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
const Web3 = require("web3"); | |
const INFURA_PROJECT_ID = "<INFURA_PROJECT_ID>"; | |
const NODE_URL = `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`; | |
const web3 = new Web3(NODE_URL); | |
const ABI = [{"constant":false,"inputs":[{"name":"asset","type":"address"},{"name":"requestedPriceMantissa","type":"uint256"}],"name":"setPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"anchorAdmin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxSwingMantissa","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"_assetPrices","outputs":[{"name":"mantissa","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"requestedState","type":"bool"}],"name":"_setPaused","out |
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
const Web3 = require("web3"); | |
const INFURA_PROJECT_ID = "<SECRET>"; | |
const NODE_URL = `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`; | |
const web3 = new Web3(NODE_URL); | |
const BancorNetworkInfoABI = [ | |
{ | |
"inputs": [ | |
{ |
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
syntax = "proto3"; | |
package amm.types.v1; | |
message Token { | |
// smart contract address | |
string id = 1; | |
string name = 2; | |
string symbol = 3; | |
uint64 decimals = 4; | |
} |
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
# install nvm and npm | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash | |
# install node 16 | |
nvm install 16 | |
# use node 16 | |
nvm use 16 | |
# verify |