-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
refactor!: replace string types with force-validated pydantic types #59
base: main
Are you sure you want to change the base?
refactor!: replace string types with force-validated pydantic types #59
Conversation
…from eth_pydantic_types library (cherry picked from commit 0df69cd)
@antazoey 2 tests are broken but will be good to talk about tomorrow and get into how heavy to enforce the pydantic types |
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.
Are there tests where typing validation fails?
it's comin' along! |
if TYPE_CHECKING: | ||
from eth_pydantic_types.abi import address, bytes32, string, uint256 |
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.
Not performance critical, so might be worth doing it like this
if TYPE_CHECKING: | |
from eth_pydantic_types.abi import address, bytes32, string, uint256 | |
from eth_pydantic_types import abi |
And then below do like :
...
inner: abi.uint256
What I did
All the types used in EIP712 contracts are now using Pydantic annotated types with built-in validation
fixes: #22
Fixes: APE-1782
How I did it
This PR is being developed in coordination with an overhaul of the eth_pydantic_types library here: ApeWorX/eth-pydantic-types#11
How to verify it
Checklist