Open ewingrj opened 5 years ago
A followup on the issue of opts not being passed...
This appears to be a bug in web3@1.0.0-beta.37. If cb is undefined or null, the opts are ignored. If I set cb to an empty function, then it works correctly.
This is still an issue even after updating to web3 1.2.1 :(
Yeah, it's not that surprising since Web3 1.2 is really beta.37 😉
Bug Report
Summary
Current behavior
When accessing a contract method directly on the generated js
Contract
instance instead of theContract.methods
object, the following bugs are present:When making a call that returns a struct ex:
Contract.records(1)
, the errorTypeError: CreateListFromArrayLike called on non-object
is thrownWhen making a send, the provided options are ignored ex:
Contract.logSender({from: 0x...})
, the default account will always be used for the send.How to reproduce
Run the tests in the repo https://github.com/ewingrj/embark_bug.
First test is for the first issue, Second for the second issue.
Expected behavior
Any contract functions accessed directly via
Contract.func_name
should behave the same as if they were accessed viaContract.methods.func_name
.If you encounter an error, please create a logfile using the following command and post the output here
Please provide additional information about your system
OS: Embark Version: 4.1.0-beta.5 Node Version: NPM Version:
Sometimes issues are related to Embark's installation. Can you provide information on how Embark was installed?