This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2116 from 0xProject/feat/3.0/eip1271-selectors
Add 4 byte ids to `EIP1271Wallet.isValidSignature` data
- Loading branch information
Showing
13 changed files
with
99 additions
and
569 deletions.
There are no files selected for viewing
115 changes: 0 additions & 115 deletions
115
contracts/exchange/contracts/examples/ExchangeWrapper.sol
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
contracts/exchange/contracts/src/interfaces/IEIP1271Data.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
Copyright 2019 ZeroEx Intl. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
pragma solidity ^0.5.9; | ||
pragma experimental ABIEncoderV2; | ||
|
||
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol"; | ||
import "@0x/contracts-exchange-libs/contracts/src/LibZeroExTransaction.sol"; | ||
|
||
|
||
// solhint-disable | ||
contract IEIP1271Data { | ||
|
||
/// @dev This function's selector is used when ABI encoding the order | ||
/// and hash into a byte array before calling `isValidSignature`. | ||
/// This function serves no other purpose. | ||
function OrderWithHash( | ||
LibOrder.Order calldata order, | ||
bytes32 orderHash | ||
) | ||
external | ||
pure; | ||
|
||
/// @dev This function's selector is used when ABI encoding the transaction | ||
/// and hash into a byte array before calling `isValidSignature`. | ||
/// This function serves no other purpose. | ||
function ZeroExTransactionWithHash( | ||
LibZeroExTransaction.ZeroExTransaction calldata transaction, | ||
bytes32 transactionHash | ||
) | ||
external | ||
pure; | ||
} |
Oops, something went wrong.