Skip to content

Instantly share code, notes, and snippets.

@simon-jentzsch
Created February 5, 2020 09:25
Show Gist options
  • Save simon-jentzsch/48fd7a5e9fd59e6d3a0c00815d37d24d to your computer and use it in GitHub Desktop.
Save simon-jentzsch/48fd7a5e9fd59e6d3a0c00815d37d24d to your computer and use it in GitHub Desktop.
test in3 erc20
const In3Client = require('in3').default
// use the In3Client
const in3 = new In3Client({
proof: 'standard',
signatureCount: 1,
chainId: 'mainnet',
replaceLatestBlock: 10
})
const myTokenContract = '0xdac17f958d2ee523a2206206994597c13d831ec7'
const myAccount = '0x5754284f345afc66a98fbb0a0afe71e0f007b949'
// use the api to call a funnction..
in3.eth.callFn(myTokenContract, 'balanceOf(address):uint', myAccount).then(_=>console.log('balance:',_.toString()), console.error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment