Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

refactor: extract minimal features of Contract into BaseContract #88

Merged
merged 4 commits into from
Oct 27, 2020

Conversation

pawanjay176
Copy link
Contributor

Motivation

Resolves #80

Solution

Refactors the Contract struct by extracting the abi into a BaseContract struct which does only abi encoding.
Working on adding human-readable abis.

@gakonst
Copy link
Owner

gakonst commented Oct 26, 2020

@pawanjay176 added some changes on top, also working on a human readable ABIs, will have something tomorrow

@pawanjay176
Copy link
Contributor Author

Thanks @gakonst. Also started working on the human readable abis. I'm doing plain parsing something similar to this https://gist.github.com/pawanjay176/4340020c41898cfee7d0430538cee986

The biggest issue with this approach is parsing the function/event arguments since it may contain solidity tuples. I was able to extend the above gist to handle all types of arguments, but the resulting code is incredibly ugly and doesn't handle many of the edge cases.

If you could share your approach, I can try and finish up the code for it :)

@gakonst gakonst marked this pull request as ready for review October 27, 2020 10:56
@gakonst gakonst merged commit 35e24ed into gakonst:master Oct 27, 2020
meetmangukiya pushed a commit to meetmangukiya/ethers-rs that referenced this pull request Mar 21, 2022
* fix(fuzz): own the fuzzer to avoid soundness issues

Apparently some functions would not get fuzzed in certain cases
when using the RefCell pattern

* fix(fuzz): snapshot and reset to original state before each run

* feat: expose call with serializing & without deserializing

* fix: ensure check_success works correctly

* test: add CheatCodes.sol

* test: fuzz test all fns in cheatcodes file

* chore: update sputnik to latest branch commit

* fix: make dapp runner require Clone
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor ethers-contract
2 participants