-
Notifications
You must be signed in to change notification settings - Fork 175
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
Fix wrong domain separator for contract versions below 1.3.0 #422
Conversation
Pull Request Test Coverage Report for Build 3900620694
💛 - Coveralls |
gnosis/safe/safe.py
Outdated
self.ethereum_client.get_chain_id(), | ||
self.address, | ||
], | ||
version = self.contract.functions.VERSION().call() |
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.
I am following the implementation of domain_separator
which is computed instead of calling the contract.
I'm not sure why, but maybe this was implemented at this way to avoid asking the blockchain one more time.
If this were the reason, then this implementation should be changed to create a @cached_property
of the contract version or perhaps call domain_separator
directly to the blockchain instead of requesting the version once more.
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.
I'd say that the library was just assuming 1.3.0 for the domain separator. Therefore, it wouldn't perform any RPC calls given that assumption.
gnosis/safe/safe.py
Outdated
self.ethereum_client.get_chain_id(), | ||
self.address, | ||
], | ||
version = self.contract.functions.VERSION().call() |
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.
I'd say that the library was just assuming 1.3.0 for the domain separator. Therefore, it wouldn't perform any RPC calls given that assumption.
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.
🚀 🚀 🚀
Closes #421
domainSeparator
calculation for contract version 1.1.1