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
{ | |
"baseFeePerGas": [ | |
"62.650148578", | |
"70.478486669", | |
"63.272705965", | |
"60.246530708", | |
"54.687396556", | |
"61.521746299", | |
"61.960612188", | |
"57.953057957", |
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
{ | |
"baseFeePerGas": [ | |
"95.821948086", | |
"89.808929316", | |
"80.073395246", | |
"90.068784709", | |
"79.765000507", | |
"85.574346111", | |
"84.32630557", | |
"90.154808568", |
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
[4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 18, 19, 20, 25, 26, 27, 28, 32, 34, 35, 36, 37, 38, 39, 40, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56] | |
0x2c02b28f612dd57a30e5b64894329fefe6dbf338 |
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
// IMPORTS | |
const { ethers } = require('ethers') | |
const swapABI = require('./swapABI.json') | |
// UTIL FUNCTIONS | |
const swapContractAddresses = { | |
"1": "0x4572f2554421bd64bef1c22c8a81840e8d496bea", | |
"4": "0x2e7373d70732e0f37f4166d8fd9dbc89dd5bc476", | |
"5": "0x18c90516a38dd7b779a8f6c19fa698f0f4efc7fc", | |
"42": "0x79fb4604f2d7bd558cda0dfadb7d61d98b28ca9f" |
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 { trackSwapSwap } from 'airswap.js/src/swap/eventListeners' | |
import { SWAP_CONTRACT_DEPLOY_BLOCK } from 'airswap.js/src/constants' | |
const trackOrderFilled = (nonce, signerWallet, callback) => trackSwapSwap({ | |
nonce, | |
signerWallet, | |
fromBlock: SWAP_CONTRACT_DEPLOY_BLOCK, | |
callback: (event) => { | |
console.log('swap filled') | |
callback(event) |
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": "Gastoken.io", | |
"symbol": "GST2", | |
"decimals": "2", | |
"address": "0x0000000000b3f879cb30fe243b4dfee438691c04" | |
}, | |
{ | |
"name": "TrueUSD", | |
"symbol": "TUSD", |
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
const _ = require('lodash') | |
const whitelist = require('assets/blockchains/ethereum/whitelist.json').map(address => address.toLowerCase()) | |
const { getERC20Name, getERC20Decimals, getERC20Symbol } = require('airswap.js/src/erc20/contractFunctions') | |
const fs = require('fs') | |
// package.json | |
// | |
// { | |
// "name": "token-crawl", | |
// "version": "1.0.0", |
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": "ButtCoin v2.0", | |
"symbol": "0xBUTT", | |
"decimals": "8", | |
"address": "0x5556d6a283fd18d71fd0c8b50d1211c5f842dbbc" | |
}, | |
{ | |
"name": "ButtCoin", | |
"symbol": "0xBUTT", |
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
const swapEvents = require('airswap.js/src/swap/eventListeners.js') | |
const signerWaller = // ADDRESS OF MAKER | |
swapEvents.trackSwapSwap({ | |
signerWaller, | |
callback: events => console.log(`got Swap events for signerWallet ${signerWallet}`, events) | |
}) | |
swapEvents.trackSwapCancel({ |
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
const ws = require("nodejs-websocket") | |
const options = { extraHeaders: { Authorization: 'Basic ' + Buffer.from('892bf962872d4f84b779fa893e138f7b').toString('base64') } } | |
const conn = ws.connect('wss://mainnet.infura.io/ws/v3/1fa032434d904e018fbbc138d3f6cb3c', options, () => { | |
console.log( 'we are connected now') | |
conn.on("text", function (str) { | |
console.log("Received "+str) | |
}) | |
conn.sendText('{"jsonrpc":"2.0","method":"eth_newBlockFilter","params":[],"id":1}') | |
}) |
NewerOlder