Source Code
Overview
S Balance
S Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 3922838 | 374 days ago | Contract Creation | 0 S |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
LiquidityHub
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.x;
import {IMulticall3} from "forge-std/interfaces/IMulticall3.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IReactor} from "uniswapx/src/interfaces/IReactor.sol";
import {IReactorCallback} from "uniswapx/src/interfaces/IReactorCallback.sol";
import {IValidationCallback} from "uniswapx/src/interfaces/IValidationCallback.sol";
import {ResolvedOrder, SignedOrder} from "uniswapx/src/base/ReactorStructs.sol";
import {ExclusiveDutchOrder} from "uniswapx/src/lib/ExclusiveDutchOrderLib.sol";
import {Consts} from "./Consts.sol";
/**
* LiquidityHub Executor
*/
contract LiquidityHub is IReactorCallback, IValidationCallback {
using SafeERC20 for IERC20;
error InvalidSender(address sender);
error InvalidOrder();
event Resolved(
bytes32 indexed orderHash,
address indexed swapper,
address indexed ref,
address inToken,
address outToken,
uint256 inAmount,
uint256 outAmount
);
event ExtraOut(address indexed recipient, address token, uint256 amount);
event Surplus(address indexed ref, address swapper, address token, uint256 amount, uint256 refshare);
uint8 public constant VERSION = 6;
address public constant INVALID_ADDRESS = address(1);
IReactor public immutable reactor;
IAllowed public immutable allowed;
constructor(IReactor _reactor, IAllowed _allowed) {
reactor = _reactor;
allowed = _allowed;
}
modifier onlyAllowed() {
if (!allowed.allowed(msg.sender)) revert InvalidSender(msg.sender);
_;
}
modifier onlyReactor() {
if (msg.sender != address(reactor)) revert InvalidSender(msg.sender);
_;
}
/**
* Entry point
*/
function execute(SignedOrder calldata order, IMulticall3.Call[] calldata calls, uint256 outAmountSwapper)
external
onlyAllowed
{
reactor.executeWithCallback(order, abi.encode(calls, outAmountSwapper));
ExclusiveDutchOrder memory o = abi.decode(order.order, (ExclusiveDutchOrder));
(address ref, uint8 share) = abi.decode(o.info.additionalValidationData, (address, uint8));
_surplus(ref, o.info.swapper, address(o.input.token), share);
for (uint256 i = 0; i < o.outputs.length; i++) {
_surplus(ref, o.info.swapper, address(o.outputs[i].token), share);
}
}
/**
* @dev IReactorCallback
*/
function reactorCallback(ResolvedOrder[] memory orders, bytes memory callbackData) external override onlyReactor {
ResolvedOrder memory order = orders[0];
(IMulticall3.Call[] memory calls, uint256 outAmountSwapper) =
abi.decode(callbackData, (IMulticall3.Call[], uint256));
_executeMulticall(calls);
(address outToken, uint256 outAmount) = _handleOrderOutputs(order);
if (outAmountSwapper > outAmount) _transfer(outToken, order.info.swapper, outAmountSwapper - outAmount);
address ref = abi.decode(order.info.additionalValidationData, (address));
emit Resolved(
order.hash, order.info.swapper, ref, address(order.input.token), outToken, order.input.amount, outAmount
);
}
function _executeMulticall(IMulticall3.Call[] memory calls) private {
Address.functionDelegateCall(
Consts.MULTICALL_ADDRESS, abi.encodeWithSelector(IMulticall3.aggregate.selector, calls)
);
}
function _handleOrderOutputs(ResolvedOrder memory order) private returns (address outToken, uint256 outAmount) {
outToken = INVALID_ADDRESS;
for (uint256 i = 0; i < order.outputs.length; i++) {
uint256 amount = order.outputs[i].amount;
if (amount > 0) {
address token = address(order.outputs[i].token);
_outputReactor(token, amount);
if (order.outputs[i].recipient == order.info.swapper) {
if (outToken != INVALID_ADDRESS && outToken != token) revert InvalidOrder();
outToken = token;
outAmount += amount;
} else {
emit ExtraOut(order.outputs[i].recipient, token, amount);
}
}
}
}
function _surplus(address ref, address swapper, address token, uint8 share) private {
uint256 balance = _balanceOf(token, address(this));
if (balance == 0) return;
uint256 refshare = (ref != address(0)) ? balance * share / 100 : 0;
if (refshare > 0) _transfer(token, ref, refshare);
_transfer(token, swapper, balance - refshare);
emit Surplus(ref, swapper, token, balance, refshare);
}
function _outputReactor(address token, uint256 amount) private {
if (token == address(0)) {
Address.sendValue(payable(address(reactor)), amount);
} else {
uint256 allowance = IERC20(token).allowance(address(this), address(reactor));
IERC20(token).safeApprove(address(reactor), 0);
IERC20(token).safeApprove(address(reactor), allowance + amount);
}
}
function _transfer(address token, address to, uint256 amount) private {
if (token == address(0)) Address.sendValue(payable(to), amount);
else IERC20(token).safeTransfer(to, amount);
}
function _balanceOf(address token, address who) private view returns (uint256) {
return (token == address(0)) ? who.balance : IERC20(token).balanceOf(who);
}
/**
* @dev IValidationCallback
*/
function validate(address filler, ResolvedOrder calldata) external view override {
if (filler != address(this)) revert InvalidSender(filler);
}
receive() external payable {
// accept ETH
}
}
interface IAllowed {
function allowed(address) external view returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.9.0;
pragma experimental ABIEncoderV2;
interface IMulticall3 {
struct Call {
address target;
bytes callData;
}
struct Call3 {
address target;
bool allowFailure;
bytes callData;
}
struct Call3Value {
address target;
bool allowFailure;
uint256 value;
bytes callData;
}
struct Result {
bool success;
bytes returnData;
}
function aggregate(Call[] calldata calls)
external
payable
returns (uint256 blockNumber, bytes[] memory returnData);
function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData);
function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData);
function blockAndAggregate(Call[] calldata calls)
external
payable
returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);
function getBasefee() external view returns (uint256 basefee);
function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);
function getBlockNumber() external view returns (uint256 blockNumber);
function getChainId() external view returns (uint256 chainid);
function getCurrentBlockCoinbase() external view returns (address coinbase);
function getCurrentBlockDifficulty() external view returns (uint256 difficulty);
function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);
function getCurrentBlockTimestamp() external view returns (uint256 timestamp);
function getEthBalance(address addr) external view returns (uint256 balance);
function getLastBlockHash() external view returns (bytes32 blockHash);
function tryAggregate(bool requireSuccess, Call[] calldata calls)
external
payable
returns (Result[] memory returnData);
function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls)
external
payable
returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;
import {ResolvedOrder, SignedOrder} from "../base/ReactorStructs.sol";
import {IReactorCallback} from "./IReactorCallback.sol";
/// @notice Interface for order execution reactors
interface IReactor {
/// @notice Execute a single order
/// @param order The order definition and valid signature to execute
function execute(SignedOrder calldata order) external payable;
/// @notice Execute a single order using the given callback data
/// @param order The order definition and valid signature to execute
function executeWithCallback(SignedOrder calldata order, bytes calldata callbackData) external payable;
/// @notice Execute the given orders at once
/// @param orders The order definitions and valid signatures to execute
function executeBatch(SignedOrder[] calldata orders) external payable;
/// @notice Execute the given orders at once using a callback with the given callback data
/// @param orders The order definitions and valid signatures to execute
/// @param callbackData The callbackData to pass to the callback
function executeBatchWithCallback(SignedOrder[] calldata orders, bytes calldata callbackData) external payable;
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;
import {ResolvedOrder} from "../base/ReactorStructs.sol";
/// @notice Callback for executing orders through a reactor.
interface IReactorCallback {
/// @notice Called by the reactor during the execution of an order
/// @param resolvedOrders Has inputs and outputs
/// @param callbackData The callbackData specified for an order execution
/// @dev Must have approved each token and amount in outputs to the msg.sender
function reactorCallback(ResolvedOrder[] memory resolvedOrders, bytes memory callbackData) external;
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;
import {OrderInfo, ResolvedOrder} from "../base/ReactorStructs.sol";
/// @notice Callback to validate an order
interface IValidationCallback {
/// @notice Called by the reactor for custom validation of an order. Will revert if validation fails
/// @param filler The filler of the order
/// @param resolvedOrder The resolved order to fill
function validate(address filler, ResolvedOrder calldata resolvedOrder) external view;
}// 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;
}
/// @dev tokens that need to be received by the recipient in order to satisfy an order
struct OutputToken {
address token;
uint256 amount;
address recipient;
}
/// @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;
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;
import {OrderInfo} from "../base/ReactorStructs.sol";
import {DutchOutput, DutchInput, DutchOrderLib} from "./DutchOrderLib.sol";
import {OrderInfoLib} from "./OrderInfoLib.sol";
struct ExclusiveDutchOrder {
// generic order information
OrderInfo info;
// The time at which the DutchOutputs start decaying
uint256 decayStartTime;
// The time at which price becomes static
uint256 decayEndTime;
// The address who has exclusive rights to the order until decayStartTime
address exclusiveFiller;
// The amount in bps that a non-exclusive filler needs to improve the outputs by to be able to fill the order
uint256 exclusivityOverrideBps;
// The tokens that the swapper will provide when settling the order
DutchInput input;
// The tokens that must be received to satisfy the order
DutchOutput[] outputs;
}
/// @notice helpers for handling dutch order objects
library ExclusiveDutchOrderLib {
using DutchOrderLib for DutchOutput[];
using OrderInfoLib for OrderInfo;
bytes internal constant EXCLUSIVE_DUTCH_LIMIT_ORDER_TYPE = abi.encodePacked(
"ExclusiveDutchOrder(",
"OrderInfo info,",
"uint256 decayStartTime,",
"uint256 decayEndTime,",
"address exclusiveFiller,",
"uint256 exclusivityOverrideBps,",
"address inputToken,",
"uint256 inputStartAmount,",
"uint256 inputEndAmount,",
"DutchOutput[] outputs)"
);
bytes internal constant ORDER_TYPE = abi.encodePacked(
EXCLUSIVE_DUTCH_LIMIT_ORDER_TYPE, DutchOrderLib.DUTCH_OUTPUT_TYPE, OrderInfoLib.ORDER_INFO_TYPE
);
bytes32 internal constant ORDER_TYPE_HASH = keccak256(ORDER_TYPE);
/// @dev Note that sub-structs have to be defined in alphabetical order in the EIP-712 spec
string internal constant PERMIT2_ORDER_TYPE = string(
abi.encodePacked(
"ExclusiveDutchOrder witness)",
DutchOrderLib.DUTCH_OUTPUT_TYPE,
EXCLUSIVE_DUTCH_LIMIT_ORDER_TYPE,
OrderInfoLib.ORDER_INFO_TYPE,
DutchOrderLib.TOKEN_PERMISSIONS_TYPE
)
);
/// @notice hash the given order
/// @param order the order to hash
/// @return the eip-712 order hash
function hash(ExclusiveDutchOrder memory order) internal pure returns (bytes32) {
return keccak256(
abi.encode(
ORDER_TYPE_HASH,
order.info.hash(),
order.decayStartTime,
order.decayEndTime,
order.exclusiveFiller,
order.exclusivityOverrideBps,
order.input.token,
order.input.startAmount,
order.input.endAmount,
order.outputs.hash()
)
);
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.x;
library Consts {
address public constant MULTICALL_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11;
address public constant PERMIT2_ADDRESS = 0x000000000022D473030F116dDEE9F6B43aC78BA3;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
/*//////////////////////////////////////////////////////////////
METADATA STORAGE
//////////////////////////////////////////////////////////////*/
string public name;
string public symbol;
uint8 public immutable decimals;
/*//////////////////////////////////////////////////////////////
ERC20 STORAGE
//////////////////////////////////////////////////////////////*/
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
/*//////////////////////////////////////////////////////////////
EIP-2612 STORAGE
//////////////////////////////////////////////////////////////*/
uint256 internal immutable INITIAL_CHAIN_ID;
bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;
mapping(address => uint256) public nonces;
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(
string memory _name,
string memory _symbol,
uint8 _decimals
) {
name = _name;
symbol = _symbol;
decimals = _decimals;
INITIAL_CHAIN_ID = block.chainid;
INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
}
/*//////////////////////////////////////////////////////////////
ERC20 LOGIC
//////////////////////////////////////////////////////////////*/
function approve(address spender, uint256 amount) public virtual returns (bool) {
allowance[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
function transfer(address to, uint256 amount) public virtual returns (bool) {
balanceOf[msg.sender] -= amount;
// Cannot overflow because the sum of all user
// balances can't exceed the max uint256 value.
unchecked {
balanceOf[to] += amount;
}
emit Transfer(msg.sender, to, amount);
return true;
}
function transferFrom(
address from,
address to,
uint256 amount
) public virtual returns (bool) {
uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.
if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;
balanceOf[from] -= amount;
// Cannot overflow because the sum of all user
// balances can't exceed the max uint256 value.
unchecked {
balanceOf[to] += amount;
}
emit Transfer(from, to, amount);
return true;
}
/*//////////////////////////////////////////////////////////////
EIP-2612 LOGIC
//////////////////////////////////////////////////////////////*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual {
require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");
// Unchecked because the only math done is incrementing
// the owner's nonce which cannot realistically overflow.
unchecked {
address recoveredAddress = ecrecover(
keccak256(
abi.encodePacked(
"\x19\x01",
DOMAIN_SEPARATOR(),
keccak256(
abi.encode(
keccak256(
"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
),
owner,
spender,
value,
nonces[owner]++,
deadline
)
)
)
),
v,
r,
s
);
require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");
allowance[recoveredAddress][spender] = value;
}
emit Approval(owner, spender, value);
}
function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
}
function computeDomainSeparator() internal view virtual returns (bytes32) {
return
keccak256(
abi.encode(
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
keccak256(bytes(name)),
keccak256("1"),
block.chainid,
address(this)
)
);
}
/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function _mint(address to, uint256 amount) internal virtual {
totalSupply += amount;
// Cannot overflow because the sum of all user
// balances can't exceed the max uint256 value.
unchecked {
balanceOf[to] += amount;
}
emit Transfer(address(0), to, amount);
}
function _burn(address from, uint256 amount) internal virtual {
balanceOf[from] -= amount;
// Cannot underflow because a user's balance
// will never be larger than the total supply.
unchecked {
totalSupply -= amount;
}
emit Transfer(from, address(0), amount);
}
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;
import {OrderInfo} from "../base/ReactorStructs.sol";
import {OrderInfoLib} from "./OrderInfoLib.sol";
import {ERC20} from "solmate/src/tokens/ERC20.sol";
/// @dev An amount of output tokens that decreases linearly over time
struct DutchOutput {
// The ERC20 token address (or native ETH address)
address token;
// The amount of tokens at the start of the time period
uint256 startAmount;
// The amount of tokens at the end of the time period
uint256 endAmount;
// The address who must receive the tokens to satisfy the order
address recipient;
}
/// @dev An amount of input tokens that increases linearly over time
struct DutchInput {
// The ERC20 token address
ERC20 token;
// The amount of tokens at the start of the time period
uint256 startAmount;
// The amount of tokens at the end of the time period
uint256 endAmount;
}
struct DutchOrder {
// generic order information
OrderInfo info;
// The time at which the DutchOutputs start decaying
uint256 decayStartTime;
// The time at which price becomes static
uint256 decayEndTime;
// The tokens that the swapper will provide when settling the order
DutchInput input;
// The tokens that must be received to satisfy the order
DutchOutput[] outputs;
}
/// @notice helpers for handling dutch order objects
library DutchOrderLib {
using OrderInfoLib for OrderInfo;
bytes internal constant DUTCH_OUTPUT_TYPE =
"DutchOutput(address token,uint256 startAmount,uint256 endAmount,address recipient)";
bytes32 internal constant DUTCH_OUTPUT_TYPE_HASH = keccak256(DUTCH_OUTPUT_TYPE);
bytes internal constant DUTCH_LIMIT_ORDER_TYPE = abi.encodePacked(
"DutchOrder(",
"OrderInfo info,",
"uint256 decayStartTime,",
"uint256 decayEndTime,",
"address inputToken,",
"uint256 inputStartAmount,",
"uint256 inputEndAmount,",
"DutchOutput[] outputs)"
);
/// @dev Note that sub-structs have to be defined in alphabetical order in the EIP-712 spec
bytes internal constant ORDER_TYPE =
abi.encodePacked(DUTCH_LIMIT_ORDER_TYPE, DUTCH_OUTPUT_TYPE, OrderInfoLib.ORDER_INFO_TYPE);
bytes32 internal constant ORDER_TYPE_HASH = keccak256(ORDER_TYPE);
string internal constant TOKEN_PERMISSIONS_TYPE = "TokenPermissions(address token,uint256 amount)";
string internal constant PERMIT2_ORDER_TYPE =
string(abi.encodePacked("DutchOrder witness)", ORDER_TYPE, TOKEN_PERMISSIONS_TYPE));
/// @notice hash the given output
/// @param output the output to hash
/// @return the eip-712 output hash
function hash(DutchOutput memory output) internal pure returns (bytes32) {
return keccak256(
abi.encode(DUTCH_OUTPUT_TYPE_HASH, output.token, output.startAmount, output.endAmount, output.recipient)
);
}
/// @notice hash the given outputs
/// @param outputs the outputs to hash
/// @return the eip-712 outputs hash
function hash(DutchOutput[] memory outputs) internal pure returns (bytes32) {
unchecked {
bytes memory packedHashes = new bytes(32 * outputs.length);
for (uint256 i = 0; i < outputs.length; i++) {
bytes32 outputHash = hash(outputs[i]);
assembly {
mstore(add(add(packedHashes, 0x20), mul(i, 0x20)), outputHash)
}
}
return keccak256(packedHashes);
}
}
/// @notice hash the given order
/// @param order the order to hash
/// @return the eip-712 order hash
function hash(DutchOrder memory order) internal pure returns (bytes32) {
return keccak256(
abi.encode(
ORDER_TYPE_HASH,
order.info.hash(),
order.decayStartTime,
order.decayEndTime,
order.input.token,
order.input.startAmount,
order.input.endAmount,
hash(order.outputs)
)
);
}
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;
import {OrderInfo} from "../base/ReactorStructs.sol";
/// @notice helpers for handling OrderInfo objects
library OrderInfoLib {
bytes internal constant ORDER_INFO_TYPE =
"OrderInfo(address reactor,address swapper,uint256 nonce,uint256 deadline,address additionalValidationContract,bytes additionalValidationData)";
bytes32 internal constant ORDER_INFO_TYPE_HASH = keccak256(ORDER_INFO_TYPE);
/// @notice hash an OrderInfo object
/// @param info The OrderInfo object to hash
function hash(OrderInfo memory info) internal pure returns (bytes32) {
return keccak256(
abi.encode(
ORDER_INFO_TYPE_HASH,
info.reactor,
info.swapper,
info.nonce,
info.deadline,
info.additionalValidationContract,
keccak256(info.additionalValidationData)
)
);
}
}{
"remappings": [
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
"uniswapx/=lib/UniswapX/",
"solmate/=lib/solmate/",
"UniswapX/=lib/UniswapX/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-gas-snapshot/=lib/UniswapX/lib/forge-gas-snapshot/src/",
"openzeppelin/=lib/openzeppelin-contracts/contracts/",
"permit2/=lib/UniswapX/lib/permit2/"
],
"optimizer": {
"enabled": true,
"runs": 1000000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IReactor","name":"_reactor","type":"address"},{"internalType":"contract IAllowed","name":"_allowed","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidOrder","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"InvalidSender","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ExtraOut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"swapper","type":"address"},{"indexed":true,"internalType":"address","name":"ref","type":"address"},{"indexed":false,"internalType":"address","name":"inToken","type":"address"},{"indexed":false,"internalType":"address","name":"outToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"inAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"outAmount","type":"uint256"}],"name":"Resolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"ref","type":"address"},{"indexed":false,"internalType":"address","name":"swapper","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"refshare","type":"uint256"}],"name":"Surplus","type":"event"},{"inputs":[],"name":"INVALID_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowed","outputs":[{"internalType":"contract IAllowed","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"order","type":"bytes"},{"internalType":"bytes","name":"sig","type":"bytes"}],"internalType":"struct SignedOrder","name":"order","type":"tuple"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct IMulticall3.Call[]","name":"calls","type":"tuple[]"},{"internalType":"uint256","name":"outAmountSwapper","type":"uint256"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reactor","outputs":[{"internalType":"contract IReactor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"contract IReactor","name":"reactor","type":"address"},{"internalType":"address","name":"swapper","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"contract IValidationCallback","name":"additionalValidationContract","type":"address"},{"internalType":"bytes","name":"additionalValidationData","type":"bytes"}],"internalType":"struct OrderInfo","name":"info","type":"tuple"},{"components":[{"internalType":"contract ERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"internalType":"struct InputToken","name":"input","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct OutputToken[]","name":"outputs","type":"tuple[]"},{"internalType":"bytes","name":"sig","type":"bytes"},{"internalType":"bytes32","name":"hash","type":"bytes32"}],"internalType":"struct ResolvedOrder[]","name":"orders","type":"tuple[]"},{"internalType":"bytes","name":"callbackData","type":"bytes"}],"name":"reactorCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"filler","type":"address"},{"components":[{"components":[{"internalType":"contract IReactor","name":"reactor","type":"address"},{"internalType":"address","name":"swapper","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"contract IValidationCallback","name":"additionalValidationContract","type":"address"},{"internalType":"bytes","name":"additionalValidationData","type":"bytes"}],"internalType":"struct OrderInfo","name":"info","type":"tuple"},{"components":[{"internalType":"contract ERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"internalType":"struct InputToken","name":"input","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct OutputToken[]","name":"outputs","type":"tuple[]"},{"internalType":"bytes","name":"sig","type":"bytes"},{"internalType":"bytes32","name":"hash","type":"bytes32"}],"internalType":"struct ResolvedOrder","name":"","type":"tuple"}],"name":"validate","outputs":[],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60c06040523480156200001157600080fd5b50604051620023eb380380620023eb833981016040819052620000349162000065565b6001600160a01b039182166080521660a052620000a4565b6001600160a01b03811681146200006257600080fd5b50565b600080604083850312156200007957600080fd5b825162000086816200004c565b602084015190925062000099816200004c565b809150509250929050565b60805160a0516122f1620000fa60003960008181609201526101de0152600081816101670152818161029d0152818161042101528181610b1d01528181610b8501528181610c1a0152610c4501526122f16000f3fe6080604052600436106100745760003560e01c80635963709b1161004e5780635963709b146101205780636e84ba2b14610135578063ab57265014610155578063ffa1ad741461018957600080fd5b806319e1fca414610080578063489f9902146100de578063585da6281461010057600080fd5b3661007b57005b600080fd5b34801561008c57600080fd5b506100b47f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046113e4565b6101b0565b005b34801561010c57600080fd5b506100fe61011b366004611859565b610409565b34801561012c57600080fd5b506100b4600181565b34801561014157600080fd5b506100fe6101503660046119e6565b610598565b34801561016157600080fd5b506100b47f000000000000000000000000000000000000000000000000000000000000000081565b34801561019557600080fd5b5061019e600681565b60405160ff90911681526020016100d5565b6040517fd63a8e110000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063d63a8e1190602401602060405180830381865afa15801561023a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025e9190611a3d565b61029b576040517f4c14f64c0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16630d335884858585856040516020016102ed93929190611b1a565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401610319929190611c7a565b600060405180830381600087803b15801561033357600080fd5b505af1158015610347573d6000803e3d6000fd5b506000925061035a915086905080611d02565b8101906103679190611e17565b9050600080826000015160a001518060200190518101906103889190611eeb565b915091506103a8828460000151602001518560a001516000015184610603565b60005b8360c00151518110156103ff576103ed838560000151602001518660c0015184815181106103db576103db611f20565b60200260200101516000015185610603565b806103f781611f7e565b9150506103ab565b5050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461047a576040517f4c14f64c000000000000000000000000000000000000000000000000000000008152336004820152602401610292565b60008260008151811061048f5761048f611f20565b60200260200101519050600080838060200190518101906104b09190611fb6565b915091506104bd826106eb565b6000806104c98561079e565b91509150808311156104f0578451602001516104f09083906104eb848761210f565b6109b8565b6000856000015160a0015180602001905181019061050e9190612122565b86516020908101516080808a0151838b01518051908501516040805173ffffffffffffffffffffffffffffffffffffffff93841681528b8416978101979097528601526060850188905294955085851694909216927f848cc5ed1484f306a3369f20f8d5c1c291e44ddd16dd5f14c106effc790dc11f910160405180910390a45050505050505050565b73ffffffffffffffffffffffffffffffffffffffff821630146105ff576040517f4c14f64c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610292565b5050565b600061060f8330610a03565b90508060000361061f57506106e5565b600073ffffffffffffffffffffffffffffffffffffffff861661064357600061065c565b606461065260ff85168461213f565b61065c9190612156565b9050801561066f5761066f8487836109b8565b61067e84866104eb848661210f565b6040805173ffffffffffffffffffffffffffffffffffffffff8781168252868116602083015291810184905260608101839052908716907fdcbeb523eb476416bee3486d82b37ae932021e9e9822c32c1ae986f97d2685df9060800160405180910390a250505b50505050565b6105ff73ca11bde05977b3631167028862be2a173976ca1163252dba4260e01b8360405160240161071c9190612191565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610ad8565b60016000805b8360400151518110156109b2576000846040015182815181106107c9576107c9611f20565b6020026020010151602001519050600081111561099f576000856040015183815181106107f8576107f8611f20565b60200260200101516000015190506108108183610afd565b85600001516020015173ffffffffffffffffffffffffffffffffffffffff168660400151848151811061084557610845611f20565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff160361090a5773ffffffffffffffffffffffffffffffffffffffff85166001148015906108bf57508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b156108f6576040517faf61069300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9350836109038285612239565b935061099d565b8560400151838151811061092057610920611f20565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff167fccfa7da1b610c73a66316e176cd35aadc378051b68b1c29ded1b2d36418728ed828460405161099492919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b60405180910390a25b505b50806109aa81611f7e565b9150506107a4565b50915091565b73ffffffffffffffffffffffffffffffffffffffff83166109e2576109dd8282610c8c565b505050565b6109dd73ffffffffffffffffffffffffffffffffffffffff84168383610de6565b600073ffffffffffffffffffffffffffffffffffffffff831615610ab6576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301528416906370a0823190602401602060405180830381865afa158015610a8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab1919061224c565b610acf565b8173ffffffffffffffffffffffffffffffffffffffff16315b90505b92915050565b6060610acf838360405180606001604052806027815260200161229560279139610eba565b73ffffffffffffffffffffffffffffffffffffffff8216610b42576105ff7f000000000000000000000000000000000000000000000000000000000000000082610c8c565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660248301526000919084169063dd62ed3e90604401602060405180830381865afa158015610bd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfc919061224c565b9050610c4073ffffffffffffffffffffffffffffffffffffffff84167f00000000000000000000000000000000000000000000000000000000000000006000610f3f565b6109dd7f0000000000000000000000000000000000000000000000000000000000000000610c6e8484612239565b73ffffffffffffffffffffffffffffffffffffffff86169190610f3f565b80471015610cf6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610292565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610d50576040519150601f19603f3d011682016040523d82523d6000602084013e610d55565b606091505b50509050806109dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610292565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109dd9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526110c1565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051610ee49190612265565b600060405180830381855af49150503d8060008114610f1f576040519150601f19603f3d011682016040523d82523d6000602084013e610f24565b606091505b5091509150610f35868383876111d0565b9695505050505050565b801580610fdf57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610fb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdd919061224c565b155b61106b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610292565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109dd9084907f095ea7b30000000000000000000000000000000000000000000000000000000090606401610e38565b6000611123826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166112789092919063ffffffff16565b90508051600014806111445750808060200190518101906111449190611a3d565b6109dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610292565b6060831561126657825160000361125f5773ffffffffffffffffffffffffffffffffffffffff85163b61125f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610292565b5081611270565b6112708383611287565b949350505050565b606061127084846000856112cb565b8151156112975781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102929190612281565b60608247101561135d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610292565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516113869190612265565b60006040518083038185875af1925050503d80600081146113c3576040519150601f19603f3d011682016040523d82523d6000602084013e6113c8565b606091505b50915091506113d9878383876111d0565b979650505050505050565b600080600080606085870312156113fa57600080fd5b843567ffffffffffffffff8082111561141257600080fd5b908601906040828903121561142657600080fd5b9094506020860135908082111561143c57600080fd5b818701915087601f83011261145057600080fd5b81358181111561145f57600080fd5b8860208260051b850101111561147457600080fd5b95986020929092019750949560400135945092505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156114de576114de61148c565b60405290565b60405160a0810167ffffffffffffffff811182821017156114de576114de61148c565b6040516080810167ffffffffffffffff811182821017156114de576114de61148c565b60405160e0810167ffffffffffffffff811182821017156114de576114de61148c565b6040805190810167ffffffffffffffff811182821017156114de576114de61148c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156115b7576115b761148c565b604052919050565b600067ffffffffffffffff8211156115d9576115d961148c565b5060051b60200190565b73ffffffffffffffffffffffffffffffffffffffff8116811461160557600080fd5b50565b8035611613816115e3565b919050565b600067ffffffffffffffff8211156116325761163261148c565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261166f57600080fd5b813561168261167d82611618565b611570565b81815284602083860101111561169757600080fd5b816020850160208301376000918101602001919091529392505050565b600060c082840312156116c657600080fd5b60405160c0810167ffffffffffffffff82821081831117156116ea576116ea61148c565b81604052829350843591506116fe826115e3565b908252602084013590611710826115e3565b81602084015260408501356040840152606085013560608401526080850135915061173a826115e3565b81608084015260a085013591508082111561175457600080fd5b506117618582860161165e565b60a0830152505092915050565b60006060828403121561178057600080fd5b6117886114bb565b90508135611795816115e3565b80825250602082013560208201526040820135604082015292915050565b600082601f8301126117c457600080fd5b813560206117d461167d836115bf565b828152606092830285018201928282019190878511156117f357600080fd5b8387015b8581101561184c5781818a03121561180f5760008081fd5b6118176114bb565b8135611822816115e3565b8152818601358682015260408083013561183b816115e3565b9082015284529284019281016117f7565b5090979650505050505050565b6000806040838503121561186c57600080fd5b823567ffffffffffffffff8082111561188457600080fd5b818501915085601f83011261189857600080fd5b813560206118a861167d836115bf565b82815260059290921b840181019181810190898411156118c757600080fd5b8286015b848110156119b8578035868111156118e35760008081fd5b870160e0818d037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018113156119195760008081fd5b6119216114e4565b86830135898111156119335760008081fd5b6119418f89838701016116b4565b8252506119518e6040850161176e565b8782015260a0830135898111156119685760008081fd5b6119768f89838701016117b3565b60408301525060c08301358981111561198f5760008081fd5b61199d8f898387010161165e565b606083015250910135608082015283529183019183016118cb565b50965050860135925050808211156119cf57600080fd5b506119dc8582860161165e565b9150509250929050565b600080604083850312156119f957600080fd5b8235611a04816115e3565b9150602083013567ffffffffffffffff811115611a2057600080fd5b830160e08186031215611a3257600080fd5b809150509250929050565b600060208284031215611a4f57600080fd5b81518015158114611a5f57600080fd5b9392505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611a9b57600080fd5b830160208101925035905067ffffffffffffffff811115611abb57600080fd5b803603821315611aca57600080fd5b9250929050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60408082528181018490526000906060600586901b840181019084018784805b89811015611bf6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa088860301845282357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18c3603018112611b9a578283fd5b8b018035611ba7816115e3565b73ffffffffffffffffffffffffffffffffffffffff1686526020611bcd82820183611a66565b92508882890152611be18989018483611ad1565b97505094850194939093019250600101611b3a565b5050505060209390930193909352509392505050565b60005b83811015611c27578181015183820152602001611c0f565b50506000910152565b60008151808452611c48816020860160208601611c0c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b604081526000611c8a8485611a66565b604080850152611c9e608085018284611ad1565b915050611cae6020860186611a66565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0858403016060860152611ce3838284611ad1565b925050508281036020840152611cf98185611c30565b95945050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611d3757600080fd5b83018035915067ffffffffffffffff821115611d5257600080fd5b602001915036819003821315611aca57600080fd5b600082601f830112611d7857600080fd5b81356020611d8861167d836115bf565b82815260079290921b84018101918181019086841115611da757600080fd5b8286015b84811015611e0c5760808189031215611dc45760008081fd5b611dcc611507565b8135611dd7816115e3565b8152818501358582015260408083013590820152606080830135611dfa816115e3565b90820152835291830191608001611dab565b509695505050505050565b600060208284031215611e2957600080fd5b813567ffffffffffffffff80821115611e4157600080fd5b908301906101208286031215611e5657600080fd5b611e5e61152a565b823582811115611e6d57600080fd5b611e79878286016116b4565b8252506020830135602082015260408301356040820152611e9c60608401611608565b606082015260808301356080820152611eb88660a0850161176e565b60a082015261010083013582811115611ed057600080fd5b611edc87828601611d67565b60c08301525095945050505050565b60008060408385031215611efe57600080fd5b8251611f09816115e3565b602084015190925060ff81168114611a3257600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611faf57611faf611f4f565b5060010190565b6000806040808486031215611fca57600080fd5b835167ffffffffffffffff80821115611fe257600080fd5b818601915086601f830112611ff657600080fd5b8151602061200661167d836115bf565b82815260059290921b8401810191818101908a84111561202557600080fd5b8286015b848110156120fb578051868111156120415760008081fd5b8701808d037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018913156120755760008081fd5b61207d61154d565b8582015161208a816115e3565b8152818a01518881111561209e5760008081fd5b8083019250508d603f8301126120b45760008081fd5b858201516120c461167d82611618565b8181528f8c8386010111156120d95760008081fd5b6120e8828983018e8701611c0c565b8288015250845250918301918301612029565b509890910151979997985050505050505050565b81810381811115610ad257610ad2611f4f565b60006020828403121561213457600080fd5b8151611a5f816115e3565b8082028115828204841417610ad257610ad2611f4f565b60008261218c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561222b578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805173ffffffffffffffffffffffffffffffffffffffff16845287015187840187905261221887850182611c30565b95880195935050908601906001016121b8565b509098975050505050505050565b80820180821115610ad257610ad2611f4f565b60006020828403121561225e57600080fd5b5051919050565b60008251612277818460208701611c0c565b9190910192915050565b602081526000610acf6020830184611c3056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122002b1a9237ec859b48a4b914b165b9a062696aa305c06c4645c0727ecc472983264736f6c6343000813003300000000000000000000000035db01d1425685789dcc9228d47c7a5c049388d8000000000000000000000000000066320a467de62b1548f46465abbb82662331
Deployed Bytecode
0x6080604052600436106100745760003560e01c80635963709b1161004e5780635963709b146101205780636e84ba2b14610135578063ab57265014610155578063ffa1ad741461018957600080fd5b806319e1fca414610080578063489f9902146100de578063585da6281461010057600080fd5b3661007b57005b600080fd5b34801561008c57600080fd5b506100b47f000000000000000000000000000066320a467de62b1548f46465abbb8266233181565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046113e4565b6101b0565b005b34801561010c57600080fd5b506100fe61011b366004611859565b610409565b34801561012c57600080fd5b506100b4600181565b34801561014157600080fd5b506100fe6101503660046119e6565b610598565b34801561016157600080fd5b506100b47f00000000000000000000000035db01d1425685789dcc9228d47c7a5c049388d881565b34801561019557600080fd5b5061019e600681565b60405160ff90911681526020016100d5565b6040517fd63a8e110000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000000066320a467de62b1548f46465abbb8266233173ffffffffffffffffffffffffffffffffffffffff169063d63a8e1190602401602060405180830381865afa15801561023a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025e9190611a3d565b61029b576040517f4c14f64c0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b7f00000000000000000000000035db01d1425685789dcc9228d47c7a5c049388d873ffffffffffffffffffffffffffffffffffffffff16630d335884858585856040516020016102ed93929190611b1a565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401610319929190611c7a565b600060405180830381600087803b15801561033357600080fd5b505af1158015610347573d6000803e3d6000fd5b506000925061035a915086905080611d02565b8101906103679190611e17565b9050600080826000015160a001518060200190518101906103889190611eeb565b915091506103a8828460000151602001518560a001516000015184610603565b60005b8360c00151518110156103ff576103ed838560000151602001518660c0015184815181106103db576103db611f20565b60200260200101516000015185610603565b806103f781611f7e565b9150506103ab565b5050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000035db01d1425685789dcc9228d47c7a5c049388d8161461047a576040517f4c14f64c000000000000000000000000000000000000000000000000000000008152336004820152602401610292565b60008260008151811061048f5761048f611f20565b60200260200101519050600080838060200190518101906104b09190611fb6565b915091506104bd826106eb565b6000806104c98561079e565b91509150808311156104f0578451602001516104f09083906104eb848761210f565b6109b8565b6000856000015160a0015180602001905181019061050e9190612122565b86516020908101516080808a0151838b01518051908501516040805173ffffffffffffffffffffffffffffffffffffffff93841681528b8416978101979097528601526060850188905294955085851694909216927f848cc5ed1484f306a3369f20f8d5c1c291e44ddd16dd5f14c106effc790dc11f910160405180910390a45050505050505050565b73ffffffffffffffffffffffffffffffffffffffff821630146105ff576040517f4c14f64c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610292565b5050565b600061060f8330610a03565b90508060000361061f57506106e5565b600073ffffffffffffffffffffffffffffffffffffffff861661064357600061065c565b606461065260ff85168461213f565b61065c9190612156565b9050801561066f5761066f8487836109b8565b61067e84866104eb848661210f565b6040805173ffffffffffffffffffffffffffffffffffffffff8781168252868116602083015291810184905260608101839052908716907fdcbeb523eb476416bee3486d82b37ae932021e9e9822c32c1ae986f97d2685df9060800160405180910390a250505b50505050565b6105ff73ca11bde05977b3631167028862be2a173976ca1163252dba4260e01b8360405160240161071c9190612191565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610ad8565b60016000805b8360400151518110156109b2576000846040015182815181106107c9576107c9611f20565b6020026020010151602001519050600081111561099f576000856040015183815181106107f8576107f8611f20565b60200260200101516000015190506108108183610afd565b85600001516020015173ffffffffffffffffffffffffffffffffffffffff168660400151848151811061084557610845611f20565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff160361090a5773ffffffffffffffffffffffffffffffffffffffff85166001148015906108bf57508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b156108f6576040517faf61069300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9350836109038285612239565b935061099d565b8560400151838151811061092057610920611f20565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff167fccfa7da1b610c73a66316e176cd35aadc378051b68b1c29ded1b2d36418728ed828460405161099492919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b60405180910390a25b505b50806109aa81611f7e565b9150506107a4565b50915091565b73ffffffffffffffffffffffffffffffffffffffff83166109e2576109dd8282610c8c565b505050565b6109dd73ffffffffffffffffffffffffffffffffffffffff84168383610de6565b600073ffffffffffffffffffffffffffffffffffffffff831615610ab6576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301528416906370a0823190602401602060405180830381865afa158015610a8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab1919061224c565b610acf565b8173ffffffffffffffffffffffffffffffffffffffff16315b90505b92915050565b6060610acf838360405180606001604052806027815260200161229560279139610eba565b73ffffffffffffffffffffffffffffffffffffffff8216610b42576105ff7f00000000000000000000000035db01d1425685789dcc9228d47c7a5c049388d882610c8c565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000035db01d1425685789dcc9228d47c7a5c049388d8811660248301526000919084169063dd62ed3e90604401602060405180830381865afa158015610bd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfc919061224c565b9050610c4073ffffffffffffffffffffffffffffffffffffffff84167f00000000000000000000000035db01d1425685789dcc9228d47c7a5c049388d86000610f3f565b6109dd7f00000000000000000000000035db01d1425685789dcc9228d47c7a5c049388d8610c6e8484612239565b73ffffffffffffffffffffffffffffffffffffffff86169190610f3f565b80471015610cf6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610292565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610d50576040519150601f19603f3d011682016040523d82523d6000602084013e610d55565b606091505b50509050806109dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610292565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109dd9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526110c1565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051610ee49190612265565b600060405180830381855af49150503d8060008114610f1f576040519150601f19603f3d011682016040523d82523d6000602084013e610f24565b606091505b5091509150610f35868383876111d0565b9695505050505050565b801580610fdf57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610fb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdd919061224c565b155b61106b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610292565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109dd9084907f095ea7b30000000000000000000000000000000000000000000000000000000090606401610e38565b6000611123826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166112789092919063ffffffff16565b90508051600014806111445750808060200190518101906111449190611a3d565b6109dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610292565b6060831561126657825160000361125f5773ffffffffffffffffffffffffffffffffffffffff85163b61125f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610292565b5081611270565b6112708383611287565b949350505050565b606061127084846000856112cb565b8151156112975781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102929190612281565b60608247101561135d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610292565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516113869190612265565b60006040518083038185875af1925050503d80600081146113c3576040519150601f19603f3d011682016040523d82523d6000602084013e6113c8565b606091505b50915091506113d9878383876111d0565b979650505050505050565b600080600080606085870312156113fa57600080fd5b843567ffffffffffffffff8082111561141257600080fd5b908601906040828903121561142657600080fd5b9094506020860135908082111561143c57600080fd5b818701915087601f83011261145057600080fd5b81358181111561145f57600080fd5b8860208260051b850101111561147457600080fd5b95986020929092019750949560400135945092505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156114de576114de61148c565b60405290565b60405160a0810167ffffffffffffffff811182821017156114de576114de61148c565b6040516080810167ffffffffffffffff811182821017156114de576114de61148c565b60405160e0810167ffffffffffffffff811182821017156114de576114de61148c565b6040805190810167ffffffffffffffff811182821017156114de576114de61148c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156115b7576115b761148c565b604052919050565b600067ffffffffffffffff8211156115d9576115d961148c565b5060051b60200190565b73ffffffffffffffffffffffffffffffffffffffff8116811461160557600080fd5b50565b8035611613816115e3565b919050565b600067ffffffffffffffff8211156116325761163261148c565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261166f57600080fd5b813561168261167d82611618565b611570565b81815284602083860101111561169757600080fd5b816020850160208301376000918101602001919091529392505050565b600060c082840312156116c657600080fd5b60405160c0810167ffffffffffffffff82821081831117156116ea576116ea61148c565b81604052829350843591506116fe826115e3565b908252602084013590611710826115e3565b81602084015260408501356040840152606085013560608401526080850135915061173a826115e3565b81608084015260a085013591508082111561175457600080fd5b506117618582860161165e565b60a0830152505092915050565b60006060828403121561178057600080fd5b6117886114bb565b90508135611795816115e3565b80825250602082013560208201526040820135604082015292915050565b600082601f8301126117c457600080fd5b813560206117d461167d836115bf565b828152606092830285018201928282019190878511156117f357600080fd5b8387015b8581101561184c5781818a03121561180f5760008081fd5b6118176114bb565b8135611822816115e3565b8152818601358682015260408083013561183b816115e3565b9082015284529284019281016117f7565b5090979650505050505050565b6000806040838503121561186c57600080fd5b823567ffffffffffffffff8082111561188457600080fd5b818501915085601f83011261189857600080fd5b813560206118a861167d836115bf565b82815260059290921b840181019181810190898411156118c757600080fd5b8286015b848110156119b8578035868111156118e35760008081fd5b870160e0818d037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018113156119195760008081fd5b6119216114e4565b86830135898111156119335760008081fd5b6119418f89838701016116b4565b8252506119518e6040850161176e565b8782015260a0830135898111156119685760008081fd5b6119768f89838701016117b3565b60408301525060c08301358981111561198f5760008081fd5b61199d8f898387010161165e565b606083015250910135608082015283529183019183016118cb565b50965050860135925050808211156119cf57600080fd5b506119dc8582860161165e565b9150509250929050565b600080604083850312156119f957600080fd5b8235611a04816115e3565b9150602083013567ffffffffffffffff811115611a2057600080fd5b830160e08186031215611a3257600080fd5b809150509250929050565b600060208284031215611a4f57600080fd5b81518015158114611a5f57600080fd5b9392505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611a9b57600080fd5b830160208101925035905067ffffffffffffffff811115611abb57600080fd5b803603821315611aca57600080fd5b9250929050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60408082528181018490526000906060600586901b840181019084018784805b89811015611bf6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa088860301845282357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18c3603018112611b9a578283fd5b8b018035611ba7816115e3565b73ffffffffffffffffffffffffffffffffffffffff1686526020611bcd82820183611a66565b92508882890152611be18989018483611ad1565b97505094850194939093019250600101611b3a565b5050505060209390930193909352509392505050565b60005b83811015611c27578181015183820152602001611c0f565b50506000910152565b60008151808452611c48816020860160208601611c0c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b604081526000611c8a8485611a66565b604080850152611c9e608085018284611ad1565b915050611cae6020860186611a66565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0858403016060860152611ce3838284611ad1565b925050508281036020840152611cf98185611c30565b95945050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611d3757600080fd5b83018035915067ffffffffffffffff821115611d5257600080fd5b602001915036819003821315611aca57600080fd5b600082601f830112611d7857600080fd5b81356020611d8861167d836115bf565b82815260079290921b84018101918181019086841115611da757600080fd5b8286015b84811015611e0c5760808189031215611dc45760008081fd5b611dcc611507565b8135611dd7816115e3565b8152818501358582015260408083013590820152606080830135611dfa816115e3565b90820152835291830191608001611dab565b509695505050505050565b600060208284031215611e2957600080fd5b813567ffffffffffffffff80821115611e4157600080fd5b908301906101208286031215611e5657600080fd5b611e5e61152a565b823582811115611e6d57600080fd5b611e79878286016116b4565b8252506020830135602082015260408301356040820152611e9c60608401611608565b606082015260808301356080820152611eb88660a0850161176e565b60a082015261010083013582811115611ed057600080fd5b611edc87828601611d67565b60c08301525095945050505050565b60008060408385031215611efe57600080fd5b8251611f09816115e3565b602084015190925060ff81168114611a3257600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611faf57611faf611f4f565b5060010190565b6000806040808486031215611fca57600080fd5b835167ffffffffffffffff80821115611fe257600080fd5b818601915086601f830112611ff657600080fd5b8151602061200661167d836115bf565b82815260059290921b8401810191818101908a84111561202557600080fd5b8286015b848110156120fb578051868111156120415760008081fd5b8701808d037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018913156120755760008081fd5b61207d61154d565b8582015161208a816115e3565b8152818a01518881111561209e5760008081fd5b8083019250508d603f8301126120b45760008081fd5b858201516120c461167d82611618565b8181528f8c8386010111156120d95760008081fd5b6120e8828983018e8701611c0c565b8288015250845250918301918301612029565b509890910151979997985050505050505050565b81810381811115610ad257610ad2611f4f565b60006020828403121561213457600080fd5b8151611a5f816115e3565b8082028115828204841417610ad257610ad2611f4f565b60008261218c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561222b578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805173ffffffffffffffffffffffffffffffffffffffff16845287015187840187905261221887850182611c30565b95880195935050908601906001016121b8565b509098975050505050505050565b80820180821115610ad257610ad2611f4f565b60006020828403121561225e57600080fd5b5051919050565b60008251612277818460208701611c0c565b9190910192915050565b602081526000610acf6020830184611c3056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122002b1a9237ec859b48a4b914b165b9a062696aa305c06c4645c0727ecc472983264736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000035db01d1425685789dcc9228d47c7a5c049388d8000000000000000000000000000066320a467de62b1548f46465abbb82662331
-----Decoded View---------------
Arg [0] : _reactor (address): 0x35db01D1425685789dCc9228d47C7A5C049388d8
Arg [1] : _allowed (address): 0x000066320a467dE62B1548f46465abBB82662331
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000035db01d1425685789dcc9228d47c7a5c049388d8
Arg [1] : 000000000000000000000000000066320a467de62b1548f46465abbb82662331
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in S
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.