Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes us compatible with contract object from the latest web3 version.
Otherwise, the
.to
of the generated transaction objects will beundefined
, leading to "invalid opcode" errors when submitting to the blockchain.But this newer web3.js version breaks tests! Something feels very buggy about the
sendTransaction
in latest web3.js. I think we need to manually add a.chainId
to the transaction object, and after that it looks like we just run into web3/web3.js#2661.I have confirmed that, just making the change in this commit, Bridge (which wants to use latest web3) works fine. Without it, it can't move past
beta.33
.@jtobin would you say it's inadvisable to do a
contract.address = (contract.address || contract._address)
during contract initialization for now? I think that would allow us to stay compatible with both older and newer web3 versions, letting us keep tests atbeta.33
?