Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

payable is not assigned in the contructor (AbiItemModel) #2285

Closed
RussMist opened this issue Feb 1, 2019 · 0 comments · Fixed by #2292
Closed

payable is not assigned in the contructor (AbiItemModel) #2285

RussMist opened this issue Feb 1, 2019 · 0 comments · Fixed by #2292
Labels
Bug Addressing a bug In Progress Currently being worked on

Comments

@RussMist
Copy link

RussMist commented Feb 1, 2019

Expected behavior

Should be able to send transactions with value on payable contract method.

Actual behavior

Error 'Can not send value to non-payable contract method or constructor'

Steps to reproduce the behavior

const contract = new web3.eth.Contract(
      ABI,
      CONTRACT_ADDRESS,
    );
contract.methods.method(...params).estimateGas({ value, from });

Method isValueValid from MethodOptionsValidator.js tried to call abiItemModel.payable, but it doesn't have this property and then it returns undefined .
(in constructor the developer simply forgot to assign payable value to the method's property)

Error Logs

Error: 'Can not send value to non-payable contract method or constructor'

Versions

web3@1.0.0-beta.41

@nivida nivida added Bug Addressing a bug In Progress Currently being worked on labels Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Addressing a bug In Progress Currently being worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants