Created
March 7, 2019 10:21
-
-
Save AlecAivazis/f361c255b59408c3fb73893b9a400a28 to your computer and use it in GitHub Desktop.
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
// create a reference to the hub contract we created earlier | |
const hub = new web3.eth.Contract(HubABI, 'hub address from earlier') | |
// build the list of auctions | |
const auctions = [] | |
for (let i = 0; i < (await hub.methods.auctionCount().call()); i++) { | |
auctions.push(new web3.eth.Contract(AuctionABI, await hub.methods.auctions(i).call())) | |
} | |
return auctions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment