More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x0e3c7ced5789ee5367cdc70531ba1ba719325b7ff15f431c35cca7ab96322548 | Swap | (pending) | 6 days ago | IN | 0.0005 ETH | (Pending) | |||
Swap | 20841844 | 131 days ago | IN | 1.755 ETH | 0.00123669 | ||||
Swap | 20838020 | 132 days ago | IN | 0 ETH | 0.00231751 | ||||
Swap | 20837860 | 132 days ago | IN | 0 ETH | 0.00184368 | ||||
Swap | 20837851 | 132 days ago | IN | 0 ETH | 0.00048532 | ||||
Swap | 20837449 | 132 days ago | IN | 0.06221398 ETH | 0.00171001 | ||||
Swap | 20837045 | 132 days ago | IN | 0 ETH | 0.00254507 | ||||
Swap | 20836737 | 132 days ago | IN | 0.06784732 ETH | 0.00321726 | ||||
Swap | 20834148 | 132 days ago | IN | 0.00249048 ETH | 0.00188398 | ||||
Swap | 20833255 | 132 days ago | IN | 0.0288 ETH | 0.00361663 | ||||
Swap | 20831667 | 133 days ago | IN | 0.02645665 ETH | 0.00170879 | ||||
Swap | 20830366 | 133 days ago | IN | 0.00109685 ETH | 0.00258563 | ||||
Swap | 20826689 | 133 days ago | IN | 0 ETH | 0.00165921 | ||||
Swap | 20826473 | 133 days ago | IN | 0.00144236 ETH | 0.00275583 | ||||
Swap | 20826184 | 133 days ago | IN | 0.00640294 ETH | 0.00042034 | ||||
Swap | 20825218 | 134 days ago | IN | 0 ETH | 0.00176592 | ||||
Swap | 20823984 | 134 days ago | IN | 0 ETH | 0.00332918 | ||||
Swap | 20823882 | 134 days ago | IN | 0 ETH | 0.00305228 | ||||
Swap | 20823871 | 134 days ago | IN | 24.06833157 ETH | 0.0030634 | ||||
Swap | 20822652 | 134 days ago | IN | 0 ETH | 0.00073589 | ||||
Swap | 20821873 | 134 days ago | IN | 0 ETH | 0.00263166 | ||||
Swap | 20821869 | 134 days ago | IN | 0 ETH | 0.00082824 | ||||
Swap | 20821853 | 134 days ago | IN | 0 ETH | 0.00385714 | ||||
Swap | 20820859 | 134 days ago | IN | 3.7 ETH | 0.0034121 | ||||
Swap | 20820855 | 134 days ago | IN | 3.7 ETH | 0.00090658 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
20841844 | 131 days ago | 1.755 ETH | ||||
20838020 | 132 days ago | 0.86987149 ETH | ||||
20838020 | 132 days ago | 0.86987149 ETH | ||||
20837449 | 132 days ago | 0.06221398 ETH | ||||
20837045 | 132 days ago | 0.0189383 ETH | ||||
20837045 | 132 days ago | 0.0189383 ETH | ||||
20836737 | 132 days ago | 0.06784732 ETH | ||||
20834148 | 132 days ago | 0.00249048 ETH | ||||
20833255 | 132 days ago | 0.0288 ETH | ||||
20831667 | 133 days ago | 0.02645665 ETH | ||||
20830366 | 133 days ago | 0.00109685 ETH | ||||
20826689 | 133 days ago | 0.02531218 ETH | ||||
20826689 | 133 days ago | 0.02531218 ETH | ||||
20826473 | 133 days ago | 0.00144236 ETH | ||||
20825218 | 134 days ago | 0.13658535 ETH | ||||
20825218 | 134 days ago | 0.13658535 ETH | ||||
20823984 | 134 days ago | 1.8865705 ETH | ||||
20823984 | 134 days ago | 1.8865705 ETH | ||||
20823871 | 134 days ago | 24.06833157 ETH | ||||
20820859 | 134 days ago | 3.7 ETH | ||||
20818571 | 134 days ago | 0.10256207 ETH | ||||
20818085 | 135 days ago | 0.00152411 ETH | ||||
20814697 | 135 days ago | 20 ETH | ||||
20814672 | 135 days ago | 30 ETH | ||||
20814150 | 135 days ago | 0.02 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
PancakeSwapMMPool
Compiler Version
v0.8.1+commit.df193b15
Optimization Enabled:
Yes with 99999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {EIP712} from "@openzeppelin-4.7.3/contracts/utils/cryptography/draft-EIP712.sol"; import {Address} from "@openzeppelin-4.7.3/contracts/utils/Address.sol"; import {Ownable} from "@openzeppelin-4.7.3/contracts/access/Ownable.sol"; import {ECDSA} from "@openzeppelin-4.7.3/contracts/utils/cryptography/ECDSA.sol"; import {IERC20} from "@openzeppelin-4.7.3/contracts/interfaces/IERC20.sol"; import {SafeERC20} from "@openzeppelin-4.7.3/contracts/token/ERC20/utils/SafeERC20.sol"; import {ReentrancyGuard} from "@openzeppelin-4.7.3/contracts/security/ReentrancyGuard.sol"; import {IWETH9} from "./interfaces/IWETH9.sol"; import {SafeWETH} from "./utils/SafeWETH.sol"; contract PancakeSwapMMPool is EIP712, ReentrancyGuard, Ownable { using Address for address payable; using ECDSA for bytes32; using SafeERC20 for IERC20; using SafeWETH for IWETH9; address constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; address immutable WETH_ADDRESS; struct MMInfo { address treasury; mapping(address => uint256) userNonce; string name; bool active; } struct Quote { uint256 nonce; address user; address baseToken; address quoteToken; uint256 baseTokenAmount; uint256 quoteTokenAmount; uint256 expiryTimestamp; } mapping(address => MMInfo) mmInfos; event Swap( uint256 nonce, address indexed user, address indexed mm, address mmTreasury, address baseToken, address quoteToken, uint256 baseTokenAmount, uint256 quoteTokenAmount ); event IncrementNonce(address mm, address user); event CreateMMInfo(address mm, address treasury, string name, bool active); event UpdateMMInfo(address mm, address treasury, bool active); event RemoveMMInfo(address mm); modifier existMMInfo(address _mm) { require(mmInfos[_mm].treasury != address(0), "mm not exist"); _; } constructor(address weth) EIP712("PCS MM Pool", "1") { require(weth != address(0), "zero address"); WETH_ADDRESS = weth; } receive() external payable {} function swap( address _mmSigner, Quote calldata _quote, bytes calldata signature ) external payable nonReentrant { require(verifyQuoteSignature(_mmSigner, _quote, signature), "wrong signature"); require(block.timestamp <= _quote.expiryTimestamp, "quote expired"); require(msg.sender == _quote.user, "sender not receiver"); MMInfo storage mmInfo = mmInfos[_mmSigner]; require(mmInfo.active, "mm not active"); require(mmInfo.userNonce[_quote.user] == _quote.nonce, "wrong nonce"); mmInfo.userNonce[_quote.user] += 1; if (_quote.baseToken == address(0) || _quote.baseToken == ETH_ADDRESS) { require(msg.value >= _quote.baseTokenAmount, "not enough amount"); IWETH9(WETH_ADDRESS).safeDeposit(_quote.baseTokenAmount); IWETH9(WETH_ADDRESS).safeTransfer(mmInfo.treasury, _quote.baseTokenAmount); uint256 leftover = msg.value - _quote.baseTokenAmount; if (leftover > 0) payable(msg.sender).sendValue(leftover); } else { uint256 _balanceBefore = IERC20(_quote.baseToken).balanceOf(mmInfo.treasury); IERC20(_quote.baseToken).safeTransferFrom(_quote.user, mmInfo.treasury, _quote.baseTokenAmount); require( IERC20(_quote.baseToken).balanceOf(mmInfo.treasury) - _balanceBefore == _quote.baseTokenAmount, "send amount not match" ); } if (_quote.quoteToken == address(0) || _quote.quoteToken == ETH_ADDRESS) { IWETH9(WETH_ADDRESS).safeTransferFrom(mmInfo.treasury, address(this), _quote.quoteTokenAmount); IWETH9(WETH_ADDRESS).safeWithdraw(_quote.quoteTokenAmount); require(address(this).balance >= _quote.quoteTokenAmount, "not enough amount"); payable(_quote.user).sendValue(_quote.quoteTokenAmount); } else { uint256 _balanceBefore = IERC20(_quote.quoteToken).balanceOf(_quote.user); IERC20(_quote.quoteToken).safeTransferFrom(mmInfo.treasury, _quote.user, _quote.quoteTokenAmount); require( IERC20(_quote.quoteToken).balanceOf(_quote.user) - _balanceBefore == _quote.quoteTokenAmount, "receive amount not match" ); } emit Swap( _quote.nonce, _quote.user, _mmSigner, mmInfo.treasury, _quote.baseToken, _quote.quoteToken, _quote.baseTokenAmount, _quote.quoteTokenAmount ); } function verifyQuoteSignature( address _account, Quote calldata _quote, bytes calldata _signature ) public view returns (bool) { require(_account != address(0), "zero address"); bytes32 digest = _hashTypedDataV4( keccak256( abi.encode( keccak256( "Quote(uint256 nonce,address user,address baseToken,address quoteToken,uint256 baseTokenAmount,uint256 quoteTokenAmount,uint256 expiryTimestamp)" ), _quote.nonce, _quote.user, _quote.baseToken, _quote.quoteToken, _quote.baseTokenAmount, _quote.quoteTokenAmount, _quote.expiryTimestamp ) ) ); return _account == digest.recover(_signature); } function incrementNonce(address _user) external existMMInfo(msg.sender) returns (uint256) { mmInfos[msg.sender].userNonce[_user] += 1; emit IncrementNonce(msg.sender, _user); return mmInfos[msg.sender].userNonce[_user]; } function createMMInfo( address _mm, address _treasury, string calldata _name, bool _active ) external onlyOwner { require(_mm != address(0) && _treasury != address(0), "zero address"); require(mmInfos[_mm].treasury == address(0), "mm exist"); mmInfos[_mm].treasury = _treasury; mmInfos[_mm].name = _name; mmInfos[_mm].active = _active; emit CreateMMInfo(_mm, _treasury, _name, _active); } function updateMMInfo(address _treasury, bool _active) external existMMInfo(msg.sender) { if (mmInfos[msg.sender].treasury != _treasury && _treasury != address(0)) mmInfos[msg.sender].treasury = _treasury; if (mmInfos[msg.sender].active != _active) mmInfos[msg.sender].active = _active; emit UpdateMMInfo(msg.sender, mmInfos[msg.sender].treasury, mmInfos[msg.sender].active); } function removeMMInfo(address _mm) external onlyOwner existMMInfo(_mm) { delete mmInfos[_mm]; emit RemoveMMInfo(_mm); } function getUserNonce(address _mm, address _user) external view existMMInfo(_mm) returns (uint256) { return mmInfos[_mm].userNonce[_user]; } function getMMInfo(address _mm) external view returns ( string memory, address, bool ) { return (mmInfos[_mm].name, mmInfos[_mm].treasury, mmInfos[_mm].active); } function redeemToken(address _token) external onlyOwner { if (_token == address(0) || _token == ETH_ADDRESS) { uint256 totalAmount = address(this).balance; require(totalAmount > 0, "zero balance"); (bool success, ) = msg.sender.call{value: totalAmount}(""); require(success, "transfer eth to sender fail"); } else { uint256 totalAmount = IERC20(_token).balanceOf(address(this)); require(totalAmount > 0, "zero balance"); IERC20(_token).safeTransfer(msg.sender, totalAmount); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IWETH9 { event Approval(address indexed src, address indexed guy, uint256 wad); event Transfer(address indexed src, address indexed dst, uint256 wad); event Deposit(address indexed dst, uint256 wad); event Withdrawal(address indexed src, uint256 wad); function deposit() external payable; function withdraw(uint256 wad) external; function totalSupply() external view returns (uint256); function approve(address guy, uint256 wad) external returns (bool); function transfer(address dst, uint256 wad) external returns (bool); function transferFrom( address src, address dst, uint256 wad ) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IWETH9} from "../interfaces/IWETH9.sol"; import {Address} from "@openzeppelin-4.7.3/contracts/utils/Address.sol"; library SafeWETH { using Address for address; function safeDeposit(IWETH9 token, uint256 value) internal { _callWithValueOptionalReturn(token, abi.encodeWithSelector(token.deposit.selector), value); } function safeWithdraw(IWETH9 token, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.withdraw.selector, value)); } function safeTransfer( IWETH9 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IWETH9 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @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(IWETH9 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, "SafeWETH: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeWETH: WETH operation did not succeed"); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * @param value The amount of native toke send with the function. */ function _callWithValueOptionalReturn( IWETH9 token, bytes memory data, uint256 value ) 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).functionCallWithValue(data, value, "SafeWETH: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeWETH: WETH operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 99999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"mm","type":"address"},{"indexed":false,"internalType":"address","name":"treasury","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"CreateMMInfo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"mm","type":"address"},{"indexed":false,"internalType":"address","name":"user","type":"address"}],"name":"IncrementNonce","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":"address","name":"mm","type":"address"}],"name":"RemoveMMInfo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"mm","type":"address"},{"indexed":false,"internalType":"address","name":"mmTreasury","type":"address"},{"indexed":false,"internalType":"address","name":"baseToken","type":"address"},{"indexed":false,"internalType":"address","name":"quoteToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"baseTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quoteTokenAmount","type":"uint256"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"mm","type":"address"},{"indexed":false,"internalType":"address","name":"treasury","type":"address"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"UpdateMMInfo","type":"event"},{"inputs":[{"internalType":"address","name":"_mm","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"bool","name":"_active","type":"bool"}],"name":"createMMInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mm","type":"address"}],"name":"getMMInfo","outputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_mm","type":"address"},{"internalType":"address","name":"_user","type":"address"}],"name":"getUserNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"incrementNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"redeemToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mm","type":"address"}],"name":"removeMMInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mmSigner","type":"address"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"baseToken","type":"address"},{"internalType":"address","name":"quoteToken","type":"address"},{"internalType":"uint256","name":"baseTokenAmount","type":"uint256"},{"internalType":"uint256","name":"quoteTokenAmount","type":"uint256"},{"internalType":"uint256","name":"expiryTimestamp","type":"uint256"}],"internalType":"struct PancakeSwapMMPool.Quote","name":"_quote","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"swap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"bool","name":"_active","type":"bool"}],"name":"updateMMInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"baseToken","type":"address"},{"internalType":"address","name":"quoteToken","type":"address"},{"internalType":"uint256","name":"baseTokenAmount","type":"uint256"},{"internalType":"uint256","name":"quoteTokenAmount","type":"uint256"},{"internalType":"uint256","name":"expiryTimestamp","type":"uint256"}],"internalType":"struct PancakeSwapMMPool.Quote","name":"_quote","type":"tuple"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"verifyQuoteSignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6101606040523480156200001257600080fd5b5060405162003594380380620035948339810160408190526200003591620001da565b604080518082018252600b81526a1410d4c8135348141bdbdb60aa1b6020808301918252835180850190945260018452603160f81b908401528151902060e08190527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66101008190524660a0529192917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620000d381848462000148565b6080523060601b60c052610120525050600160005550620000ff9050620000f962000184565b62000188565b6001600160a01b038116620001315760405162461bcd60e51b8152600401620001289062000236565b60405180910390fd5b60601b6001600160601b031916610140526200025c565b60008383834630604051602001620001659594939291906200020a565b6040516020818303038152906040528051906020012090509392505050565b3390565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060208284031215620001ec578081fd5b81516001600160a01b038116811462000203578182fd5b9392505050565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b6020808252600c908201526b7a65726f206164647265737360a01b604082015260600190565b60805160a05160c05160601c60e05161010051610120516101405160601c6132c2620002d260003960008181610b7401528181610bbb01528181610eb50152610efd01526000611efc01526000611f3e01526000611f1d01526000611e7f01526000611ea901526000611ed301526132c26000f3fe6080604052600436106100cb5760003560e01c80638da5cb5b11610074578063ee7ce13c1161004e578063ee7ce13c14610215578063f2fde38b14610235578063f5743c4c14610255576100d2565b80638da5cb5b146101a6578063af706348146101c8578063cbfda2e0146101f5576100d2565b8063715018a6116100a5578063715018a61461015e578063842fc1a31461017357806384477b3914610193576100d2565b80632f62a9bf146100d75780636292be961461010f578063646179341461013c576100d2565b366100d257005b600080fd5b3480156100e357600080fd5b506100f76100f2366004612615565b610275565b60405161010693929190612a7d565b60405180910390f35b34801561011b57600080fd5b5061012f61012a36600461262f565b610350565b604051610106919061315b565b34801561014857600080fd5b5061015c610157366004612661565b6103f9565b005b34801561016a57600080fd5b5061015c6105cc565b34801561017f57600080fd5b5061015c61018e366004612615565b6105e0565b61015c6101a136600461270e565b610822565b3480156101b257600080fd5b506101bb611233565b6040516101069190612868565b3480156101d457600080fd5b506101e86101e336600461270e565b611250565b60405161010691906129b8565b34801561020157600080fd5b5061015c6102103660046126d8565b6113b5565b34801561022157600080fd5b5061015c610230366004612615565b611580565b34801561024157600080fd5b5061015c610250366004612615565b6116a9565b34801561026157600080fd5b5061012f610270366004612615565b611707565b73ffffffffffffffffffffffffffffffffffffffff80821660009081526002602081905260408220805460038201549190920180546060958594929392169160ff169083906102c390613201565b80601f01602080910402602001604051908101604052809291908181526020018280546102ef90613201565b801561033c5780601f106103115761010080835404028352916020019161033c565b820191906000526020600020905b81548152906001019060200180831161031f57829003601f168201915b505050505092509250925092509193909250565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526002602052604081205490918491166103bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612f48565b60405180910390fd5b505073ffffffffffffffffffffffffffffffffffffffff91821660009081526002602090815260408083209390941682526001909201909152205490565b610401611828565b73ffffffffffffffffffffffffffffffffffffffff85161580159061043b575073ffffffffffffffffffffffffffffffffffffffff841615155b610471576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612fb4565b73ffffffffffffffffffffffffffffffffffffffff85811660009081526002602052604090205416156104d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612af4565b73ffffffffffffffffffffffffffffffffffffffff858116600090815260026020819052604090912080547fffffffffffffffffffffffff000000000000000000000000000000000000000016928716929092178255610532910184846124c2565b5073ffffffffffffffffffffffffffffffffffffffff85166000908152600260205260409081902060030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016831515179055517fe5c616fdaa6b3b222d93e47302c034f77132ddfac3d8178c0d05db81870f6f31906105bd90879087908790879087906128e1565b60405180910390a15050505050565b6105d4611828565b6105de600061189b565b565b6105e8611828565b73ffffffffffffffffffffffffffffffffffffffff81161580610634575073ffffffffffffffffffffffffffffffffffffffff811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145b1561071b574780610671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b2906130ed565b60003373ffffffffffffffffffffffffffffffffffffffff16826040516106979061124d565b60006040518083038185875af1925050503d80600081146106d4576040519150601f19603f3d011682016040523d82523d6000602084013e6106d9565b606091505b5050905080610714576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612c9b565b505061081f565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610770903090600401612868565b60206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c091906127b4565b9050600081116107fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b2906130ed565b61081d73ffffffffffffffffffffffffffffffffffffffff83163383611912565b505b50565b6002600054141561085f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b2906130b6565b600260005561087084848484611250565b6108a6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290613124565b8260c001354211156108e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612f11565b6108f46040840160208501612615565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610958576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612b2b565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600260205260409020600381015460ff166109bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290613022565b83356001820160006109d36040880160208901612615565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610a45576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612e7d565b60018181016000610a5c6040880160208901612615565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610aa591906131a6565b9091555060009050610abd6060860160408701612615565b73ffffffffffffffffffffffffffffffffffffffff161480610b17575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee610aff6060860160408701612615565b73ffffffffffffffffffffffffffffffffffffffff16145b15610c10578360800135341015610b5a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612c64565b610b9e73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001660808601356119b8565b8054610be89073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811691166080870135611a1b565b6000610bf86080860135346131be565b90508015610c0a57610c0a3382611abc565b50610e27565b6000610c226060860160408701612615565b82546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff928316926370a0823192610c7892911690600401612868565b60206040518083038186803b158015610c9057600080fd5b505afa158015610ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc891906127b4565b9050610d28610cdd6040870160208801612615565b835473ffffffffffffffffffffffffffffffffffffffff166080880135610d0a60608a0160408b01612615565b73ffffffffffffffffffffffffffffffffffffffff16929190611b99565b608085013581610d3e6060880160408901612615565b84546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff928316926370a0823192610d9492911690600401612868565b60206040518083038186803b158015610dac57600080fd5b505afa158015610dc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de491906127b4565b610dee91906131be565b14610e25576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612c2d565b505b6000610e396080860160608701612615565b73ffffffffffffffffffffffffffffffffffffffff161480610e93575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee610e7b6080860160608701612615565b73ffffffffffffffffffffffffffffffffffffffff16145b15610f9e578054610ee39073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811691163060a0880135611bc0565b610f2773ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001660a0860135611be1565b8360a00135471015610f65576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612c64565b610f9960a0850135610f7d6040870160208801612615565b73ffffffffffffffffffffffffffffffffffffffff1690611abc565b61117b565b6000610fb06080860160608701612615565b73ffffffffffffffffffffffffffffffffffffffff166370a08231610fdb6040880160208901612615565b6040518263ffffffff1660e01b8152600401610ff79190612868565b60206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104791906127b4565b825490915061108b9073ffffffffffffffffffffffffffffffffffffffff166110766040880160208901612615565b60a0880135610d0a60808a0160608b01612615565b60a0850135816110a16080880160608901612615565b73ffffffffffffffffffffffffffffffffffffffff166370a082316110cc60408a0160208b01612615565b6040518263ffffffff1660e01b81526004016110e89190612868565b60206040518083038186803b15801561110057600080fd5b505afa158015611114573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113891906127b4565b61114291906131be565b14611179576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612b99565b505b73ffffffffffffffffffffffffffffffffffffffff85166111a26040860160208701612615565b825473ffffffffffffffffffffffffffffffffffffffff918216917fe7d6f812e1a54298ddef0b881cd08a4d452d9de35eb18b5145aa580fdda18b2691883591166111f360608a0160408b01612615565b61120360808b0160608c01612615565b8a608001358b60a0013560405161121f96959493929190613164565b60405180910390a350506001600055505050565b60015473ffffffffffffffffffffffffffffffffffffffff165b90565b600073ffffffffffffffffffffffffffffffffffffffff851661129f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612fb4565b60006113387f7cae903e28caed1b8bfca0434588f00fa8e7bc618719abe9952ae3a0859168a486356112d76040890160208a01612615565b6112e760608a0160408b01612615565b6112f760808b0160608c01612615565b8a608001358b60a001358c60c0013560405160200161131d9897969594939291906129fc565b60405160208183030381529060405280519060200120611bfe565b905061137c84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508593925050611c199050565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614915050949350505050565b3360008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16611411576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612f48565b3360009081526002602052604090205473ffffffffffffffffffffffffffffffffffffffff84811691161480159061145e575073ffffffffffffffffffffffffffffffffffffffff831615155b156114b15733600090815260026020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555b3360009081526002602052604090206003015460ff1615158215151461150e5733600090815260026020526040902060030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168315151790555b3360008181526002602052604090819020805460039091015491517f32705decaa46d8f5e4d261dfb3c3bd34a5ce35243746387d933fb54db4cb165a9361157393909273ffffffffffffffffffffffffffffffffffffffff169160ff909116906128b0565b60405180910390a1505050565b611588611828565b73ffffffffffffffffffffffffffffffffffffffff8082166000908152600260205260409020548291166115e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612f48565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600260208190526040822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155919061164390830182612564565b5060030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517fed24b0e4d14feb074f9e9950f2715fd0e6f6540d81cff065d03bdd4d8dc43df79061169d908490612868565b60405180910390a15050565b6116b1611828565b73ffffffffffffffffffffffffffffffffffffffff81166116fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612bd0565b61081f8161189b565b3360008181526002602052604081205490919073ffffffffffffffffffffffffffffffffffffffff16611766576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612f48565b33600090815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452600190810190925282208054919290916117ac9084906131a6565b90915550506040517f5e8f0e4645f809f08cb25035c10549547a8333ff44136e2a06f4b13f66e3b350906117e39033908690612889565b60405180910390a133600090815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845260010190915290205491505b50919050565b611830611c3d565b73ffffffffffffffffffffffffffffffffffffffff1661184e611233565b73ffffffffffffffffffffffffffffffffffffffff16146105de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612f7f565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6119b38363a9059cbb60e01b8484604051602401611931929190612992565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611c41565b505050565b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd0e30db00000000000000000000000000000000000000000000000000000000017905261081d90839083611cf7565b6119b38363a9059cbb60e01b8484604051602401611a3a929190612992565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611daf565b80471015611af6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612d8c565b60008273ffffffffffffffffffffffffffffffffffffffff1682604051611b1c9061124d565b60006040518083038185875af1925050503d8060008114611b59576040519150601f19603f3d011682016040523d82523d6000602084013e611b5e565b606091505b50509050806119b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612cd2565b611bba846323b872dd60e01b85858560405160240161193193929190612961565b50505050565b611bba846323b872dd60e01b858585604051602401611a3a93929190612961565b61081d82632e1a7d4d60e01b83604051602401611a3a919061315b565b6000611c11611c0b611e65565b83611f69565b90505b919050565b6000806000611c288585611f9c565b91509150611c3581611fe2565b509392505050565b3390565b6000611ca3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166121f49092919063ffffffff16565b8051909150156119b35780806020019051810190611cc19190612798565b6119b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290613059565b6000611d5b83836040518060400160405280601f81526020017f53616665574554483a206c6f772d6c6576656c2063616c6c206661696c6564008152508773ffffffffffffffffffffffffffffffffffffffff1661220d909392919063ffffffff16565b805190915015611bba5780806020019051810190611d799190612798565b611bba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612e20565b6000611e11826040518060400160405280601f81526020017f53616665574554483a206c6f772d6c6576656c2063616c6c206661696c6564008152508573ffffffffffffffffffffffffffffffffffffffff166121f49092919063ffffffff16565b8051909150156119b35780806020019051810190611e2f9190612798565b6119b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612e20565b60003073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015611ecb57507f000000000000000000000000000000000000000000000000000000000000000046145b15611ef757507f000000000000000000000000000000000000000000000000000000000000000061124d565b611f627f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061230e565b905061124d565b60008282604051602001611f7e929190612832565b60405160208183030381529060405280519060200120905092915050565b600080825160411415611fd35760208301516040840151606085015160001a611fc787828585612348565b94509450505050611fdb565b506000905060025b9250929050565b600081600481111561201d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156120285761081f565b6001816004811115612063577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b141561209b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612abd565b60028160048111156120d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b141561210e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612b62565b6003816004811115612149577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415612181576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612d2f565b60048160048111156121bc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b141561081f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612eb4565b6060612203848460008561220d565b90505b9392505050565b606082471015612249576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612dc3565b61225285612453565b612288576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612feb565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516122b19190612816565b60006040518083038185875af1925050503d80600081146122ee576040519150601f19603f3d011682016040523d82523d6000602084013e6122f3565b606091505b509150915061230382828661246f565b979650505050505050565b600083838346306040516020016123299594939291906129c3565b6040516020818303038152906040528051906020012090509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561237f575060009050600361244a565b8460ff16601b1415801561239757508460ff16601c14155b156123a8575060009050600461244a565b6000600187878787604051600081526020016040526040516123cd9493929190612a4c565b6020604051602081039080840390855afa1580156123ef573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166124435760006001925092505061244a565b9150600090505b94509492505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6060831561247e575081612206565b82511561248e5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b29190612a6a565b8280546124ce90613201565b90600052602060002090601f0160209004810192826124f05760008555612554565b82601f10612527578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555612554565b82800160010185558215612554579182015b82811115612554578235825591602001919060010190612539565b5061256092915061259c565b5090565b50805461257090613201565b6000825580601f10612582575061081f565b601f01602090049060005260206000209081019061081f91905b5b80821115612560576000815560010161259d565b803573ffffffffffffffffffffffffffffffffffffffff81168114611c1457600080fd5b60008083601f8401126125e6578182fd5b50813567ffffffffffffffff8111156125fd578182fd5b602083019150836020828501011115611fdb57600080fd5b600060208284031215612626578081fd5b612206826125b1565b60008060408385031215612641578081fd5b61264a836125b1565b9150612658602084016125b1565b90509250929050565b600080600080600060808688031215612678578081fd5b612681866125b1565b945061268f602087016125b1565b9350604086013567ffffffffffffffff8111156126aa578182fd5b6126b6888289016125d5565b90945092505060608601356126ca8161327e565b809150509295509295909350565b600080604083850312156126ea578182fd5b6126f3836125b1565b915060208301356127038161327e565b809150509250929050565b600080600080848603610120811215612725578485fd5b61272e866125b1565b945060e07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08201121561275f578384fd5b5060208501925061010085013567ffffffffffffffff811115612780578283fd5b61278c878288016125d5565b95989497509550505050565b6000602082840312156127a9578081fd5b81516122068161327e565b6000602082840312156127c5578081fd5b5051919050565b600081518084526127e48160208601602086016131d5565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082516128288184602087016131d5565b9190910192915050565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152901515604082015260600190565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525060806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905082151560608301529695505050505050565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b94855260208501939093526040840191909152606083015273ffffffffffffffffffffffffffffffffffffffff16608082015260a00190565b978852602088019690965273ffffffffffffffffffffffffffffffffffffffff948516604088015292841660608701529216608085015260a084019190915260c083015260e08201526101000190565b93845260ff9290921660208401526040830152606082015260800190565b60006020825261220660208301846127cc565b600060608252612a9060608301866127cc565b73ffffffffffffffffffffffffffffffffffffffff94909416602083015250901515604090910152919050565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b60208082526008908201527f6d6d206578697374000000000000000000000000000000000000000000000000604082015260600190565b60208082526013908201527f73656e646572206e6f7420726563656976657200000000000000000000000000604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b60208082526018908201527f7265636569766520616d6f756e74206e6f74206d617463680000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526015908201527f73656e6420616d6f756e74206e6f74206d617463680000000000000000000000604082015260600190565b60208082526011908201527f6e6f7420656e6f75676820616d6f756e74000000000000000000000000000000604082015260600190565b6020808252601b908201527f7472616e736665722065746820746f2073656e646572206661696c0000000000604082015260600190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260408201527f6563697069656e74206d61792068617665207265766572746564000000000000606082015260800190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60408201527f7565000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f53616665574554483a2057455448206f7065726174696f6e20646964206e6f7460408201527f2073756363656564000000000000000000000000000000000000000000000000606082015260800190565b6020808252600b908201527f77726f6e67206e6f6e6365000000000000000000000000000000000000000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60408201527f7565000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600d908201527f71756f7465206578706972656400000000000000000000000000000000000000604082015260600190565b6020808252600c908201527f6d6d206e6f742065786973740000000000000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600c908201527f7a65726f20616464726573730000000000000000000000000000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252600d908201527f6d6d206e6f742061637469766500000000000000000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600c908201527f7a65726f2062616c616e63650000000000000000000000000000000000000000604082015260600190565b6020808252600f908201527f77726f6e67207369676e61747572650000000000000000000000000000000000604082015260600190565b90815260200190565b95865273ffffffffffffffffffffffffffffffffffffffff9485166020870152928416604086015292166060840152608083019190915260a082015260c00190565b600082198211156131b9576131b961324f565b500190565b6000828210156131d0576131d061324f565b500390565b60005b838110156131f05781810151838201526020016131d8565b83811115611bba5750506000910152565b60028104600182168061321557607f821691505b60208210811415611822577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b801515811461081f57600080fdfea26469706673582212207ab2c0cb773eea578abcf90164a95891b6772e9286992b23755df6f3d44cd5c164736f6c63430008010033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Deployed Bytecode
0x6080604052600436106100cb5760003560e01c80638da5cb5b11610074578063ee7ce13c1161004e578063ee7ce13c14610215578063f2fde38b14610235578063f5743c4c14610255576100d2565b80638da5cb5b146101a6578063af706348146101c8578063cbfda2e0146101f5576100d2565b8063715018a6116100a5578063715018a61461015e578063842fc1a31461017357806384477b3914610193576100d2565b80632f62a9bf146100d75780636292be961461010f578063646179341461013c576100d2565b366100d257005b600080fd5b3480156100e357600080fd5b506100f76100f2366004612615565b610275565b60405161010693929190612a7d565b60405180910390f35b34801561011b57600080fd5b5061012f61012a36600461262f565b610350565b604051610106919061315b565b34801561014857600080fd5b5061015c610157366004612661565b6103f9565b005b34801561016a57600080fd5b5061015c6105cc565b34801561017f57600080fd5b5061015c61018e366004612615565b6105e0565b61015c6101a136600461270e565b610822565b3480156101b257600080fd5b506101bb611233565b6040516101069190612868565b3480156101d457600080fd5b506101e86101e336600461270e565b611250565b60405161010691906129b8565b34801561020157600080fd5b5061015c6102103660046126d8565b6113b5565b34801561022157600080fd5b5061015c610230366004612615565b611580565b34801561024157600080fd5b5061015c610250366004612615565b6116a9565b34801561026157600080fd5b5061012f610270366004612615565b611707565b73ffffffffffffffffffffffffffffffffffffffff80821660009081526002602081905260408220805460038201549190920180546060958594929392169160ff169083906102c390613201565b80601f01602080910402602001604051908101604052809291908181526020018280546102ef90613201565b801561033c5780601f106103115761010080835404028352916020019161033c565b820191906000526020600020905b81548152906001019060200180831161031f57829003601f168201915b505050505092509250925092509193909250565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526002602052604081205490918491166103bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612f48565b60405180910390fd5b505073ffffffffffffffffffffffffffffffffffffffff91821660009081526002602090815260408083209390941682526001909201909152205490565b610401611828565b73ffffffffffffffffffffffffffffffffffffffff85161580159061043b575073ffffffffffffffffffffffffffffffffffffffff841615155b610471576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612fb4565b73ffffffffffffffffffffffffffffffffffffffff85811660009081526002602052604090205416156104d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612af4565b73ffffffffffffffffffffffffffffffffffffffff858116600090815260026020819052604090912080547fffffffffffffffffffffffff000000000000000000000000000000000000000016928716929092178255610532910184846124c2565b5073ffffffffffffffffffffffffffffffffffffffff85166000908152600260205260409081902060030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016831515179055517fe5c616fdaa6b3b222d93e47302c034f77132ddfac3d8178c0d05db81870f6f31906105bd90879087908790879087906128e1565b60405180910390a15050505050565b6105d4611828565b6105de600061189b565b565b6105e8611828565b73ffffffffffffffffffffffffffffffffffffffff81161580610634575073ffffffffffffffffffffffffffffffffffffffff811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145b1561071b574780610671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b2906130ed565b60003373ffffffffffffffffffffffffffffffffffffffff16826040516106979061124d565b60006040518083038185875af1925050503d80600081146106d4576040519150601f19603f3d011682016040523d82523d6000602084013e6106d9565b606091505b5050905080610714576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612c9b565b505061081f565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610770903090600401612868565b60206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c091906127b4565b9050600081116107fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b2906130ed565b61081d73ffffffffffffffffffffffffffffffffffffffff83163383611912565b505b50565b6002600054141561085f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b2906130b6565b600260005561087084848484611250565b6108a6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290613124565b8260c001354211156108e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612f11565b6108f46040840160208501612615565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610958576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612b2b565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600260205260409020600381015460ff166109bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290613022565b83356001820160006109d36040880160208901612615565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610a45576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612e7d565b60018181016000610a5c6040880160208901612615565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610aa591906131a6565b9091555060009050610abd6060860160408701612615565b73ffffffffffffffffffffffffffffffffffffffff161480610b17575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee610aff6060860160408701612615565b73ffffffffffffffffffffffffffffffffffffffff16145b15610c10578360800135341015610b5a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612c64565b610b9e73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21660808601356119b8565b8054610be89073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2811691166080870135611a1b565b6000610bf86080860135346131be565b90508015610c0a57610c0a3382611abc565b50610e27565b6000610c226060860160408701612615565b82546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff928316926370a0823192610c7892911690600401612868565b60206040518083038186803b158015610c9057600080fd5b505afa158015610ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc891906127b4565b9050610d28610cdd6040870160208801612615565b835473ffffffffffffffffffffffffffffffffffffffff166080880135610d0a60608a0160408b01612615565b73ffffffffffffffffffffffffffffffffffffffff16929190611b99565b608085013581610d3e6060880160408901612615565b84546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff928316926370a0823192610d9492911690600401612868565b60206040518083038186803b158015610dac57600080fd5b505afa158015610dc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de491906127b4565b610dee91906131be565b14610e25576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612c2d565b505b6000610e396080860160608701612615565b73ffffffffffffffffffffffffffffffffffffffff161480610e93575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee610e7b6080860160608701612615565b73ffffffffffffffffffffffffffffffffffffffff16145b15610f9e578054610ee39073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2811691163060a0880135611bc0565b610f2773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21660a0860135611be1565b8360a00135471015610f65576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612c64565b610f9960a0850135610f7d6040870160208801612615565b73ffffffffffffffffffffffffffffffffffffffff1690611abc565b61117b565b6000610fb06080860160608701612615565b73ffffffffffffffffffffffffffffffffffffffff166370a08231610fdb6040880160208901612615565b6040518263ffffffff1660e01b8152600401610ff79190612868565b60206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104791906127b4565b825490915061108b9073ffffffffffffffffffffffffffffffffffffffff166110766040880160208901612615565b60a0880135610d0a60808a0160608b01612615565b60a0850135816110a16080880160608901612615565b73ffffffffffffffffffffffffffffffffffffffff166370a082316110cc60408a0160208b01612615565b6040518263ffffffff1660e01b81526004016110e89190612868565b60206040518083038186803b15801561110057600080fd5b505afa158015611114573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113891906127b4565b61114291906131be565b14611179576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612b99565b505b73ffffffffffffffffffffffffffffffffffffffff85166111a26040860160208701612615565b825473ffffffffffffffffffffffffffffffffffffffff918216917fe7d6f812e1a54298ddef0b881cd08a4d452d9de35eb18b5145aa580fdda18b2691883591166111f360608a0160408b01612615565b61120360808b0160608c01612615565b8a608001358b60a0013560405161121f96959493929190613164565b60405180910390a350506001600055505050565b60015473ffffffffffffffffffffffffffffffffffffffff165b90565b600073ffffffffffffffffffffffffffffffffffffffff851661129f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612fb4565b60006113387f7cae903e28caed1b8bfca0434588f00fa8e7bc618719abe9952ae3a0859168a486356112d76040890160208a01612615565b6112e760608a0160408b01612615565b6112f760808b0160608c01612615565b8a608001358b60a001358c60c0013560405160200161131d9897969594939291906129fc565b60405160208183030381529060405280519060200120611bfe565b905061137c84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508593925050611c199050565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614915050949350505050565b3360008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16611411576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612f48565b3360009081526002602052604090205473ffffffffffffffffffffffffffffffffffffffff84811691161480159061145e575073ffffffffffffffffffffffffffffffffffffffff831615155b156114b15733600090815260026020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555b3360009081526002602052604090206003015460ff1615158215151461150e5733600090815260026020526040902060030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168315151790555b3360008181526002602052604090819020805460039091015491517f32705decaa46d8f5e4d261dfb3c3bd34a5ce35243746387d933fb54db4cb165a9361157393909273ffffffffffffffffffffffffffffffffffffffff169160ff909116906128b0565b60405180910390a1505050565b611588611828565b73ffffffffffffffffffffffffffffffffffffffff8082166000908152600260205260409020548291166115e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612f48565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600260208190526040822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155919061164390830182612564565b5060030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517fed24b0e4d14feb074f9e9950f2715fd0e6f6540d81cff065d03bdd4d8dc43df79061169d908490612868565b60405180910390a15050565b6116b1611828565b73ffffffffffffffffffffffffffffffffffffffff81166116fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612bd0565b61081f8161189b565b3360008181526002602052604081205490919073ffffffffffffffffffffffffffffffffffffffff16611766576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612f48565b33600090815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452600190810190925282208054919290916117ac9084906131a6565b90915550506040517f5e8f0e4645f809f08cb25035c10549547a8333ff44136e2a06f4b13f66e3b350906117e39033908690612889565b60405180910390a133600090815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845260010190915290205491505b50919050565b611830611c3d565b73ffffffffffffffffffffffffffffffffffffffff1661184e611233565b73ffffffffffffffffffffffffffffffffffffffff16146105de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612f7f565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6119b38363a9059cbb60e01b8484604051602401611931929190612992565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611c41565b505050565b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd0e30db00000000000000000000000000000000000000000000000000000000017905261081d90839083611cf7565b6119b38363a9059cbb60e01b8484604051602401611a3a929190612992565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611daf565b80471015611af6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612d8c565b60008273ffffffffffffffffffffffffffffffffffffffff1682604051611b1c9061124d565b60006040518083038185875af1925050503d8060008114611b59576040519150601f19603f3d011682016040523d82523d6000602084013e611b5e565b606091505b50509050806119b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612cd2565b611bba846323b872dd60e01b85858560405160240161193193929190612961565b50505050565b611bba846323b872dd60e01b858585604051602401611a3a93929190612961565b61081d82632e1a7d4d60e01b83604051602401611a3a919061315b565b6000611c11611c0b611e65565b83611f69565b90505b919050565b6000806000611c288585611f9c565b91509150611c3581611fe2565b509392505050565b3390565b6000611ca3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166121f49092919063ffffffff16565b8051909150156119b35780806020019051810190611cc19190612798565b6119b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290613059565b6000611d5b83836040518060400160405280601f81526020017f53616665574554483a206c6f772d6c6576656c2063616c6c206661696c6564008152508773ffffffffffffffffffffffffffffffffffffffff1661220d909392919063ffffffff16565b805190915015611bba5780806020019051810190611d799190612798565b611bba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612e20565b6000611e11826040518060400160405280601f81526020017f53616665574554483a206c6f772d6c6576656c2063616c6c206661696c6564008152508573ffffffffffffffffffffffffffffffffffffffff166121f49092919063ffffffff16565b8051909150156119b35780806020019051810190611e2f9190612798565b6119b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612e20565b60003073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000009ca2a439810524250e543ba8fb6e88578af242bc16148015611ecb57507f000000000000000000000000000000000000000000000000000000000000000146145b15611ef757507f68c7cd2f18e7acb39d34a471c644162b73a1402c7d003d20486ae3f69e40dcc761124d565b611f627f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f8dbab396a9771eef7aebebbfcff63910dc0d252c6c2020c7170d3d72a7b284dd7fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc661230e565b905061124d565b60008282604051602001611f7e929190612832565b60405160208183030381529060405280519060200120905092915050565b600080825160411415611fd35760208301516040840151606085015160001a611fc787828585612348565b94509450505050611fdb565b506000905060025b9250929050565b600081600481111561201d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156120285761081f565b6001816004811115612063577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b141561209b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612abd565b60028160048111156120d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b141561210e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612b62565b6003816004811115612149577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415612181576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612d2f565b60048160048111156121bc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b141561081f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612eb4565b6060612203848460008561220d565b90505b9392505050565b606082471015612249576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612dc3565b61225285612453565b612288576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b290612feb565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516122b19190612816565b60006040518083038185875af1925050503d80600081146122ee576040519150601f19603f3d011682016040523d82523d6000602084013e6122f3565b606091505b509150915061230382828661246f565b979650505050505050565b600083838346306040516020016123299594939291906129c3565b6040516020818303038152906040528051906020012090509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561237f575060009050600361244a565b8460ff16601b1415801561239757508460ff16601c14155b156123a8575060009050600461244a565b6000600187878787604051600081526020016040526040516123cd9493929190612a4c565b6020604051602081039080840390855afa1580156123ef573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166124435760006001925092505061244a565b9150600090505b94509492505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b6060831561247e575081612206565b82511561248e5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b29190612a6a565b8280546124ce90613201565b90600052602060002090601f0160209004810192826124f05760008555612554565b82601f10612527578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555612554565b82800160010185558215612554579182015b82811115612554578235825591602001919060010190612539565b5061256092915061259c565b5090565b50805461257090613201565b6000825580601f10612582575061081f565b601f01602090049060005260206000209081019061081f91905b5b80821115612560576000815560010161259d565b803573ffffffffffffffffffffffffffffffffffffffff81168114611c1457600080fd5b60008083601f8401126125e6578182fd5b50813567ffffffffffffffff8111156125fd578182fd5b602083019150836020828501011115611fdb57600080fd5b600060208284031215612626578081fd5b612206826125b1565b60008060408385031215612641578081fd5b61264a836125b1565b9150612658602084016125b1565b90509250929050565b600080600080600060808688031215612678578081fd5b612681866125b1565b945061268f602087016125b1565b9350604086013567ffffffffffffffff8111156126aa578182fd5b6126b6888289016125d5565b90945092505060608601356126ca8161327e565b809150509295509295909350565b600080604083850312156126ea578182fd5b6126f3836125b1565b915060208301356127038161327e565b809150509250929050565b600080600080848603610120811215612725578485fd5b61272e866125b1565b945060e07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08201121561275f578384fd5b5060208501925061010085013567ffffffffffffffff811115612780578283fd5b61278c878288016125d5565b95989497509550505050565b6000602082840312156127a9578081fd5b81516122068161327e565b6000602082840312156127c5578081fd5b5051919050565b600081518084526127e48160208601602086016131d5565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082516128288184602087016131d5565b9190910192915050565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152901515604082015260600190565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525060806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905082151560608301529695505050505050565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b94855260208501939093526040840191909152606083015273ffffffffffffffffffffffffffffffffffffffff16608082015260a00190565b978852602088019690965273ffffffffffffffffffffffffffffffffffffffff948516604088015292841660608701529216608085015260a084019190915260c083015260e08201526101000190565b93845260ff9290921660208401526040830152606082015260800190565b60006020825261220660208301846127cc565b600060608252612a9060608301866127cc565b73ffffffffffffffffffffffffffffffffffffffff94909416602083015250901515604090910152919050565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b60208082526008908201527f6d6d206578697374000000000000000000000000000000000000000000000000604082015260600190565b60208082526013908201527f73656e646572206e6f7420726563656976657200000000000000000000000000604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b60208082526018908201527f7265636569766520616d6f756e74206e6f74206d617463680000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526015908201527f73656e6420616d6f756e74206e6f74206d617463680000000000000000000000604082015260600190565b60208082526011908201527f6e6f7420656e6f75676820616d6f756e74000000000000000000000000000000604082015260600190565b6020808252601b908201527f7472616e736665722065746820746f2073656e646572206661696c0000000000604082015260600190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260408201527f6563697069656e74206d61792068617665207265766572746564000000000000606082015260800190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60408201527f7565000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f53616665574554483a2057455448206f7065726174696f6e20646964206e6f7460408201527f2073756363656564000000000000000000000000000000000000000000000000606082015260800190565b6020808252600b908201527f77726f6e67206e6f6e6365000000000000000000000000000000000000000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60408201527f7565000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600d908201527f71756f7465206578706972656400000000000000000000000000000000000000604082015260600190565b6020808252600c908201527f6d6d206e6f742065786973740000000000000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600c908201527f7a65726f20616464726573730000000000000000000000000000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252600d908201527f6d6d206e6f742061637469766500000000000000000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600c908201527f7a65726f2062616c616e63650000000000000000000000000000000000000000604082015260600190565b6020808252600f908201527f77726f6e67207369676e61747572650000000000000000000000000000000000604082015260600190565b90815260200190565b95865273ffffffffffffffffffffffffffffffffffffffff9485166020870152928416604086015292166060840152608083019190915260a082015260c00190565b600082198211156131b9576131b961324f565b500190565b6000828210156131d0576131d061324f565b500390565b60005b838110156131f05781810151838201526020016131d8565b83811115611bba5750506000910152565b60028104600182168061321557607f821691505b60208210811415611822577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b801515811461081f57600080fdfea26469706673582212207ab2c0cb773eea578abcf90164a95891b6772e9286992b23755df6f3d44cd5c164736f6c63430008010033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
-----Decoded View---------------
Arg [0] : weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.