smartcontractkit / truffle-starter-kit

An example smart contract utilizing Chainlink
MIT License
264 stars 102 forks source link

Getting error while running fund-contract.js script #103

Closed maikotrindade closed 3 years ago

maikotrindade commented 3 years ago

I'm facing an error when I'm trying to execute fund-contract.js. I'm not sure if I'm using some incompatible version of Truffle or so. The deployment worked like a charm.

npx truffle exec scripts/fund-contract.js --network kovan

Error:

Funding contract: 0x1123c6967701ab4a86f7781Fa4E3091383314121
Transaction: 0x0e5447b9f367d76a0bc4c6b9683d4e8d8f7e49c28dc4aeac07ed2e11c0e80d91 exited with an error (status 0) after consuming all gas.
     Please check that the transaction:
     - satisfies all conditions set by Solidity `assert` statements.
     - has enough gas to execute the full transaction.
     - does not trigger an invalid opcode by other means (ex: accessing an array out of bounds).

#Versions
Truffle v5.3.6 (core: 5.3.6)
Node v14.16.1
Npm v6.14.12
Yarn 1.22.10
MacOS 11.2.1

This is what I see at Etherscan.

Do you have any idea what I'm doing wrong? 🐻 with me 🙂

pappas999 commented 3 years ago

Hi @maikotrindade , can you confirm that the wallet you're using has enough LINK in it to satisfy the funding of the contract? Also are you doing any kind of extra computation as part of the script, because it says that all of the gas was used.

You can try increase the gas and gas price too to see if that helps https://www.trufflesuite.com/docs/truffle/reference/configuration

maikotrindade commented 3 years ago

I appreciated your quick response. Thanks for the tips. I was running out of LINK and didn't release that until you mentioned. So everything is fine now! 🥳 Thank you once again