-
Notifications
You must be signed in to change notification settings - Fork 78
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
BIP-X: Tractor (+ Junctions) #727
Conversation
…eld-and-housekeeping
Status
|
…eanstalk into tractor-generalized
…Beanstalk into tractor-generalized
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.
review I
BLUEPRINT_TYPE_HASH, | ||
blueprint.publisher, | ||
keccak256(blueprint.data), | ||
keccak256(abi.encodePacked(blueprint.operatorPasteInstrs)), |
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.
is there a reason that this uses abi.encodePacked vs the regular abi.encode?
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.
great question
it's an inline way for adhering to the eip712 spec
the correct way to pack a list of objects in eip712 is to
- encode each object
- concatenate all encoded data
- hash the concatenation
here each object is a bytes32 so it is already 'encoded', so the encodePacked directly concatenates them all without extraneous bytes. then they are hashed.
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.
Tractor
Tractor is a system to give a third party operator permission to perform any Beanstalk action on behalf of the publisher.