-
Notifications
You must be signed in to change notification settings - Fork 70
Gasless Asks Extension #160
base: main
Are you sure you want to change the base?
Conversation
5e4a492
to
5bf9764
Compare
contracts/ZoraModuleManager.sol
Outdated
uint8 v; // The 129th byte and chain ID of the signature | ||
bytes32 r; // The first 64 bytes of the signature | ||
bytes32 s; // Bytes 64-128 of the signature |
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.
Should these comments instead say 65th byte, first 32 bytes, and bytes 32-64, respectively? Or am I missing another part of the signature?
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.
Lmao I honestly didn't even expect to have review permission on this.
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 think it's correct – from the EIP-712 spec:
As in eth_sign it is a hex encoded 129 byte array starting with 0x. It encodes the r, s and v parameters from appendix F of the yellow paper in big-endian format. Bytes 0…64 contain the r parameter, bytes 64…128 the s parameter and the last byte the v parameter. Note that the v parameter includes the chain id as specified in EIP-155.
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.
Ohh yea the ERC is very unclear with the terminology there. Seems it confuses bytes with hex characters in that paragraph (the appendix it references also says there are 65 bytes in a sig). Thanks for linking!
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.
Lol it also said to expect a 129 byte array as a signature but shows a 65 byte array in the example just below?? I’m gonna try and open a PR over in ethereum/EIPs
New Module Extension Proposal
Description
This extension enables signed off-chain orders to be executed on the Asks Core ETH module.
Motivation and Context
In order to support gas-free NFT platforms, we can extend our Asks module to support signed orders as listings. We can also use this extension as a mechanism to drive on-chain liquidity via incentive programs. This extension provides support for the execution, invalidation, broadcasting, and promoting of off-chain signed orders via EIP-712.
How has this been tested?
Relevant tests have been included via Foundry.
Checklist:
The module is a Hyperstructure