Skip to content

Instantly share code, notes, and snippets.

@Dan-Nolan
Created May 20, 2020 14:34
Show Gist options
  • Save Dan-Nolan/25a94e4de6de1fd126a99e32a45518be to your computer and use it in GitHub Desktop.
Save Dan-Nolan/25a94e4de6de1fd126a99e32a45518be to your computer and use it in GitHub Desktop.
Kovan Constant
const ethers = require('ethers');
const provider = ethers.getDefaultProvider('kovan');
const CONTACT_ADDR = "0xae4b4bda19d53178ebbad7737ba34beaa0107c18";
const ABI = [
{
"constant": true,
"inputs": [],
"name": "activeLength",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
]
const contract = new ethers.Contract(CONTACT_ADDR, ABI, provider);
contract.activeLength().then(console.log)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment