You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 5, 2025. It is now read-only.
When deploying using Truffle the checkForContractAddress method in Web3 keeps throwing the error "The contract code couldn't be stored..." etc. The contract code is being stored, the transaction is getting mined, but the logic in checkForContractAddress is causing it to think it failed when it hasn't.
I'm using latest Parity on Kovan.
I solved this by specifying the "Default block parameter" to pending, instead of the default latest, e.g.:
The problem is that the transaction receipt is being returned, but then the getCode call fails because the transaction hasn't been mined yet. When I add pending to getCode this piece of code works fine.
I don't know if this is specific to Kovan, or Parity, or if adding pending will cause other problems.
I can submit a pull request for this change if you want, or you can tell me things which need to be checked.
Either way - this bug is preventing me from deploying contracts with Truffle. 👿 👿 👿 It works fine with testrpc/ganache though, but only because that has instamine.
The text was updated successfully, but these errors were encountered:
This is because parity is returning receipts, even if the tx is not mined, which is different to geth. i fixed it in develop just now, please use this for now.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
https://github.com/ethereum/web3.js/blob/develop/lib/web3/contract.js#L122
When deploying using Truffle the
checkForContractAddress
method in Web3 keeps throwing the error "The contract code couldn't be stored..." etc. The contract code is being stored, the transaction is getting mined, but the logic incheckForContractAddress
is causing it to think it failed when it hasn't.I'm using latest Parity on Kovan.
I solved this by specifying the "Default block parameter" to
pending
, instead of the defaultlatest
, e.g.:The problem is that the transaction receipt is being returned, but then the
getCode
call fails because the transaction hasn't been mined yet. When I addpending
togetCode
this piece of code works fine.I don't know if this is specific to Kovan, or Parity, or if adding
pending
will cause other problems.I can submit a pull request for this change if you want, or you can tell me things which need to be checked.
Either way - this bug is preventing me from deploying contracts with Truffle. 👿 👿 👿 It works fine with testrpc/ganache though, but only because that has instamine.
The text was updated successfully, but these errors were encountered: