This file contains hidden or 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 source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ | |
// @version=5 | |
indicator("Auto-Pivot", overlay=true) | |
// Get user input | |
var devTooltip = "Deviation is a multiplier that affects how much the price should deviate from the previous pivot in order for the bar to become a new pivot." | |
var depthTooltip = "The minimum number of bars that will be taken into account when calculating the indicator." | |
threshold_multiplier = input.float(title="Deviation", defval=3, minval=0, tooltip=devTooltip) | |
depth = input.int(title="Depth", defval=10, minval=1, tooltip=depthTooltip) | |
reverse = input.bool(title="Reverse", defval=false, tooltip="Flips the fibonacci levels around.") |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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) |
NewerOlder