Maxim Andreev
Maxim Andreev
Hi! I created an R&D issue (https://github.com/cdump/evmole/issues/9) just 3 hours before your PR. I will continue researching WASM vs native library options and will extend this research to the Go...
It's trivial (at least for Solidity). I'll add this to the backlog and implement it later.
> prioritizing this After https://github.com/cdump/evmole/issues/9, it will be easier to implement new features only in 1 language. I'm on 4'th step of [TODO list](https://github.com/cdump/evmole/issues/9#issuecomment-2294823719)
Do you want to return https://docs.rs/alloy-json-abi/0.8.0/alloy_json_abi/struct.Function.html ? If yes, what about `outputs` field, which is not `Optional`, we don't have this information. Using empty Vec there may mislead the users.
I've conducted some experiments in the [state_mutability branch](https://github.com/cdump/evmole/tree/state_mutability), the main idea is [described here](https://github.com/cdump/evmole/commit/36eff45823f4590ae6dec314807e6865e89efc03#diff-00657c10745f74bedef2b4c37540af1735fb9989cf37c77ec82ef18c2bc78dffR93) (typo: it's `call_value=0` in 2.1.) Using the `largest1k` dataset, I couldn't achieve more than a 53%...
I've added normal benchmark to 'state_mutability' branch, current results: 'simple' always returns 'nonpayable' **strict cmp ('view' != 'nonpayable'):** ``` dataset largest1k (1000 contracts, 24427 functions), evmole-rs: bad: 20846 functions 85.34%...
I found a bug - we need to track reverts even inside 'skip_until_inside_function', because if all functions are not payable, then Solidity checks CALLVALUE at the beginning of the contract...
Bug was about location of this check - at the begging of the whole contract or after checking for function selector - inside function body
Now results are even better: https://github.com/cdump/evmole/tree/state_mutability?tab=readme-ov-file#function-state-mutability
Merged to the master, will make release soon