Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
_blockDiff() {
local_hex=$(curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}' 0.0.0.0:8545 | jq -r '.result')
local=$(echo "ibase=16; ${local_hex^^}" | bc)
remote_hex=$(curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}' https://mainnet.infura.io/v3/[INSERT_KEY] | jq -r '.result')
remote=$(echo "ibase=16; ${remote_hex^^}" | bc)
diff=$(($remote-$local))
@andr11111
andr11111 / 8base.yml
Created January 29, 2019 18:16
8base.yml example
functions:
resolverExample:
handler:
code: src/resolverFunc.ts
type: resolver
schema: src/resolverFunc.graphql
triggerBefore:
handler:
code: src/triggerBefore.ts
contract BlockSigmaBase is StandardToken {
/**
* @dev Constructor
* @param _underlyingTokenAddress address of the underlying ERC20 token.
* @param _currencyTokenAddress address of the currency ERC20 token.
* @param _strike option strike denominated in the currency token.
* @param _exp expiration timestamp.
* @param _minReserve minimum (excess) reserve
* @param _underlyingBancorConverter address of the Bancor converter contract that converts underlying token into BNT.
#!/bin/bash
POST_INIT_SYNC_DELAY=60
POLL_DELAY=60
STALL_THRESHOLD=5
BTCCTL='docker exec btcd btcctl --rpcuser=YOUR_USER --rpcpass=YOUR_PASS --rpccert=/rpc/rpc.cert '
stalls=0
echo "Starting watcher..."
while true; do