1
vote
Accepted
Create/set "subId" by createSubscription() and get "subId" vrfCoordinatorV2_5Mock calling by javascript in hardhat environment
Instead of events, it should be the logs array, inside the createSubIdReceipt object.
So, replace this line:
subscriptionId = createSubIdReceipt.events[0].args.subId
with:
subscriptionId = ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
javascript × 1446web3js × 520
solidity × 494
ethers.js × 196
truffle × 143
nodejs × 127
metamask × 110
hardhat × 108
go-ethereum × 107
blockchain × 89
ethereumjs × 70
contract-development × 60
transactions × 56
react × 54
dapps × 52
contract-deployment × 44
events × 43
testing × 43
uniswap × 42
remix × 39
dapp-development × 39
ether × 34
contract-invocation × 33
ganache × 29
wallets × 26