Skip to content

Added possible gas estimation for participant registration#180

Open
Flash-Git wants to merge 1 commit intomakoto:masterfrom
Flash-Git:master
Open

Added possible gas estimation for participant registration#180
Flash-Git wants to merge 1 commit intomakoto:masterfrom
Flash-Git:master

Conversation

@Flash-Git
Copy link

@Flash-Git Flash-Git commented Aug 19, 2018

I haven't built the project so this addition is untested.

Code based on my own experience with web3 v1.0 and the docs.

If you are not using 1.0 then it looks to be slightly different.

v0.2
contract.myMethod.estimateGas()
https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethdefaultblock
v1.0
myContract.methods.myMethod([param1[, param2[, ...]]]).estimateGas(options[, callback])
https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html?#contract-estimategas

Hopefully this is helpful.

EDIT: To be clear, this probably isn't functional as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant