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

is there a way to use reserved keywords as a message field? [APE-706] #33

Open
iurii2002 opened this issue Mar 12, 2023 · 3 comments
Open

Comments

@iurii2002
Copy link

iurii2002 commented Mar 12, 2023

For example, I want to create a message of the following structure


class Mail(EIP712Message):
    _name_ = "Ether Mail"
    _version_ = "1"

    from: "address"
    receiver: "address"

Python does not allow me to use from here

@NotPeopling2day NotPeopling2day changed the title is there a way to use reserved keywords as a message field? is there a way to use reserved keywords as a message field? [APE-706] Mar 12, 2023
@fubuloubu
Copy link
Member

Not currently.

A way to rename members for encoding purposes is needed, hence why I wanted to pursue #22 as a solution, which would allow this (among other things)

@antazoey
Copy link
Member

Yes, if we do #22, we can use field aliases, would that work @fubuloubu ?
So this is blocked by #22

@fubuloubu
Copy link
Member

Yes, if we do #22, we can use field aliases, would that work @fubuloubu ? So this is blocked by #22

Yes, that is the only solution I can think of currently. Note that resolving #22 is likely a breaking change, and there were several other issues with it which is why I took it out of v0.2.0 release

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

No branches or pull requests

3 participants