-
Notifications
You must be signed in to change notification settings - Fork 21
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
pypechain: code reuse with format_code and write_code #861
pypechain: code reuse with format_code and write_code #861
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a great idea, love that we can do this so easily!
e587993
to
a087ece
Compare
rebased 🙌 |
please run this on the code first to make sure the codegen isn't garbled before you merge |
changes on ERC20Contract.py from main to this PR are all style changes from black, and removing some trailing commas: 1c1
< #pylint: disable=invalid-name
---
> # pylint: disable=invalid-name
4d3
<
17a17
>
28a29
>
39a41
>
48c50
< def __call__(self, ) -> "ERC20DecimalsContractFunction":
---
> def __call__(self) -> "ERC20DecimalsContractFunction":
50a53
>
59c62,64
< def __call__(self, spender: str, subtractedValue: int) -> "ERC20DecreaseAllowanceContractFunction":
---
> def __call__(
> self, spender: str, subtractedValue: int
> ) -> "ERC20DecreaseAllowanceContractFunction":
61a67
>
70c76,78
< def __call__(self, spender: str, addedValue: int) -> "ERC20IncreaseAllowanceContractFunction":
---
> def __call__(
> self, spender: str, addedValue: int
> ) -> "ERC20IncreaseAllowanceContractFunction":
72a81
>
81c90
< def __call__(self, ) -> "ERC20NameContractFunction":
---
> def __call__(self) -> "ERC20NameContractFunction":
83a93
>
92c102
< def __call__(self, ) -> "ERC20SymbolContractFunction":
---
> def __call__(self) -> "ERC20SymbolContractFunction":
94a105
>
103c114
< def __call__(self, ) -> "ERC20TotalSupplyContractFunction":
---
> def __call__(self) -> "ERC20TotalSupplyContractFunction":
105a117
>
116a129
>
125c138,140
< def __call__(self, _from: str, to: str, amount: int) -> "ERC20TransferFromContractFunction":
---
> def __call__(
> self, _from: str, to: str, amount: int
> ) -> "ERC20TransferFromContractFunction":
127a143
>
132,133d147
<
<
138d151
<
140d152
<
142d153
<
144d154
<
146d155
<
148d156
<
150d157
<
152d158
<
154d159
<
156d160
<
167,168c171,175
< self.address = address if address else cast(ChecksumAddress, "0x0000000000000000000000000000000000000000")
<
---
> self.address = (
> address
> if address
> else cast(ChecksumAddress, "0x0000000000000000000000000000000000000000")
> )
172d178
<
178,179c184
<
< functions: ERC20ContractFunctions
\ No newline at end of file
---
> functions: ERC20ContractFunctions |
No description provided.