web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

submit work doc

Open jdevcs opened this issue 3 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

What would you like to say about Web3.js' documentation?

Example for submit work has error, its not array: https://web3js.readthedocs.io/en/v1.7.4/web3-eth.html#id114

Using array as its param : Error: Invalid number of parameters for "submitWork". Got 1 expected 3!

Examples/References

No response

jdevcs avatar Jul 04 '22 15:07 jdevcs

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar Sep 04 '22 00:09 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar Nov 06 '22 00:11 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar Jan 07 '23 00:01 github-actions[bot]

The same situation if you try to invoke the contract method.

args = ['1','1','1']
contract.methods['methodName'](args)

Result

web3.min.js:22 Uncaught Error: Invalid number of parameters for <methodName>. Got 1 expected 3!
    at Object.InvalidNumberOfParams (web3.min.js:22:368881)
    at y._createTxObject (web3.min.js:22:227981)
    at <anonymous>:1:24

But if call method like this:

contract.methods['methodName'](arg1, arg2, arg3)

Everything works.

But in docs: myContract.methods.myMethod([param1[, param2[, ...]]]).send(options[, callback]) Link to docs: https://web3js.readthedocs.io/en/v1.7.4/web3-eth-contract.html

totgard avatar Jan 29 '23 21:01 totgard