Closed snd closed 6 years ago
Just out of curiosity, what is the use case for such methods in tests? Or do you think it should be there for the completeness sake?
Just realized it would be cool for solaris
to automatically print out gas estimates for all methods as part of fn main()
probably.
Just out of curiosity, what is the use case for such methods in tests? Or do you think it should be there for the completeness sake?
good question. maybe this should be in another crate
we could split sol-rs into a testing part (~ truffle) and a utility part (~ web3 js api)
sol::wei
, estimate_gas
, etc could be in the utility part
We already have rust-web3
(over RPC) that does that for state read from database and parity-evm
for contract execution (you can run a contract and see how much gas it consumed, just a matter of adding binary chop to find the best value), I don't see how this could be useful even in utility crate.
@snd Are you OK with closing this one? I'm with @tomusdrw — we'd better focus on making the testing side of things usable, reliable and smooth right now.
closing this. i agree with @tomusdrw that this doesn't really belong in sol-rs. on top of that there are already several options to estimate gas from within rust
https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethestimategas
usage could look like this: