Error Transaction Failed when calling EndLottery function which uses ChainLink Oracle to get random number #2332
Unanswered
myhendry
asked this question in
Troubleshooting
Replies: 1 comment 1 reply
-
That's a typical error when a transaction fails in a network that's not Hardhat Network. We can't help you, as this is not a problem with Hardhat, but with your contract. You can dry-run your tx before sending it using ethers' |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I am trying to do a lottery contract using hardhat and chainlink
Issues
I get this cryptic error message without any specific error message. below is a portion of the long error. i wonder if anyone has encounter this error before and point me in the direction to go toward resolving this error
The error occur when I call the endLottery() function. The other functions before this work fine on rinkeby network. I have a separate test using mocks and it is working fine hence I believe my solidity code should be fine. I have reproduced the solidity codes below just in case. I have also funded the smart contract with Link tokens in order to use the Chainlink oracle
const LinkToken = new ethers.Contract(link_token, abi, signer); tx = await LinkToken.transfer(lottery.address, 1000000000000000);
appreciate if someone can help advise on this. Thanks
Error Message
Error: transaction failed (transactionHash="0xbc55f0d34681e8b90d03cfc47316f7c2986247c62fa3560786121973e2d0522f", transaction={"hash":"0xbc55f0d34681e8b90d03cfc47316f7c298624... "logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0x53ef0d29ddca38a90c22f30c7f418d55acfef
Test
Lottery.sol
Beta Was this translation helpful? Give feedback.
All reactions