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 time | |
import requests as r | |
import matplotlib.pyplot as plt | |
# number of data points (+- 1 data point/sec) | |
period = 100 | |
# marketId(s) | |
idex_pair, radar_pair = 'ETH_ZRX', 'ZRX-WETH' | |
idex_api = 'https://api.idex.market/returnTicker' |
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 matplotlib.pyplot as plt | |
import numpy as np | |
import math | |
## Define functions and set domain | |
x = np.arange(1, 2.0, .01) | |
y = x**2 -1 | |
z = np.log(x) | |
i = x*z | |
j = x -1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
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
{"time": [1545422267.6052659, 1545422269.4957619, 1545422270.469002, 1545422271.4398975, 1545422272.4109225, 1545422273.3798273, 1545422274.3479774, 1545422275.3110235, 1545422276.2727327, 1545422277.2384531, 1545422278.2009916, 1545422279.161564, 1545422280.1253865, 1545422281.1490555, 1545422282.1241975, 1545422283.0934203, 1545422284.0659976, 1545422285.0293655, 1545422286.0726593, 1545422287.134177, 1545422288.0984619, 1545422289.113013, 1545422290.1109424, 1545422291.193251, 1545422292.1596334, 1545422293.1282427, 1545422294.0896368, 1545422295.049812, 1545422296.0777402, 1545422297.0531185, 1545422298.0317602, 1545422298.9892073, 1545422299.9564652, 1545422300.9360473, 1545422301.8958302, 1545422302.8714283, 1545422303.838503, 1545422304.8033242, 1545422305.7691946, 1545422306.7333825, 1545422307.6960747, 1545422308.6804762, 1545422309.6363482, 1545422310.6080627, 1545422311.59466, 1545422312.5751548, 1545422313.5459666, 1545422314.5055177, 1545422315.4572759, 1545422316.4308088, 1545422317.3947704, 154 |
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 { keccak256 as solidityKeccak256 } from "@ethersproject/solidity"; | |
import BN from "bn.js"; | |
export const getConditionId = (oracle: string, questionId: string, outcomeSlotCount: number): string => | |
solidityKeccak256(["address", "bytes32", "uint256"], [oracle, questionId, outcomeSlotCount]); | |
const altBN128P = new BN("21888242871839275222246405745257275088696311157297823662689037894645226208583"); | |
const altBN128PRed = BN.red(altBN128P); | |
const altBN128B = new BN(3).toRed(altBN128PRed); | |
const zeroPRed = new BN(0).toRed(altBN128PRed); |
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
from web3 import Web3 | |
from web3.constants import MAX_INT | |
from web3.middleware import geth_poa_middleware | |
rpc_url = "" # Polygon rpc url | |
priv_key = "" # Polygon account private key (needs some MATIC) | |
pub_key = "" # Polygon account public key corresponding to private key | |
chain_id = 137 |
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
from web3 import Web3 | |
import os | |
from dotenv import load_dotenv | |
load_dotenv() | |
pk = os.getenv('PRIVATE_KEY') | |
rpc = os.getenv('RPC_URL') | |
wallet_address = os.getenv('WALLET_ADDRESS') | |
new_wallet_address = os.getenv('NEW_WALLET_ADDRESS') |