Created
May 20, 2020 14:34
-
-
Save Dan-Nolan/25a94e4de6de1fd126a99e32a45518be to your computer and use it in GitHub Desktop.
Kovan Constant
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 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