Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x56a97461a7bbf36a9acc194de385a146f7af781685882f9e7b95f6ac752a4a29 | Mint | (pending) | 5 days ago | IN | 0 ETH | (Pending) | |||
0xa67910bc38ef0c8dc3a1b765bcfffa28a645759e35f9bea88aa3aa588443af36 | Mint | (pending) | 5 days ago | IN | 0 ETH | (Pending) | |||
Redeem | 20974039 | 24 days ago | IN | 0 ETH | 0.00151776 | ||||
Redeem | 20886975 | 36 days ago | IN | 0 ETH | 0.00299921 | ||||
Redeem | 20857503 | 40 days ago | IN | 0 ETH | 0.00177348 | ||||
Redeem | 20802216 | 48 days ago | IN | 0 ETH | 0.00107815 | ||||
Redeem | 20740610 | 56 days ago | IN | 0 ETH | 0.00039103 | ||||
Redeem | 20630228 | 72 days ago | IN | 0 ETH | 0.00037002 | ||||
Redeem | 20618283 | 74 days ago | IN | 0 ETH | 0.00039373 | ||||
Redeem | 20570951 | 80 days ago | IN | 0 ETH | 0.00038965 | ||||
Redeem | 20541850 | 84 days ago | IN | 0 ETH | 0.00038037 | ||||
Redeem | 20517413 | 88 days ago | IN | 0 ETH | 0.00040897 | ||||
Redeem | 20517399 | 88 days ago | IN | 0 ETH | 0.00048936 | ||||
Redeem | 20517391 | 88 days ago | IN | 0 ETH | 0.00044008 | ||||
Redeem | 20517381 | 88 days ago | IN | 0 ETH | 0.00041485 | ||||
Redeem | 20517369 | 88 days ago | IN | 0 ETH | 0.00040747 | ||||
Redeem | 20517362 | 88 days ago | IN | 0 ETH | 0.00051921 | ||||
Redeem | 20501544 | 90 days ago | IN | 0 ETH | 0.00027065 | ||||
Redeem | 20447731 | 97 days ago | IN | 0 ETH | 0.00048887 | ||||
Redeem | 20175561 | 135 days ago | IN | 0 ETH | 0.00035936 | ||||
Redeem | 20147462 | 139 days ago | IN | 0 ETH | 0.00063539 | ||||
Redeem | 19960028 | 165 days ago | IN | 0 ETH | 0.00155285 | ||||
Redeem | 19826298 | 184 days ago | IN | 0 ETH | 0.00146893 | ||||
Redeem | 19045711 | 294 days ago | IN | 0 ETH | 0.00198754 | ||||
Mint | 18897412 | 314 days ago | IN | 0 ETH | 0.00196645 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
MAMMSwapPair
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2023-05-14 */ // SPDX-License-Identifier: MIT pragma solidity 0.8.9; // // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } } // // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) /** * @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; } } // // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount ) external returns (bool); /** * @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); } // // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.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)); } } /** * @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"); } } } // // Forked from https://github.com/compound-finance/open-oracle/blob/master/contracts/Uniswap/UniswapLib.sol // Based on code from https://github.com/Uniswap/uniswap-v2-periphery // a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format)) library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // returns a uq112x112 which represents the ratio of the numerator to the denominator // equivalent to encode(numerator).div(denominator) function fraction(uint112 numerator, uint112 denominator) internal pure returns (uq112x112 memory) { require(denominator > 0, "FixedPoint: DIV_BY_ZERO"); return uq112x112((uint224(numerator) << 112) / denominator); } // decode a uq112x112 into a uint with 18 decimals of precision function decode112with18(uq112x112 memory self) internal pure returns (uint) { // we only have 256 - 224 = 32 bits to spare, so scaling up by ~60 bits is dangerous // instead, get close to: // (x * 1e18) >> 112 // without risk of overflowing, e.g.: // (x) / 2 ** (112 - lg(1e18)) return uint(self._x) / 5192296858534827; } } // interface IMAMMSwapPair { function pause() external; function unpause() external; function setNewReordersController(address _reordersController) external; function addLiquidity() external; function removeLiquidity(uint amount0, uint amount1) external; function sync() external; function mintFee() external; function pavAllocation( uint newMMFRewards0, uint newMMFRewards1, uint newRainyDayFunds, uint newProtocolFees ) external; function migrate(address to) external; function token0() external view returns (address); function token1() external view returns (address); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function getTiUSDPrice() external view returns (uint256, bool); function getMMFFunds() external view returns (uint _mmfFund0, uint _mmfFund1, uint32 _blockTimestampLast); function getDepth() external view returns (uint112 _fund0, uint112 _fund1, uint32 _blockTimestampLast); } // /** * @dev Fixed window oracle that recomputes the average price for the entire period once every period. * Note that the price average is only guaranteed to be over at least 1 period, but may be over a longer period. */ contract TiTiOracles { using FixedPoint for *; /// @notice The TWAP's calculation period. uint public period = 1 hours; /// @notice Sum of cumulative prices denominated in USDC. uint public price0CumulativeLast; /// @notice Sum of cumulative prices denominated in TiUSD. uint public price1CumulativeLast; /// @notice Last recorded cumulative prices denominated in USDC. uint public priorCumulative; /// @notice TiUSD's average price denominated in USDC. FixedPoint.uq112x112 public priceAverage; /// @notice Last update timestamp. uint32 public lastOracleUpdateTime; /// @notice Precision conversion to normalize USDC and TiUSD units. uint256 private constant BASE_TOKEN_DECIMALS_MULTIPLIER = 1e12; function _updatePrice(uint32 blockTimestamp) internal { if (lastOracleUpdateTime == 0) { lastOracleUpdateTime = blockTimestamp; } else { uint32 timeElapsed; unchecked { timeElapsed = blockTimestamp - lastOracleUpdateTime; // overflow is desired } // ensure that at least one full period has passed since the last update if (timeElapsed >= period) { uint256 currentCumulative = price0CumulativeLast; unchecked { // overflow is desired, casting never truncates // cumulative price is in (uq112x112 price * seconds) units so we simply wrap it after division by time elapsed priceAverage = FixedPoint.uq112x112(uint224((currentCumulative - priorCumulative) / timeElapsed)); } priorCumulative = currentCumulative; lastOracleUpdateTime = blockTimestamp; } } } function _resetPrice() internal { // reset twap to $1 priceAverage = FixedPoint.uq112x112(uint224(2**112) / uint224(1e12)); } /// @notice Get TiUSD's average price denominated in USDC. /// @return tiusdPriceMantissa TiUSD price with 18-bit precision. /// @return isValid Whether the return TiUSD price is valid. function _getTiUSDPrice() internal view returns (uint256 tiusdPriceMantissa, bool isValid) { tiusdPriceMantissa = priceAverage.decode112with18() * BASE_TOKEN_DECIMALS_MULTIPLIER; isValid = tiusdPriceMantissa > 0; } } // // computes square roots using the babylonian method // https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method library Babylonian { // credit for this implementation goes to // https://github.com/abdk-consulting/abdk-libraries-solidity/blob/master/ABDKMath64x64.sol#L687 function sqrt(uint256 x) internal pure returns (uint256) { if (x == 0) return 0; // this block is equivalent to r = uint256(1) << (BitMath.mostSignificantBit(x) / 2); // however that code costs significantly more gas uint256 xx = x; uint256 r = 1; if (xx >= 0x100000000000000000000000000000000) { xx >>= 128; r <<= 64; } if (xx >= 0x10000000000000000) { xx >>= 64; r <<= 32; } if (xx >= 0x100000000) { xx >>= 32; r <<= 16; } if (xx >= 0x10000) { xx >>= 16; r <<= 8; } if (xx >= 0x100) { xx >>= 8; r <<= 4; } if (xx >= 0x10) { xx >>= 4; r <<= 2; } if (xx >= 0x8) { r <<= 1; } r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; // Seven iterations should be enough uint256 r1 = x / r; return (r < r1 ? r : r1); } } // // Sourced from the Uniswap v2 code base // a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format)) // range: [0, 2**112 - 1] // resolution: 1 / 2**112 library UQ112x112 { uint224 constant Q112 = 2**112; // encode a uint112 as a UQ112x112 function encode(uint112 y) internal pure returns (uint224 z) { z = uint224(y) * Q112; // never overflows } // divide a UQ112x112 by a uint112, returning a UQ112x112 function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) { z = x / uint224(y); } } // interface IReOrdersController { function sync() external; function pause() external; function unpause() external; function setNewMAMM(address _mamm) external; function setNewMMF(address _mmf) external; function setNewPegPrice(uint256 _pegPrice) external; function setNewDuration(uint256 _duration) external; function setNewAllocation( uint256 _mmfRewardsAllocation, uint256 _rainyDayFundAllocation, uint256 _protocolFeeAllocation, address _rainyDayFundVault, address _protocolFeeVault ) external; function setNewCoreController(address _coreController) external; function reorders() external; function rainyDayFundVault() external view returns (address); function protocolFeeVault() external view returns (address); function PEG_PRICE() external view returns (uint256 _pegPrice); } // /// @title The MAMM module of TiTi Protocol /// @author TiTi Protocol /// @notice The module implements the related functions of MAMM. /// @dev Only the owner can call the params' update function, the owner will be transferred to Timelock in the future. contract MAMMSwapPair is Ownable, Pausable, TiTiOracles, ReentrancyGuard { using UQ112x112 for uint224; using SafeERC20 for IERC20; /// @notice MAX_UINT112. uint112 private constant MAX_UINT112 = type(uint112).max; /// @notice MarketMakerFund contract address. address public immutable mmf; /// @notice ReOrdersController contract address. address public reordersController; /// @notice The address used to receive swap fees. address public feeTo; /// @notice Whether to charge swap fees. bool public feeOn; /// @notice TiUSD contract address. IERC20 public immutable token0; /// @notice USDC contract address. IERC20 public immutable token1; /// @notice TiUSD balance. uint112 private fund0; /// @notice USDC balance. uint112 private fund1; /// @notice Last update timestamp. uint32 private blockTimestampLast; /// @notice Last MMF's TiUSD staked amount in MAMM. uint private mmfFund0; /// @notice Last MMF's USDC staked amount in MAMM. uint private mmfFund1; /// @notice fund0 * fund1, as of immediately after the most recent liquidity event. uint public kLast; /// @notice Whether to allow contracts to call the function. bool public isAllowedContractsCall; /// @notice Emitted when users add liquidity through MarketMakerFund. event AddLiquidity(uint amount0, uint amount1); /// @notice Emitted when users remove liquidity through MarketMakerFund. event RemoveLiquidity(uint amount0, uint amount1); /// @notice Emitted when users mint TiUSD. event Mint(address indexed sender, uint baseTokenAmount, uint tiusdAmount); /// @notice Emitted when users redeem USDC. event Redeem(address indexed sender, uint baseTokenAmount, uint tiusdAmount); /// @notice Emitted when the fund0 and fund1 are updated. event Sync(uint112 fund0, uint112 fund1); /// @notice Emitted when new reordersController is set. event NewReordersController(address oldAddr, address newAddr); /// @notice Emitted when new feeTo address is set. event NewFeeTo(address oldFeeTo, address newFeeTo); /// @notice Emitted when new twap period is set. event NewTWAPPeriod(uint256 period); /// @notice Emitted when the isAllowedContractsCall is updated. event IsAllowedContractsCall(bool isAllowed); /// @notice Emitted when PAV allocation is triggered. event PAVAllocation( uint mmfRewards, uint rainyDayFunds, uint protocolFees, uint blockTimestampLast ); constructor( IERC20 _token0, IERC20 _token1, address _mmf ) { token0 = _token0; token1 = _token1; mmf = _mmf; } modifier onlyEOA() { if (!isAllowedContractsCall) { require(tx.origin == msg.sender, "MAMMSwapPair: Not EOA"); } _; } modifier onlyReordersController() { require(msg.sender == reordersController, "MAMMSwapPair: Not ReordersController"); _; } modifier onlyMMF() { require(msg.sender == mmf, "MAMMSwapPair: Not Matched MMF"); _; } /// @notice Set a new address to receive swap fees. /// @param _feeTo New address to receive swap fees. function setFeeTo(address _feeTo) external onlyOwner { address oldFeeTo = feeTo; feeTo = _feeTo; feeOn = feeTo != address(0); emit NewFeeTo(oldFeeTo, _feeTo); } /// @notice Set a new period for the TWAP window. /// @param _period New period for the TWAP window. function setPeriod(uint256 _period) external onlyOwner { require(_period != 0, "MAMMSwapPair: Cannot be zero"); period = _period; emit NewTWAPPeriod(_period); } /// @notice Set the isAllowedContractsCall. /// @param _isAllowed Is to allow contracts to call. function setIsAllowedContractsCall(bool _isAllowed) external onlyOwner { isAllowedContractsCall = _isAllowed; emit IsAllowedContractsCall(_isAllowed); } /// @notice Set a new ReOrdersController contract. /// @param _reordersController New ReOrdersController contract address. function setNewReordersController(address _reordersController) external onlyOwner { require(_reordersController != address(0), "MAMMSwapPair: Cannot be address(0)"); address oldReorders = reordersController; reordersController = _reordersController; emit NewReordersController(oldReorders, _reordersController); } /// @notice Receive swap fees. /// @dev Only ReOrdersController can call this function /// Since ReOrders will change K, it is necessary to complete the collection of the previous round of swap fee /// before executing ReOrders each time. function mintFee() external nonReentrant onlyReordersController { uint _kLast = kLast; // gas savings uint112 _fund0 = fund0; uint112 _fund1 = fund1; if (feeOn) { if (_kLast != 0) { uint rootK = Babylonian.sqrt(uint(_fund0) * uint(_fund1)); uint rootKLast = Babylonian.sqrt(_kLast); // When the swap fee is turned on, all swap fees will be included in the protocol fee if (rootK > rootKLast) { uint amount0 = uint(_fund0) * (rootK - rootKLast) / rootK; uint amount1 = uint(_fund1) * (rootK - rootKLast) / rootK; token0.safeTransfer(feeTo, amount0); token1.safeTransfer(feeTo, amount1); uint balance0 = token0.balanceOf(address(this)); uint balance1 = token1.balanceOf(address(this)); _update(balance0, balance1, _fund0, _fund1); kLast = uint(fund0) * fund1; // fund0 and fund1 are up-to-date } } } else if (_kLast != 0) { kLast = 0; } } /// @notice Users add liquidity through MarketMakerFund. /// @dev Only MMF can call this function. function addLiquidity() external nonReentrant onlyMMF { uint112 _fund0 = fund0; uint112 _fund1 = fund1; uint balance0 = token0.balanceOf(address(this)); uint balance1 = token1.balanceOf(address(this)); uint amount0 = balance0 - _fund0; uint amount1 = balance1 - _fund1; mmfFund0 += amount0; mmfFund1 += amount1; _update(balance0, balance1, _fund0, _fund1); if (feeOn) kLast = uint(fund0) * fund1; emit AddLiquidity(amount0, amount1); } /// @notice Users remove liquidity through MarketMakerFund. /// @dev Only MMF can call this function. function removeLiquidity(uint _amount0, uint _amount1) external nonReentrant onlyMMF { uint112 _fund0 = fund0; uint112 _fund1 = fund1; IERC20 _token0 = token0; IERC20 _token1 = token1; _token0.safeTransfer(mmf, _amount0); _token1.safeTransfer(mmf, _amount1); uint balance0 = _token0.balanceOf(address(this)); uint balance1 = _token1.balanceOf(address(this)); mmfFund0 = mmfFund0 - _amount0; mmfFund1 = mmfFund1 - _amount1; _update(balance0, balance1, _fund0, _fund1); if (feeOn) kLast = uint(fund0) * fund1; emit RemoveLiquidity(_amount0, _amount1); } /// @notice Users mint TiUSD by USDC. /// @param _amount Amount of USDC spent by users. function mint(uint256 _amount) external onlyEOA nonReentrant whenNotPaused { (uint256 _fund0, uint256 _fund1,) = getDepth(); uint256 tiusdOut = _getAmountOut(_amount, _fund1, _fund0); token1.safeTransferFrom(msg.sender, address(this), _amount); _swap(tiusdOut, 0, msg.sender); emit Mint(msg.sender, _amount, tiusdOut); } /// @notice Users redeem USDC by TiUSD. /// @param _amount Amount of TiUSD spent by users. function redeem(uint256 _amount) external onlyEOA nonReentrant whenNotPaused { (uint256 _fund0, uint256 _fund1,) = getDepth(); uint256 baseTokenOut = _getAmountOut(_amount, _fund0, _fund1); token0.safeTransferFrom(msg.sender, address(this), _amount); _swap(0, baseTokenOut, msg.sender); emit Redeem(msg.sender, baseTokenOut, _amount); } /// @notice Match the requirements of reorders and update the global parameters. function sync() external nonReentrant whenNotPaused onlyReordersController { _update(token0.balanceOf(address(this)), token1.balanceOf(address(this)), fund0, fund1); if (feeOn) kLast = uint(fund0) * fund1; _resetPrice(); } /// @notice Update global parameters based on the latest balance. function updateOraclePrice() external nonReentrant whenNotPaused { _update(token0.balanceOf(address(this)), token1.balanceOf(address(this)), fund0, fund1); } /// @notice Allocate PAV funds, this function is called by OrdersController in _reorders(), and its purpose is as follows: /// 1. It is used to complete the profit sharing for MMF participants. Since the total amount of shares is recorded in MMF, /// only mmfFund0 and mmfFund1 need to be updated to distribute profits to participants; /// 2. Used to transfer part of USDC to rainyDayFund /// 3. Used to transfer part of USDC to protocolFeeVault /// @param _newMMFRewards0 The amount of TiUSD that needs to be allocated to MMF in PAV. /// @param _newMMFRewards1 The amount of USDC that needs to be allocated to MMF in PAV. /// @param _newRainyDayFunds The amount of USDC that needs to be withdrawn for rainy day fund in PAV. /// @param _newProtocolFees The amount of USDC that needs to be withdrawn for protocol fee in PAV. function pavAllocation( uint _newMMFRewards0, uint _newMMFRewards1, uint _newRainyDayFunds, uint _newProtocolFees ) external nonReentrant onlyReordersController whenNotPaused { IERC20 _token = token1; uint newMMFRewards = _newMMFRewards1; // Since MMF is recorded by share, we can update mmfFund directly to complete the profit sharing mmfFund0 = mmfFund0 + _newMMFRewards0; mmfFund1 = mmfFund1 + _newMMFRewards1; address _rainyDayFundVault = IReOrdersController(reordersController).rainyDayFundVault(); address _protocolFeeVault = IReOrdersController(reordersController).protocolFeeVault(); _token.safeTransfer(_rainyDayFundVault, _newRainyDayFunds); _token.safeTransfer(_protocolFeeVault, _newProtocolFees); emit PAVAllocation(newMMFRewards, _newRainyDayFunds, _newProtocolFees, block.timestamp); } /// @notice Pause the whole system. function pause() external onlyOwner { _pause(); } /// @notice Unpause the whole system. function unpause() external onlyOwner { _unpause(); } /// @notice Get the lastest MMF's TiUSD and USDC staked amount in MAMM. function getMMFFunds() external view returns (uint, uint, uint32) { return (mmfFund0, mmfFund1, blockTimestampLast); } /// @notice Get TiUSD's average price denominated in USDC. /// @return tiusdPriceMantissa TiUSD price with 18-bit precision. /// @return isValid Whether the return TiUSD price is valid. function getTiUSDPrice() external view whenNotPaused returns (uint256 tiusdPriceMantissa, bool isValid) { (tiusdPriceMantissa, isValid) = _getTiUSDPrice(); } /// @notice Get the lastest MAMM's TiUSD and USDC depth. function getDepth() public view returns (uint112, uint112, uint32) { return (fund0, fund1, blockTimestampLast); } /// @notice Perform swap operation /// @dev this low-level function should be called from a contract which performs important safety checks function _swap(uint _amount0Out, uint _amount1Out, address _to) internal { require(_amount0Out > 0 || _amount1Out > 0, 'MAMMSwapPair: INSUFFICIENT_OUTPUT_AMOUNT'); (uint112 _fund0, uint112 _fund1,) = getDepth(); // gas savings // Redeem cannot lose MMF's Fund, because currently MMF's Fund is only used to increase depth bool isSufficient = _amount0Out <= _fund0 && _amount1Out <= uint(_fund1) - mmfFund1; require(isSufficient, 'MAMMSwapPair: INSUFFICIENT_LIQUIDITY'); uint balance0; uint balance1; { // scope for _token{0,1}, avoids stack too deep errors IERC20 _token0 = token0; IERC20 _token1 = token1; require(_to != address(_token0) && _to != address(_token1) && _to != address(this), 'MAMMSwapPair: INVALID_TO'); if (_amount0Out > 0) _token0.safeTransfer(_to, _amount0Out); if (_amount1Out > 0) _token1.safeTransfer(_to, _amount1Out); balance0 = _token0.balanceOf(address(this)); balance1 = _token1.balanceOf(address(this)); } uint amount0In = balance0 > _fund0 - _amount0Out ? balance0 - (_fund0 - _amount0Out) : 0; uint amount1In = balance1 > _fund1 - _amount1Out ? balance1 - (_fund1 - _amount1Out) : 0; require(amount0In > 0 || amount1In > 0, 'MAMMSwapPair: INSUFFICIENT_INPUT_AMOUNT'); { // scope for funds{0,1}Adjusted, avoids stack too deep errors uint balance0Adjusted = balance0 * 1000 - (amount0In * 3); uint balance1Adjusted = balance1 * 1000 - (amount1In * 3); require(balance0Adjusted * balance1Adjusted >= uint(_fund0) * uint(_fund1) * 1000**2, 'MAMMSwapPair: K'); } _update(balance0, balance1, _fund0, _fund1); } /// @notice According to k = x * y, calculate the amount of tokenOut obtained in the swap process. function _getAmountOut( uint _amountIn, uint _fundIn, uint _fundOut ) internal pure returns (uint amountOut) { require(_amountIn > 0, 'MAMMSwapPair: INSUFFICIENT_INPUT_AMOUNT'); require(_fundIn > 0 && _fundOut > 0, 'MAMMSwapPair: INSUFFICIENT_LIQUIDITY'); uint amountInWithFee = _amountIn * 997; uint numerator = amountInWithFee * _fundOut; uint denominator = _fundIn * 1000 + amountInWithFee; amountOut = numerator / denominator; } function _update(uint _balance0, uint _balance1, uint112 _fund0, uint112 _fund1) private { require(_balance0 <= MAX_UINT112 && _balance1 <= MAX_UINT112, 'MAMMSwapPair: OVERFLOW'); uint32 blockTimestamp = uint32(block.timestamp % 2**32); unchecked { uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired if (timeElapsed > 0 && _fund0 != 0 && _fund1 != 0) { // * never overflows, and + overflow is desired price0CumulativeLast += uint(UQ112x112.encode(_fund1).uqdiv(_fund0)) * timeElapsed; price1CumulativeLast += uint(UQ112x112.encode(_fund0).uqdiv(_fund1)) * timeElapsed; } } // Update TiUSD's TWAP _updatePrice(blockTimestamp); fund0 = uint112(_balance0); fund1 = uint112(_balance1); blockTimestampLast = blockTimestamp; emit Sync(fund0, fund1); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_token0","type":"address"},{"internalType":"contract IERC20","name":"_token1","type":"address"},{"internalType":"address","name":"_mmf","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"AddLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isAllowed","type":"bool"}],"name":"IsAllowedContractsCall","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"baseTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tiusdAmount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldFeeTo","type":"address"},{"indexed":false,"internalType":"address","name":"newFeeTo","type":"address"}],"name":"NewFeeTo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddr","type":"address"},{"indexed":false,"internalType":"address","name":"newAddr","type":"address"}],"name":"NewReordersController","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"period","type":"uint256"}],"name":"NewTWAPPeriod","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"mmfRewards","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rainyDayFunds","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"protocolFees","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"blockTimestampLast","type":"uint256"}],"name":"PAVAllocation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"baseTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tiusdAmount","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"RemoveLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"fund0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"fund1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"addLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeTo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDepth","outputs":[{"internalType":"uint112","name":"","type":"uint112"},{"internalType":"uint112","name":"","type":"uint112"},{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMMFFunds","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTiUSDPrice","outputs":[{"internalType":"uint256","name":"tiusdPriceMantissa","type":"uint256"},{"internalType":"bool","name":"isValid","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAllowedContractsCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastOracleUpdateTime","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mmf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMMFRewards0","type":"uint256"},{"internalType":"uint256","name":"_newMMFRewards1","type":"uint256"},{"internalType":"uint256","name":"_newRainyDayFunds","type":"uint256"},{"internalType":"uint256","name":"_newProtocolFees","type":"uint256"}],"name":"pavAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"period","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceAverage","outputs":[{"internalType":"uint224","name":"_x","type":"uint224"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priorCumulative","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount0","type":"uint256"},{"internalType":"uint256","name":"_amount1","type":"uint256"}],"name":"removeLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reordersController","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_feeTo","type":"address"}],"name":"setFeeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isAllowed","type":"bool"}],"name":"setIsAllowedContractsCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_reordersController","type":"address"}],"name":"setNewReordersController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"setPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sync","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateOraclePrice","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e0604052610e106001553480156200001757600080fd5b5060405162002dd638038062002dd68339810160408190526200003a91620000de565b620000453362000075565b6000805460ff60a01b1916905560016007556001600160a01b0392831660a05290821660c0521660805262000132565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620000db57600080fd5b50565b600080600060608486031215620000f457600080fd5b83516200010181620000c5565b60208501519093506200011481620000c5565b60408501519092506200012781620000c5565b809150509250925092565b60805160a05160c051612be8620001ee6000396000818161040c015281816107300152818161081601528181610b6e01528181610e7b01528181610fe20152818161129b01528181611602015261209c01526000818161027c015281816106f60152818161077101528181610b4d01528181611203015281816114210152818161155d01528181611962015261207b01526000818161044601528181610ac701528181610b9c01528181610bd001526114c00152612be86000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c80638456cb5911610125578063e7ac7d13116100ad578063f2fde38b1161007c578063f2fde38b146104a4578063f46901ed146104b7578063fbfa8d10146104ca578063ff4b589e146104e7578063fff6cae91461050c57600080fd5b8063e7ac7d1314610441578063e8078d9414610468578063eb3091b114610470578063ef78d4fd1461049b57600080fd5b8063b26cec9e116100f4578063b26cec9e146103d9578063b9850ea8146103ec578063c0bbd884146103ff578063d21220a714610407578063db006a751461042e57600080fd5b80638456cb591461039a5780638da5cb5b146103a25780639d7de6b3146103b3578063a0712d68146103c657600080fd5b80633f4ba83a116101a85780635a3d5493116101775780635a3d5493146103615780635abc01bd1461036a5780635c975abb14610377578063715018a6146103895780637464fc3d1461039157600080fd5b80633f4ba83a14610315578063455e95f61461031d5780634f335d0a146103345780635909c0d51461035857600080fd5b806313966db5116101e457806313966db5146102b35780632c37c6cc146102bb5780632d1ff95f146102ce578063367506ef146102e157600080fd5b8063015d707214610216578063017e7e581461024c5780630dfe1681146102775780630f3a9f651461029e575b600080fd5b600b54600c54600a54604080519384526020840192909252600160e01b900463ffffffff16908201526060015b60405180910390f35b60095461025f906001600160a01b031681565b6040516001600160a01b039091168152602001610243565b61025f7f000000000000000000000000000000000000000000000000000000000000000081565b6102b16102ac3660046127be565b610514565b005b6102b16105d0565b6102b16102c93660046127ec565b6108e3565b60085461025f906001600160a01b031681565b6102e96109d0565b604080516001600160701b03948516815293909216602084015263ffffffff1690820152606001610243565b6102b16109fa565b61032660045481565b604051908152602001610243565b60095461034890600160a01b900460ff1681565b6040519015158152602001610243565b61032660025481565b61032660035481565b600e546103489060ff1681565b600054600160a01b900460ff16610348565b6102b1610a2e565b610326600d5481565b6102b1610a62565b6000546001600160a01b031661025f565b6102b16103c1366004612809565b610a94565b6102b16103d43660046127be565b610d9a565b6102b16103e7366004612839565b610ef6565b6102b16103fa366004612856565b610f61565b6102b1611198565b61025f7f000000000000000000000000000000000000000000000000000000000000000081565b6102b161043c3660046127be565b611340565b61025f7f000000000000000000000000000000000000000000000000000000000000000081565b6102b161148d565b600554610483906001600160e01b031681565b6040516001600160e01b039091168152602001610243565b61032660015481565b6102b16104b23660046127ec565b611764565b6102b16104c53660046127ec565b6117ff565b6104d261188f565b60408051928352901515602083015201610243565b6006546104f79063ffffffff1681565b60405163ffffffff9091168152602001610243565b6102b16118cd565b6000546001600160a01b031633146105475760405162461bcd60e51b815260040161053e90612888565b60405180910390fd5b806105945760405162461bcd60e51b815260206004820152601c60248201527f4d414d4d53776170506169723a2043616e6e6f74206265207a65726f00000000604482015260640161053e565b60018190556040518181527f54c7f77fe1c72b75de6846ca2e33ffce2208936f2b526456f423a9b5aa7bb4f8906020015b60405180910390a150565b600260075414156105f35760405162461bcd60e51b815260040161053e906128bd565b60026007556008546001600160a01b031633146106225760405162461bcd60e51b815260040161053e906128f4565b600d54600a546009546001600160701b0380831692600160701b90041690600160a01b900460ff16156108cd5782156108c85760006106756106706001600160701b0380851690861661294e565b6119d6565b90506000610682856119d6565b9050808211156108c557600082610699838261296d565b6106ac906001600160701b03881661294e565b6106b6919061299a565b90506000836106c5848261296d565b6106d8906001600160701b03881661294e565b6106e2919061299a565b60095490915061071f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911684611b54565b600954610759906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683611b54565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156107bb57600080fd5b505afa1580156107cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f391906129ae565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561085857600080fd5b505afa15801561086c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089091906129ae565b905061089e82828a8a611bbc565b600a546108bd906001600160701b03600160701b82048116911661294e565b600d55505050505b50505b6108d9565b82156108d9576000600d555b5050600160075550565b6000546001600160a01b0316331461090d5760405162461bcd60e51b815260040161053e90612888565b6001600160a01b03811661096e5760405162461bcd60e51b815260206004820152602260248201527f4d414d4d53776170506169723a2043616e6e6f74206265206164647265737328604482015261302960f01b606482015260840161053e565b600880546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527fc9377606f509e4de437074d6be747d536517ca9242042013bdfbb09ff93fe17291015b60405180910390a15050565b600a546001600160701b0380821692600160701b830490911691600160e01b900463ffffffff1690565b6000546001600160a01b03163314610a245760405162461bcd60e51b815260040161053e90612888565b610a2c611d80565b565b6000546001600160a01b03163314610a585760405162461bcd60e51b815260040161053e90612888565b610a2c6000611e1d565b6000546001600160a01b03163314610a8c5760405162461bcd60e51b815260040161053e90612888565b610a2c611e6d565b60026007541415610ab75760405162461bcd60e51b815260040161053e906128bd565b6002600755336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b345760405162461bcd60e51b815260206004820152601d60248201527f4d414d4d53776170506169723a204e6f74204d617463686564204d4d46000000604482015260640161053e565b600a546001600160701b0380821691600160701b9004167f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610bc16001600160a01b0383167f000000000000000000000000000000000000000000000000000000000000000088611b54565b610bf56001600160a01b0382167f000000000000000000000000000000000000000000000000000000000000000087611b54565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b158015610c3757600080fd5b505afa158015610c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6f91906129ae565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a082319060240160206040518083038186803b158015610cb457600080fd5b505afa158015610cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cec91906129ae565b905087600b54610cfc919061296d565b600b55600c54610d0d90889061296d565b600c55610d1c82828888611bbc565b600954600160a01b900460ff1615610d5157600a54610d4d906001600160701b03600160701b82048116911661294e565b600d555b60408051898152602081018990527f9101fb4cb96b608de64eae79af26fc5fbe69904c5e3b6108204eefd9212f477091015b60405180910390a150506001600755505050505050565b600e5460ff16610deb57323314610deb5760405162461bcd60e51b81526020600482015260156024820152744d414d4d53776170506169723a204e6f7420454f4160581b604482015260640161053e565b60026007541415610e0e5760405162461bcd60e51b815260040161053e906128bd565b6002600755600054600160a01b900460ff1615610e3d5760405162461bcd60e51b815260040161053e906129c7565b600080610e486109d0565b506001600160701b031691506001600160701b031691506000610e6c848385611ed2565b9050610ea36001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087611f6d565b610eaf81600033611fab565b604080518581526020810183905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f91015b60405180910390a2505060016007555050565b6000546001600160a01b03163314610f205760405162461bcd60e51b815260040161053e90612888565b600e805460ff19168215159081179091556040519081527fdca4744a41d77c7666c061bdbdebdc91f3c333f285d573d7370403fa3ac45a5a906020016105c5565b60026007541415610f845760405162461bcd60e51b815260040161053e906128bd565b60026007556008546001600160a01b03163314610fb35760405162461bcd60e51b815260040161053e906128f4565b600054600160a01b900460ff1615610fdd5760405162461bcd60e51b815260040161053e906129c7565b600b547f000000000000000000000000000000000000000000000000000000000000000090849061100f9087906129f1565b600b55600c546110209086906129f1565b600c5560085460408051630fd3969f60e31b815290516000926001600160a01b031691637e9cb4f8916004808301926020929190829003018186803b15801561106857600080fd5b505afa15801561107c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a09190612a09565b90506000600860009054906101000a90046001600160a01b03166001600160a01b031663af1af3b96040518163ffffffff1660e01b815260040160206040518083038186803b1580156110f257600080fd5b505afa158015611106573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112a9190612a09565b90506111406001600160a01b0385168388611b54565b6111546001600160a01b0385168287611b54565b60408051848152602081018890529081018690524260608201527f46ef09809fcda99871b7e9ba0d62bb918d3e1b4413035ad7340e17e4d833c80a90608001610d83565b600260075414156111bb5760405162461bcd60e51b815260040161053e906128bd565b6002600755600054600160a01b900460ff16156111ea5760405162461bcd60e51b815260040161053e906129c7565b6040516370a0823160e01b8152306004820152611339907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a08231906024015b60206040518083038186803b15801561124e57600080fd5b505afa158015611262573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128691906129ae565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156112e557600080fd5b505afa1580156112f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131d91906129ae565b600a546001600160701b0380821691600160701b900416611bbc565b6001600755565b600e5460ff16611391573233146113915760405162461bcd60e51b81526020600482015260156024820152744d414d4d53776170506169723a204e6f7420454f4160581b604482015260640161053e565b600260075414156113b45760405162461bcd60e51b815260040161053e906128bd565b6002600755600054600160a01b900460ff16156113e35760405162461bcd60e51b815260040161053e906129c7565b6000806113ee6109d0565b506001600160701b031691506001600160701b031691506000611412848484611ed2565b90506114496001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087611f6d565b61145560008233611fab565b604080518281526020810186905233917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a9299101610ee3565b600260075414156114b05760405162461bcd60e51b815260040161053e906128bd565b6002600755336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461152d5760405162461bcd60e51b815260206004820152601d60248201527f4d414d4d53776170506169723a204e6f74204d617463686564204d4d46000000604482015260640161053e565b600a546040516370a0823160e01b81523060048201526001600160701b0380831692600160701b900416906000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156115a757600080fd5b505afa1580156115bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115df91906129ae565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561164457600080fd5b505afa158015611658573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167c91906129ae565b905060006116936001600160701b0386168461296d565b905060006116aa6001600160701b0386168461296d565b905081600b60008282546116be91906129f1565b9250508190555080600c60008282546116d791906129f1565b909155506116e9905084848888611bbc565b600954600160a01b900460ff161561171e57600a5461171a906001600160701b03600160701b82048116911661294e565b600d555b60408051838152602081018390527fcb1652de9aeec38545fc281847b3dbfc89aab56dfa907b1ab68466f602c36fb4910160405180910390a15050600160075550505050565b6000546001600160a01b0316331461178e5760405162461bcd60e51b815260040161053e90612888565b6001600160a01b0381166117f35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161053e565b6117fc81611e1d565b50565b6000546001600160a01b031633146118295760405162461bcd60e51b815260040161053e90612888565b600980546001600160a81b031981166001600160a01b03848116918217821515600160a01b021790935560408051939092168084526020840191909152917f94bb4d51407e7df26fbe099cbeab4795bad91771448a8a498a5d22272385cf4391016109c4565b600080548190600160a01b900460ff16156118bc5760405162461bcd60e51b815260040161053e906129c7565b6118c46123f3565b90939092509050565b600260075414156118f05760405162461bcd60e51b815260040161053e906128bd565b6002600755600054600160a01b900460ff161561191f5760405162461bcd60e51b815260040161053e906129c7565b6008546001600160a01b031633146119495760405162461bcd60e51b815260040161053e906128f4565b6040516370a0823160e01b8152306004820152611999907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401611236565b600954600160a01b900460ff16156119ce57600a546119ca906001600160701b03600160701b82048116911661294e565b600d555b611339612435565b6000816119e557506000919050565b816001600160801b82106119fe5760809190911c9060401b5b680100000000000000008210611a195760409190911c9060201b5b6401000000008210611a305760209190911c9060101b5b620100008210611a455760109190911c9060081b5b6101008210611a595760089190911c9060041b5b60108210611a6c5760049190911c9060021b5b60088210611a785760011b5b6001611a84828661299a565b611a8e90836129f1565b901c90506001611a9e828661299a565b611aa890836129f1565b901c90506001611ab8828661299a565b611ac290836129f1565b901c90506001611ad2828661299a565b611adc90836129f1565b901c90506001611aec828661299a565b611af690836129f1565b901c90506001611b06828661299a565b611b1090836129f1565b901c90506001611b20828661299a565b611b2a90836129f1565b901c90506000611b3a828661299a565b9050808210611b495780611b4b565b815b95945050505050565b6040516001600160a01b038316602482015260448101829052611bb790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261247c565b505050565b6001600160701b038411801590611bda57506001600160701b038311155b611c1f5760405162461bcd60e51b81526020600482015260166024820152754d414d4d53776170506169723a204f564552464c4f5760501b604482015260640161053e565b6000611c3064010000000042612a26565b600a5490915063ffffffff600160e01b9091048116820390811615801590611c6057506001600160701b03841615155b8015611c7457506001600160701b03831615155b15611cdf578063ffffffff16611c9c85611c8d8661254e565b6001600160e01b03169061256d565b600280546001600160e01b03929092169290920201905563ffffffff8116611cc784611c8d8761254e565b600380546001600160e01b0392909216929092020190555b50611ce981612589565b600a805463ffffffff8316600160e01b026001600160e01b036001600160701b03888116600160701b9081026001600160e01b03199095168b83161794909417918216831794859055604080519382169282169290921783529290930490911660208201527f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1910160405180910390a15050505050565b600054600160a01b900460ff16611dd05760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161053e565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff1615611e975760405162461bcd60e51b815260040161053e906129c7565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611e003390565b6000808411611ef35760405162461bcd60e51b815260040161053e90612a3a565b600083118015611f035750600082115b611f1f5760405162461bcd60e51b815260040161053e90612a81565b6000611f2d856103e561294e565b90506000611f3b848361294e565b9050600082611f4c876103e861294e565b611f5691906129f1565b9050611f62818361299a565b979650505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052611fa59085906323b872dd60e01b90608401611b80565b50505050565b6000831180611fba5750600082115b6120175760405162461bcd60e51b815260206004820152602860248201527f4d414d4d53776170506169723a20494e53554646494349454e545f4f555450556044820152671517d05353d5539560c21b606482015260840161053e565b6000806120226109d0565b50915091506000826001600160701b031686111580156120575750600c54612053906001600160701b03841661296d565b8511155b9050806120765760405162461bcd60e51b815260040161053e90612a81565b6000807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03888116908316148015906120e95750806001600160a01b0316886001600160a01b031614155b80156120fe57506001600160a01b0388163014155b61214a5760405162461bcd60e51b815260206004820152601860248201527f4d414d4d53776170506169723a20494e56414c49445f544f0000000000000000604482015260640161053e565b8915612164576121646001600160a01b038316898c611b54565b881561217e5761217e6001600160a01b038216898b611b54565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b1580156121bd57600080fd5b505afa1580156121d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f591906129ae565b6040516370a0823160e01b81523060048201529094506001600160a01b038216906370a082319060240160206040518083038186803b15801561223757600080fd5b505afa15801561224b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226f91906129ae565b92505050600088866001600160701b031661228a919061296d565b83116122975760006122b4565b6122aa896001600160701b03881661296d565b6122b4908461296d565b905060006122cb896001600160701b03881661296d565b83116122d85760006122f5565b6122eb896001600160701b03881661296d565b6122f5908461296d565b905060008211806123065750600081115b6123225760405162461bcd60e51b815260040161053e90612a3a565b600061232f83600361294e565b61233b866103e861294e565b612345919061296d565b9050600061235483600361294e565b612360866103e861294e565b61236a919061296d565b90506123826001600160701b03808a16908b1661294e565b61238f90620f424061294e565b612399828461294e565b10156123d95760405162461bcd60e51b815260206004820152600f60248201526e4d414d4d53776170506169723a204b60881b604482015260640161053e565b50506123e784848989611bbc565b50505050505050505050565b60408051602081019091526005546001600160e01b03168152600090819064e8d4a510009061242190612636565b61242b919061294e565b9283151592509050565b604051806020016040528064e8d4a51000600160701b6124559190612ac5565b6001600160e01b039081169091529051600580546001600160e01b03191691909216179055565b60006124d1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166126569092919063ffffffff16565b805190915015611bb757808060200190518101906124ef9190612aeb565b611bb75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161053e565b6000612567600160701b6001600160701b038416612b08565b92915050565b60006125826001600160701b03831684612ac5565b9392505050565b60065463ffffffff166125b0576006805463ffffffff831663ffffffff1990911617905550565b60065460015463ffffffff918216830391821610612632576000600254905060405180602001604052808363ffffffff166004548403816125f3576125f3612984565b046001600160e01b039081169091529051600580546001600160e01b031916919092161790556004556006805463ffffffff191663ffffffff84161790555b5050565b8051600090612567906612725dd1d243ab906001600160e01b031661299a565b6060612665848460008561266d565b949350505050565b6060824710156126ce5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161053e565b843b61271c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161053e565b600080866001600160a01b031685876040516127389190612b63565b60006040518083038185875af1925050503d8060008114612775576040519150601f19603f3d011682016040523d82523d6000602084013e61277a565b606091505b5091509150611f6282828660608315612794575081612582565b8251156127a45782518084602001fd5b8160405162461bcd60e51b815260040161053e9190612b7f565b6000602082840312156127d057600080fd5b5035919050565b6001600160a01b03811681146117fc57600080fd5b6000602082840312156127fe57600080fd5b8135612582816127d7565b6000806040838503121561281c57600080fd5b50508035926020909101359150565b80151581146117fc57600080fd5b60006020828403121561284b57600080fd5b81356125828161282b565b6000806000806080858703121561286c57600080fd5b5050823594602084013594506040840135936060013592509050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526024908201527f4d414d4d53776170506169723a204e6f742052656f7264657273436f6e74726f604082015263363632b960e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561296857612968612938565b500290565b60008282101561297f5761297f612938565b500390565b634e487b7160e01b600052601260045260246000fd5b6000826129a9576129a9612984565b500490565b6000602082840312156129c057600080fd5b5051919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60008219821115612a0457612a04612938565b500190565b600060208284031215612a1b57600080fd5b8151612582816127d7565b600082612a3557612a35612984565b500690565b60208082526027908201527f4d414d4d53776170506169723a20494e53554646494349454e545f494e50555460408201526617d05353d5539560ca1b606082015260800190565b60208082526024908201527f4d414d4d53776170506169723a20494e53554646494349454e545f4c495155496040820152634449545960e01b606082015260800190565b60006001600160e01b0383811680612adf57612adf612984565b92169190910492915050565b600060208284031215612afd57600080fd5b81516125828161282b565b60006001600160e01b0382811684821681151582840482111615612b2e57612b2e612938565b02949350505050565b60005b83811015612b52578181015183820152602001612b3a565b83811115611fa55750506000910152565b60008251612b75818460208701612b37565b9190910192915050565b6020815260008251806020840152612b9e816040850160208701612b37565b601f01601f1916919091016040019291505056fea2646970667358221220755bec90b6855f90a96d0aaeb9de28547d1e77899e2c6c3796661401fe4384d364736f6c634300080900330000000000000000000000006eff556748ee452cbdaf31bcb8c76a28651509bd000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000009d9afd31a79df17086809832ac53d1d21b99f57e
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102115760003560e01c80638456cb5911610125578063e7ac7d13116100ad578063f2fde38b1161007c578063f2fde38b146104a4578063f46901ed146104b7578063fbfa8d10146104ca578063ff4b589e146104e7578063fff6cae91461050c57600080fd5b8063e7ac7d1314610441578063e8078d9414610468578063eb3091b114610470578063ef78d4fd1461049b57600080fd5b8063b26cec9e116100f4578063b26cec9e146103d9578063b9850ea8146103ec578063c0bbd884146103ff578063d21220a714610407578063db006a751461042e57600080fd5b80638456cb591461039a5780638da5cb5b146103a25780639d7de6b3146103b3578063a0712d68146103c657600080fd5b80633f4ba83a116101a85780635a3d5493116101775780635a3d5493146103615780635abc01bd1461036a5780635c975abb14610377578063715018a6146103895780637464fc3d1461039157600080fd5b80633f4ba83a14610315578063455e95f61461031d5780634f335d0a146103345780635909c0d51461035857600080fd5b806313966db5116101e457806313966db5146102b35780632c37c6cc146102bb5780632d1ff95f146102ce578063367506ef146102e157600080fd5b8063015d707214610216578063017e7e581461024c5780630dfe1681146102775780630f3a9f651461029e575b600080fd5b600b54600c54600a54604080519384526020840192909252600160e01b900463ffffffff16908201526060015b60405180910390f35b60095461025f906001600160a01b031681565b6040516001600160a01b039091168152602001610243565b61025f7f0000000000000000000000006eff556748ee452cbdaf31bcb8c76a28651509bd81565b6102b16102ac3660046127be565b610514565b005b6102b16105d0565b6102b16102c93660046127ec565b6108e3565b60085461025f906001600160a01b031681565b6102e96109d0565b604080516001600160701b03948516815293909216602084015263ffffffff1690820152606001610243565b6102b16109fa565b61032660045481565b604051908152602001610243565b60095461034890600160a01b900460ff1681565b6040519015158152602001610243565b61032660025481565b61032660035481565b600e546103489060ff1681565b600054600160a01b900460ff16610348565b6102b1610a2e565b610326600d5481565b6102b1610a62565b6000546001600160a01b031661025f565b6102b16103c1366004612809565b610a94565b6102b16103d43660046127be565b610d9a565b6102b16103e7366004612839565b610ef6565b6102b16103fa366004612856565b610f61565b6102b1611198565b61025f7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b6102b161043c3660046127be565b611340565b61025f7f0000000000000000000000009d9afd31a79df17086809832ac53d1d21b99f57e81565b6102b161148d565b600554610483906001600160e01b031681565b6040516001600160e01b039091168152602001610243565b61032660015481565b6102b16104b23660046127ec565b611764565b6102b16104c53660046127ec565b6117ff565b6104d261188f565b60408051928352901515602083015201610243565b6006546104f79063ffffffff1681565b60405163ffffffff9091168152602001610243565b6102b16118cd565b6000546001600160a01b031633146105475760405162461bcd60e51b815260040161053e90612888565b60405180910390fd5b806105945760405162461bcd60e51b815260206004820152601c60248201527f4d414d4d53776170506169723a2043616e6e6f74206265207a65726f00000000604482015260640161053e565b60018190556040518181527f54c7f77fe1c72b75de6846ca2e33ffce2208936f2b526456f423a9b5aa7bb4f8906020015b60405180910390a150565b600260075414156105f35760405162461bcd60e51b815260040161053e906128bd565b60026007556008546001600160a01b031633146106225760405162461bcd60e51b815260040161053e906128f4565b600d54600a546009546001600160701b0380831692600160701b90041690600160a01b900460ff16156108cd5782156108c85760006106756106706001600160701b0380851690861661294e565b6119d6565b90506000610682856119d6565b9050808211156108c557600082610699838261296d565b6106ac906001600160701b03881661294e565b6106b6919061299a565b90506000836106c5848261296d565b6106d8906001600160701b03881661294e565b6106e2919061299a565b60095490915061071f906001600160a01b037f0000000000000000000000006eff556748ee452cbdaf31bcb8c76a28651509bd8116911684611b54565b600954610759906001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb488116911683611b54565b6040516370a0823160e01b81523060048201526000907f0000000000000000000000006eff556748ee452cbdaf31bcb8c76a28651509bd6001600160a01b0316906370a082319060240160206040518083038186803b1580156107bb57600080fd5b505afa1580156107cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f391906129ae565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816906370a082319060240160206040518083038186803b15801561085857600080fd5b505afa15801561086c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089091906129ae565b905061089e82828a8a611bbc565b600a546108bd906001600160701b03600160701b82048116911661294e565b600d55505050505b50505b6108d9565b82156108d9576000600d555b5050600160075550565b6000546001600160a01b0316331461090d5760405162461bcd60e51b815260040161053e90612888565b6001600160a01b03811661096e5760405162461bcd60e51b815260206004820152602260248201527f4d414d4d53776170506169723a2043616e6e6f74206265206164647265737328604482015261302960f01b606482015260840161053e565b600880546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527fc9377606f509e4de437074d6be747d536517ca9242042013bdfbb09ff93fe17291015b60405180910390a15050565b600a546001600160701b0380821692600160701b830490911691600160e01b900463ffffffff1690565b6000546001600160a01b03163314610a245760405162461bcd60e51b815260040161053e90612888565b610a2c611d80565b565b6000546001600160a01b03163314610a585760405162461bcd60e51b815260040161053e90612888565b610a2c6000611e1d565b6000546001600160a01b03163314610a8c5760405162461bcd60e51b815260040161053e90612888565b610a2c611e6d565b60026007541415610ab75760405162461bcd60e51b815260040161053e906128bd565b6002600755336001600160a01b037f0000000000000000000000009d9afd31a79df17086809832ac53d1d21b99f57e1614610b345760405162461bcd60e51b815260206004820152601d60248201527f4d414d4d53776170506169723a204e6f74204d617463686564204d4d46000000604482015260640161053e565b600a546001600160701b0380821691600160701b9004167f0000000000000000000000006eff556748ee452cbdaf31bcb8c76a28651509bd7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48610bc16001600160a01b0383167f0000000000000000000000009d9afd31a79df17086809832ac53d1d21b99f57e88611b54565b610bf56001600160a01b0382167f0000000000000000000000009d9afd31a79df17086809832ac53d1d21b99f57e87611b54565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b158015610c3757600080fd5b505afa158015610c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6f91906129ae565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a082319060240160206040518083038186803b158015610cb457600080fd5b505afa158015610cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cec91906129ae565b905087600b54610cfc919061296d565b600b55600c54610d0d90889061296d565b600c55610d1c82828888611bbc565b600954600160a01b900460ff1615610d5157600a54610d4d906001600160701b03600160701b82048116911661294e565b600d555b60408051898152602081018990527f9101fb4cb96b608de64eae79af26fc5fbe69904c5e3b6108204eefd9212f477091015b60405180910390a150506001600755505050505050565b600e5460ff16610deb57323314610deb5760405162461bcd60e51b81526020600482015260156024820152744d414d4d53776170506169723a204e6f7420454f4160581b604482015260640161053e565b60026007541415610e0e5760405162461bcd60e51b815260040161053e906128bd565b6002600755600054600160a01b900460ff1615610e3d5760405162461bcd60e51b815260040161053e906129c7565b600080610e486109d0565b506001600160701b031691506001600160701b031691506000610e6c848385611ed2565b9050610ea36001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816333087611f6d565b610eaf81600033611fab565b604080518581526020810183905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f91015b60405180910390a2505060016007555050565b6000546001600160a01b03163314610f205760405162461bcd60e51b815260040161053e90612888565b600e805460ff19168215159081179091556040519081527fdca4744a41d77c7666c061bdbdebdc91f3c333f285d573d7370403fa3ac45a5a906020016105c5565b60026007541415610f845760405162461bcd60e51b815260040161053e906128bd565b60026007556008546001600160a01b03163314610fb35760405162461bcd60e51b815260040161053e906128f4565b600054600160a01b900460ff1615610fdd5760405162461bcd60e51b815260040161053e906129c7565b600b547f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4890849061100f9087906129f1565b600b55600c546110209086906129f1565b600c5560085460408051630fd3969f60e31b815290516000926001600160a01b031691637e9cb4f8916004808301926020929190829003018186803b15801561106857600080fd5b505afa15801561107c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a09190612a09565b90506000600860009054906101000a90046001600160a01b03166001600160a01b031663af1af3b96040518163ffffffff1660e01b815260040160206040518083038186803b1580156110f257600080fd5b505afa158015611106573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112a9190612a09565b90506111406001600160a01b0385168388611b54565b6111546001600160a01b0385168287611b54565b60408051848152602081018890529081018690524260608201527f46ef09809fcda99871b7e9ba0d62bb918d3e1b4413035ad7340e17e4d833c80a90608001610d83565b600260075414156111bb5760405162461bcd60e51b815260040161053e906128bd565b6002600755600054600160a01b900460ff16156111ea5760405162461bcd60e51b815260040161053e906129c7565b6040516370a0823160e01b8152306004820152611339907f0000000000000000000000006eff556748ee452cbdaf31bcb8c76a28651509bd6001600160a01b0316906370a08231906024015b60206040518083038186803b15801561124e57600080fd5b505afa158015611262573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128691906129ae565b6040516370a0823160e01b81523060048201527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a082319060240160206040518083038186803b1580156112e557600080fd5b505afa1580156112f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131d91906129ae565b600a546001600160701b0380821691600160701b900416611bbc565b6001600755565b600e5460ff16611391573233146113915760405162461bcd60e51b81526020600482015260156024820152744d414d4d53776170506169723a204e6f7420454f4160581b604482015260640161053e565b600260075414156113b45760405162461bcd60e51b815260040161053e906128bd565b6002600755600054600160a01b900460ff16156113e35760405162461bcd60e51b815260040161053e906129c7565b6000806113ee6109d0565b506001600160701b031691506001600160701b031691506000611412848484611ed2565b90506114496001600160a01b037f0000000000000000000000006eff556748ee452cbdaf31bcb8c76a28651509bd16333087611f6d565b61145560008233611fab565b604080518281526020810186905233917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a9299101610ee3565b600260075414156114b05760405162461bcd60e51b815260040161053e906128bd565b6002600755336001600160a01b037f0000000000000000000000009d9afd31a79df17086809832ac53d1d21b99f57e161461152d5760405162461bcd60e51b815260206004820152601d60248201527f4d414d4d53776170506169723a204e6f74204d617463686564204d4d46000000604482015260640161053e565b600a546040516370a0823160e01b81523060048201526001600160701b0380831692600160701b900416906000907f0000000000000000000000006eff556748ee452cbdaf31bcb8c76a28651509bd6001600160a01b0316906370a082319060240160206040518083038186803b1580156115a757600080fd5b505afa1580156115bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115df91906129ae565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816906370a082319060240160206040518083038186803b15801561164457600080fd5b505afa158015611658573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167c91906129ae565b905060006116936001600160701b0386168461296d565b905060006116aa6001600160701b0386168461296d565b905081600b60008282546116be91906129f1565b9250508190555080600c60008282546116d791906129f1565b909155506116e9905084848888611bbc565b600954600160a01b900460ff161561171e57600a5461171a906001600160701b03600160701b82048116911661294e565b600d555b60408051838152602081018390527fcb1652de9aeec38545fc281847b3dbfc89aab56dfa907b1ab68466f602c36fb4910160405180910390a15050600160075550505050565b6000546001600160a01b0316331461178e5760405162461bcd60e51b815260040161053e90612888565b6001600160a01b0381166117f35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161053e565b6117fc81611e1d565b50565b6000546001600160a01b031633146118295760405162461bcd60e51b815260040161053e90612888565b600980546001600160a81b031981166001600160a01b03848116918217821515600160a01b021790935560408051939092168084526020840191909152917f94bb4d51407e7df26fbe099cbeab4795bad91771448a8a498a5d22272385cf4391016109c4565b600080548190600160a01b900460ff16156118bc5760405162461bcd60e51b815260040161053e906129c7565b6118c46123f3565b90939092509050565b600260075414156118f05760405162461bcd60e51b815260040161053e906128bd565b6002600755600054600160a01b900460ff161561191f5760405162461bcd60e51b815260040161053e906129c7565b6008546001600160a01b031633146119495760405162461bcd60e51b815260040161053e906128f4565b6040516370a0823160e01b8152306004820152611999907f0000000000000000000000006eff556748ee452cbdaf31bcb8c76a28651509bd6001600160a01b0316906370a0823190602401611236565b600954600160a01b900460ff16156119ce57600a546119ca906001600160701b03600160701b82048116911661294e565b600d555b611339612435565b6000816119e557506000919050565b816001600160801b82106119fe5760809190911c9060401b5b680100000000000000008210611a195760409190911c9060201b5b6401000000008210611a305760209190911c9060101b5b620100008210611a455760109190911c9060081b5b6101008210611a595760089190911c9060041b5b60108210611a6c5760049190911c9060021b5b60088210611a785760011b5b6001611a84828661299a565b611a8e90836129f1565b901c90506001611a9e828661299a565b611aa890836129f1565b901c90506001611ab8828661299a565b611ac290836129f1565b901c90506001611ad2828661299a565b611adc90836129f1565b901c90506001611aec828661299a565b611af690836129f1565b901c90506001611b06828661299a565b611b1090836129f1565b901c90506001611b20828661299a565b611b2a90836129f1565b901c90506000611b3a828661299a565b9050808210611b495780611b4b565b815b95945050505050565b6040516001600160a01b038316602482015260448101829052611bb790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261247c565b505050565b6001600160701b038411801590611bda57506001600160701b038311155b611c1f5760405162461bcd60e51b81526020600482015260166024820152754d414d4d53776170506169723a204f564552464c4f5760501b604482015260640161053e565b6000611c3064010000000042612a26565b600a5490915063ffffffff600160e01b9091048116820390811615801590611c6057506001600160701b03841615155b8015611c7457506001600160701b03831615155b15611cdf578063ffffffff16611c9c85611c8d8661254e565b6001600160e01b03169061256d565b600280546001600160e01b03929092169290920201905563ffffffff8116611cc784611c8d8761254e565b600380546001600160e01b0392909216929092020190555b50611ce981612589565b600a805463ffffffff8316600160e01b026001600160e01b036001600160701b03888116600160701b9081026001600160e01b03199095168b83161794909417918216831794859055604080519382169282169290921783529290930490911660208201527f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1910160405180910390a15050505050565b600054600160a01b900460ff16611dd05760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161053e565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff1615611e975760405162461bcd60e51b815260040161053e906129c7565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611e003390565b6000808411611ef35760405162461bcd60e51b815260040161053e90612a3a565b600083118015611f035750600082115b611f1f5760405162461bcd60e51b815260040161053e90612a81565b6000611f2d856103e561294e565b90506000611f3b848361294e565b9050600082611f4c876103e861294e565b611f5691906129f1565b9050611f62818361299a565b979650505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052611fa59085906323b872dd60e01b90608401611b80565b50505050565b6000831180611fba5750600082115b6120175760405162461bcd60e51b815260206004820152602860248201527f4d414d4d53776170506169723a20494e53554646494349454e545f4f555450556044820152671517d05353d5539560c21b606482015260840161053e565b6000806120226109d0565b50915091506000826001600160701b031686111580156120575750600c54612053906001600160701b03841661296d565b8511155b9050806120765760405162461bcd60e51b815260040161053e90612a81565b6000807f0000000000000000000000006eff556748ee452cbdaf31bcb8c76a28651509bd7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b03888116908316148015906120e95750806001600160a01b0316886001600160a01b031614155b80156120fe57506001600160a01b0388163014155b61214a5760405162461bcd60e51b815260206004820152601860248201527f4d414d4d53776170506169723a20494e56414c49445f544f0000000000000000604482015260640161053e565b8915612164576121646001600160a01b038316898c611b54565b881561217e5761217e6001600160a01b038216898b611b54565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b1580156121bd57600080fd5b505afa1580156121d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f591906129ae565b6040516370a0823160e01b81523060048201529094506001600160a01b038216906370a082319060240160206040518083038186803b15801561223757600080fd5b505afa15801561224b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226f91906129ae565b92505050600088866001600160701b031661228a919061296d565b83116122975760006122b4565b6122aa896001600160701b03881661296d565b6122b4908461296d565b905060006122cb896001600160701b03881661296d565b83116122d85760006122f5565b6122eb896001600160701b03881661296d565b6122f5908461296d565b905060008211806123065750600081115b6123225760405162461bcd60e51b815260040161053e90612a3a565b600061232f83600361294e565b61233b866103e861294e565b612345919061296d565b9050600061235483600361294e565b612360866103e861294e565b61236a919061296d565b90506123826001600160701b03808a16908b1661294e565b61238f90620f424061294e565b612399828461294e565b10156123d95760405162461bcd60e51b815260206004820152600f60248201526e4d414d4d53776170506169723a204b60881b604482015260640161053e565b50506123e784848989611bbc565b50505050505050505050565b60408051602081019091526005546001600160e01b03168152600090819064e8d4a510009061242190612636565b61242b919061294e565b9283151592509050565b604051806020016040528064e8d4a51000600160701b6124559190612ac5565b6001600160e01b039081169091529051600580546001600160e01b03191691909216179055565b60006124d1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166126569092919063ffffffff16565b805190915015611bb757808060200190518101906124ef9190612aeb565b611bb75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161053e565b6000612567600160701b6001600160701b038416612b08565b92915050565b60006125826001600160701b03831684612ac5565b9392505050565b60065463ffffffff166125b0576006805463ffffffff831663ffffffff1990911617905550565b60065460015463ffffffff918216830391821610612632576000600254905060405180602001604052808363ffffffff166004548403816125f3576125f3612984565b046001600160e01b039081169091529051600580546001600160e01b031916919092161790556004556006805463ffffffff191663ffffffff84161790555b5050565b8051600090612567906612725dd1d243ab906001600160e01b031661299a565b6060612665848460008561266d565b949350505050565b6060824710156126ce5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161053e565b843b61271c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161053e565b600080866001600160a01b031685876040516127389190612b63565b60006040518083038185875af1925050503d8060008114612775576040519150601f19603f3d011682016040523d82523d6000602084013e61277a565b606091505b5091509150611f6282828660608315612794575081612582565b8251156127a45782518084602001fd5b8160405162461bcd60e51b815260040161053e9190612b7f565b6000602082840312156127d057600080fd5b5035919050565b6001600160a01b03811681146117fc57600080fd5b6000602082840312156127fe57600080fd5b8135612582816127d7565b6000806040838503121561281c57600080fd5b50508035926020909101359150565b80151581146117fc57600080fd5b60006020828403121561284b57600080fd5b81356125828161282b565b6000806000806080858703121561286c57600080fd5b5050823594602084013594506040840135936060013592509050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526024908201527f4d414d4d53776170506169723a204e6f742052656f7264657273436f6e74726f604082015263363632b960e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561296857612968612938565b500290565b60008282101561297f5761297f612938565b500390565b634e487b7160e01b600052601260045260246000fd5b6000826129a9576129a9612984565b500490565b6000602082840312156129c057600080fd5b5051919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60008219821115612a0457612a04612938565b500190565b600060208284031215612a1b57600080fd5b8151612582816127d7565b600082612a3557612a35612984565b500690565b60208082526027908201527f4d414d4d53776170506169723a20494e53554646494349454e545f494e50555460408201526617d05353d5539560ca1b606082015260800190565b60208082526024908201527f4d414d4d53776170506169723a20494e53554646494349454e545f4c495155496040820152634449545960e01b606082015260800190565b60006001600160e01b0383811680612adf57612adf612984565b92169190910492915050565b600060208284031215612afd57600080fd5b81516125828161282b565b60006001600160e01b0382811684821681151582840482111615612b2e57612b2e612938565b02949350505050565b60005b83811015612b52578181015183820152602001612b3a565b83811115611fa55750506000910152565b60008251612b75818460208701612b37565b9190910192915050565b6020815260008251806020840152612b9e816040850160208701612b37565b601f01601f1916919091016040019291505056fea2646970667358221220755bec90b6855f90a96d0aaeb9de28547d1e77899e2c6c3796661401fe4384d364736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006eff556748ee452cbdaf31bcb8c76a28651509bd000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000009d9afd31a79df17086809832ac53d1d21b99f57e
-----Decoded View---------------
Arg [0] : _token0 (address): 0x6EFF556748Ee452CbDaf31bcb8c76A28651509bd
Arg [1] : _token1 (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [2] : _mmf (address): 0x9D9afD31a79df17086809832Ac53d1d21B99F57E
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000006eff556748ee452cbdaf31bcb8c76a28651509bd
Arg [1] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [2] : 0000000000000000000000009d9afd31a79df17086809832ac53d1d21b99f57e
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.