Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Uniswap/relayer
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongeric committed Nov 15, 2023
2 parents 6e5dff3 + 8650444 commit c787121
Show file tree
Hide file tree
Showing 72 changed files with 30 additions and 7,371 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
264847
264776
Original file line number Diff line number Diff line change
@@ -1 +1 @@
312312
312241
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
[submodule "lib/UniswapX"]
path = lib/UniswapX
url = https://github.com/Uniswap/UniswapX
branch = main
1 change: 0 additions & 1 deletion lib/UniswapX
Submodule UniswapX deleted from 7c5e35
1 change: 1 addition & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ solmate/=lib/solmate/
erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/
openzeppelin/=lib/openzeppelin-contracts/contracts/
universal-router/=lib/universal-router/
UniswapX/=lib/UniswapX/
40 changes: 0 additions & 40 deletions script/DeployDutch.s.sol

This file was deleted.

39 changes: 0 additions & 39 deletions script/DeployExclusiveDutch.s.sol

This file was deleted.

27 changes: 0 additions & 27 deletions script/DeploySwapRouter02Executor.s.sol

This file was deleted.

111 changes: 0 additions & 111 deletions src/base/ProtocolFees.sol

This file was deleted.

54 changes: 1 addition & 53 deletions src/base/ReactorStructs.sol
Original file line number Diff line number Diff line change
@@ -1,37 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;

import {IReactor} from "../interfaces/IReactor.sol";
import {IValidationCallback} from "../interfaces/IValidationCallback.sol";
import {ERC20} from "solmate/src/tokens/ERC20.sol";

/// @dev generic order information
/// should be included as the first field in any concrete order types
struct OrderInfo {
// The address of the reactor that this order is targeting
// Note that this must be included in every order so the swapper
// signature commits to the specific reactor that they trust to fill their order properly
IReactor reactor;
// The address of the user which created the order
// Note that this must be included so that order hashes are unique by swapper
address swapper;
// The nonce of the order, allowing for signature replay protection and cancellation
uint256 nonce;
// The timestamp after which this order is no longer valid
uint256 deadline;
// Custom validation contract
IValidationCallback additionalValidationContract;
// Encoded validation params for additionalValidationContract
bytes additionalValidationData;
}

/// @dev tokens that need to be sent from the swapper in order to satisfy an order
struct InputToken {
ERC20 token;
uint256 amount;
// Needed for dutch decaying inputs
uint256 maxAmount;
}
import {OrderInfo, OutputToken} from "UniswapX/src/base/ReactorStructs.sol";

/// @dev tokens that need to be sent from the swapper in order to satisfy an order
struct InputTokenWithRecipient {
Expand All @@ -42,13 +13,6 @@ struct InputTokenWithRecipient {
address recipient;
}

/// @dev tokens that need to be received by the recipient in order to satisfy an order
struct OutputToken {
address token;
uint256 amount;
address recipient;
}

struct ResolvedRelayOrder {
OrderInfo info;
bytes[] actions;
Expand All @@ -57,19 +21,3 @@ struct ResolvedRelayOrder {
bytes sig;
bytes32 hash;
}

/// @dev generic concrete order that specifies exact tokens which need to be sent and received
struct ResolvedOrder {
OrderInfo info;
InputToken input;
OutputToken[] outputs;
bytes sig;
bytes32 hash;
}

/// @dev external struct including a generic encoded order and swapper signature
/// The order bytes will be parsed and mapped to a ResolvedOrder in the concrete reactor contract
struct SignedOrder {
bytes order;
bytes sig;
}
31 changes: 0 additions & 31 deletions src/external/ISwapRouter02.sol

This file was deleted.

12 changes: 0 additions & 12 deletions src/interfaces/IProtocolFeeController.sol

This file was deleted.

25 changes: 0 additions & 25 deletions src/interfaces/IReactor.sol

This file was deleted.

Loading

0 comments on commit c787121

Please sign in to comment.