Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create MVP Pypechain lib #840

Merged
merged 6 commits into from
Aug 18, 2023
Merged

Create MVP Pypechain lib #840

merged 6 commits into from
Aug 18, 2023

Conversation

sentilesdal
Copy link
Contributor

Creates a simple Pypechain library that generates custom web3.py Contract classes for a given abi. For example, ERC20.json will create an ERC20Contract.py file that contains a custom ERC20Contract class along with classes for every public function the contract has. Each function has the signature typed which will allow tools like VSCode to enable features like autocomplete when using the functions. Next steps:

Testing

  • add unit tests for utilites
  • add basic test for template outputs from run_pypechain.py

Add Events

  • add ContractEvent classes for all events in an ABI.

Add Structs

  • add NamedTuple types for all internalTypes that can be found in an ABI. This will allow us to have types for things like PoolConfig and PoolInfo based off the actual source of the struct.

Nice to haves

  • Add file splitting for template output, group functions, events, structs into their own files.
  • Add bash script or some installable package so that pypechain can be run from the console for any package.

@vercel
Copy link

vercel bot commented Aug 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
elf-simulations ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 18, 2023 11:33pm

Copy link
Member

@dpaiton dpaiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some minor comments but overall this is awesome! Can't wait to start using it :)

@sentilesdal sentilesdal merged commit 01d9f8a into main Aug 18, 2023
4 checks passed
@sentilesdal sentilesdal deleted the matt-pypechain branch August 18, 2023 23:40
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.

2 participants