Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,940 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit Swap Wit... | 10154601 | 1 hr ago | IN | 0 ETH | 0.00002034 | ||||
Deposit Swap Wit... | 10033061 | 4 days ago | IN | 0 ETH | 0.00001563 | ||||
Deposit Swap Wit... | 9853326 | 10 days ago | IN | 0 ETH | 0.00000718 | ||||
Deposit Swap Wit... | 9853310 | 10 days ago | IN | 0 ETH | 0.00000721 | ||||
Deposit Swap Wit... | 9770962 | 13 days ago | IN | 0 ETH | 0.00001748 | ||||
Deposit Swap Wit... | 9770780 | 13 days ago | IN | 0 ETH | 0.00001841 | ||||
Deposit Swap Wit... | 9466342 | 23 days ago | IN | 0 ETH | 0.00002563 | ||||
Deposit Double S... | 9355809 | 27 days ago | IN | 0 ETH | 0.0000114 | ||||
Deposit Swap Wit... | 9104453 | 36 days ago | IN | 0 ETH | 0.00000643 | ||||
Deposit Double S... | 9104389 | 36 days ago | IN | 0 ETH | 0.00000807 | ||||
Deposit Swap Wit... | 9101704 | 36 days ago | IN | 0 ETH | 0.00000668 | ||||
Deposit Swap Wit... | 9101568 | 36 days ago | IN | 0 ETH | 0.00000677 | ||||
Deposit Swap Wit... | 9090439 | 36 days ago | IN | 0 ETH | 0.00001148 | ||||
Deposit Double S... | 9066127 | 37 days ago | IN | 0 ETH | 0.0000095 | ||||
Deposit Swap Wit... | 8992292 | 39 days ago | IN | 0 ETH | 0.00001441 | ||||
Deposit Swap Wit... | 8809388 | 46 days ago | IN | 0 ETH | 0.00001104 | ||||
Deposit Swap Wit... | 8794646 | 46 days ago | IN | 0 ETH | 0.00000684 | ||||
Deposit Swap Wit... | 8753884 | 47 days ago | IN | 0 ETH | 0.00002335 | ||||
Deposit Swap Wit... | 8727536 | 48 days ago | IN | 0 ETH | 0.00000852 | ||||
Deposit Swap Wit... | 8726345 | 48 days ago | IN | 0 ETH | 0.00000694 | ||||
Deposit Double S... | 8645991 | 51 days ago | IN | 0 ETH | 0.00001004 | ||||
Deposit Swap Wit... | 8645932 | 51 days ago | IN | 0 ETH | 0.00000734 | ||||
Deposit Swap Wit... | 8641608 | 51 days ago | IN | 0 ETH | 0.00000682 | ||||
Deposit Swap Wit... | 8592269 | 53 days ago | IN | 0 ETH | 0.00000783 | ||||
Deposit Swap Wit... | 8585716 | 53 days ago | IN | 0 ETH | 0.00000663 |
Latest 3 internal transactions
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
6913092 | 109 days ago | Contract Creation | 0 ETH | |||
6913091 | 109 days ago | Contract Creation | 0 ETH | |||
6913090 | 109 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
FactoryWrapper
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 10000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL 1.1 pragma solidity =0.8.22; import "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; import "openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol"; import "openzeppelin-contracts/contracts/security/ReentrancyGuard.sol"; import "./interfaces/IFactoryWrapper.sol"; import "./interfaces/IPairWrapper.sol"; import "../pools/interfaces/IPools.sol"; import "./PairWrapper.sol"; // Wraps DEX functionality to appear externally as a UniswapV2Factory contract FactoryWrapper is IFactoryWrapper, ReentrancyGuard { using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; event PairCreated(address indexed token0, address indexed token1, address pair, uint); IPools immutable public pools; // Maps [token0][token1] or [token1][token0] to the corresponding IPairWrapper mapping(address => mapping(address => IPairWrapper)) private pairs; // Keeps track of what pairs have been whitelisted EnumerableSet.AddressSet private _allPairs; address constant public feeTo = address(0x0); address constant public feeToSetter = address(0x0); constructor( IPools _pools ) { pools = _pools; } function createPair(address token0, address token1) external returns (address pair) { require( address(pairs[token0][token1]) == address(0), "Pair already created" ); IPairWrapper pairWrapper = new PairWrapper( pools, this, IERC20(token0), IERC20(token1) ); pairs[token0][token1] = pairWrapper; pairs[token1][token0] = pairWrapper; pair = address(pairWrapper); _allPairs.add( pair ); // FactoryWrapper needs approval to swap on the Pools contract at user swap time. if ( IERC20(token0).allowance( address(this), address(pools) ) == 0 ) IERC20(token0).safeApprove( address(pools), type(uint256).max ); if ( IERC20(token1).allowance( address(this), address(pools) ) == 0 ) IERC20(token1).safeApprove( address(pools), type(uint256).max ); emit PairCreated(token0, token1, pair, _allPairs.length() ); } // Deposit tokenIn, swap to tokenOut and then have tokenOut sent to the sender function depositSwapWithdraw(IERC20 swapTokenIn, IERC20 swapTokenOut, uint256 swapAmountIn, uint256 minAmountOut, uint256 deadline ) external nonReentrant returns (uint256 swapAmountOut) { // Transfer the tokens from the sender - only tokens without fees should be whitelisted on the DEX swapTokenIn.safeTransferFrom(msg.sender, address(this), swapAmountIn ); swapAmountOut = pools.depositSwapWithdraw( swapTokenIn, swapTokenOut, swapAmountIn, minAmountOut, deadline ); // Send tokenOut to the user swapTokenOut.safeTransfer( msg.sender, swapAmountOut ); // Emit UniswapV2 style swap events IPairWrapper pair = IPairWrapper( getPair( address(swapTokenIn), address(swapTokenOut) ) ); pair.emitSwapEvents( msg.sender, address(swapTokenIn), swapAmountIn, swapAmountOut ); } // A convenience method to perform two swaps in one transaction function depositDoubleSwapWithdraw( IERC20 swapTokenIn, IERC20 swapTokenMiddle, IERC20 swapTokenOut, uint256 swapAmountIn, uint256 minAmountOut, uint256 deadline ) external nonReentrant returns (uint256 swapAmountOut) { // Transfer the tokens from the sender - only tokens without fees should be whitelisted on the DEX swapTokenIn.safeTransferFrom(msg.sender, address(this), swapAmountIn ); // Check the initial reserves of the middle token in the second swap (uint256 initialMidReserves, ) = pools.getPoolReserves(swapTokenMiddle, swapTokenOut); swapAmountOut = pools.depositDoubleSwapWithdraw( swapTokenIn, swapTokenMiddle, swapTokenOut, swapAmountIn, minAmountOut, deadline ); // Send tokenOut to the user swapTokenOut.safeTransfer( msg.sender, swapAmountOut ); // See how much of the middle token was involved (uint256 currentMidReserves, ) = pools.getPoolReserves(swapTokenMiddle, swapTokenOut); uint256 swapAmountMiddle = currentMidReserves - initialMidReserves; // Emit UniswapV2 style swap events IPairWrapper pair = IPairWrapper( getPair( address(swapTokenIn), address(swapTokenMiddle) ) ); pair.emitSwapEvents( msg.sender, address(swapTokenIn), swapAmountIn, swapAmountMiddle ); IPairWrapper pair2 = IPairWrapper( getPair( address(swapTokenMiddle), address(swapTokenOut) ) ); pair2.emitSwapEvents( msg.sender, address(swapTokenMiddle), swapAmountMiddle, swapAmountOut ); } // === VIEWS === function isPair(address pair) external view returns (bool) { return _allPairs.contains(pair); } function allPairs(uint256 index ) external view returns (address pair) { return _allPairs.at(index); } function allPairsLength() external view returns (uint) { return _allPairs.length(); } function getPair(address tokenA, address tokenB) public view returns (address pair) { return address(pairs[tokenA][tokenB]); } }
// 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: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
pragma solidity =0.8.22; import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; // Wraps DEX functionality to appear externally as a IUniswapV2Factory interface IFactoryWrapper { function createPair(address token0, address token1) external returns (address pair); function depositSwapWithdraw(IERC20 swapTokenIn, IERC20 swapTokenOut, uint256 swapAmountIn, uint256 minAmountOut, uint256 deadline ) external returns (uint256 swapAmountOut); function depositDoubleSwapWithdraw( IERC20 swapTokenIn, IERC20 swapTokenMiddle, IERC20 swapTokenOut, uint256 swapAmountIn, uint256 minAmountOut, uint256 deadline ) external returns (uint256 swapAmountOut); // VIEWS function isPair(address pair) external view returns (bool); function getPair(address token0, address token1) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); }
pragma solidity =0.8.22; // Wraps DEX functionality to appear externally as a IUniswapV2Pair interface IPairWrapper { function emitSwapEvents( address sender, address swapTokenIn, uint256 swapAmountIn, uint256 swapAmountOut ) external; // VIEWS function name() external view returns (string memory); function symbol() external view returns (string memory); function token0() external view returns (address); function token1() external view returns (address); function factory() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function kLast() external view returns (uint); }
// SPDX-License-Identifier: BUSL 1.1 pragma solidity =0.8.22; import "../../staking/interfaces/ILiquidity.sol"; import "../../dao/interfaces/IDAO.sol"; import "./IPoolStats.sol"; interface IPools is IPoolStats { function startExchangeApproved() external; function setContracts( IDAO _dao, ILiquidity _liquidity ) external; // onlyOwner function addLiquidity( IERC20 tokenA, IERC20 tokenB, uint256 maxAmountA, uint256 maxAmountB, uint256 minAddedAmountA, uint256 minAddedAmountB, uint256 totalLiquidity ) external returns (uint256 addedAmountA, uint256 addedAmountB, uint256 addedLiquidity); function removeLiquidity( IERC20 tokenA, IERC20 tokenB, uint256 liquidityToRemove, uint256 minReclaimedA, uint256 minReclaimedB, uint256 totalLiquidity ) external returns (uint256 reclaimedA, uint256 reclaimedB); function deposit( IERC20 token, uint256 amount ) external; function withdraw( IERC20 token, uint256 amount ) external; function swap( IERC20 swapTokenIn, IERC20 swapTokenOut, uint256 swapAmountIn, uint256 minAmountOut, uint256 deadline ) external returns (uint256 swapAmountOut); function depositSwapWithdraw(IERC20 swapTokenIn, IERC20 swapTokenOut, uint256 swapAmountIn, uint256 minAmountOut, uint256 deadline ) external returns (uint256 swapAmountOut); function depositDoubleSwapWithdraw( IERC20 swapTokenIn, IERC20 swapTokenMiddle, IERC20 swapTokenOut, uint256 swapAmountIn, uint256 minAmountOut, uint256 deadline ) external returns (uint256 swapAmountOut); function depositZapSwapWithdraw(IERC20 swapTokenIn, IERC20 swapTokenOut, uint256 swapAmountIn ) external returns (uint256 swapAmountOut); // Views function exchangeIsLive() external view returns (bool); function getPoolReserves(IERC20 tokenA, IERC20 tokenB) external view returns (uint256 reserveA, uint256 reserveB); function depositedUserBalance(address user, IERC20 token) external view returns (uint256); }
// SPDX-License-Identifier: BUSL 1.1 pragma solidity =0.8.22; import "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; import "openzeppelin-contracts/contracts/security/ReentrancyGuard.sol"; import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "./interfaces/IUniswapV2Callee.sol"; import "./interfaces/IFactoryWrapper.sol"; import "./interfaces/IPairWrapper.sol"; import "../pools/interfaces/IPools.sol"; // Wraps DEX functionality to appear externally as a IUniswapV2Pair contract PairWrapper is IPairWrapper, ReentrancyGuard { using SafeERC20 for IERC20; event Swap(address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to); event Sync(uint112 reserve0, uint112 reserve1); IPools immutable public pools; address immutable public factory; address immutable public token0; address immutable public token1; string public constant name = 'Zero DEX'; string public constant symbol = 'ZERO-DEX'; uint8 public constant decimals = 18; constructor( IPools _pools, IFactoryWrapper _factory, IERC20 _token0, IERC20 _token1 ) { pools = _pools; factory = address(_factory); token0 = address(_token0); token1 = address(_token1); // PairWrapper needs approval to swap on the Pools contract when swap() is used IERC20(token0).safeApprove( address(pools), type(uint256).max ); IERC20(token1).safeApprove( address(pools), type(uint256).max ); _emitSync(); } function _emitSync() internal { (uint256 reserve0, uint256 reserve1) = pools.getPoolReserves(IERC20(token0), IERC20(token1)); emit Sync( uint112(reserve0), uint112(reserve1) ); } function _emitSwapEvents( address sender, address swapTokenIn, uint256 swapAmountIn, uint256 swapAmountOut ) internal { _emitSync(); if ( address( swapTokenIn) == token0 ) emit Swap( sender, swapAmountIn, 0, 0, swapAmountOut, sender ); else emit Swap( sender, 0, swapAmountIn, swapAmountOut, 0, sender ); } function emitSwapEvents( address sender, address swapTokenIn, uint256 swapAmountIn, uint256 swapAmountOut ) external { require( msg.sender == factory, "Only callable from the factory" ); _emitSwapEvents( sender, swapTokenIn, swapAmountIn, swapAmountOut ); } // Derived from UniswapV2Pair. // Assumes the input tokens have already been sent here. // Sufficient input and output checks will be done within pools.depositSwapWithdraw(). function swap( uint amount0Out, uint amount1Out, address to, bytes calldata data ) external nonReentrant { if ( amount1Out > 0 ) { // Previously sent token0 will act as the input uint amount0In = IERC20(token0).balanceOf(address(this)); // Swapping from token0->token1 uint256 swapAmountOut = pools.depositSwapWithdraw( IERC20(token0), IERC20(token1), amount0In, amount1Out, block.timestamp ); // Send the resulting output tokens to the specified address IERC20(token1).safeTransfer(to, swapAmountOut); _emitSwapEvents( msg.sender, token0, amount0In, swapAmountOut ); } if ( amount0Out > 0 ) { // Previously sent token1 will act as the input uint amount1In = IERC20(token1).balanceOf(address(this)); // Swapping from token1->token0 uint256 swapAmountOut = pools.depositSwapWithdraw( IERC20(token1), IERC20(token0), amount1In, amount0Out, block.timestamp ); // Send the resulting output tokens to the specified address IERC20(token0).safeTransfer(to, swapAmountOut); _emitSwapEvents( msg.sender, token1, amount1In, swapAmountOut ); } if (data.length > 0) IUniswapV2Callee(to).uniswapV2Call(msg.sender, amount0Out, amount1Out, data); } // === VIEWS === function getReserves() external view returns (uint112 _reserve0, uint112 _reserve1, uint32 blockTimestampLast) { (uint256 reserve0, uint256 reserve1) = pools.getPoolReserves(IERC20(token0), IERC20(token1)); _reserve0 = uint112(reserve0); _reserve1 = uint112(reserve1); blockTimestampLast = uint32(block.timestamp); } function kLast() external view returns (uint256) { (uint256 reserve0, uint256 reserve1) = pools.getPoolReserves(IERC20(token0), IERC20(token1)); return reserve0 * reserve1; } }
// 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: 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: BUSL 1.1 pragma solidity =0.8.22; import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "./IStakingRewards.sol"; interface ILiquidity is IStakingRewards { function depositLiquidityAndIncreaseShare( IERC20 tokenA, IERC20 tokenB, uint256 maxAmountA, uint256 maxAmountB, uint256 minAddedAmountA, uint256 minAddedAmountB, uint256 minAddedLiquidity, uint256 deadline, bool useZapping ) external returns (uint256 addedLiquidity); function withdrawLiquidityAndClaim( IERC20 tokenA, IERC20 tokenB, uint256 liquidityToWithdraw, uint256 minReclaimedA, uint256 minReclaimedB, uint256 deadline ) external returns (uint256 reclaimedA, uint256 reclaimedB); }
// SPDX-License-Identifier: BUSL 1.1 pragma solidity =0.8.22; import "../../rewards/interfaces/IZeroRewards.sol"; import "../../pools/interfaces/IPools.sol"; import "../../interfaces/IZero.sol"; interface IDAO { function finalizeBallot( uint256 ballotID ) external; function manuallyRemoveBallot( uint256 ballotID ) external; function withdrawFromDAO( IERC20 token ) external returns (uint256 withdrawnAmount); // Views function pools() external view returns (IPools); function websiteURL() external view returns (string memory); function countryIsExcluded( string calldata country ) external view returns (bool); }
// SPDX-License-Identifier: BUSL 1.1 pragma solidity =0.8.22; interface IPoolStats { // These are the indicies (in terms of a poolIDs location in the current whitelistedPoolIDs array) of pools involved in an arbitrage path struct ArbitrageIndicies { uint64 index1; uint64 index2; uint64 index3; } function clearProfitsForPools() external; function updateArbitrageIndicies() external; // Views function profitsForWhitelistedPools() external view returns (uint256[] memory _calculatedProfits); function arbitrageIndicies(bytes32 poolID) external view returns (ArbitrageIndicies memory); }
pragma solidity =0.8.22; interface IUniswapV2Callee { function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external; }
// SPDX-License-Identifier: BUSL 1.1 pragma solidity =0.8.22; struct AddedReward { bytes32 poolID; // The pool to add rewards to uint256 amountToAdd; // The amount of rewards (as ZERO) to add } struct UserShareInfo { uint256 userShare; // A user's share for a given poolID uint256 virtualRewards; // The amount of rewards that were added to maintain proper rewards/share ratio - and will be deducted from a user's pending rewards. uint256 cooldownExpiration; // The timestamp when the user can modify their share } interface IStakingRewards { function claimAllRewards( bytes32[] calldata poolIDs ) external returns (uint256 rewardsAmount); function addZERORewards( AddedReward[] calldata addedRewards ) external; // Views function totalShares(bytes32 poolID) external view returns (uint256); function totalSharesForPools( bytes32[] calldata poolIDs ) external view returns (uint256[] calldata shares); function totalRewardsForPools( bytes32[] calldata poolIDs ) external view returns (uint256[] calldata rewards); function userRewardForPool( address wallet, bytes32 poolID ) external view returns (uint256); function userShareForPool( address wallet, bytes32 poolID ) external view returns (uint256); function userVirtualRewardsForPool( address wallet, bytes32 poolID ) external view returns (uint256); function userRewardsForPools( address wallet, bytes32[] calldata poolIDs ) external view returns (uint256[] calldata rewards); function userShareForPools( address wallet, bytes32[] calldata poolIDs ) external view returns (uint256[] calldata shares); function userCooldowns( address wallet, bytes32[] calldata poolIDs ) external view returns (uint256[] calldata cooldowns); }
// SPDX-License-Identifier: BUSL 1.1 pragma solidity =0.8.22; import "./IRewardsEmitter.sol"; interface IZeroRewards { function sendInitialZERORewards( uint256 liquidityBootstrapAmount, bytes32[] calldata poolIDs ) external; function performUpkeep( bytes32[] calldata poolIDs, uint256[] calldata profitsForPools ) external; // Views function stakingRewardsEmitter() external view returns (IRewardsEmitter); function liquidityRewardsEmitter() external view returns (IRewardsEmitter); }
// SPDX-License-Identifier: BUSL 1.1 pragma solidity =0.8.22; import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; interface IZero is IERC20 { function burnTokensInContract() external; // Views function totalBurned() external view returns (uint256); }
// SPDX-License-Identifier: BUSL 1.1 pragma solidity =0.8.22; import "../../staking/interfaces/IStakingRewards.sol"; interface IRewardsEmitter { function addZERORewards( AddedReward[] calldata addedRewards ) external; function performUpkeep( uint256 timeSinceLastUpkeep ) external; // Views function pendingRewardsForPools( bytes32[] calldata pools ) external view returns (uint256[] calldata); }
{ "remappings": [ "chainlink/=lib/chainlink/", "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts/contracts/", "v3-core/=lib/v3-core/contracts/" ], "optimizer": { "enabled": true, "runs": 10000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IPools","name":"_pools","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"PairCreated","type":"event"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"allPairs","outputs":[{"internalType":"address","name":"pair","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allPairsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"}],"name":"createPair","outputs":[{"internalType":"address","name":"pair","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"swapTokenIn","type":"address"},{"internalType":"contract IERC20","name":"swapTokenMiddle","type":"address"},{"internalType":"contract IERC20","name":"swapTokenOut","type":"address"},{"internalType":"uint256","name":"swapAmountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"depositDoubleSwapWithdraw","outputs":[{"internalType":"uint256","name":"swapAmountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"swapTokenIn","type":"address"},{"internalType":"contract IERC20","name":"swapTokenOut","type":"address"},{"internalType":"uint256","name":"swapAmountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"depositSwapWithdraw","outputs":[{"internalType":"uint256","name":"swapAmountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeTo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeToSetter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"}],"name":"getPair","outputs":[{"internalType":"address","name":"pair","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"}],"name":"isPair","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pools","outputs":[{"internalType":"contract IPools","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5060405161345e38038061345e83398101604081905261002f91610045565b60016000556001600160a01b0316608052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805161338f6100cf6000396000818161013b015281816102ba015281816103970152818161047e01528181610766015281816108b701528181610952015281816109db01528181610a760152610be0015261338f6000f3fe60806040523480156200001157600080fd5b5060043610620000cd5760003560e01c8063c74e31c8116200007f578063e2f7c4801162000062578063e2f7c480146200018b578063e5e31b1314620001a2578063e6a4390514620001ca57600080fd5b8063c74e31c8146200015d578063c9c65396146200017457600080fd5b80631e3dd18b11620000b45780631e3dd18b1462000105578063574f2ba3146200011c578063c5c51dca146200013557600080fd5b8063017e7e5814620000d2578063094b741514620000d2575b600080fd5b620000db600081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b620000db62000116366004620014e4565b62000212565b6200012662000227565b604051908152602001620000fc565b620000db7f000000000000000000000000000000000000000000000000000000000000000081565b620001266200016e36600462001524565b6200023a565b620000db6200018536600462001590565b620006be565b620001266200019c366004620015ce565b62000b4e565b620001b9620001b336600462001624565b62000d5c565b6040519015158152602001620000fc565b620000db620001db36600462001590565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600160209081526040808320938516835292905220541690565b60006200022160028362000d6b565b92915050565b600062000235600262000d80565b905090565b60006200024662000d8b565b6200026a73ffffffffffffffffffffffffffffffffffffffff881633308762000e00565b6040517fd4469c3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015286811660248301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063d4469c3e906044016040805180830381865afa15801562000303573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000329919062001644565b506040517fc74e31c800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a8116600483015289811660248301528881166044830152606482018890526084820187905260a482018690529192507f00000000000000000000000000000000000000000000000000000000000000009091169063c74e31c89060c4016020604051808303816000875af1158015620003e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000409919062001669565b91506200042e73ffffffffffffffffffffffffffffffffffffffff8716338462000ee4565b6040517fd4469c3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015287811660248301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063d4469c3e906044016040805180830381865afa158015620004c7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004ed919062001644565b5090506000620004fe838362001683565b73ffffffffffffffffffffffffffffffffffffffff808c166000908152600160209081526040808320848f16845290915281205492935091166040517feaa99dbb00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8d81166024830152604482018b9052606482018590529192509082169063eaa99dbb90608401600060405180830381600087803b158015620005b957600080fd5b505af1158015620005ce573d6000803e3d6000fd5b50505073ffffffffffffffffffffffffffffffffffffffff808c166000908152600160209081526040808320848f168452909152812054909250166040517feaa99dbb00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8d8116602483015260448201869052606482018990529192509082169063eaa99dbb90608401600060405180830381600087803b1580156200068b57600080fd5b505af1158015620006a0573d6000803e3d6000fd5b505050505050505050620006b46001600055565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260016020908152604080832085851684529091528120549091161562000762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061697220616c7265616479206372656174656400000000000000000000000060448201526064015b60405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000003085856040516200079690620014d6565b73ffffffffffffffffffffffffffffffffffffffff9485168152928416602084015290831660408301529091166060820152608001604051809103906000f080158015620007e8573d6000803e3d6000fd5b5073ffffffffffffffffffffffffffffffffffffffff80861660008181526001602081815260408084208a87168552825280842080549688167fffffffffffffffffffffffff00000000000000000000000000000000000000009788168117909155928252808420948452939052919020805490921617905591508190506200087360028262000f41565b506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116602483015285169063dd62ed3e90604401602060405180830381865afa15801562000907573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200092d919062001669565b60000362000998576200099873ffffffffffffffffffffffffffffffffffffffff85167f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff62000f65565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116602483015284169063dd62ed3e90604401602060405180830381865afa15801562000a2b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a51919062001669565b60000362000abc5762000abc73ffffffffffffffffffffffffffffffffffffffff84167f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff62000f65565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e98462000b18600262000d80565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091520160405180910390a35092915050565b600062000b5a62000d8b565b62000b7e73ffffffffffffffffffffffffffffffffffffffff871633308762000e00565b6040517fe2f7c48000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015286811660248301526044820186905260648201859052608482018490527f0000000000000000000000000000000000000000000000000000000000000000169063e2f7c4809060a4016020604051808303816000875af115801562000c2a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c50919062001669565b905062000c7573ffffffffffffffffffffffffffffffffffffffff8616338362000ee4565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600160209081526040808320848a1684529091528120549091166040517feaa99dbb00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff898116602483015260448201889052606482018590529192509082169063eaa99dbb90608401600060405180830381600087803b15801562000d2e57600080fd5b505af115801562000d43573d6000803e3d6000fd5b505050505062000d536001600055565b95945050505050565b600062000221600283620010ef565b600062000d7983836200111f565b9392505050565b600062000221825490565b60026000540362000df9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640162000759565b6002600055565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905262000ede9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526200114c565b50505050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905262000f3c9084907fa9059cbb000000000000000000000000000000000000000000000000000000009060640162000e5b565b505050565b600062000d798373ffffffffffffffffffffffffffffffffffffffff841662001262565b8015806200100957506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa15801562000fe1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001007919062001669565b155b62001097576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606482015260840162000759565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905262000f3c9084907f095ea7b3000000000000000000000000000000000000000000000000000000009060640162000e5b565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151562000d79565b6000826000018281548110620011395762001139620016be565b9060005260206000200154905092915050565b6000620011b0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16620012b49092919063ffffffff16565b9050805160001480620011d4575080806020019051810190620011d49190620016ed565b62000f3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840162000759565b6000818152600183016020526040812054620012ab5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000221565b50600062000221565b6060620012c58484600085620012cd565b949350505050565b60608247101562001361576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840162000759565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516200138c919062001737565b60006040518083038185875af1925050503d8060008114620013cb576040519150601f19603f3d011682016040523d82523d6000602084013e620013d0565b606091505b5091509150620013e387838387620013ee565b979650505050505050565b6060831562001489578251600003620014815773ffffffffffffffffffffffffffffffffffffffff85163b62001481576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000759565b5081620012c5565b620012c58383815115620014a05781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000759919062001755565b611bb180620017a983390190565b600060208284031215620014f757600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146200152157600080fd5b50565b60008060008060008060c087890312156200153e57600080fd5b86356200154b81620014fe565b955060208701356200155d81620014fe565b945060408701356200156f81620014fe565b959894975094956060810135955060808101359460a0909101359350915050565b60008060408385031215620015a457600080fd5b8235620015b181620014fe565b91506020830135620015c381620014fe565b809150509250929050565b600080600080600060a08688031215620015e757600080fd5b8535620015f481620014fe565b945060208601356200160681620014fe565b94979496505050506040830135926060810135926080909101359150565b6000602082840312156200163757600080fd5b813562000d7981620014fe565b600080604083850312156200165857600080fd5b505080516020909101519092909150565b6000602082840312156200167c57600080fd5b5051919050565b8181038181111562000221577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156200170057600080fd5b8151801515811462000d7957600080fd5b60005b838110156200172e57818101518382015260200162001714565b50506000910152565b600082516200174b81846020870162001711565b9190910192915050565b60208152600082518060208401526200177681604085016020870162001711565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe6101006040523480156200001257600080fd5b5060405162001bb138038062001bb1833981016040819052620000359162000553565b60016000556001600160a01b03808516608081905284821660a05283821660c081905291831660e0526200006d9190600019620000a1565b60805160e0516200008d916001600160a01b0390911690600019620000a1565b62000097620001f4565b505050506200069e565b8015806200011f5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620005bb565b155b620001975760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084015b60405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620001ef918591620002c216565b505050565b60805160c05160e051604051636a234e1f60e11b81526001600160a01b03928316600482015290821660248201526000928392169063d4469c3e906044016040805180830381865afa1580156200024f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002759190620005d5565b604080516001600160701b038085168252831660208201529294509092507f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1910160405180910390a15050565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649082015260009062000311906001600160a01b03851690849062000396565b905080516000148062000335575080806020019051810190620003359190620005fa565b620001ef5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016200018e565b6060620003a78484600085620003af565b949350505050565b606082471015620004125760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016200018e565b600080866001600160a01b031685876040516200043091906200064b565b60006040518083038185875af1925050503d80600081146200046f576040519150601f19603f3d011682016040523d82523d6000602084013e62000474565b606091505b509092509050620004888783838762000493565b979650505050505050565b6060831562000507578251600003620004ff576001600160a01b0385163b620004ff5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016200018e565b5081620003a7565b620003a783838151156200051e5781518083602001fd5b8060405162461bcd60e51b81526004016200018e919062000669565b6001600160a01b03811681146200055057600080fd5b50565b600080600080608085870312156200056a57600080fd5b845162000577816200053a565b60208601519094506200058a816200053a565b60408601519093506200059d816200053a565b6060860151909250620005b0816200053a565b939692955090935050565b600060208284031215620005ce57600080fd5b5051919050565b60008060408385031215620005e957600080fd5b505080516020909101519092909150565b6000602082840312156200060d57600080fd5b815180151581146200061e57600080fd5b9392505050565b60005b838110156200064257818101518382015260200162000628565b50506000910152565b600082516200065f81846020870162000625565b9190910192915050565b60208152600082518060208401526200068a81604085016020870162000625565b601f01601f19169190910160400192915050565b60805160a05160c05160e051611438620007796000396000818161027b015281816103d40152818161049f0152818161052c015281816105e9015281816107090152818161083d0152818161094e0152610e56015260008181610175015281816102ef015281816103ac015281816104cc01528181610611015281816106dc0152818161081c0152818161092601528181610bc40152610e2e01526000818161022d0152610a170152600081816102540152818161041601528181610653015281816107e00152818161097d0152610e8301526114386000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80637464fc3d11610081578063c5c51dca1161005b578063c5c51dca1461024f578063d21220a714610276578063eaa99dbb1461029d57600080fd5b80637464fc3d146101d657806395d89b41146101ec578063c45a01551461022857600080fd5b80630902f1ac116100b25780630902f1ac146101355780630dfe168114610170578063313ce567146101bc57600080fd5b8063022c0d9f146100ce57806306fdde03146100e3575b600080fd5b6100e16100dc366004611179565b6102b0565b005b61011f6040518060400160405280600881526020017f5a65726f2044455800000000000000000000000000000000000000000000000081525081565b60405161012c9190611231565b60405180910390f35b61013d6107d6565b604080516dffffffffffffffffffffffffffff948516815293909216602084015263ffffffff169082015260600161012c565b6101977f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161012c565b6101c4601281565b60405160ff909116815260200161012c565b6101de6108e9565b60405190815260200161012c565b61011f6040518060400160405280600881526020017f5a45524f2d44455800000000000000000000000000000000000000000000000081525081565b6101977f000000000000000000000000000000000000000000000000000000000000000081565b6101977f000000000000000000000000000000000000000000000000000000000000000081565b6101977f000000000000000000000000000000000000000000000000000000000000000081565b6100e16102ab366004611282565b6109ff565b6102b8610ab5565b83156104f5576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561034b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036f91906112c4565b6040517fe2f7c48000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015260448201839052606482018890524260848301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063e2f7c4809060a4016020604051808303816000875af115801561045f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048391906112c4565b90506104c673ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168683610b28565b6104f2337f00000000000000000000000000000000000000000000000000000000000000008484610bba565b50505b8415610732576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610588573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ac91906112c4565b6040517fe2f7c48000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015260448201839052606482018990524260848301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063e2f7c4809060a4016020604051808303816000875af115801561069c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c091906112c4565b905061070373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168683610b28565b61072f337f00000000000000000000000000000000000000000000000000000000000000008484610bba565b50505b80156107c5576040517f10d1e85c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416906310d1e85c9061079290339089908990889088906004016112dd565b600060405180830381600087803b1580156107ac57600080fd5b505af11580156107c0573d6000803e3d6000fd5b505050505b6107cf6001600055565b5050505050565b60008060008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d4469c3e7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b815260040161089b92919073ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b6040805180830381865afa1580156108b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108db9190611355565b909690955042945092505050565b6040517fd4469c3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152600091829182917f00000000000000000000000000000000000000000000000000000000000000009091169063d4469c3e906044016040805180830381865afa1580156109c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e99190611355565b90925090506109f88183611379565b9250505090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610aa3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4f6e6c792063616c6c61626c652066726f6d2074686520666163746f7279000060448201526064015b60405180910390fd5b610aaf84848484610bba565b50505050565b600260005403610b21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a9a565b6002600055565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610bb5908490610ce2565b505050565b610bc2610df1565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610c7b57604080518381526000602082018190528183015260608101839052905173ffffffffffffffffffffffffffffffffffffffff86169182917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a3610aaf565b604080516000808252602082018590528183018490526060820152905173ffffffffffffffffffffffffffffffffffffffff86169182917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350505050565b6000610d44826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610f419092919063ffffffff16565b9050805160001480610d65575080806020019051810190610d6591906113bd565b610bb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610a9a565b6040517fd4469c3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015260009182917f0000000000000000000000000000000000000000000000000000000000000000169063d4469c3e906044016040805180830381865afa158015610ec9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eed9190611355565b604080516dffffffffffffffffffffffffffff8085168252831660208201529294509092507f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1910160405180910390a15050565b6060610f508484600085610f58565b949350505050565b606082471015610fea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610a9a565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161101391906113e6565b60006040518083038185875af1925050503d8060008114611050576040519150601f19603f3d011682016040523d82523d6000602084013e611055565b606091505b509150915061106687838387611071565b979650505050505050565b606083156111075782516000036111005773ffffffffffffffffffffffffffffffffffffffff85163b611100576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a9a565b5081610f50565b610f50838381511561111c5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9a9190611231565b803573ffffffffffffffffffffffffffffffffffffffff8116811461117457600080fd5b919050565b60008060008060006080868803121561119157600080fd5b85359450602086013593506111a860408701611150565b9250606086013567ffffffffffffffff808211156111c557600080fd5b818801915088601f8301126111d957600080fd5b8135818111156111e857600080fd5b8960208285010111156111fa57600080fd5b9699959850939650602001949392505050565b60005b83811015611228578181015183820152602001611210565b50506000910152565b602081526000825180602084015261125081604085016020870161120d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000806000806080858703121561129857600080fd5b6112a185611150565b93506112af60208601611150565b93969395505050506040820135916060013590565b6000602082840312156112d657600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101949350505050565b6000806040838503121561136857600080fd5b505080516020909101519092909150565b80820281158282048414176113b7577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b6000602082840312156113cf57600080fd5b815180151581146113df57600080fd5b9392505050565b600082516113f881846020870161120d565b919091019291505056fea2646970667358221220a0fca329c91a271368c9ebfe104c512d4ea8d914fe7696133d036c6fd8241ede64736f6c63430008160033a2646970667358221220bc9d890ab38a68641e09980b1b51c7bec394bee21fe7a42d35bd6347b134597c64736f6c634300081600330000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c357110
Deployed Bytecode
0x60806040523480156200001157600080fd5b5060043610620000cd5760003560e01c8063c74e31c8116200007f578063e2f7c4801162000062578063e2f7c480146200018b578063e5e31b1314620001a2578063e6a4390514620001ca57600080fd5b8063c74e31c8146200015d578063c9c65396146200017457600080fd5b80631e3dd18b11620000b45780631e3dd18b1462000105578063574f2ba3146200011c578063c5c51dca146200013557600080fd5b8063017e7e5814620000d2578063094b741514620000d2575b600080fd5b620000db600081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b620000db62000116366004620014e4565b62000212565b6200012662000227565b604051908152602001620000fc565b620000db7f0000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c35711081565b620001266200016e36600462001524565b6200023a565b620000db6200018536600462001590565b620006be565b620001266200019c366004620015ce565b62000b4e565b620001b9620001b336600462001624565b62000d5c565b6040519015158152602001620000fc565b620000db620001db36600462001590565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600160209081526040808320938516835292905220541690565b60006200022160028362000d6b565b92915050565b600062000235600262000d80565b905090565b60006200024662000d8b565b6200026a73ffffffffffffffffffffffffffffffffffffffff881633308762000e00565b6040517fd4469c3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015286811660248301526000917f0000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c3571109091169063d4469c3e906044016040805180830381865afa15801562000303573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000329919062001644565b506040517fc74e31c800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a8116600483015289811660248301528881166044830152606482018890526084820187905260a482018690529192507f0000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c3571109091169063c74e31c89060c4016020604051808303816000875af1158015620003e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000409919062001669565b91506200042e73ffffffffffffffffffffffffffffffffffffffff8716338462000ee4565b6040517fd4469c3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015287811660248301526000917f0000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c3571109091169063d4469c3e906044016040805180830381865afa158015620004c7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004ed919062001644565b5090506000620004fe838362001683565b73ffffffffffffffffffffffffffffffffffffffff808c166000908152600160209081526040808320848f16845290915281205492935091166040517feaa99dbb00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8d81166024830152604482018b9052606482018590529192509082169063eaa99dbb90608401600060405180830381600087803b158015620005b957600080fd5b505af1158015620005ce573d6000803e3d6000fd5b50505073ffffffffffffffffffffffffffffffffffffffff808c166000908152600160209081526040808320848f168452909152812054909250166040517feaa99dbb00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8d8116602483015260448201869052606482018990529192509082169063eaa99dbb90608401600060405180830381600087803b1580156200068b57600080fd5b505af1158015620006a0573d6000803e3d6000fd5b505050505050505050620006b46001600055565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260016020908152604080832085851684529091528120549091161562000762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061697220616c7265616479206372656174656400000000000000000000000060448201526064015b60405180910390fd5b60007f0000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c3571103085856040516200079690620014d6565b73ffffffffffffffffffffffffffffffffffffffff9485168152928416602084015290831660408301529091166060820152608001604051809103906000f080158015620007e8573d6000803e3d6000fd5b5073ffffffffffffffffffffffffffffffffffffffff80861660008181526001602081815260408084208a87168552825280842080549688167fffffffffffffffffffffffff00000000000000000000000000000000000000009788168117909155928252808420948452939052919020805490921617905591508190506200087360028262000f41565b506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c3571108116602483015285169063dd62ed3e90604401602060405180830381865afa15801562000907573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200092d919062001669565b60000362000998576200099873ffffffffffffffffffffffffffffffffffffffff85167f0000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c3571107fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff62000f65565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c3571108116602483015284169063dd62ed3e90604401602060405180830381865afa15801562000a2b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a51919062001669565b60000362000abc5762000abc73ffffffffffffffffffffffffffffffffffffffff84167f0000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c3571107fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff62000f65565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e98462000b18600262000d80565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091520160405180910390a35092915050565b600062000b5a62000d8b565b62000b7e73ffffffffffffffffffffffffffffffffffffffff871633308762000e00565b6040517fe2f7c48000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015286811660248301526044820186905260648201859052608482018490527f0000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c357110169063e2f7c4809060a4016020604051808303816000875af115801562000c2a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c50919062001669565b905062000c7573ffffffffffffffffffffffffffffffffffffffff8616338362000ee4565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600160209081526040808320848a1684529091528120549091166040517feaa99dbb00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff898116602483015260448201889052606482018590529192509082169063eaa99dbb90608401600060405180830381600087803b15801562000d2e57600080fd5b505af115801562000d43573d6000803e3d6000fd5b505050505062000d536001600055565b95945050505050565b600062000221600283620010ef565b600062000d7983836200111f565b9392505050565b600062000221825490565b60026000540362000df9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640162000759565b6002600055565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905262000ede9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526200114c565b50505050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905262000f3c9084907fa9059cbb000000000000000000000000000000000000000000000000000000009060640162000e5b565b505050565b600062000d798373ffffffffffffffffffffffffffffffffffffffff841662001262565b8015806200100957506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa15801562000fe1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001007919062001669565b155b62001097576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606482015260840162000759565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905262000f3c9084907f095ea7b3000000000000000000000000000000000000000000000000000000009060640162000e5b565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151562000d79565b6000826000018281548110620011395762001139620016be565b9060005260206000200154905092915050565b6000620011b0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16620012b49092919063ffffffff16565b9050805160001480620011d4575080806020019051810190620011d49190620016ed565b62000f3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840162000759565b6000818152600183016020526040812054620012ab5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000221565b50600062000221565b6060620012c58484600085620012cd565b949350505050565b60608247101562001361576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840162000759565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516200138c919062001737565b60006040518083038185875af1925050503d8060008114620013cb576040519150601f19603f3d011682016040523d82523d6000602084013e620013d0565b606091505b5091509150620013e387838387620013ee565b979650505050505050565b6060831562001489578251600003620014815773ffffffffffffffffffffffffffffffffffffffff85163b62001481576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000759565b5081620012c5565b620012c58383815115620014a05781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000759919062001755565b611bb180620017a983390190565b600060208284031215620014f757600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146200152157600080fd5b50565b60008060008060008060c087890312156200153e57600080fd5b86356200154b81620014fe565b955060208701356200155d81620014fe565b945060408701356200156f81620014fe565b959894975094956060810135955060808101359460a0909101359350915050565b60008060408385031215620015a457600080fd5b8235620015b181620014fe565b91506020830135620015c381620014fe565b809150509250929050565b600080600080600060a08688031215620015e757600080fd5b8535620015f481620014fe565b945060208601356200160681620014fe565b94979496505050506040830135926060810135926080909101359150565b6000602082840312156200163757600080fd5b813562000d7981620014fe565b600080604083850312156200165857600080fd5b505080516020909101519092909150565b6000602082840312156200167c57600080fd5b5051919050565b8181038181111562000221577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156200170057600080fd5b8151801515811462000d7957600080fd5b60005b838110156200172e57818101518382015260200162001714565b50506000910152565b600082516200174b81846020870162001711565b9190910192915050565b60208152600082518060208401526200177681604085016020870162001711565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe6101006040523480156200001257600080fd5b5060405162001bb138038062001bb1833981016040819052620000359162000553565b60016000556001600160a01b03808516608081905284821660a05283821660c081905291831660e0526200006d9190600019620000a1565b60805160e0516200008d916001600160a01b0390911690600019620000a1565b62000097620001f4565b505050506200069e565b8015806200011f5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620005bb565b155b620001975760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084015b60405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620001ef918591620002c216565b505050565b60805160c05160e051604051636a234e1f60e11b81526001600160a01b03928316600482015290821660248201526000928392169063d4469c3e906044016040805180830381865afa1580156200024f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002759190620005d5565b604080516001600160701b038085168252831660208201529294509092507f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1910160405180910390a15050565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649082015260009062000311906001600160a01b03851690849062000396565b905080516000148062000335575080806020019051810190620003359190620005fa565b620001ef5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016200018e565b6060620003a78484600085620003af565b949350505050565b606082471015620004125760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016200018e565b600080866001600160a01b031685876040516200043091906200064b565b60006040518083038185875af1925050503d80600081146200046f576040519150601f19603f3d011682016040523d82523d6000602084013e62000474565b606091505b509092509050620004888783838762000493565b979650505050505050565b6060831562000507578251600003620004ff576001600160a01b0385163b620004ff5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016200018e565b5081620003a7565b620003a783838151156200051e5781518083602001fd5b8060405162461bcd60e51b81526004016200018e919062000669565b6001600160a01b03811681146200055057600080fd5b50565b600080600080608085870312156200056a57600080fd5b845162000577816200053a565b60208601519094506200058a816200053a565b60408601519093506200059d816200053a565b6060860151909250620005b0816200053a565b939692955090935050565b600060208284031215620005ce57600080fd5b5051919050565b60008060408385031215620005e957600080fd5b505080516020909101519092909150565b6000602082840312156200060d57600080fd5b815180151581146200061e57600080fd5b9392505050565b60005b838110156200064257818101518382015260200162000628565b50506000910152565b600082516200065f81846020870162000625565b9190910192915050565b60208152600082518060208401526200068a81604085016020870162000625565b601f01601f19169190910160400192915050565b60805160a05160c05160e051611438620007796000396000818161027b015281816103d40152818161049f0152818161052c015281816105e9015281816107090152818161083d0152818161094e0152610e56015260008181610175015281816102ef015281816103ac015281816104cc01528181610611015281816106dc0152818161081c0152818161092601528181610bc40152610e2e01526000818161022d0152610a170152600081816102540152818161041601528181610653015281816107e00152818161097d0152610e8301526114386000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80637464fc3d11610081578063c5c51dca1161005b578063c5c51dca1461024f578063d21220a714610276578063eaa99dbb1461029d57600080fd5b80637464fc3d146101d657806395d89b41146101ec578063c45a01551461022857600080fd5b80630902f1ac116100b25780630902f1ac146101355780630dfe168114610170578063313ce567146101bc57600080fd5b8063022c0d9f146100ce57806306fdde03146100e3575b600080fd5b6100e16100dc366004611179565b6102b0565b005b61011f6040518060400160405280600881526020017f5a65726f2044455800000000000000000000000000000000000000000000000081525081565b60405161012c9190611231565b60405180910390f35b61013d6107d6565b604080516dffffffffffffffffffffffffffff948516815293909216602084015263ffffffff169082015260600161012c565b6101977f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161012c565b6101c4601281565b60405160ff909116815260200161012c565b6101de6108e9565b60405190815260200161012c565b61011f6040518060400160405280600881526020017f5a45524f2d44455800000000000000000000000000000000000000000000000081525081565b6101977f000000000000000000000000000000000000000000000000000000000000000081565b6101977f000000000000000000000000000000000000000000000000000000000000000081565b6101977f000000000000000000000000000000000000000000000000000000000000000081565b6100e16102ab366004611282565b6109ff565b6102b8610ab5565b83156104f5576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561034b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036f91906112c4565b6040517fe2f7c48000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015260448201839052606482018890524260848301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063e2f7c4809060a4016020604051808303816000875af115801561045f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048391906112c4565b90506104c673ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168683610b28565b6104f2337f00000000000000000000000000000000000000000000000000000000000000008484610bba565b50505b8415610732576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610588573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ac91906112c4565b6040517fe2f7c48000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015260448201839052606482018990524260848301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063e2f7c4809060a4016020604051808303816000875af115801561069c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c091906112c4565b905061070373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168683610b28565b61072f337f00000000000000000000000000000000000000000000000000000000000000008484610bba565b50505b80156107c5576040517f10d1e85c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416906310d1e85c9061079290339089908990889088906004016112dd565b600060405180830381600087803b1580156107ac57600080fd5b505af11580156107c0573d6000803e3d6000fd5b505050505b6107cf6001600055565b5050505050565b60008060008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d4469c3e7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b815260040161089b92919073ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b6040805180830381865afa1580156108b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108db9190611355565b909690955042945092505050565b6040517fd4469c3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152600091829182917f00000000000000000000000000000000000000000000000000000000000000009091169063d4469c3e906044016040805180830381865afa1580156109c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e99190611355565b90925090506109f88183611379565b9250505090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610aa3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4f6e6c792063616c6c61626c652066726f6d2074686520666163746f7279000060448201526064015b60405180910390fd5b610aaf84848484610bba565b50505050565b600260005403610b21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a9a565b6002600055565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610bb5908490610ce2565b505050565b610bc2610df1565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610c7b57604080518381526000602082018190528183015260608101839052905173ffffffffffffffffffffffffffffffffffffffff86169182917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a3610aaf565b604080516000808252602082018590528183018490526060820152905173ffffffffffffffffffffffffffffffffffffffff86169182917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350505050565b6000610d44826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610f419092919063ffffffff16565b9050805160001480610d65575080806020019051810190610d6591906113bd565b610bb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610a9a565b6040517fd4469c3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015260009182917f0000000000000000000000000000000000000000000000000000000000000000169063d4469c3e906044016040805180830381865afa158015610ec9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eed9190611355565b604080516dffffffffffffffffffffffffffff8085168252831660208201529294509092507f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1910160405180910390a15050565b6060610f508484600085610f58565b949350505050565b606082471015610fea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610a9a565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161101391906113e6565b60006040518083038185875af1925050503d8060008114611050576040519150601f19603f3d011682016040523d82523d6000602084013e611055565b606091505b509150915061106687838387611071565b979650505050505050565b606083156111075782516000036111005773ffffffffffffffffffffffffffffffffffffffff85163b611100576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a9a565b5081610f50565b610f50838381511561111c5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9a9190611231565b803573ffffffffffffffffffffffffffffffffffffffff8116811461117457600080fd5b919050565b60008060008060006080868803121561119157600080fd5b85359450602086013593506111a860408701611150565b9250606086013567ffffffffffffffff808211156111c557600080fd5b818801915088601f8301126111d957600080fd5b8135818111156111e857600080fd5b8960208285010111156111fa57600080fd5b9699959850939650602001949392505050565b60005b83811015611228578181015183820152602001611210565b50506000910152565b602081526000825180602084015261125081604085016020870161120d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000806000806080858703121561129857600080fd5b6112a185611150565b93506112af60208601611150565b93969395505050506040820135916060013590565b6000602082840312156112d657600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101949350505050565b6000806040838503121561136857600080fd5b505080516020909101519092909150565b80820281158282048414176113b7577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b6000602082840312156113cf57600080fd5b815180151581146113df57600080fd5b9392505050565b600082516113f881846020870161120d565b919091019291505056fea2646970667358221220a0fca329c91a271368c9ebfe104c512d4ea8d914fe7696133d036c6fd8241ede64736f6c63430008160033a2646970667358221220bc9d890ab38a68641e09980b1b51c7bec394bee21fe7a42d35bd6347b134597c64736f6c63430008160033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c357110
-----Decoded View---------------
Arg [0] : _pools (address): 0x3A07FfB529C1f4EfE2Bb3613e2419a149c357110
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003a07ffb529c1f4efe2bb3613e2419a149c357110
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ 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.