You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for two new order signature types to orders:
EIP1271Wallet
EIP1271OrderWallet.
Respectively, these new signature are analagous to OrderValidator (proposed in #33) and the Wallet signature type introduced in 2.0. However, their callbacks implement the EIP-1271 standard, which takes an arbitrary bytes payload for the data that is signed.
Motivation
EIP-1271 provides a more flexible way for wallets to validate arbitrary data (not just Orders). A wallet implementing this standard could use the same callback/function to parse different types of data and validate signatures based on some context.
Summary
Add support for two new order signature types to orders:
EIP1271Wallet
EIP1271OrderWallet
.Respectively, these new signature are analagous to
OrderValidator
(proposed in #33) and theWallet
signature type introduced in2.0
. However, their callbacks implement the EIP-1271 standard, which takes an arbitrarybytes
payload for the data that is signed.Motivation
EIP-1271 provides a more flexible way for wallets to validate arbitrary data (not just
Orders
). A wallet implementing this standard could use the same callback/function to parse different types of data and validate signatures based on some context.Status
Branch:
3.0
Specification
Restrictions
staticcall()
. If the contract attempts to update state during call, the validation will fail.Encoding of
data
EIP1271Wallet
data
is simply the 32-byte hash placed in abytes
array.EIP1271OrderWallet
data
is the abi-encodedOrder
. E.g,abi.encode(order)
.The callback contract
In both cases, the callback contract is determined by the order maker.
Implementation
Contracts validating the
EIP1271Wallet
andEIP1271OrderWallet
signature types must expose anisValidSignature
function with the following signature:Example
Here is a trivial implementation of
EIP1271OrderWallet
:The text was updated successfully, but these errors were encountered: