Open jvinet opened 2 years ago
Same problem here. How about changing to
structs = [domain, self]
in that line?
I have the same error when I used .to_message()
on Arrays
and when I use .signable_bytes(domain)
I get:
AttributeError: 'bytes' object has no attribute 'version'
Same error. Any workaround found ?
This project appears to be dormant. I used a custom solution instead: https://github.com/jvinet/eip712
Perhaps it can work for you, too.
This is fixed in my branch at https://github.com/ViciNFT/py-eip712-structs. The answer posted by @numpde is part of the solution, and there were a few other changes required.
Array
should pass variables of type tuple.Like this:
byte_array = tuple([os.urandom(32) for _ in range(4)])
Test code:
This code will raise: