ApeWorX / eip712

Message classes for typed structured data hashing and signing in Ethereum
Apache License 2.0
42 stars 19 forks source link

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

Open iurii2002 opened 1 year ago

iurii2002 commented 1 year ago

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

fubuloubu commented 1 year ago

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 commented 1 year ago

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

fubuloubu commented 1 year ago

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