Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
16888176 | 641 days ago | 0.002 ETH | ||||
16888176 | 641 days ago | 0.002 ETH | ||||
16859176 | 645 days ago | 0.006 ETH | ||||
16859176 | 645 days ago | 0.006 ETH | ||||
16452048 | 702 days ago | 0.0001 ETH | ||||
16452048 | 702 days ago | 0.0001005 ETH | ||||
16426550 | 705 days ago | 0.0946 ETH | ||||
16426550 | 705 days ago | 0.0946 ETH | ||||
16426550 | 705 days ago | 0.2542 ETH | ||||
16426550 | 705 days ago | 0.2542 ETH | ||||
16426547 | 705 days ago | 0.0628 ETH | ||||
16426547 | 705 days ago | 0.0628 ETH | ||||
16426509 | 705 days ago | 0.0001475 ETH | ||||
16426509 | 705 days ago | 0.0295 ETH | ||||
16426509 | 705 days ago | 0.0296475 ETH | ||||
16426498 | 705 days ago | 0.0675 ETH | ||||
16426498 | 705 days ago | 0.0675 ETH | ||||
16426458 | 705 days ago | 0.0919 ETH | ||||
16426458 | 705 days ago | 0.0919 ETH | ||||
16426452 | 705 days ago | 0.0379 ETH | ||||
16426452 | 705 days ago | 0.0379 ETH | ||||
16426452 | 705 days ago | 0.000035 ETH | ||||
16426452 | 705 days ago | 0.007 ETH | ||||
16426452 | 705 days ago | 0.007035 ETH | ||||
16426428 | 705 days ago | 0.0000006 ETH |
Loading...
Loading
Contract Name:
SeaportModule
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {BaseExchangeModule} from "./BaseExchangeModule.sol"; import {BaseModule} from "../BaseModule.sol"; import {ISeaport} from "../../../interfaces/ISeaport.sol"; // Notes on the Seaport module: // - supports filling listings (both ERC721/ERC1155) // - supports filling offers (both ERC721/ERC1155) contract SeaportModule is BaseExchangeModule { // --- Structs --- // Helper struct for avoiding "Stack too deep" errors struct SeaportFulfillments { ISeaport.FulfillmentComponent[][] offer; ISeaport.FulfillmentComponent[][] consideration; } // --- Fields --- ISeaport public constant EXCHANGE = ISeaport(0x00000000006c3852cbEf3e08E8dF289169EdE581); // --- Constructor --- constructor(address owner, address router) BaseModule(owner) BaseExchangeModule(router) {} // --- Fallback --- receive() external payable {} // --- Single ETH listing --- function acceptETHListing( ISeaport.AdvancedOrder calldata order, ETHListingParams calldata params, Fee[] calldata fees ) external payable nonReentrant refundETHLeftover(params.refundTo) chargeETHFees(fees, params.amount) { // Execute the fill params.revertIfIncomplete ? _fillSingleOrderWithRevertIfIncomplete( order, new ISeaport.CriteriaResolver[](0), params.fillTo, params.amount ) : _fillSingleOrder( order, new ISeaport.CriteriaResolver[](0), params.fillTo, params.amount ); } // --- Single ERC20 listing --- function acceptERC20Listing( ISeaport.AdvancedOrder calldata order, ERC20ListingParams calldata params, Fee[] calldata fees ) external nonReentrant refundERC20Leftover(params.refundTo, params.token) chargeERC20Fees(fees, params.token, params.amount) { // Approve the exchange if needed _approveERC20IfNeeded(params.token, address(EXCHANGE), params.amount); // Execute the fill params.revertIfIncomplete ? _fillSingleOrderWithRevertIfIncomplete( order, new ISeaport.CriteriaResolver[](0), params.fillTo, 0 ) : _fillSingleOrder( order, new ISeaport.CriteriaResolver[](0), params.fillTo, 0 ); } // --- Multiple ETH listings --- function acceptETHListings( ISeaport.AdvancedOrder[] calldata orders, // Use `memory` instead of `calldata` to avoid `Stack too deep` errors SeaportFulfillments memory fulfillments, ETHListingParams calldata params, Fee[] calldata fees ) external payable nonReentrant refundETHLeftover(params.refundTo) chargeETHFees(fees, params.amount) { // Execute the fill params.revertIfIncomplete ? _fillMultipleOrdersWithRevertIfIncomplete( orders, new ISeaport.CriteriaResolver[](0), fulfillments, params.fillTo, params.amount ) : _fillMultipleOrders( orders, new ISeaport.CriteriaResolver[](0), fulfillments, params.fillTo, params.amount ); } // --- Multiple ERC20 listings --- function acceptERC20Listings( ISeaport.AdvancedOrder[] calldata orders, // Use `memory` instead of `calldata` to avoid `Stack too deep` errors SeaportFulfillments memory fulfillments, ERC20ListingParams calldata params, Fee[] calldata fees ) external nonReentrant refundERC20Leftover(params.refundTo, params.token) chargeERC20Fees(fees, params.token, params.amount) { // Approve the exchange if needed _approveERC20IfNeeded(params.token, address(EXCHANGE), params.amount); // Execute the fill params.revertIfIncomplete ? _fillMultipleOrdersWithRevertIfIncomplete( orders, new ISeaport.CriteriaResolver[](0), fulfillments, params.fillTo, 0 ) : _fillMultipleOrders( orders, new ISeaport.CriteriaResolver[](0), fulfillments, params.fillTo, 0 ); } // --- Single ERC721 offer --- function acceptERC721Offer( ISeaport.AdvancedOrder calldata order, // Use `memory` instead of `calldata` to avoid `Stack too deep` errors ISeaport.CriteriaResolver[] memory criteriaResolvers, OfferParams calldata params, Fee[] calldata fees ) external nonReentrant { // Extract the ERC721 token from the consideration items ISeaport.ConsiderationItem calldata nftItem = order .parameters .consideration[0]; if ( nftItem.itemType != ISeaport.ItemType.ERC721 && nftItem.itemType != ISeaport.ItemType.ERC721_WITH_CRITERIA ) { revert WrongParams(); } IERC721 nftToken = IERC721(nftItem.token); // Extract the payment token from the offer items ISeaport.OfferItem calldata paymentItem = order.parameters.offer[0]; IERC20 paymentToken = IERC20(paymentItem.token); // Approve the exchange if needed _approveERC721IfNeeded(nftToken, address(EXCHANGE)); _approveERC20IfNeeded( paymentToken, address(EXCHANGE), type(uint256).max ); // Execute the fill params.revertIfIncomplete ? _fillSingleOrderWithRevertIfIncomplete( order, criteriaResolvers, address(this), 0 ) : _fillSingleOrder(order, criteriaResolvers, address(this), 0); uint256 identifier = nftItem.itemType == ISeaport.ItemType.ERC721 ? nftItem.identifierOrCriteria : criteriaResolvers[0].identifier; // Pay fees if (nftToken.ownerOf(identifier) != address(this)) { // Only pay fees if the fill was successful uint256 feesLength = fees.length; for (uint256 i; i < feesLength; ) { Fee memory fee = fees[i]; _sendERC20(fee.recipient, fee.amount, paymentToken); unchecked { ++i; } } } // Refund any ERC721 leftover _sendAllERC721(params.refundTo, nftToken, identifier); // Forward any left payment to the specified receiver _sendAllERC20(params.fillTo, paymentToken); } // --- Single ERC1155 offer --- function acceptERC1155Offer( ISeaport.AdvancedOrder calldata order, // Use `memory` instead of `calldata` to avoid `Stack too deep` errors ISeaport.CriteriaResolver[] memory criteriaResolvers, OfferParams calldata params, Fee[] calldata fees ) external nonReentrant { // Extract the ERC1155 token from the consideration items ISeaport.ConsiderationItem calldata nftItem = order .parameters .consideration[0]; if ( nftItem.itemType != ISeaport.ItemType.ERC1155 && nftItem.itemType != ISeaport.ItemType.ERC1155_WITH_CRITERIA ) { revert WrongParams(); } IERC1155 nftToken = IERC1155(nftItem.token); // Extract the payment token from the offer items ISeaport.OfferItem calldata paymentItem = order.parameters.offer[0]; IERC20 paymentToken = IERC20(paymentItem.token); // Approve the exchange if needed _approveERC1155IfNeeded(nftToken, address(EXCHANGE)); _approveERC20IfNeeded( paymentToken, address(EXCHANGE), type(uint256).max ); uint256 identifier = nftItem.itemType == ISeaport.ItemType.ERC1155 ? nftItem.identifierOrCriteria : criteriaResolvers[0].identifier; uint256 balanceBefore = nftToken.balanceOf(address(this), identifier); // Execute the fill params.revertIfIncomplete ? _fillSingleOrderWithRevertIfIncomplete( order, criteriaResolvers, address(this), 0 ) : _fillSingleOrder(order, criteriaResolvers, address(this), 0); uint256 balanceAfter = nftToken.balanceOf(address(this), identifier); // Pay fees uint256 amountFilled = balanceBefore - balanceAfter; if (amountFilled > 0) { uint256 feesLength = fees.length; for (uint256 i; i < feesLength; ) { Fee memory fee = fees[i]; _sendERC20( fee.recipient, // Only pay fees for the amount that was actually filled (fee.amount * amountFilled) / order.numerator, paymentToken ); unchecked { ++i; } } } // Refund any ERC1155 leftover _sendAllERC1155(params.refundTo, nftToken, identifier); // Forward any left payment to the specified receiver _sendAllERC20(params.fillTo, paymentToken); } // --- Generic handler (used for Seaport-based approvals) --- function matchOrders( ISeaport.Order[] calldata orders, ISeaport.Fulfillment[] calldata fulfillments ) external nonReentrant { // We don't perform any kind of input or return value validation, // so this function should be used with precaution - the official // way to use it is only for Seaport-based approvals EXCHANGE.matchOrders(orders, fulfillments); } // --- ERC721 / ERC1155 hooks --- // Single token offer acceptance can be done approval-less by using the // standard `safeTransferFrom` method together with specifying data for // further contract calls. An example: // `safeTransferFrom( // 0xWALLET, // 0xMODULE, // TOKEN_ID, // 0xABI_ENCODED_ROUTER_EXECUTION_CALLDATA_FOR_OFFER_ACCEPTANCE // )` function onERC721Received( address, // operator, address, // from uint256, // tokenId, bytes calldata data ) external returns (bytes4) { if (data.length > 0) { _makeCall(router, data, 0); } return this.onERC721Received.selector; } function onERC1155Received( address, // operator address, // from uint256, // tokenId uint256, // amount bytes calldata data ) external returns (bytes4) { if (data.length > 0) { _makeCall(router, data, 0); } return this.onERC1155Received.selector; } // --- Internal --- // NOTE: In lots of cases, Seaport will not revert if fills were not // fully executed. An example of that is partial filling, which will // successfully fill any amount that is still available (including a // zero amount). One way to ensure that we revert in case of partial // executions is to check the order's filled amount before and after // we trigger the fill (we can use Seaport's `getOrderStatus` method // to check). Since this can be expensive in terms of gas, we have a // separate method variant to be called when reverts are enabled. function _fillSingleOrder( ISeaport.AdvancedOrder calldata order, // Use `memory` instead of `calldata` to avoid `Stack too deep` errors ISeaport.CriteriaResolver[] memory criteriaResolvers, address receiver, uint256 value ) internal { // Execute the fill try EXCHANGE.fulfillAdvancedOrder{value: value}( order, criteriaResolvers, bytes32(0), receiver ) {} catch {} } function _fillSingleOrderWithRevertIfIncomplete( ISeaport.AdvancedOrder calldata order, // Use `memory` instead of `calldata` to avoid `Stack too deep` errors ISeaport.CriteriaResolver[] memory criteriaResolvers, address receiver, uint256 value ) internal { // Cache the order's hash bytes32 orderHash = _getOrderHash(order.parameters); // Before filling, get the order's filled amount uint256 beforeFilledAmount = _getFilledAmount(orderHash); // Execute the fill bool success; try EXCHANGE.fulfillAdvancedOrder{value: value}( order, criteriaResolvers, bytes32(0), receiver ) returns (bool fulfilled) { success = fulfilled; } catch { revert UnsuccessfulFill(); } if (!success) { revert UnsuccessfulFill(); } else { // After successfully filling, get the order's filled amount uint256 afterFilledAmount = _getFilledAmount(orderHash); // Make sure the amount filled as part of this call is correct if (afterFilledAmount - beforeFilledAmount != order.numerator) { revert UnsuccessfulFill(); } } } function _fillMultipleOrders( ISeaport.AdvancedOrder[] calldata orders, // Use `memory` instead of `calldata` to avoid `Stack too deep` errors ISeaport.CriteriaResolver[] memory criteriaResolvers, SeaportFulfillments memory fulfillments, address receiver, uint256 value ) internal { // Execute the fill EXCHANGE.fulfillAvailableAdvancedOrders{value: value}( orders, criteriaResolvers, fulfillments.offer, fulfillments.consideration, bytes32(0), receiver, // Assume at most 255 orders can be filled at once 0xff ); } function _fillMultipleOrdersWithRevertIfIncomplete( ISeaport.AdvancedOrder[] calldata orders, // Use `memory` instead of `calldata` to avoid `Stack too deep` errors ISeaport.CriteriaResolver[] memory criteriaResolvers, SeaportFulfillments memory fulfillments, address receiver, uint256 value ) internal { uint256 length = orders.length; bytes32[] memory orderHashes = new bytes32[](length); uint256[] memory beforeFilledAmounts = new uint256[](length); { for (uint256 i = 0; i < length; ) { // Cache each order's hashes orderHashes[i] = _getOrderHash(orders[i].parameters); // Before filling, get each order's filled amount beforeFilledAmounts[i] = _getFilledAmount(orderHashes[i]); unchecked { ++i; } } } // Execute the fill (bool[] memory fulfilled, ) = EXCHANGE.fulfillAvailableAdvancedOrders{ value: value }( orders, criteriaResolvers, fulfillments.offer, fulfillments.consideration, bytes32(0), receiver, // Assume at most 255 orders can be filled at once 0xff ); for (uint256 i = 0; i < length; ) { // After successfully filling, get the order's filled amount uint256 afterFilledAmount = _getFilledAmount(orderHashes[i]); // Make sure the amount filled as part of this call is correct if ( fulfilled[i] && afterFilledAmount - beforeFilledAmounts[i] != orders[i].numerator ) { fulfilled[i] = false; } if (!fulfilled[i]) { revert UnsuccessfulFill(); } unchecked { ++i; } } } function _getOrderHash( // Must use `memory` instead of `calldata` for the below cast ISeaport.OrderParameters memory orderParameters ) internal view returns (bytes32 orderHash) { // `OrderParameters` and `OrderComponents` share the exact same // fields, apart from the last one, so here we simply treat the // `orderParameters` argument as `OrderComponents` and then set // the last field to the correct data ISeaport.OrderComponents memory orderComponents; assembly { orderComponents := orderParameters } orderComponents.counter = EXCHANGE.getCounter(orderParameters.offerer); orderHash = EXCHANGE.getOrderHash(orderComponents); } function _getFilledAmount(bytes32 orderHash) internal view returns (uint256 totalFilled) { (, , totalFilled, ) = EXCHANGE.getOrderStatus(orderHash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-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.6.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.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-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; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } 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)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } 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"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } 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"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 * ==== * * [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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(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) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; interface ISeaport { enum OrderType { FULL_OPEN, PARTIAL_OPEN, FULL_RESTRICTED, PARTIAL_RESTRICTED } enum ItemType { NATIVE, ERC20, ERC721, ERC1155, ERC721_WITH_CRITERIA, ERC1155_WITH_CRITERIA } enum Side { OFFER, CONSIDERATION } struct OfferItem { ItemType itemType; address token; uint256 identifierOrCriteria; uint256 startAmount; uint256 endAmount; } struct ConsiderationItem { ItemType itemType; address token; uint256 identifierOrCriteria; uint256 startAmount; uint256 endAmount; address recipient; } struct ReceivedItem { ItemType itemType; address token; uint256 identifier; uint256 amount; address recipient; } struct OrderComponents { address offerer; address zone; OfferItem[] offer; ConsiderationItem[] consideration; OrderType orderType; uint256 startTime; uint256 endTime; bytes32 zoneHash; uint256 salt; bytes32 conduitKey; uint256 counter; } struct OrderParameters { address offerer; address zone; OfferItem[] offer; ConsiderationItem[] consideration; OrderType orderType; uint256 startTime; uint256 endTime; bytes32 zoneHash; uint256 salt; bytes32 conduitKey; uint256 totalOriginalConsiderationItems; } struct Order { OrderParameters parameters; bytes signature; } struct AdvancedOrder { OrderParameters parameters; uint120 numerator; uint120 denominator; bytes signature; bytes extraData; } struct CriteriaResolver { uint256 orderIndex; Side side; uint256 index; uint256 identifier; bytes32[] criteriaProof; } struct FulfillmentComponent { uint256 orderIndex; uint256 itemIndex; } struct Fulfillment { FulfillmentComponent[] offerComponents; FulfillmentComponent[] considerationComponents; } struct Execution { ReceivedItem item; address offerer; bytes32 conduitKey; } function getOrderHash(OrderComponents calldata order) external view returns (bytes32 orderHash); function getOrderStatus(bytes32 orderHash) external view returns ( bool isValidated, bool isCancelled, uint256 totalFilled, uint256 totalSize ); function getCounter(address offerer) external view returns (uint256 counter); function fulfillAdvancedOrder( AdvancedOrder calldata advancedOrder, CriteriaResolver[] calldata criteriaResolvers, bytes32 fulfillerConduitKey, address recipient ) external payable returns (bool fulfilled); function fulfillAvailableAdvancedOrders( AdvancedOrder[] memory advancedOrders, CriteriaResolver[] calldata criteriaResolvers, FulfillmentComponent[][] calldata offerFulfillments, FulfillmentComponent[][] calldata considerationFulfillments, bytes32 fulfillerConduitKey, address recipient, uint256 maximumFulfilled ) external payable returns (bool[] memory availableOrders, Execution[] memory executions); function matchOrders( Order[] calldata orders, Fulfillment[] calldata fulfillments ) external payable returns (Execution[] memory executions); function matchAdvancedOrders( AdvancedOrder[] calldata advancedOrders, CriteriaResolver[] calldata criteriaResolvers, Fulfillment[] calldata fulfillments ) external payable returns (Execution[] memory executions); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; // Adapted from: // https://github.com/boringcrypto/BoringSolidity/blob/e74c5b22a61bfbadd645e51a64aa1d33734d577a/contracts/BoringOwnable.sol contract TwoStepOwnable { // --- Fields --- address public owner; address public pendingOwner; // --- Events --- event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); // --- Errors --- error InvalidParams(); error Unauthorized(); // --- Modifiers --- modifier onlyOwner() { if (msg.sender != owner) { revert Unauthorized(); } _; } // --- Constructor --- constructor(address initialOwner) { owner = initialOwner; emit OwnershipTransferred(address(0), initialOwner); } // --- Methods --- function transferOwnership(address newOwner) public onlyOwner { pendingOwner = newOwner; } function claimOwnership() public { address _pendingOwner = pendingOwner; if (msg.sender != _pendingOwner) { revert Unauthorized(); } owner = _pendingOwner; pendingOwner = address(0); emit OwnershipTransferred(owner, _pendingOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {TwoStepOwnable} from "../../misc/TwoStepOwnable.sol"; // Notes: // - includes common helpers useful for all modules abstract contract BaseModule is TwoStepOwnable, ReentrancyGuard { using SafeERC20 for IERC20; // --- Events --- event CallExecuted(address target, bytes data, uint256 value); // --- Errors --- error UnsuccessfulCall(); error UnsuccessfulPayment(); error WrongParams(); // --- Constructor --- constructor(address owner) TwoStepOwnable(owner) {} // --- Owner --- // To be able to recover anything that gets stucked by mistake in the module, // we allow the owner to perform any arbitrary call. Since the goal is to be // stateless, this should only happen in case of mistakes. In addition, this // method is also useful for withdrawing any earned trading rewards. function makeCalls( address[] calldata targets, bytes[] calldata data, uint256[] calldata values ) external payable onlyOwner nonReentrant { uint256 length = targets.length; for (uint256 i = 0; i < length; ) { _makeCall(targets[i], data[i], values[i]); emit CallExecuted(targets[i], data[i], values[i]); unchecked { ++i; } } } // --- Helpers --- function _sendETH(address to, uint256 amount) internal { if (amount > 0) { (bool success, ) = payable(to).call{value: amount}(""); if (!success) { revert UnsuccessfulPayment(); } } } function _sendERC20( address to, uint256 amount, IERC20 token ) internal { if (amount > 0) { token.safeTransfer(to, amount); } } function _makeCall( address target, bytes memory data, uint256 value ) internal { (bool success, ) = payable(target).call{value: value}(data); if (!success) { revert UnsuccessfulCall(); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import {BaseModule} from "../BaseModule.sol"; // Notes: // - includes common helpers useful for all marketplace/exchange modules abstract contract BaseExchangeModule is BaseModule { using SafeERC20 for IERC20; // --- Structs --- // Every fill execution has the following parameters: // - `fillTo`: the recipient of the received items // - `refundTo`: the recipient of any refunds // - `revertIfIncomplete`: whether to revert or skip unsuccessful fills // The below `ETHListingParams` and `ERC20ListingParams` rely on the // off-chain execution encoder to ensure that the orders filled with // the passed in listing parameters exactly match (eg. order amounts // and payment tokens match). struct ETHListingParams { address fillTo; address refundTo; bool revertIfIncomplete; // The total amount of ETH to be provided when filling uint256 amount; } struct ERC20ListingParams { address fillTo; address refundTo; bool revertIfIncomplete; // The ERC20 payment token for the listings IERC20 token; // The total amount of `token` to be provided when filling uint256 amount; } struct OfferParams { address fillTo; address refundTo; bool revertIfIncomplete; } struct Fee { address recipient; uint256 amount; } // --- Fields --- address public immutable router; // --- Errors --- error UnsuccessfulFill(); // --- Constructor --- constructor(address routerAddress) { router = routerAddress; } // --- Modifiers --- modifier refundETHLeftover(address refundTo) { _; uint256 leftover = address(this).balance; if (leftover > 0) { _sendETH(refundTo, leftover); } } modifier refundERC20Leftover(address refundTo, IERC20 token) { _; uint256 leftover = token.balanceOf(address(this)); if (leftover > 0) { token.safeTransfer(refundTo, leftover); } } modifier chargeETHFees(Fee[] calldata fees, uint256 amount) { if (fees.length == 0) { _; } else { uint256 balanceBefore = address(this).balance; _; uint256 length = fees.length; if (length > 0) { uint256 balanceAfter = address(this).balance; uint256 actualPaid = balanceBefore - balanceAfter; uint256 actualFee; for (uint256 i = 0; i < length; ) { // Adjust the fee to what was actually paid actualFee = (fees[i].amount * actualPaid) / amount; if (actualFee > 0) { _sendETH(fees[i].recipient, actualFee); } unchecked { ++i; } } } } } modifier chargeERC20Fees( Fee[] calldata fees, IERC20 token, uint256 amount ) { if (fees.length == 0) { _; } else { uint256 balanceBefore = token.balanceOf(address(this)); _; uint256 length = fees.length; if (length > 0) { uint256 balanceAfter = token.balanceOf(address(this)); uint256 actualPaid = balanceBefore - balanceAfter; uint256 actualFee; for (uint256 i = 0; i < length; ) { // Adjust the fee to what was actually paid actualFee = (fees[i].amount * actualPaid) / amount; if (actualFee > 0) { token.safeTransfer(fees[i].recipient, actualFee); } unchecked { ++i; } } } } } // --- Helpers --- function _sendAllETH(address to) internal { _sendETH(to, address(this).balance); } function _sendAllERC20(address to, IERC20 token) internal { uint256 balance = token.balanceOf(address(this)); if (balance > 0) { token.safeTransfer(to, balance); } } function _sendAllERC721( address to, IERC721 token, uint256 tokenId ) internal { if (token.ownerOf(tokenId) == address(this)) { token.safeTransferFrom(address(this), to, tokenId); } } function _sendAllERC1155( address to, IERC1155 token, uint256 tokenId ) internal { uint256 balance = token.balanceOf(address(this), tokenId); if (balance > 0) { token.safeTransferFrom(address(this), to, tokenId, balance, ""); } } function _approveERC20IfNeeded( IERC20 token, address spender, uint256 amount ) internal { uint256 allowance = token.allowance(address(this), spender); if (allowance < amount) { token.approve(spender, amount - allowance); } } function _approveERC721IfNeeded(IERC721 token, address operator) internal { bool isApproved = token.isApprovedForAll(address(this), operator); if (!isApproved) { token.setApprovalForAll(operator, true); } } function _approveERC1155IfNeeded(IERC1155 token, address operator) internal { bool isApproved = token.isApprovedForAll(address(this), operator); if (!isApproved) { token.setApprovalForAll(operator, true); } } }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidParams","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnsuccessfulCall","type":"error"},{"inputs":[],"name":"UnsuccessfulFill","type":"error"},{"inputs":[],"name":"UnsuccessfulPayment","type":"error"},{"inputs":[],"name":"WrongParams","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"CallExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"EXCHANGE","outputs":[{"internalType":"contract ISeaport","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct ISeaport.AdvancedOrder","name":"order","type":"tuple"},{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"enum ISeaport.Side","name":"side","type":"uint8"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"bytes32[]","name":"criteriaProof","type":"bytes32[]"}],"internalType":"struct ISeaport.CriteriaResolver[]","name":"criteriaResolvers","type":"tuple[]"},{"components":[{"internalType":"address","name":"fillTo","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"bool","name":"revertIfIncomplete","type":"bool"}],"internalType":"struct BaseExchangeModule.OfferParams","name":"params","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.Fee[]","name":"fees","type":"tuple[]"}],"name":"acceptERC1155Offer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct ISeaport.AdvancedOrder","name":"order","type":"tuple"},{"components":[{"internalType":"address","name":"fillTo","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"bool","name":"revertIfIncomplete","type":"bool"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.ERC20ListingParams","name":"params","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.Fee[]","name":"fees","type":"tuple[]"}],"name":"acceptERC20Listing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct ISeaport.AdvancedOrder[]","name":"orders","type":"tuple[]"},{"components":[{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"uint256","name":"itemIndex","type":"uint256"}],"internalType":"struct ISeaport.FulfillmentComponent[][]","name":"offer","type":"tuple[][]"},{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"uint256","name":"itemIndex","type":"uint256"}],"internalType":"struct ISeaport.FulfillmentComponent[][]","name":"consideration","type":"tuple[][]"}],"internalType":"struct SeaportModule.SeaportFulfillments","name":"fulfillments","type":"tuple"},{"components":[{"internalType":"address","name":"fillTo","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"bool","name":"revertIfIncomplete","type":"bool"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.ERC20ListingParams","name":"params","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.Fee[]","name":"fees","type":"tuple[]"}],"name":"acceptERC20Listings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct ISeaport.AdvancedOrder","name":"order","type":"tuple"},{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"enum ISeaport.Side","name":"side","type":"uint8"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"bytes32[]","name":"criteriaProof","type":"bytes32[]"}],"internalType":"struct ISeaport.CriteriaResolver[]","name":"criteriaResolvers","type":"tuple[]"},{"components":[{"internalType":"address","name":"fillTo","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"bool","name":"revertIfIncomplete","type":"bool"}],"internalType":"struct BaseExchangeModule.OfferParams","name":"params","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.Fee[]","name":"fees","type":"tuple[]"}],"name":"acceptERC721Offer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct ISeaport.AdvancedOrder","name":"order","type":"tuple"},{"components":[{"internalType":"address","name":"fillTo","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"bool","name":"revertIfIncomplete","type":"bool"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.ETHListingParams","name":"params","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.Fee[]","name":"fees","type":"tuple[]"}],"name":"acceptETHListing","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct ISeaport.AdvancedOrder[]","name":"orders","type":"tuple[]"},{"components":[{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"uint256","name":"itemIndex","type":"uint256"}],"internalType":"struct ISeaport.FulfillmentComponent[][]","name":"offer","type":"tuple[][]"},{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"uint256","name":"itemIndex","type":"uint256"}],"internalType":"struct ISeaport.FulfillmentComponent[][]","name":"consideration","type":"tuple[][]"}],"internalType":"struct SeaportModule.SeaportFulfillments","name":"fulfillments","type":"tuple"},{"components":[{"internalType":"address","name":"fillTo","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"bool","name":"revertIfIncomplete","type":"bool"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.ETHListingParams","name":"params","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.Fee[]","name":"fees","type":"tuple[]"}],"name":"acceptETHListings","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"makeCalls","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct ISeaport.Order[]","name":"orders","type":"tuple[]"},{"components":[{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"uint256","name":"itemIndex","type":"uint256"}],"internalType":"struct ISeaport.FulfillmentComponent[]","name":"offerComponents","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"uint256","name":"itemIndex","type":"uint256"}],"internalType":"struct ISeaport.FulfillmentComponent[]","name":"considerationComponents","type":"tuple[]"}],"internalType":"struct ISeaport.Fulfillment[]","name":"fulfillments","type":"tuple[]"}],"name":"matchOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a034620000c657601f62003ba838819003918201601f19168301916001600160401b03831184841017620000cb578084926040948552833981010312620000c6576200005a60206200005283620000e1565b9201620000e1565b600080546001600160a01b0319166001600160a01b03909316928317815560405192907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a36001600255608052613ab19081620000f782396080518181816103c901526114f00152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620000c65756fe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806312f3a43f1461015b578063150b7a02146101525780632b8a88ec146101495780634e71e0c8146101405780636baab5f71461013757806376af66291461012e57806386f20e8c146101255780638da5cb5b1461011c5780638fc10d3b14610113578063a81744041461010a578063b50e44b814610101578063d44e2a2d146100f8578063e30c3978146100ef578063f23a6e61146100e6578063f2fde38b146100dd5763f887ea400361000e576100d86114d9565b61000e565b506100d8611488565b506100d8611413565b506100d86113e9565b506100d8611295565b506100d861126a565b506100d86110eb565b506100d8611070565b506100d8610eef565b506100d8610ddd565b506100d8610c69565b506100d8610a5f565b506100d86109f5565b506100d86106ee565b506100d8610359565b506100d8610199565b9181601f84011215610194578235916001600160401b038311610194576020808501948460051b01011161019457565b600080fd5b50606080600319360112610194576001600160401b0390600435828111610194576101c8903690600401610164565b602493919335828111610194576101e3903690600401610164565b92604435908111610194576101fc903690600401610164565b60005491956001600160a01b03949092851633036102fd5761022260028054141561151f565b6002805560005b81811061023a576100196001600255565b807fa3f06cf374cf66be06f5fe85cdd3b13d9d9fdef6482f640d2de1d44c3ed7332c8787868c6102f08f878f81816102c1828f60019f976102bc8c8e6102b68e6102ad886102d49f806102cc9f6102956102a5938d8d611582565b35976102a08961030e565b6115b3565b969093611582565b3593369161162c565b906116f0565b611582565b35986102a08a61030e565b959094611582565b359160409384519687961686528c60208701528c860191611663565b918301520390a101610229565b6040516282b42960e81b8152600490fd5b6001600160a01b0381160361019457565b359061032a8261030e565b565b9181601f84011215610194578235916001600160401b038311610194576020838186019501011161019457565b50346101945760803660031901126101945761037660043561030e565b61038160243561030e565b6064356001600160401b038111610194576103a090369060040161032c565b806103b8575b604051630a85bd0160e11b8152602090f35b6103ed916103c791369161162c565b7f00000000000000000000000000000000000000000000000000000000000000006116b4565b38806103a6565b60a090602319011261019457602490565b908160a09103126101945790565b50634e487b7160e01b600052604160045260246000fd5b60a081019081106001600160401b0382111761044557604052565b61044d610413565b604052565b604081019081106001600160401b0382111761044557604052565b6001600160401b03811161044557604052565b606081019081106001600160401b0382111761044557604052565b60c081019081106001600160401b0382111761044557604052565b90601f801991011681019081106001600160401b0382111761044557604052565b6040519061016082018281106001600160401b0382111761044557604052565b6020906001600160401b038111610510575b60051b0190565b610518610413565b610509565b81601f8201121561019457803591610534836104f7565b9261054260405194856104b6565b808452602092838086019260051b820101928311610194578301905b82821061056c575050505090565b8135815290830190830161055e565b606090604319011261019457604490565b9181601f84011215610194578235916001600160401b038311610194576020808501948460061b01011161019457565b60c0600319820112610194576001600160401b039060043582811161019457816105e891600401610405565b92602480359084821161019457836023830112156101945781600401359161060f836104f7565b92604061061e815195866104b6565b818552602093808587019360051b8501019388851161019457818101935b85851061066f5750505050505050926106548361057b565b9260a4359182116101945761066b9160040161058c565b9091565b84358b81116101945782019060a0828c036023190112610194578451906106958261042a565b8483013582526044830135600281101561019457898301526064830135868301526084830135606083015260a4830135918d8311610194576106de8d878c96958796010161051d565b608082015281520194019361063c565b5034610194576106fd366105bc565b610710600280969395949654141561151f565b6002805561073461072e610724848061215c565b6060810190612172565b906121a7565b936003610740866121eb565b610749816121d9565b1415806109ce575b6109bc576020916107726107668488016115a9565b6001600160a01b031690565b9361079a6107668561079461072e61078a868061215c565b60408101906121f5565b016115a9565b966107a48661241b565b6107ad88611c68565b60036107b8826121eb565b6107c1816121d9565b036109a15761085a6040610874920135975b604051627eeac760e11b808252306004830152602482018b9052909188918b916001600160a01b038c1691908f8587604481875afa968715610994575b60009761096e575b5060406108259101611799565b1561095d576108369030908a612f24565b60405190815230600482015260248101929092529093849190829081906044820190565b03915afa918215610950575b600092610921575b50611729565b91826108ac575b6108a28861089d8b6108988b8b6108938c85016115a9565b6124fa565b6115a9565b6122c9565b6100196001600255565b60005b8181106108bc575061087b565b8061091b8a6108d66108d1600195878b61173e565b612286565b8051610915906108f5908a908d906001600160a01b031694015161175c565b61090f6109038d8b016124f0565b6001600160781b031690565b9061176f565b906122b6565b016108af565b610942919250873d8911610949575b61093a81836104b6565b81019061186a565b903861086e565b503d610930565b610958611879565b610866565b6109699030908a612c81565b610836565b61082591975061098c604091883d8a116109495761093a81836104b6565b979150610818565b61099c611879565b610810565b5061087461085a60606109b38961222a565b510151976107d3565b604051635863f78960e01b8152600490fd5b5060056109da866121eb565b6109e3816121d9565b1415610751565b600091031261019457565b503461019457600080600319360112610a5c576001546001600160a01b03811690338290036102fd5782546001600160a01b03199081168317845516600155807f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b80fd5b503461019457610a6e366105bc565b919392600291610a81838054141561151f565b828055610a9461072e610724878061215c565b9183610a9f846121eb565b610aa8816121d9565b141580610c2b575b6109bc57602092610ac56107668583016115a9565b94610add6107668661079461072e61078a8d8061215c565b97610ae78761241b565b610af089611c68565b610afc60408b01611799565b15610c1a57610b0d90843091612f24565b610b16826121eb565b610b1f816121d9565b03610c0557604091500135935b6040516331a9108f60e11b8152600481018690526001600160a01b0384826024818985165afa918215610bf8575b600092610bc9575b5030911603610b89575b6108a28661089d896108988989610b848a85016115a9565b612337565b60005b818110610b995750610b6c565b80610bc388610bae6108d1600195878961173e565b805190880151906001600160a01b03166122b6565b01610b8c565b610bea919250853d8711610bf1575b610be281836104b6565b810190612271565b9038610b62565b503d610bd8565b610c00611879565b610b5a565b50610c1160609161222a565b51015193610b2c565b610c2690843091612c81565b610b0d565b506004610c37846121eb565b610c40816121d9565b1415610ab0565b608090602319011261019457602490565b608090604319011261019457604490565b5060c0366003190112610194576001600160401b0360043581811161019457610c96903690600401610405565b610c9f36610c47565b9160a43590811161019457610cb890369060040161058c565b929091610cc960028054141561151f565b6002805560208083013593610cdd8561030e565b60608401359580610d1657505050610cf69293506117d4565b4780610d06576100196001600255565b610d0f9161182b565b38806108a2565b919392610d5891938747926040830135610d2f8161178f565b15610dbb57610d5192610d406117a3565b903591610d4c8361030e565b613013565b4790611729565b60005b828110610d6e5750505050509050610cf6565b80610d9188610d8c8589610d856001978a8c61173e565b013561175c565b61176f565b80610d9e575b5001610d5b565b610db590610db061089884888a61173e565b61182b565b38610d97565b610dd892610dc76117a3565b903591610dd38361030e565b612ca3565b610d51565b50346101945760e0366003190112610194576001600160401b0360043581811161019457610e0f903690600401610405565b90610e19366103f4565b9060c43590811161019457610e35610e6b91369060040161058c565b90610e4460028054141561151f565b60028055602084013593610e578561030e565b606081013595610e668761030e565b611886565b6040516370a0823160e01b8152306004820152906020826024816001600160a01b0387165afa918215610ee2575b600092610ec2575b5081610eb1576100196001600255565b610eba92611a6f565b3880806108a2565b610edb91925060203d81116109495761093a81836104b6565b9038610ea1565b610eea611879565b610e99565b5034610194576000366003190112610194576000546040516001600160a01b039091168152602090f35b9080601f8301121561019457813591610f31836104f7565b92604092610f41845195866104b6565b818552602093848087019360051b8501019382851161019457858101935b858510610f70575050505050505090565b84356001600160401b03811161019457820184603f82011215610194578781013590610f9b826104f7565b91610fa8865193846104b6565b808352858a84019160061b830101918783116101945791868b94929593015b818110610fde575050829350815201940193610f5f565b91935091938682890312610194578a87918251610ffa81610452565b8435815282850135838201528152019101918a93919492610fc7565b9190604083820312610194576040519061102f82610452565b81938035916001600160401b03928381116101945781611050918401610f19565b845260208201359283116101945760209261106b9201610f19565b910152565b503461019457610100366003190112610194576001600160401b03600435818111610194576110a3903690600401610164565b90602435838111610194576110bc903690600401611016565b60a03660431901126101945760e435938411610194576110e361001994369060040161058c565b939092611ec9565b50346101945760406003198181360112610194576001600160401b039060043582811161019457611120903690600401610164565b9092602435908111610194579161113c85933690600401610164565b9161114b60028054141561151f565b600280558451958694632a05d10160e21b8652806044870188600489015252606486019160648260051b8801019781936000925b8484106111fa5789600081806111a08f8e8e8e858403016024860152612a57565b0381836e6c3852cbef3e08e8df289169ede5815af180156111ed575b6111ca576100196001600255565b6111e6903d806000833e6111de81836104b6565b8101906126e5565b50806108a2565b6111f5611879565b6111bc565b919395969798509193986112496001916063198d82030185526112566112208d866129d0565b9161123a61122e848061270a565b898352898301906128cb565b9060209484868096019061299f565b9185818503910152611663565b9b019301940191938a98979695939161117f565b50346101945760003660031901126101945760206040516e6c3852cbef3e08e8df289169ede5818152f35b5060e0366003190112610194576001600160401b03600435818111610194576112c2903690600401610164565b9091602435818111610194576112dc903690600401611016565b6112e536610c58565b9160c435908111610194576112fe90369060040161058c565b93909461130f60028054141561151f565b6002805560209485850135956113248761030e565b6060860135918061133d57505050610cf6949550611e6c565b9390959161137a93819996479460408101356113588161178f565b156113cc57610d51946113696117a3565b9135936113758561030e565b613572565b60005b8281106113905750505050509050610cf6565b806113a788610d8c8589610d856001978a8c61173e565b806113b4575b500161137d565b6113c690610db061089884888a61173e565b386113ad565b610dd8946113d86117a3565b9135936113e48561030e565b61331d565b5034610194576000366003190112610194576001546040516001600160a01b039091168152602090f35b50346101945760a03660031901126101945761143060043561030e565b61143b60243561030e565b6084356001600160401b0381116101945761145a90369060040161032c565b80611472575b60405163f23a6e6160e01b8152602090f35b611481916103c791369161162c565b3880611460565b5034610194576020366003190112610194576004356114a68161030e565b6000546001600160a01b039190821633036102fd57166bffffffffffffffffffffffff60a01b6001541617600155600080f35b5034610194576000366003190112610194576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b1561152657565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b50634e487b7160e01b600052603260045260246000fd5b91908110156115925760051b0190565b61051861156b565b60a4356115a68161030e565b90565b356115a68161030e565b91908110156115f5575b60051b81013590601e19813603018212156101945701908135916001600160401b038311610194576020018236038113610194579190565b6115fd61156b565b6115bd565b6020906001600160401b03811161161f575b601f01601f19160190565b611627610413565b611614565b92919261163882611602565b9161164660405193846104b6565b829481845281830111610194578281602093846000960137010152565b908060209392818452848401376000828201840152601f01601f1916010190565b3d156116af573d9061169582611602565b916116a360405193846104b6565b82523d6000602084013e565b606090565b8151600092839260209091019083906001600160a01b03165af16116d6611684565b50156116de57565b6040516322092f2f60e11b8152600490fd5b8151600093849391926020909201916001600160a01b03165af16116d6611684565b50634e487b7160e01b600052601160045260246000fd5b9190820391821161173657565b61032a611712565b919081101561174f575b60061b0190565b61175761156b565b611748565b8181029291811591840414171561173657565b8115611779570490565b634e487b7160e01b600052601260045260246000fd5b8015150361019457565b356115a68161178f565b604051602081018181106001600160401b038211176117c7575b6040526000815290565b6117cf610413565b6117bd565b60408201356117e28161178f565b156118095761032a916117f36117a3565b60608235926118018461030e565b013592613013565b61032a916118156117a3565b60608235926118238461030e565b013592612ca3565b81611834575050565b6000918291829182916001600160a01b03165af1611850611684565b501561185857565b60405163d2dcf4f360e01b8152600490fd5b90816020910312610194575190565b506040513d6000823e3d90fd5b9091939293611897606084016115a9565b608084013595806118b05750505061032a9293506119a7565b6040516370a0823160e01b80825230600483015260209694959394929361191f936001600160a01b038716939289929091908385602481895afa94851561199a575b600095611975575b5090611905916119a7565b60405190815230600482015292839081806024810161085a565b60005b828110611933575050505050509050565b8061194a89610d8c858a610d856001978a8d61173e565b80611957575b5001611922565b61196f9061196961089884888b61173e565b87611a6f565b38611950565b6119059291955061199290853d87116109495761093a81836104b6565b9490916118fa565b6119a2611879565b6118f2565b906119c460608201356119b98161030e565b608083013590611d59565b60408101356119d28161178f565b156119f5579061032a916119e46117a3565b9035916119f08361030e565b612f24565b602090611a006117a3565b903592611a0c8461030e565b611a2a60405194859384936339eb2ac960e21b855260048501612c40565b038160006e6c3852cbef3e08e8df289169ede5815af1611a48575b50565b611a459060203d8111611a68575b611a6081836104b6565b810190611b79565b503d611a56565b60405163a9059cbb60e01b60208083019182526001600160a01b03949094166024830152604480830195909552938152919290611aad6064846104b6565b60018060a01b03169060405192611ac384610452565b8484527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656485850152823b15611b3457611b0f939260009283809351925af1611b09611684565b90611bed565b80519081611b1c57505050565b8261032a93611b2f938301019101611b79565b611b8e565b60405162461bcd60e51b815260048101869052601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b9081602091031261019457516115a68161178f565b15611b9557565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b90919015611bf9575090565b815115611c095750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510611c4f575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611c2c565b604051636eb1769f60e11b81523060048201526e6c3852cbef3e08e8df289169ede58160248201526020916001600160a01b03168282604481845afa918215611d4c575b600092611d2d575b506000198210611cc357505050565b60405163095ea7b360e01b81526e6c3852cbef3e08e8df289169ede5816004820152911960248301528290829060449082906000905af18015611d20575b611d0a575b5050565b81611a4592903d10611a6857611a6081836104b6565b611d28611879565b611d01565b611d45919250833d85116109495761093a81836104b6565b9038611cb4565b611d54611879565b611cac565b604051636eb1769f60e11b81523060048201526e6c3852cbef3e08e8df289169ede58160248201526020926001600160a01b039290921691908381604481865afa908115611e5f575b600091611e42575b50818110611db9575b50505050565b600092611dca611e00928694611729565b60405194858094819363095ea7b360e01b8352600483019190602060408401936e6c3852cbef3e08e8df289169ede58181520152565b03925af18015611e35575b611e17575b8080611db3565b81611e2d92903d10611a6857611a6081836104b6565b503880611e10565b611e3d611879565b611e0b565b611e599150843d86116109495761093a81836104b6565b38611daa565b611e67611879565b611da2565b919290926040820135611e7e8161178f565b15611ea65761032a93611e8f6117a3565b906060843594611e9e8661030e565b013594613572565b61032a93611eb26117a3565b906060843594611ec18661030e565b01359461331d565b939092611f0192611ede60028054141561151f565b6002805560643594611eef8661030e565b60a43596611efc8861030e565b611f89565b6040516370a0823160e01b8152306004820152906020826024816001600160a01b0387165afa918215611f7c575b600092611f5c575b5081611f4b575b50505061032a6001600255565b611f5492611a6f565b388080611f3e565b611f7591925060203d81116109495761093a81836104b6565b9038611f37565b611f84611879565b611f2f565b909192949394611f9761159a565b60c4359680611fae5750505061032a939450612087565b6040516370a0823160e01b808252306004830152602097949693959294612003946001600160a01b038816948a9392919084866024818a5afa95861561207a575b600096612053575b50906119059291612087565b60005b828110612017575050505050509050565b8061202e89610d8c858a610d856001978a8d61173e565b8061203b575b5001612006565b61204d9061196961089884888b61173e565b38612034565b611905939291965061207190863d88116109495761093a81836104b6565b95909192611ff7565b612082611879565b611fef565b906120a060a4356120978161030e565b60c43590611d59565b6084356120ac8161178f565b156120d1579161032a926120be6117a3565b90604435936120cc8561030e565b6133ce565b6000916121106120df6117a3565b94604435906120ed8261030e565b602081519101519060405197889687966387201b4160e01b8852600488016131b7565b0381836e6c3852cbef3e08e8df289169ede5815af1801561214f575b6121335750565b611d06903d806000833e61214781836104b6565b810190613089565b612157611879565b61212c565b90359061015e1981360301821215610194570190565b903590601e198136030182121561019457018035906001600160401b038211610194576020019160c082023603831361019457565b90156121b05790565b6115a661156b565b6006111561019457565b50634e487b7160e01b600052602160045260246000fd5b600611156121e357565b61032a6121c2565b356115a6816121b8565b903590601e198136030182121561019457018035906001600160401b038211610194576020019160a082023603831361019457565b602090805115612238570190565b61224061156b565b0190565b6020918151811015612259575b60051b010190565b61226161156b565b612251565b519061032a8261030e565b9081602091031261019457516115a68161030e565b6040813603126101945760206040519161229f83610452565b80356122aa8161030e565b83520135602082015290565b816122c057505050565b61032a92611a6f565b6040516370a0823160e01b8152306004820152906020826024816001600160a01b0387165afa91821561232a575b60009261230a575b50816122c057505050565b61232391925060203d81116109495761093a81836104b6565b90386122ff565b612332611879565b6122f7565b6040516331a9108f60e11b8152600481018490526001600160a01b03928316939192602082602481885afa91821561240e575b6000926123ee575b5016301461237f57505050565b823b1561019457604051632142170760e11b81523060048201526001600160a01b0390921660248301526044820152906000908290818381606481015b03925af180156123e1575b6123ce5750565b806123db61032a9261046d565b806109ea565b6123e9611879565b6123c7565b61240791925060203d8111610bf157610be281836104b6565b9038612372565b612416611879565b61236a565b60405163e985e9c560e01b81523060048201526e6c3852cbef3e08e8df289169ede58160248201526001600160a01b039190911690602081604481855afa9081156124d2575b6000916124b4575b50156124725750565b803b156101945760405163a22cb46560e01b81526e6c3852cbef3e08e8df289169ede581600482015260016024820152906000908290818381604481016123bc565b6124cc915060203d8111611a6857611a6081836104b6565b38612469565b6124da611879565b612461565b6001600160781b0381160361019457565b356115a6816124df565b604051627eeac760e11b81523060048201526024810184905290916001600160a01b0316602082604481845afa9182156125ec575b6000926125cc575b50816125435750505050565b803b1561019457604051637921219560e11b81523060048201526001600160a01b039390931660248401526044830193909352606482015260a06084820152600060a482018190529091829060c490829084905af180156125bf575b6125ac575b808080611db3565b806123db6125b99261046d565b386125a4565b6125c7611879565b61259f565b6125e591925060203d81116109495761093a81836104b6565b9038612537565b6125f4611879565b61252f565b81601f8201121561019457805190612610826104f7565b92604090612620825195866104b6565b838552602091828601918360e080970286010194818611610194578401925b858410612650575050505050505090565b8382038781126101945783519161266683610480565b60a08092126101945788926126cd889387516126818161042a565b895161268c816121b8565b8152858a015161269b8161030e565b86820152888a0151898201526060808b0151908201526080808b0151906126c18261030e565b82015283528801612266565b8382015260c08701518682015281520193019261263f565b906020828203126101945781516001600160401b038111610194576115a692016125f9565b903561015e1982360301811215610194570190565b9035601e19823603018112156101945701602081359101916001600160401b0382116101945760a082023603831361019457565b9060068210156127605752565b6127686121c2565b52565b9190808252602080920192916000905b828210612789575050505090565b90919293806127a4600192873561279f816121b8565b612753565b828601356127b18161030e565b828060a01b03168382015260408087013590820152606080870135908201526080808701359082015260a0809101950192019092919261277b565b9035601e19823603018112156101945701602081359101916001600160401b0382116101945760c082023603831361019457565b9190808252602080920192916000905b82821061283e575050505090565b9091929380612854600192873561279f816121b8565b828601356128618161030e565b828060a01b038091168483015260408088013590830152606080880135908301526080808801359083015260a0908188013561289c8161030e565b169082015260c0908101950193920190612830565b3590600482101561019457565b9060048210156127605752565b906128e6816128d98461031f565b6001600160a01b03169052565b6129056128f56020840161031f565b6001600160a01b03166020830152565b612944612929612918604085018561271f565b61016080604087015285019161276b565b61293660608501856127ec565b908483036060860152612820565b9161295e612954608083016128b1565b60808401906128be565b60a081013560a083015260c081013560c083015260e081013560e0830152610100808201359083015261012080820135908301526101408091013591015290565b9035601e19823603018112156101945701602081359101916001600160401b03821161019457813603831361019457565b9035603e1982360301811215610194570190565b9035601e19823603018112156101945701602081359101916001600160401b038211610194578160061b3603831361019457565b9190808252602080920192916000905b828210612a36575050505090565b83358552838101358582015260409485019490930192600190910190612a28565b90808352602080930192838260051b850194846000925b858410612a7f575050505050505090565b909192939495968580612ad28385600195038852612a9d8c886129d0565b90612ac5612abb612aae84806129e4565b6040808652850191612a18565b92858101906129e4565b9185818503910152612a18565b990194019401929594939190612a6e565b6115a691612b60612b55612b08612afa858061270a565b60a0855260a08501906128cb565b6020850135612b16816124df565b6001600160781b0380911660208601526040860135612b34816124df565b166040850152612b47606086018661299f565b908583036060870152611663565b92608081019061299f565b916080818503910152611663565b90815180825260208092019182818360051b8201950193600080925b858410612b9b575050505050505090565b9091929394959681810384528751908660c060a0928381019385518252838601516002811015612c33575b8483015260408087015190830152606080870151908301526080958601519582015284519384905291939101919083019085905b808210612c1a575050509080600192990194019401929594939190612b8a565b9193806001929486518152019401920188939291612bfa565b612c3b6121c2565b612bc6565b91612c6a90612c5c606093969596608086526080860190612ae3565b908482036020860152612b6e565b600060408401526001600160a01b03909416910152565b90602091611a2a60405194859384936339eb2ac960e21b855260048501612c40565b9260209291612cc994604051958694859384936339eb2ac960e21b855260048501612c40565b03916e6c3852cbef3e08e8df289169ede5815af1611a485750565b81601f8201121561019457803590612cfb826104f7565b92604090612d0b825195866104b6565b838552602091828601918360a080970286010194818611610194578401925b858410612d3b575050505050505090565b8684830312610194578487918451612d528161042a565b8635612d5d816121b8565b815282870135612d6c8161030e565b8382015285870135868201526060808801359082015260808088013590820152815201930192612d2a565b81601f8201121561019457803590612dae826104f7565b92604090612dbe825195866104b6565b838552602091828601918360c080970286010194818611610194578401925b858410612dee575050505050505090565b8684830312610194578487918451612e058161049b565b8635612e10816121b8565b815282870135612e1f8161030e565b838201528587013586820152606080880135908201526080808801359082015260a08088013590612e4f8261030e565b820152815201930192612ddd565b6101608136031261019457612e706104d7565b90612e7a8161031f565b8252612e886020820161031f565b60208301526001600160401b03604082013581811161019457612eae9036908401612ce4565b6040840152606082013590811161019457612ecc9036908301612d97565b6060830152612edd608082016128b1565b608083015260a081013560a083015260c081013560c083015260e081013560e083015261010080820135908301526101208082013590830152610140809101359082015290565b9190612f6f612f43612f3e612f39868061215c565b612e5d565b6138f8565b916020612f4f846139e7565b9460009260405194859283926339eb2ac960e21b84528a60048501612c40565b0381846e6c3852cbef3e08e8df289169ede5815af1909181612ff3575b50612fa357604051631298f31b60e11b8152600490fd5b612fb957604051631298f31b60e11b8152600490fd5b6020612fd3612fda93612fce610903946139e7565b611729565b93016124f0565b03612fe157565b604051631298f31b60e11b8152600490fd5b61300c91925060203d8111611a6857611a6081836104b6565b9038612f8c565b92919061305790602061302c612f3e612f39888061215c565b93613036856139e7565b956000936040518096819482936339eb2ac960e21b84528c60048501612c40565b03916e6c3852cbef3e08e8df289169ede5815af1909181612ff35750612fa357604051631298f31b60e11b8152600490fd5b919091604081840312610194578051926001600160401b03938481116101945782019381601f860112156101945784516130c2816104f7565b906130d060405192836104b6565b808252602096878084019260051b820101918583116101945788809201905b83821061310f575050505094830151908111610194576115a692016125f9565b828091835161311d8161178f565b8152019101906130ef565b90815180825260208092019182818360051b8201950193600080925b858410613155575050505050505090565b9091929387828297989903855288519082808351928381520192019085905b808210613194575050509080600192990194019401929594939190613144565b919360406001929482875180518352015183820152019401920188939291613174565b94929695939190968160e0870160e0885252610100808701908360051b88010192899160009a8b905b838210613247575050505050859361321d6132439461320f8561322b9560ff9b60c09b980360208b0152612b6e565b908782036040890152613128565b908582036060870152613128565b60808401979097526001600160a01b031660a0830152565b0152565b909192939560ff198b82030184528635609e198336030181121561328457600191836132739201612ae3565b9660209081019594019201906131e0565b8d80fd5b94929695939190968160e0870160e0885252610100808701908360051b88010192899160009a8b905b8382106132e0575050505050859361321d6132439461320f8561322b9560ff9b60c09b980360208b0152612b6e565b909192939560ff198b82030184528635609e1983360301811215613284576001918361330c9201612ae3565b9660209081019594019201906132b1565b61334b6000959693949660208851980151604051988997889687966387201b4160e01b8852600488016131b7565b03916e6c3852cbef3e08e8df289169ede5815af1801561214f576121335750565b90613376826104f7565b61338360405191826104b6565b8281528092613394601f19916104f7565b0190602036910137565b91908110156133c1575b60051b81013590609e1981360301821215610194570190565b6133c961156b565b6133a8565b9392936133da8261336c565b946133e48361336c565b9260005b81811061352c5750600082516020809401519661341d6040998a51998a9485946387201b4160e01b8652888b60048801613288565b0381836e6c3852cbef3e08e8df289169ede5815af194851561351f575b600095613503575b5060005b818110613457575050505050505050565b61346a613464828a612244565b516139e7565b61347d6134778389612244565b51151590565b90816134cd575b506134bb575b61349e61349a6134778389612244565b1590565b6134aa57600101613446565b8651631298f31b60e11b8152600490fd5b60006134c78288612244565b5261348a565b6134e391506134dc8388612244565b5190611729565b6134fb610903856134f585878a61339e565b016124f0565b141538613484565b61351791953d8091833e61214781836104b6565b509338613442565b613527611879565b61343a565b80613549612f3e612f39613543600195878a61339e565b8061215c565b613553828b612244565b52613561613464828b612244565b61356b8288612244565b52016133e8565b90949193926135808661336c565b9561358a8161336c565b9360005b8281106136a75750600090835190602080950151916040996135c78b519a8b95869485946387201b4160e01b86528a8d60048801613288565b03916e6c3852cbef3e08e8df289169ede5815af194851561369a575b60009561367e575b5060005b818110613600575050505050505050565b61360d613464828a612244565b61361a6134778389612244565b9081613655575b50613643575b61363761349a6134778389612244565b6134aa576001016135ef565b600061364f8288612244565b52613627565b61366491506134dc8388612244565b613676610903856134f585878a61339e565b141538613621565b61369291953d8091833e61214781836104b6565b5093386135eb565b6136a2611879565b6135e3565b806136be612f3e612f39613543600195888b61339e565b6136c8828c612244565b526136d6613464828c612244565b6136e08289612244565b520161358e565b6040519061016082018281106001600160401b0382111761374d575b60405281610140600091828152826020820152606060408201526060808201528260808201528260a08201528260c08201528260e082015282610100820152826101208201520152565b613755610413565b613703565b90815180825260208080930193019160005b82811061377a575050505090565b909192938260a06001928751613791828251612753565b8084015185841b86900316828501526040808201519083015260608082015190830152608090810151908201520195019392910161376c565b90815180825260208080930193019160005b8281106137ea575050505090565b909192938260c06001928751613801828251612753565b848060a01b038085830151168584015260408083015190840152606080830151908401526080808301519084015260a08092015116908201520195019101929190926137dc565b602080825282516001600160a01b03169082015260208201516001600160a01b0316604082015260408201516138a561388f6101609283606086015261018085019061375a565b6060850151848203601f190160808601526137ca565b926138b8608082015160a08501906128be565b60a081015160c084015260c081015160e084015260e081015161010090818501528101516101209081850152810151906101409182850152015191015290565b613982613937916139076136e7565b50805160405163f07ec37360e01b81526001600160a01b0390911660048201526020938492919081906024820190565b039083816e6c3852cbef3e08e8df289169ede5819381855afa9081156139da575b6000916139bd575b5061014083015260405180809581946379df72bd60e01b835260048301613848565b03915afa9182156139b0575b60009261399a57505090565b6115a69250803d106109495761093a81836104b6565b6139b8611879565b61398e565b6139d49150843d86116109495761093a81836104b6565b38613960565b6139e2611879565b613958565b604051906346423aa760e01b825260048201526080816024816e6c3852cbef3e08e8df289169ede5815afa908115613a6e575b600091613a25575090565b906080823d8211613a66575b81613a3e608093836104b6565b81010312610a5c575080613a546040925161178f565b613a61602082015161178f565b015190565b3d9150613a31565b613a76611879565b613a1a56fea264697066735822122011da19d0442f114e1954a4ab5b8b58a1700f2b82957cf1076dc331abed5ee17264736f6c63430008110033000000000000000000000000f3d63166f0ca56c3c1a3508fce03ff0cf3fb691e000000000000000000000000178a86d36d89c7fdebea90b739605da7b131ff6a
Deployed Bytecode
0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806312f3a43f1461015b578063150b7a02146101525780632b8a88ec146101495780634e71e0c8146101405780636baab5f71461013757806376af66291461012e57806386f20e8c146101255780638da5cb5b1461011c5780638fc10d3b14610113578063a81744041461010a578063b50e44b814610101578063d44e2a2d146100f8578063e30c3978146100ef578063f23a6e61146100e6578063f2fde38b146100dd5763f887ea400361000e576100d86114d9565b61000e565b506100d8611488565b506100d8611413565b506100d86113e9565b506100d8611295565b506100d861126a565b506100d86110eb565b506100d8611070565b506100d8610eef565b506100d8610ddd565b506100d8610c69565b506100d8610a5f565b506100d86109f5565b506100d86106ee565b506100d8610359565b506100d8610199565b9181601f84011215610194578235916001600160401b038311610194576020808501948460051b01011161019457565b600080fd5b50606080600319360112610194576001600160401b0390600435828111610194576101c8903690600401610164565b602493919335828111610194576101e3903690600401610164565b92604435908111610194576101fc903690600401610164565b60005491956001600160a01b03949092851633036102fd5761022260028054141561151f565b6002805560005b81811061023a576100196001600255565b807fa3f06cf374cf66be06f5fe85cdd3b13d9d9fdef6482f640d2de1d44c3ed7332c8787868c6102f08f878f81816102c1828f60019f976102bc8c8e6102b68e6102ad886102d49f806102cc9f6102956102a5938d8d611582565b35976102a08961030e565b6115b3565b969093611582565b3593369161162c565b906116f0565b611582565b35986102a08a61030e565b959094611582565b359160409384519687961686528c60208701528c860191611663565b918301520390a101610229565b6040516282b42960e81b8152600490fd5b6001600160a01b0381160361019457565b359061032a8261030e565b565b9181601f84011215610194578235916001600160401b038311610194576020838186019501011161019457565b50346101945760803660031901126101945761037660043561030e565b61038160243561030e565b6064356001600160401b038111610194576103a090369060040161032c565b806103b8575b604051630a85bd0160e11b8152602090f35b6103ed916103c791369161162c565b7f000000000000000000000000178a86d36d89c7fdebea90b739605da7b131ff6a6116b4565b38806103a6565b60a090602319011261019457602490565b908160a09103126101945790565b50634e487b7160e01b600052604160045260246000fd5b60a081019081106001600160401b0382111761044557604052565b61044d610413565b604052565b604081019081106001600160401b0382111761044557604052565b6001600160401b03811161044557604052565b606081019081106001600160401b0382111761044557604052565b60c081019081106001600160401b0382111761044557604052565b90601f801991011681019081106001600160401b0382111761044557604052565b6040519061016082018281106001600160401b0382111761044557604052565b6020906001600160401b038111610510575b60051b0190565b610518610413565b610509565b81601f8201121561019457803591610534836104f7565b9261054260405194856104b6565b808452602092838086019260051b820101928311610194578301905b82821061056c575050505090565b8135815290830190830161055e565b606090604319011261019457604490565b9181601f84011215610194578235916001600160401b038311610194576020808501948460061b01011161019457565b60c0600319820112610194576001600160401b039060043582811161019457816105e891600401610405565b92602480359084821161019457836023830112156101945781600401359161060f836104f7565b92604061061e815195866104b6565b818552602093808587019360051b8501019388851161019457818101935b85851061066f5750505050505050926106548361057b565b9260a4359182116101945761066b9160040161058c565b9091565b84358b81116101945782019060a0828c036023190112610194578451906106958261042a565b8483013582526044830135600281101561019457898301526064830135868301526084830135606083015260a4830135918d8311610194576106de8d878c96958796010161051d565b608082015281520194019361063c565b5034610194576106fd366105bc565b610710600280969395949654141561151f565b6002805561073461072e610724848061215c565b6060810190612172565b906121a7565b936003610740866121eb565b610749816121d9565b1415806109ce575b6109bc576020916107726107668488016115a9565b6001600160a01b031690565b9361079a6107668561079461072e61078a868061215c565b60408101906121f5565b016115a9565b966107a48661241b565b6107ad88611c68565b60036107b8826121eb565b6107c1816121d9565b036109a15761085a6040610874920135975b604051627eeac760e11b808252306004830152602482018b9052909188918b916001600160a01b038c1691908f8587604481875afa968715610994575b60009761096e575b5060406108259101611799565b1561095d576108369030908a612f24565b60405190815230600482015260248101929092529093849190829081906044820190565b03915afa918215610950575b600092610921575b50611729565b91826108ac575b6108a28861089d8b6108988b8b6108938c85016115a9565b6124fa565b6115a9565b6122c9565b6100196001600255565b60005b8181106108bc575061087b565b8061091b8a6108d66108d1600195878b61173e565b612286565b8051610915906108f5908a908d906001600160a01b031694015161175c565b61090f6109038d8b016124f0565b6001600160781b031690565b9061176f565b906122b6565b016108af565b610942919250873d8911610949575b61093a81836104b6565b81019061186a565b903861086e565b503d610930565b610958611879565b610866565b6109699030908a612c81565b610836565b61082591975061098c604091883d8a116109495761093a81836104b6565b979150610818565b61099c611879565b610810565b5061087461085a60606109b38961222a565b510151976107d3565b604051635863f78960e01b8152600490fd5b5060056109da866121eb565b6109e3816121d9565b1415610751565b600091031261019457565b503461019457600080600319360112610a5c576001546001600160a01b03811690338290036102fd5782546001600160a01b03199081168317845516600155807f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b80fd5b503461019457610a6e366105bc565b919392600291610a81838054141561151f565b828055610a9461072e610724878061215c565b9183610a9f846121eb565b610aa8816121d9565b141580610c2b575b6109bc57602092610ac56107668583016115a9565b94610add6107668661079461072e61078a8d8061215c565b97610ae78761241b565b610af089611c68565b610afc60408b01611799565b15610c1a57610b0d90843091612f24565b610b16826121eb565b610b1f816121d9565b03610c0557604091500135935b6040516331a9108f60e11b8152600481018690526001600160a01b0384826024818985165afa918215610bf8575b600092610bc9575b5030911603610b89575b6108a28661089d896108988989610b848a85016115a9565b612337565b60005b818110610b995750610b6c565b80610bc388610bae6108d1600195878961173e565b805190880151906001600160a01b03166122b6565b01610b8c565b610bea919250853d8711610bf1575b610be281836104b6565b810190612271565b9038610b62565b503d610bd8565b610c00611879565b610b5a565b50610c1160609161222a565b51015193610b2c565b610c2690843091612c81565b610b0d565b506004610c37846121eb565b610c40816121d9565b1415610ab0565b608090602319011261019457602490565b608090604319011261019457604490565b5060c0366003190112610194576001600160401b0360043581811161019457610c96903690600401610405565b610c9f36610c47565b9160a43590811161019457610cb890369060040161058c565b929091610cc960028054141561151f565b6002805560208083013593610cdd8561030e565b60608401359580610d1657505050610cf69293506117d4565b4780610d06576100196001600255565b610d0f9161182b565b38806108a2565b919392610d5891938747926040830135610d2f8161178f565b15610dbb57610d5192610d406117a3565b903591610d4c8361030e565b613013565b4790611729565b60005b828110610d6e5750505050509050610cf6565b80610d9188610d8c8589610d856001978a8c61173e565b013561175c565b61176f565b80610d9e575b5001610d5b565b610db590610db061089884888a61173e565b61182b565b38610d97565b610dd892610dc76117a3565b903591610dd38361030e565b612ca3565b610d51565b50346101945760e0366003190112610194576001600160401b0360043581811161019457610e0f903690600401610405565b90610e19366103f4565b9060c43590811161019457610e35610e6b91369060040161058c565b90610e4460028054141561151f565b60028055602084013593610e578561030e565b606081013595610e668761030e565b611886565b6040516370a0823160e01b8152306004820152906020826024816001600160a01b0387165afa918215610ee2575b600092610ec2575b5081610eb1576100196001600255565b610eba92611a6f565b3880806108a2565b610edb91925060203d81116109495761093a81836104b6565b9038610ea1565b610eea611879565b610e99565b5034610194576000366003190112610194576000546040516001600160a01b039091168152602090f35b9080601f8301121561019457813591610f31836104f7565b92604092610f41845195866104b6565b818552602093848087019360051b8501019382851161019457858101935b858510610f70575050505050505090565b84356001600160401b03811161019457820184603f82011215610194578781013590610f9b826104f7565b91610fa8865193846104b6565b808352858a84019160061b830101918783116101945791868b94929593015b818110610fde575050829350815201940193610f5f565b91935091938682890312610194578a87918251610ffa81610452565b8435815282850135838201528152019101918a93919492610fc7565b9190604083820312610194576040519061102f82610452565b81938035916001600160401b03928381116101945781611050918401610f19565b845260208201359283116101945760209261106b9201610f19565b910152565b503461019457610100366003190112610194576001600160401b03600435818111610194576110a3903690600401610164565b90602435838111610194576110bc903690600401611016565b60a03660431901126101945760e435938411610194576110e361001994369060040161058c565b939092611ec9565b50346101945760406003198181360112610194576001600160401b039060043582811161019457611120903690600401610164565b9092602435908111610194579161113c85933690600401610164565b9161114b60028054141561151f565b600280558451958694632a05d10160e21b8652806044870188600489015252606486019160648260051b8801019781936000925b8484106111fa5789600081806111a08f8e8e8e858403016024860152612a57565b0381836e6c3852cbef3e08e8df289169ede5815af180156111ed575b6111ca576100196001600255565b6111e6903d806000833e6111de81836104b6565b8101906126e5565b50806108a2565b6111f5611879565b6111bc565b919395969798509193986112496001916063198d82030185526112566112208d866129d0565b9161123a61122e848061270a565b898352898301906128cb565b9060209484868096019061299f565b9185818503910152611663565b9b019301940191938a98979695939161117f565b50346101945760003660031901126101945760206040516e6c3852cbef3e08e8df289169ede5818152f35b5060e0366003190112610194576001600160401b03600435818111610194576112c2903690600401610164565b9091602435818111610194576112dc903690600401611016565b6112e536610c58565b9160c435908111610194576112fe90369060040161058c565b93909461130f60028054141561151f565b6002805560209485850135956113248761030e565b6060860135918061133d57505050610cf6949550611e6c565b9390959161137a93819996479460408101356113588161178f565b156113cc57610d51946113696117a3565b9135936113758561030e565b613572565b60005b8281106113905750505050509050610cf6565b806113a788610d8c8589610d856001978a8c61173e565b806113b4575b500161137d565b6113c690610db061089884888a61173e565b386113ad565b610dd8946113d86117a3565b9135936113e48561030e565b61331d565b5034610194576000366003190112610194576001546040516001600160a01b039091168152602090f35b50346101945760a03660031901126101945761143060043561030e565b61143b60243561030e565b6084356001600160401b0381116101945761145a90369060040161032c565b80611472575b60405163f23a6e6160e01b8152602090f35b611481916103c791369161162c565b3880611460565b5034610194576020366003190112610194576004356114a68161030e565b6000546001600160a01b039190821633036102fd57166bffffffffffffffffffffffff60a01b6001541617600155600080f35b5034610194576000366003190112610194576040517f000000000000000000000000178a86d36d89c7fdebea90b739605da7b131ff6a6001600160a01b03168152602090f35b1561152657565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b50634e487b7160e01b600052603260045260246000fd5b91908110156115925760051b0190565b61051861156b565b60a4356115a68161030e565b90565b356115a68161030e565b91908110156115f5575b60051b81013590601e19813603018212156101945701908135916001600160401b038311610194576020018236038113610194579190565b6115fd61156b565b6115bd565b6020906001600160401b03811161161f575b601f01601f19160190565b611627610413565b611614565b92919261163882611602565b9161164660405193846104b6565b829481845281830111610194578281602093846000960137010152565b908060209392818452848401376000828201840152601f01601f1916010190565b3d156116af573d9061169582611602565b916116a360405193846104b6565b82523d6000602084013e565b606090565b8151600092839260209091019083906001600160a01b03165af16116d6611684565b50156116de57565b6040516322092f2f60e11b8152600490fd5b8151600093849391926020909201916001600160a01b03165af16116d6611684565b50634e487b7160e01b600052601160045260246000fd5b9190820391821161173657565b61032a611712565b919081101561174f575b60061b0190565b61175761156b565b611748565b8181029291811591840414171561173657565b8115611779570490565b634e487b7160e01b600052601260045260246000fd5b8015150361019457565b356115a68161178f565b604051602081018181106001600160401b038211176117c7575b6040526000815290565b6117cf610413565b6117bd565b60408201356117e28161178f565b156118095761032a916117f36117a3565b60608235926118018461030e565b013592613013565b61032a916118156117a3565b60608235926118238461030e565b013592612ca3565b81611834575050565b6000918291829182916001600160a01b03165af1611850611684565b501561185857565b60405163d2dcf4f360e01b8152600490fd5b90816020910312610194575190565b506040513d6000823e3d90fd5b9091939293611897606084016115a9565b608084013595806118b05750505061032a9293506119a7565b6040516370a0823160e01b80825230600483015260209694959394929361191f936001600160a01b038716939289929091908385602481895afa94851561199a575b600095611975575b5090611905916119a7565b60405190815230600482015292839081806024810161085a565b60005b828110611933575050505050509050565b8061194a89610d8c858a610d856001978a8d61173e565b80611957575b5001611922565b61196f9061196961089884888b61173e565b87611a6f565b38611950565b6119059291955061199290853d87116109495761093a81836104b6565b9490916118fa565b6119a2611879565b6118f2565b906119c460608201356119b98161030e565b608083013590611d59565b60408101356119d28161178f565b156119f5579061032a916119e46117a3565b9035916119f08361030e565b612f24565b602090611a006117a3565b903592611a0c8461030e565b611a2a60405194859384936339eb2ac960e21b855260048501612c40565b038160006e6c3852cbef3e08e8df289169ede5815af1611a48575b50565b611a459060203d8111611a68575b611a6081836104b6565b810190611b79565b503d611a56565b60405163a9059cbb60e01b60208083019182526001600160a01b03949094166024830152604480830195909552938152919290611aad6064846104b6565b60018060a01b03169060405192611ac384610452565b8484527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656485850152823b15611b3457611b0f939260009283809351925af1611b09611684565b90611bed565b80519081611b1c57505050565b8261032a93611b2f938301019101611b79565b611b8e565b60405162461bcd60e51b815260048101869052601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b9081602091031261019457516115a68161178f565b15611b9557565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b90919015611bf9575090565b815115611c095750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510611c4f575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611c2c565b604051636eb1769f60e11b81523060048201526e6c3852cbef3e08e8df289169ede58160248201526020916001600160a01b03168282604481845afa918215611d4c575b600092611d2d575b506000198210611cc357505050565b60405163095ea7b360e01b81526e6c3852cbef3e08e8df289169ede5816004820152911960248301528290829060449082906000905af18015611d20575b611d0a575b5050565b81611a4592903d10611a6857611a6081836104b6565b611d28611879565b611d01565b611d45919250833d85116109495761093a81836104b6565b9038611cb4565b611d54611879565b611cac565b604051636eb1769f60e11b81523060048201526e6c3852cbef3e08e8df289169ede58160248201526020926001600160a01b039290921691908381604481865afa908115611e5f575b600091611e42575b50818110611db9575b50505050565b600092611dca611e00928694611729565b60405194858094819363095ea7b360e01b8352600483019190602060408401936e6c3852cbef3e08e8df289169ede58181520152565b03925af18015611e35575b611e17575b8080611db3565b81611e2d92903d10611a6857611a6081836104b6565b503880611e10565b611e3d611879565b611e0b565b611e599150843d86116109495761093a81836104b6565b38611daa565b611e67611879565b611da2565b919290926040820135611e7e8161178f565b15611ea65761032a93611e8f6117a3565b906060843594611e9e8661030e565b013594613572565b61032a93611eb26117a3565b906060843594611ec18661030e565b01359461331d565b939092611f0192611ede60028054141561151f565b6002805560643594611eef8661030e565b60a43596611efc8861030e565b611f89565b6040516370a0823160e01b8152306004820152906020826024816001600160a01b0387165afa918215611f7c575b600092611f5c575b5081611f4b575b50505061032a6001600255565b611f5492611a6f565b388080611f3e565b611f7591925060203d81116109495761093a81836104b6565b9038611f37565b611f84611879565b611f2f565b909192949394611f9761159a565b60c4359680611fae5750505061032a939450612087565b6040516370a0823160e01b808252306004830152602097949693959294612003946001600160a01b038816948a9392919084866024818a5afa95861561207a575b600096612053575b50906119059291612087565b60005b828110612017575050505050509050565b8061202e89610d8c858a610d856001978a8d61173e565b8061203b575b5001612006565b61204d9061196961089884888b61173e565b38612034565b611905939291965061207190863d88116109495761093a81836104b6565b95909192611ff7565b612082611879565b611fef565b906120a060a4356120978161030e565b60c43590611d59565b6084356120ac8161178f565b156120d1579161032a926120be6117a3565b90604435936120cc8561030e565b6133ce565b6000916121106120df6117a3565b94604435906120ed8261030e565b602081519101519060405197889687966387201b4160e01b8852600488016131b7565b0381836e6c3852cbef3e08e8df289169ede5815af1801561214f575b6121335750565b611d06903d806000833e61214781836104b6565b810190613089565b612157611879565b61212c565b90359061015e1981360301821215610194570190565b903590601e198136030182121561019457018035906001600160401b038211610194576020019160c082023603831361019457565b90156121b05790565b6115a661156b565b6006111561019457565b50634e487b7160e01b600052602160045260246000fd5b600611156121e357565b61032a6121c2565b356115a6816121b8565b903590601e198136030182121561019457018035906001600160401b038211610194576020019160a082023603831361019457565b602090805115612238570190565b61224061156b565b0190565b6020918151811015612259575b60051b010190565b61226161156b565b612251565b519061032a8261030e565b9081602091031261019457516115a68161030e565b6040813603126101945760206040519161229f83610452565b80356122aa8161030e565b83520135602082015290565b816122c057505050565b61032a92611a6f565b6040516370a0823160e01b8152306004820152906020826024816001600160a01b0387165afa91821561232a575b60009261230a575b50816122c057505050565b61232391925060203d81116109495761093a81836104b6565b90386122ff565b612332611879565b6122f7565b6040516331a9108f60e11b8152600481018490526001600160a01b03928316939192602082602481885afa91821561240e575b6000926123ee575b5016301461237f57505050565b823b1561019457604051632142170760e11b81523060048201526001600160a01b0390921660248301526044820152906000908290818381606481015b03925af180156123e1575b6123ce5750565b806123db61032a9261046d565b806109ea565b6123e9611879565b6123c7565b61240791925060203d8111610bf157610be281836104b6565b9038612372565b612416611879565b61236a565b60405163e985e9c560e01b81523060048201526e6c3852cbef3e08e8df289169ede58160248201526001600160a01b039190911690602081604481855afa9081156124d2575b6000916124b4575b50156124725750565b803b156101945760405163a22cb46560e01b81526e6c3852cbef3e08e8df289169ede581600482015260016024820152906000908290818381604481016123bc565b6124cc915060203d8111611a6857611a6081836104b6565b38612469565b6124da611879565b612461565b6001600160781b0381160361019457565b356115a6816124df565b604051627eeac760e11b81523060048201526024810184905290916001600160a01b0316602082604481845afa9182156125ec575b6000926125cc575b50816125435750505050565b803b1561019457604051637921219560e11b81523060048201526001600160a01b039390931660248401526044830193909352606482015260a06084820152600060a482018190529091829060c490829084905af180156125bf575b6125ac575b808080611db3565b806123db6125b99261046d565b386125a4565b6125c7611879565b61259f565b6125e591925060203d81116109495761093a81836104b6565b9038612537565b6125f4611879565b61252f565b81601f8201121561019457805190612610826104f7565b92604090612620825195866104b6565b838552602091828601918360e080970286010194818611610194578401925b858410612650575050505050505090565b8382038781126101945783519161266683610480565b60a08092126101945788926126cd889387516126818161042a565b895161268c816121b8565b8152858a015161269b8161030e565b86820152888a0151898201526060808b0151908201526080808b0151906126c18261030e565b82015283528801612266565b8382015260c08701518682015281520193019261263f565b906020828203126101945781516001600160401b038111610194576115a692016125f9565b903561015e1982360301811215610194570190565b9035601e19823603018112156101945701602081359101916001600160401b0382116101945760a082023603831361019457565b9060068210156127605752565b6127686121c2565b52565b9190808252602080920192916000905b828210612789575050505090565b90919293806127a4600192873561279f816121b8565b612753565b828601356127b18161030e565b828060a01b03168382015260408087013590820152606080870135908201526080808701359082015260a0809101950192019092919261277b565b9035601e19823603018112156101945701602081359101916001600160401b0382116101945760c082023603831361019457565b9190808252602080920192916000905b82821061283e575050505090565b9091929380612854600192873561279f816121b8565b828601356128618161030e565b828060a01b038091168483015260408088013590830152606080880135908301526080808801359083015260a0908188013561289c8161030e565b169082015260c0908101950193920190612830565b3590600482101561019457565b9060048210156127605752565b906128e6816128d98461031f565b6001600160a01b03169052565b6129056128f56020840161031f565b6001600160a01b03166020830152565b612944612929612918604085018561271f565b61016080604087015285019161276b565b61293660608501856127ec565b908483036060860152612820565b9161295e612954608083016128b1565b60808401906128be565b60a081013560a083015260c081013560c083015260e081013560e0830152610100808201359083015261012080820135908301526101408091013591015290565b9035601e19823603018112156101945701602081359101916001600160401b03821161019457813603831361019457565b9035603e1982360301811215610194570190565b9035601e19823603018112156101945701602081359101916001600160401b038211610194578160061b3603831361019457565b9190808252602080920192916000905b828210612a36575050505090565b83358552838101358582015260409485019490930192600190910190612a28565b90808352602080930192838260051b850194846000925b858410612a7f575050505050505090565b909192939495968580612ad28385600195038852612a9d8c886129d0565b90612ac5612abb612aae84806129e4565b6040808652850191612a18565b92858101906129e4565b9185818503910152612a18565b990194019401929594939190612a6e565b6115a691612b60612b55612b08612afa858061270a565b60a0855260a08501906128cb565b6020850135612b16816124df565b6001600160781b0380911660208601526040860135612b34816124df565b166040850152612b47606086018661299f565b908583036060870152611663565b92608081019061299f565b916080818503910152611663565b90815180825260208092019182818360051b8201950193600080925b858410612b9b575050505050505090565b9091929394959681810384528751908660c060a0928381019385518252838601516002811015612c33575b8483015260408087015190830152606080870151908301526080958601519582015284519384905291939101919083019085905b808210612c1a575050509080600192990194019401929594939190612b8a565b9193806001929486518152019401920188939291612bfa565b612c3b6121c2565b612bc6565b91612c6a90612c5c606093969596608086526080860190612ae3565b908482036020860152612b6e565b600060408401526001600160a01b03909416910152565b90602091611a2a60405194859384936339eb2ac960e21b855260048501612c40565b9260209291612cc994604051958694859384936339eb2ac960e21b855260048501612c40565b03916e6c3852cbef3e08e8df289169ede5815af1611a485750565b81601f8201121561019457803590612cfb826104f7565b92604090612d0b825195866104b6565b838552602091828601918360a080970286010194818611610194578401925b858410612d3b575050505050505090565b8684830312610194578487918451612d528161042a565b8635612d5d816121b8565b815282870135612d6c8161030e565b8382015285870135868201526060808801359082015260808088013590820152815201930192612d2a565b81601f8201121561019457803590612dae826104f7565b92604090612dbe825195866104b6565b838552602091828601918360c080970286010194818611610194578401925b858410612dee575050505050505090565b8684830312610194578487918451612e058161049b565b8635612e10816121b8565b815282870135612e1f8161030e565b838201528587013586820152606080880135908201526080808801359082015260a08088013590612e4f8261030e565b820152815201930192612ddd565b6101608136031261019457612e706104d7565b90612e7a8161031f565b8252612e886020820161031f565b60208301526001600160401b03604082013581811161019457612eae9036908401612ce4565b6040840152606082013590811161019457612ecc9036908301612d97565b6060830152612edd608082016128b1565b608083015260a081013560a083015260c081013560c083015260e081013560e083015261010080820135908301526101208082013590830152610140809101359082015290565b9190612f6f612f43612f3e612f39868061215c565b612e5d565b6138f8565b916020612f4f846139e7565b9460009260405194859283926339eb2ac960e21b84528a60048501612c40565b0381846e6c3852cbef3e08e8df289169ede5815af1909181612ff3575b50612fa357604051631298f31b60e11b8152600490fd5b612fb957604051631298f31b60e11b8152600490fd5b6020612fd3612fda93612fce610903946139e7565b611729565b93016124f0565b03612fe157565b604051631298f31b60e11b8152600490fd5b61300c91925060203d8111611a6857611a6081836104b6565b9038612f8c565b92919061305790602061302c612f3e612f39888061215c565b93613036856139e7565b956000936040518096819482936339eb2ac960e21b84528c60048501612c40565b03916e6c3852cbef3e08e8df289169ede5815af1909181612ff35750612fa357604051631298f31b60e11b8152600490fd5b919091604081840312610194578051926001600160401b03938481116101945782019381601f860112156101945784516130c2816104f7565b906130d060405192836104b6565b808252602096878084019260051b820101918583116101945788809201905b83821061310f575050505094830151908111610194576115a692016125f9565b828091835161311d8161178f565b8152019101906130ef565b90815180825260208092019182818360051b8201950193600080925b858410613155575050505050505090565b9091929387828297989903855288519082808351928381520192019085905b808210613194575050509080600192990194019401929594939190613144565b919360406001929482875180518352015183820152019401920188939291613174565b94929695939190968160e0870160e0885252610100808701908360051b88010192899160009a8b905b838210613247575050505050859361321d6132439461320f8561322b9560ff9b60c09b980360208b0152612b6e565b908782036040890152613128565b908582036060870152613128565b60808401979097526001600160a01b031660a0830152565b0152565b909192939560ff198b82030184528635609e198336030181121561328457600191836132739201612ae3565b9660209081019594019201906131e0565b8d80fd5b94929695939190968160e0870160e0885252610100808701908360051b88010192899160009a8b905b8382106132e0575050505050859361321d6132439461320f8561322b9560ff9b60c09b980360208b0152612b6e565b909192939560ff198b82030184528635609e1983360301811215613284576001918361330c9201612ae3565b9660209081019594019201906132b1565b61334b6000959693949660208851980151604051988997889687966387201b4160e01b8852600488016131b7565b03916e6c3852cbef3e08e8df289169ede5815af1801561214f576121335750565b90613376826104f7565b61338360405191826104b6565b8281528092613394601f19916104f7565b0190602036910137565b91908110156133c1575b60051b81013590609e1981360301821215610194570190565b6133c961156b565b6133a8565b9392936133da8261336c565b946133e48361336c565b9260005b81811061352c5750600082516020809401519661341d6040998a51998a9485946387201b4160e01b8652888b60048801613288565b0381836e6c3852cbef3e08e8df289169ede5815af194851561351f575b600095613503575b5060005b818110613457575050505050505050565b61346a613464828a612244565b516139e7565b61347d6134778389612244565b51151590565b90816134cd575b506134bb575b61349e61349a6134778389612244565b1590565b6134aa57600101613446565b8651631298f31b60e11b8152600490fd5b60006134c78288612244565b5261348a565b6134e391506134dc8388612244565b5190611729565b6134fb610903856134f585878a61339e565b016124f0565b141538613484565b61351791953d8091833e61214781836104b6565b509338613442565b613527611879565b61343a565b80613549612f3e612f39613543600195878a61339e565b8061215c565b613553828b612244565b52613561613464828b612244565b61356b8288612244565b52016133e8565b90949193926135808661336c565b9561358a8161336c565b9360005b8281106136a75750600090835190602080950151916040996135c78b519a8b95869485946387201b4160e01b86528a8d60048801613288565b03916e6c3852cbef3e08e8df289169ede5815af194851561369a575b60009561367e575b5060005b818110613600575050505050505050565b61360d613464828a612244565b61361a6134778389612244565b9081613655575b50613643575b61363761349a6134778389612244565b6134aa576001016135ef565b600061364f8288612244565b52613627565b61366491506134dc8388612244565b613676610903856134f585878a61339e565b141538613621565b61369291953d8091833e61214781836104b6565b5093386135eb565b6136a2611879565b6135e3565b806136be612f3e612f39613543600195888b61339e565b6136c8828c612244565b526136d6613464828c612244565b6136e08289612244565b520161358e565b6040519061016082018281106001600160401b0382111761374d575b60405281610140600091828152826020820152606060408201526060808201528260808201528260a08201528260c08201528260e082015282610100820152826101208201520152565b613755610413565b613703565b90815180825260208080930193019160005b82811061377a575050505090565b909192938260a06001928751613791828251612753565b8084015185841b86900316828501526040808201519083015260608082015190830152608090810151908201520195019392910161376c565b90815180825260208080930193019160005b8281106137ea575050505090565b909192938260c06001928751613801828251612753565b848060a01b038085830151168584015260408083015190840152606080830151908401526080808301519084015260a08092015116908201520195019101929190926137dc565b602080825282516001600160a01b03169082015260208201516001600160a01b0316604082015260408201516138a561388f6101609283606086015261018085019061375a565b6060850151848203601f190160808601526137ca565b926138b8608082015160a08501906128be565b60a081015160c084015260c081015160e084015260e081015161010090818501528101516101209081850152810151906101409182850152015191015290565b613982613937916139076136e7565b50805160405163f07ec37360e01b81526001600160a01b0390911660048201526020938492919081906024820190565b039083816e6c3852cbef3e08e8df289169ede5819381855afa9081156139da575b6000916139bd575b5061014083015260405180809581946379df72bd60e01b835260048301613848565b03915afa9182156139b0575b60009261399a57505090565b6115a69250803d106109495761093a81836104b6565b6139b8611879565b61398e565b6139d49150843d86116109495761093a81836104b6565b38613960565b6139e2611879565b613958565b604051906346423aa760e01b825260048201526080816024816e6c3852cbef3e08e8df289169ede5815afa908115613a6e575b600091613a25575090565b906080823d8211613a66575b81613a3e608093836104b6565b81010312610a5c575080613a546040925161178f565b613a61602082015161178f565b015190565b3d9150613a31565b613a76611879565b613a1a56fea264697066735822122011da19d0442f114e1954a4ab5b8b58a1700f2b82957cf1076dc331abed5ee17264736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f3d63166f0ca56c3c1a3508fce03ff0cf3fb691e000000000000000000000000178a86d36d89c7fdebea90b739605da7b131ff6a
-----Decoded View---------------
Arg [0] : owner (address): 0xf3d63166F0Ca56C3c1A3508FcE03Ff0Cf3Fb691e
Arg [1] : router (address): 0x178A86D36D89c7FDeBeA90b739605da7B131ff6A
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000f3d63166f0ca56c3c1a3508fce03ff0cf3fb691e
Arg [1] : 000000000000000000000000178a86d36d89c7fdebea90b739605da7b131ff6a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.