Fetch election calls with web3
If you want to connect to the AP Election results in JavaScript using web3, learn how here.
Last updated
Was this helpful?
If you want to connect to the AP Election results in JavaScript using web3, learn how here.
Last updated
Was this helpful?
. This shows how to connect to both mainnet and Kovan testnet using web3.
Begin by installing web3
2. Instantiate a web3 provider
3. Connect to the contract (the "abi" variable below is a JavaScript array. Find and the )
// Mainnet
// Kovan
4. Fetch the election results!
// Mainnet
// Kovan
5. Make use of your verified election data!
You may find this screenshot from Remix easier to understand. This is example data returned for the state "TEST" in production.
6. Still having issues?
Learn more about Chainlink Oracles at
Tweet to and any engineering questions (or send a DM on Twitter to )