This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "elementalBrian", | |
"website": "https://elementalblockchain.co", | |
"description": "Accelerating Web3", | |
"logo": "https://static.wixstatic.com/media/693f48_d8347e5783874776848adf1206bab61c%7Emv2.jpg/v1/fit/w_2500,h_1330,al_c/693f48_d8347e5783874776848adf1206bab61c%7Emv2.png", | |
"twitter": "https://x.com/elementalblockchain" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.0; | |
/** | |
* Version of ERC20 with no return values for `transfer` and `transferFrom | |
* https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca | |
*/ | |
interface IERC20NonStandard { | |
function transfer(address to, uint256 value) external; | |
function approve(address spender, uint256 value) external; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am elementalblockchain on github. | |
* I am elementalbrian (https://keybase.io/elementalbrian) on keybase. | |
* I have a public key ASBt0OXee99jSkoXrM0lxR_tQfZ_ckszf2OCnt-DcgWjnAo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.6.6; | |
/** | |
* @dev Collection of functions related to the address type | |
*/ | |
library Address { | |
/** | |
* @dev Returns true if `account` is a contract. | |
* | |
* [IMPORTANT] | |
* ==== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this uses the uniswap smart contract to find the exchange rate on uniswap from one token to another | |
import requests, logging, json, os, time, sys | |
from web3 import Web3 | |
inputToken = "dai" | |
outputToken = "usdc" | |
inputAmount = 100 | |
tokens = json.load(open('abi/kyber_currencies.json', 'r'))["data"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this uses the uniswap smart contract to find the exchange rate on uniswap from one token to another | |
import requests, logging, json, os, time, sys | |
from web3 import Web3 | |
inputToken = "dai" | |
outputToken = "usdc" | |
inputAmount = 100 | |
tokens = json.load(open('abi/kyber_currencies.json', 'r'))["data"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this uses the uniswap smart contract to find the exchange rate on uniswap from one token to another | |
import requests, logging, json, os, time, sys | |
from web3 import Web3 | |
inputToken = sys.argv[1] | |
outputToken = sys.argv[2] | |
inputAmount = sys.argv[3] | |
tokens = json.load(open('abi/kyber_currencies.json', 'r'))["data"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this uses the uniswap smart contract to find the exchange rate on uniswap from one token to another | |
import requests, logging, json, os, time, sys | |
from web3 import Web3 | |
inputToken = sys.argv[1] | |
outputToken = sys.argv[2] | |
inputAmount = sys.argv[3] | |
tokens = json.load(open('abi/kyber_currencies.json', 'r'))["data"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this uses the uniswap smart contract to find the exchange rate on uniswap from one token to another | |
import requests, logging, json, os, time, sys | |
from web3 import Web3 | |
tokens = json.load(open('abi/kyber_currencies.json', 'r'))["data"] | |
tokenarray = {} | |
for i in tokens: tokenarray[i["symbol"].lower()] = (Web3.toChecksumAddress(i["address"]), i["decimals"]) | |
#print(tokenarray) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "./Ownable.sol"; | |
pragma solidity 0.5.12; | |
contract Destroyable is Ownable { | |
function destroy() public onlyOwner { | |
address payable receiver = msg.sender; | |
selfdestruct(receiver); | |
} | |
} |
NewerOlder