-
Having tested everything as working fine locally using Ganache, I then went on to test on the Rinkeby test network via Infura (from 4h23m2s https://youtu.be/M576WGiDBdQ?t=15782) The problem is every time I've run the deploy.py script I get some kind of exception, apart from once, and on this occasion the amount stored via the 'store' function call didn't work, and the returned value was zero (this was returning as 15 locally). Some of the exceptions I've been getting:
Can anyone please clarify why these exceptions and incorrect function call returns might be happening? UPDATE: Interestingly, earlier on in the video Patrick added a ‘returns (uint256)’, and ‘return favoriteNumber’ to the SimpleStorage.sol contract. I removed these (as per the version in github), and deploy.py ran as expected for the first time. Subsequent runs started rendering similar timeout errors though, and also came back with a new error:
Any help gratefully received... |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 21 replies
-
Hello @semsion I will try to solve your question: Could not decode contract function call to retrieve with return data: b'', output_types: ['uint256']: Make sure the function function retrieve() public view returns (uint256){
return favoriteNumber;
} Also in the function store(uint256 _favoriteNumber) public {
favoriteNumber = _favoriteNumber;
} ValueError: {'code': -32000, 'message': 'replacement transaction underpriced'} First of all make sure you have enough ETH on your Rinkeby wallet, you can get it from the new faucet provided by chainlink: https://faucets.chain.link/rinkeby Well the problem occurs because web3 thinks you want to replace an existing uncompleted transaction and it could be solved in different ways. Easiest one: just delete the compiled_code.json and compile again.
Increase the gas price: this one is more complex to do and is not worth. web3.exceptions.TimeExhausted: Transaction HexBytes('0x9c052b9c907e9540ef064a074a1c61a625dae69e888b58ca9b609b799f8a0fee') is not in the chain, after 120 seconds this is related to the last problem, as the transaction is never completed the default timeout raises the exception. |
Beta Was this translation helpful? Give feedback.
-
It seems the retrieve() function has to have an additional bool return value I fixed it by updating the function as followed:
The boolean returns false as the function itself is not TransactionReceipt. |
Beta Was this translation helpful? Give feedback.
-
Got a "ValueError: replacement transaction underpriced" error when running the integration test |
Beta Was this translation helpful? Give feedback.
Hello @semsion I will try to solve your question:
Could not decode contract function call to retrieve with return data: b'', output_types: ['uint256']:
Make sure the function
retrieve
on yourSimpleStorage.sol
has a return valueuint256
:Also in the
store
function:ValueError: {'code': -32000, 'message': 'replacement transaction underpriced'}
First of all make sure you have enough ETH on your Rinkeby wallet, you can get it from the new faucet provided by chainlink: https://faucets.chain.link/rinkeby
Well the pr…