Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
Latest 25 from a total of 2,024 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Pause Exchan... | 17347584 | 614 days ago | IN | 0 ETH | 0.00087755 | ||||
Exchange Makimon... | 17347560 | 614 days ago | IN | 0 ETH | 0.00257252 | ||||
Exchange Makimon... | 17347526 | 614 days ago | IN | 0 ETH | 0.00249027 | ||||
Exchange Makimon... | 17347442 | 614 days ago | IN | 0 ETH | 0.00224343 | ||||
Exchange Makimon... | 17347436 | 614 days ago | IN | 0 ETH | 0.0029423 | ||||
Exchange Makimon... | 17347408 | 614 days ago | IN | 0 ETH | 0.00218727 | ||||
Exchange Makimon... | 17347391 | 614 days ago | IN | 0 ETH | 0.00201341 | ||||
Exchange Makimon... | 17347224 | 614 days ago | IN | 0 ETH | 0.00259169 | ||||
Exchange Makimon... | 17347165 | 614 days ago | IN | 0 ETH | 0.00284687 | ||||
Exchange Makimon... | 17347164 | 614 days ago | IN | 0 ETH | 0.00222756 | ||||
Exchange Makimon... | 17347139 | 614 days ago | IN | 0 ETH | 0.00204612 | ||||
Exchange Makimon... | 17347076 | 614 days ago | IN | 0 ETH | 0.00200326 | ||||
Exchange Makimon... | 17346996 | 614 days ago | IN | 0 ETH | 0.00217808 | ||||
Exchange Makimon... | 17346928 | 614 days ago | IN | 0 ETH | 0.00364375 | ||||
Exchange Makimon... | 17346899 | 614 days ago | IN | 0 ETH | 0.00198825 | ||||
Exchange Makimon... | 17346875 | 614 days ago | IN | 0 ETH | 0.0019721 | ||||
Exchange Makimon... | 17346863 | 614 days ago | IN | 0 ETH | 0.00199129 | ||||
Exchange Makimon... | 17346863 | 614 days ago | IN | 0 ETH | 0.00079253 | ||||
Exchange Makimon... | 17346829 | 614 days ago | IN | 0 ETH | 0.00295432 | ||||
Exchange Makimon... | 17346770 | 614 days ago | IN | 0 ETH | 0.0020169 | ||||
Exchange Makimon... | 17346755 | 614 days ago | IN | 0 ETH | 0.00216804 | ||||
Exchange Makimon... | 17346723 | 614 days ago | IN | 0 ETH | 0.00297083 | ||||
Exchange Makimon... | 17346709 | 614 days ago | IN | 0 ETH | 0.00366368 | ||||
Exchange Makimon... | 17346686 | 614 days ago | IN | 0 ETH | 0.00513609 | ||||
Exchange Makimon... | 17346676 | 614 days ago | IN | 0 ETH | 0.00209336 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
CNCCSeller
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import "./AdminAccessControl.sol"; import "./interface/ICryptNinjaChildrenCoin.sol"; import "./interface/ICryptNinjaChildren.sol"; contract CNCCSeller is AdminAccessControl, ReentrancyGuard { event exchangeCoinToMakimonoEvent(address indexed user, uint256 afterTokenId, uint256 amount); event exchangeMakimonoToCharacterEvent(address indexed user, uint256 beforeTokenId, uint256 afterTokenId, uint256 amount); event burninEvent(address indexed user, uint256 burnTokenId, uint256 mintTokenId); struct phaseStruct { uint256 totalSupply; uint256 maxSupply; uint256 cost; uint256 maxMintAmountPerTransaction; bytes32 merkleRoot; mapping(address => uint256) userMintedAmount; } struct pauseStruct { bool coinMint; bool exchangeCoinToMakimono; bool exchangeMakimonoToCharacter; bool exchangeCoinToKatasiro; bool burnin; } uint256 public phaseId; pauseStruct public pauseData; mapping(uint256 => phaseStruct) public phaseStructMap; mapping(uint256 => uint256) public exchangeTokenIdMap; ICryptNinjaChildren public immutable cnc; ICryptNinjaChildrenCoin public immutable cncc; uint256 public cncNextTokenId = 11111; uint256 public constant COIN_TOKEN_ID = 1; uint256 public constant MAKIMONO_TEN_TOKEN_ID = 2; // 天 uint256 public constant MAKIMONO_KAI_TOKEN_ID = 3; // 海 uint256 public constant MAKIMONO_CHI_TOKEN_ID = 4; // 地 uint256 public constant CHARACTER_KANEKO_TOKEN_ID = 5; // カネコ uint256 public constant CHARACTER_SATORU_TOKEN_ID = 6; // サトル uint256 public constant CHARACTER_SARAO_TOKEN_ID = 7; // サラオ uint256 public constant KATASIRO_TOKEN_ID = 8; // 形代 constructor(ICryptNinjaChildrenCoin _cncc, ICryptNinjaChildren _cnc) { grantAdmin(_msgSender()); cnc = ICryptNinjaChildren(_cnc); cncc = ICryptNinjaChildrenCoin(_cncc); setPhaseId(1); setExchangeTokenIdMap(MAKIMONO_TEN_TOKEN_ID, CHARACTER_KANEKO_TOKEN_ID); setExchangeTokenIdMap(MAKIMONO_KAI_TOKEN_ID, CHARACTER_SATORU_TOKEN_ID); setExchangeTokenIdMap(MAKIMONO_CHI_TOKEN_ID, CHARACTER_SARAO_TOKEN_ID); setPauseCoinMint(true); setPauseExchangeCoinToMakimono(true); setPauseExchangeMakimonoToCharacter(true); setPauseExchangeCoinToKatasiro(true); setPauseBurnin(true); } modifier amountCheck(uint256 _mintAmount, uint256 _wlCount) { require(_mintAmount > 0, 'Mint amount cannot be zero'); require(_mintAmount <= phaseStructMap[phaseId].maxMintAmountPerTransaction, "max mint amount per session exceeded"); require(phaseStructMap[phaseId].totalSupply + _mintAmount <= phaseStructMap[phaseId].maxSupply, "max NFT limit exceeded"); require( phaseStructMap[phaseId].userMintedAmount[msg.sender] + _mintAmount <= _wlCount, 'Address already claimed max amount' ); _; } modifier senderCheck(address _sender, uint248 _wlCount, bytes32[] calldata _merkleProof) { bytes32 leaf = keccak256(abi.encodePacked(_sender, _wlCount)); require(MerkleProof.verifyCalldata(_merkleProof, phaseStructMap[phaseId].merkleRoot, leaf), 'Invalid Merkle Proof'); _; } modifier callerIsUser() { require(tx.origin == msg.sender, "The caller is another contract."); _; } modifier enouthEth(uint256 _amount) { require(msg.value >= phaseStructMap[phaseId].cost * _amount, "not enough eth."); _; } function setPauseCoinMint(bool _isPause) public onlyAdmin { pauseData.coinMint = _isPause; } function setPauseExchangeCoinToMakimono(bool _isPause) public onlyAdmin { pauseData.exchangeCoinToMakimono = _isPause; } function setPauseExchangeMakimonoToCharacter(bool _isPause) public onlyAdmin { pauseData.exchangeMakimonoToCharacter = _isPause; } function setPauseExchangeCoinToKatasiro(bool _isPause) public onlyAdmin { pauseData.exchangeCoinToKatasiro = _isPause; } function setPauseBurnin(bool _isPause) public onlyAdmin { pauseData.burnin = _isPause; } function mint( uint256 _mintAmount, uint248 _wlCount, bytes32[] calldata _merkleProof ) external payable amountCheck(_mintAmount, _wlCount) senderCheck(msg.sender, _wlCount, _merkleProof) nonReentrant callerIsUser enouthEth(_mintAmount) { require(!pauseData.coinMint, 'is not active.'); phaseStructMap[phaseId].userMintedAmount[msg.sender] += _mintAmount; phaseStructMap[phaseId].totalSupply += _mintAmount; cncc.mint(msg.sender, COIN_TOKEN_ID, _mintAmount, ""); } function exchangeCoinToMakimono(uint256 _amount) external nonReentrant callerIsUser { require(!pauseData.exchangeCoinToMakimono, 'is not active.'); require(0 < _amount && _amount <= cncc.balanceOf(msg.sender, COIN_TOKEN_ID), 'amount cannot be zero'); cncc.burn(msg.sender, COIN_TOKEN_ID, _amount); uint256[] memory randCounts = new uint256[](3); for (uint256 i = 0; i < _amount; i++) { uint256 rand = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1), i))) % 3; // 0,1,2 randCounts[rand] += 1; } uint256[] memory tokenIds; uint256[] memory amounts; (tokenIds, amounts) = _forBatchMint(randCounts); cncc.mintBatch(msg.sender, tokenIds, amounts, ""); } function _forBatchMint(uint256[] memory _randCounts) private returns (uint256[] memory tokenIds, uint256[] memory amounts) { tokenIds = new uint256[](_randCounts.length); amounts = new uint256[](_randCounts.length); uint256 tokenAmountIndex = 0; for(uint256 i = 0; i < 3; i++) { if (_randCounts[i] > 0) { tokenIds[tokenAmountIndex] = MAKIMONO_TEN_TOKEN_ID + i; amounts[tokenAmountIndex] = _randCounts[i]; emit exchangeCoinToMakimonoEvent(msg.sender, tokenIds[tokenAmountIndex], amounts[tokenAmountIndex]); tokenAmountIndex += 1; } } return (tokenIds, amounts); } function setExchangeTokenIdMap(uint256 _beforeTokenId, uint256 _afterTokenId) public onlyAdmin { require(_beforeTokenId != _afterTokenId, 'beforeTokenId and afterTokenId cannot be same'); exchangeTokenIdMap[_beforeTokenId] = _afterTokenId; } function exchangeMakimonoToCharacter(uint256[] calldata _burnTokenIds, uint256[] calldata _amounts) external nonReentrant { require(!pauseData.exchangeMakimonoToCharacter, 'is not active.'); require(_burnTokenIds.length > 0, 'length cannot be zero'); require(_burnTokenIds.length == _amounts.length, 'lengths are not equal'); uint256[] memory mintTokenIds = new uint256[](_burnTokenIds.length); for(uint256 i = 0; i < _burnTokenIds.length; i++) { require(_amounts[i] > 0, 'amount cannot be zero'); require(cncc.balanceOf(msg.sender, _burnTokenIds[i]) >= _amounts[i], 'Insufficient balance'); uint256 mintTokenId = exchangeTokenIdMap[_burnTokenIds[i]]; require(mintTokenId > 0, 'Invalid burn token id'); mintTokenIds[i] = mintTokenId; emit exchangeMakimonoToCharacterEvent(msg.sender, _burnTokenIds[i], mintTokenId, _amounts[i]); } cncc.burnBatch(msg.sender, _burnTokenIds, _amounts); cncc.mintBatch(msg.sender, mintTokenIds, _amounts, ""); } function exchangeCoinToKatasiro(uint256 _amount) external nonReentrant callerIsUser { require(!pauseData.exchangeCoinToKatasiro, 'is not active.'); require(0 < _amount && _amount <= cncc.balanceOf(msg.sender, COIN_TOKEN_ID), 'amount cannot be zero'); cncc.burn(msg.sender, COIN_TOKEN_ID, _amount); cncc.mint(msg.sender, KATASIRO_TOKEN_ID, _amount, ""); } function burnin(uint256[] calldata _CNCTokenIds) external nonReentrant { require(!pauseData.burnin, 'is not active.'); uint256 tokenLength = _CNCTokenIds.length; require(tokenLength > 0, 'length cannot be zero'); require(cncc.balanceOf(msg.sender, KATASIRO_TOKEN_ID) >= tokenLength, "Insufficient Katasiro balance"); for(uint256 i = 0; i < tokenLength; ++i) { require(cnc.ownerOf(_CNCTokenIds[i]) == msg.sender, 'Not CNC owner'); } cncc.burn(msg.sender, KATASIRO_TOKEN_ID, _CNCTokenIds.length); bytes32[] memory merkleProof = new bytes32[](0); cnc.exchange(_CNCTokenIds, 11111, merkleProof); uint256 baseTokenId = cncNextTokenId; for(uint256 i = 0; i < tokenLength; ++i) { uint256 mintTokenId = baseTokenId + i; cnc.safeTransferFrom(address(this), msg.sender, mintTokenId); emit burninEvent(msg.sender, _CNCTokenIds[i], mintTokenId); } cncNextTokenId += tokenLength; } function adminMint(uint256 _tokenId, uint256 _mintAmount, address _to) external onlyAdmin { require(_mintAmount > 0, 'Mint amount cannot be zero'); phaseStructMap[phaseId].totalSupply += _mintAmount; cncc.mint(_to, _tokenId, _mintAmount, ""); } function airdropMint(address[] calldata _airdropAddresses , uint256 _tokenId, uint256[] memory _userMintAmount) external onlyAdmin { require(_airdropAddresses.length == _userMintAmount.length , "Array lengths are different"); require(_tokenId > 0, "Token ID cannot be zero"); uint256 mintAmount = 0; for (uint256 i = 0; i < _userMintAmount.length; ++i) { mintAmount += _userMintAmount[i]; } require(mintAmount > 0, "need to mint at least 1 NFT"); require(phaseStructMap[phaseId].totalSupply + mintAmount <= phaseStructMap[phaseId].maxSupply, "max NFT limit exceeded"); for(uint256 i = 0; i < _userMintAmount.length; ++i) { phaseStructMap[phaseId].totalSupply += _userMintAmount[i]; cncc.mint(_airdropAddresses[i], _tokenId, _userMintAmount[i], ""); } } function setPhaseData( uint256 _id, uint256 _maxSupply, uint256 _cost, uint256 _maxMintAmountPerTransaction, bytes32 _merkleRoot ) external onlyAdmin { phaseStructMap[_id].maxSupply = _maxSupply; phaseStructMap[_id].cost = _cost; phaseStructMap[_id].maxMintAmountPerTransaction = _maxMintAmountPerTransaction; phaseStructMap[_id].merkleRoot = _merkleRoot; } function setPhaseId(uint256 _id) public onlyAdmin { phaseId = _id; } function setMaxSupply(uint256 _maxSupply) external onlyAdmin { phaseStructMap[phaseId].maxSupply = _maxSupply; } function setCost(uint256 _newCost) external onlyAdmin { phaseStructMap[phaseId].cost = _newCost; } function setMaxMintAmountPerTransaction(uint256 _maxMintAmountPerTransaction) external onlyAdmin { phaseStructMap[phaseId].maxMintAmountPerTransaction = _maxMintAmountPerTransaction; } function setMerkleRoot(bytes32 _merkleRoot) external onlyAdmin { phaseStructMap[phaseId].merkleRoot = _merkleRoot; } function getUserMintedAmount(address _address) external view returns(uint256){ return phaseStructMap[phaseId].userMintedAmount[_address]; } function onERC721Received( address, // operator address, // from uint256, // tokenId bytes calldata // data ) external pure returns (bytes4) { return this.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// 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.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _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) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @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] = _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 pragma solidity ^0.8.19; import '@openzeppelin/contracts/access/AccessControl.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; contract AdminAccessControl is AccessControl, Ownable { bytes32 public constant ADMIN = "ADMIN"; modifier onlyAdmin() { require(hasRole(ADMIN, _msgSender()), 'Caller is not a admin'); _; } function grantAdmin(address account) public onlyOwner { _grantRole(ADMIN, account); } function revokeAdmin(address account) public onlyOwner { _revokeRole(ADMIN, account); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; interface ICryptNinjaChildren { function exchange( uint256[] calldata burnTokenIds, uint248 allowedAmount, bytes32[] calldata merkleProof ) external; function isApprovedForAll(address owner, address operator) external view returns(bool); function claim( uint248 amount, uint248 allowedAmount, bytes32[] calldata merkleProof ) external payable; function safeTransferFrom( address from, address to, uint256 tokenId ) external; function ownerOf(uint256 tokenId) external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; interface ICryptNinjaChildrenCoin { function mint( address to, uint256 id, uint256 amount, bytes memory data ) external; function mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) external; function burn( address account, uint256 id, uint256 value ) external; function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) external; function balanceOf(address account, uint256 id) external view returns (uint256); }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract ICryptNinjaChildrenCoin","name":"_cncc","type":"address"},{"internalType":"contract ICryptNinjaChildren","name":"_cnc","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"burnTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintTokenId","type":"uint256"}],"name":"burninEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"afterTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"exchangeCoinToMakimonoEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"beforeTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"afterTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"exchangeMakimonoToCharacterEvent","type":"event"},{"inputs":[],"name":"ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CHARACTER_KANEKO_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CHARACTER_SARAO_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CHARACTER_SATORU_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COIN_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"KATASIRO_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAKIMONO_CHI_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAKIMONO_KAI_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAKIMONO_TEN_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_airdropAddresses","type":"address[]"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256[]","name":"_userMintAmount","type":"uint256[]"}],"name":"airdropMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_CNCTokenIds","type":"uint256[]"}],"name":"burnin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cnc","outputs":[{"internalType":"contract ICryptNinjaChildren","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cncNextTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cncc","outputs":[{"internalType":"contract ICryptNinjaChildrenCoin","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"exchangeCoinToKatasiro","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"exchangeCoinToMakimono","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_burnTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"exchangeMakimonoToCharacter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"exchangeTokenIdMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getUserMintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"grantAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"uint248","name":"_wlCount","type":"uint248"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseData","outputs":[{"internalType":"bool","name":"coinMint","type":"bool"},{"internalType":"bool","name":"exchangeCoinToMakimono","type":"bool"},{"internalType":"bool","name":"exchangeMakimonoToCharacter","type":"bool"},{"internalType":"bool","name":"exchangeCoinToKatasiro","type":"bool"},{"internalType":"bool","name":"burnin","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phaseId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"phaseStructMap","outputs":[{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"uint256","name":"maxMintAmountPerTransaction","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCost","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_beforeTokenId","type":"uint256"},{"internalType":"uint256","name":"_afterTokenId","type":"uint256"}],"name":"setExchangeTokenIdMap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxMintAmountPerTransaction","type":"uint256"}],"name":"setMaxMintAmountPerTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPause","type":"bool"}],"name":"setPauseBurnin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPause","type":"bool"}],"name":"setPauseCoinMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPause","type":"bool"}],"name":"setPauseExchangeCoinToKatasiro","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPause","type":"bool"}],"name":"setPauseExchangeCoinToMakimono","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPause","type":"bool"}],"name":"setPauseExchangeMakimonoToCharacter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_cost","type":"uint256"},{"internalType":"uint256","name":"_maxMintAmountPerTransaction","type":"uint256"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setPhaseData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"setPhaseId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c0604052612b676007553480156200001757600080fd5b5060405162003bd638038062003bd68339810160408190526200003a91620005cd565b6200004533620000e2565b6001600255620000553362000134565b6001600160a01b03808216608052821660a05262000074600162000155565b6200008260026005620001d3565b6200009060036006620001d3565b6200009e60046007620001d3565b620000aa60016200029d565b620000b6600162000301565b620000c260016200036c565b620000ce6001620003d9565b620000da600162000448565b50506200060c565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200013e620004b8565b620001526420a226a4a760d91b8262000516565b50565b6200018d6420a226a4a760d91b335b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b620001ce5760405162461bcd60e51b8152602060048201526015602482015260008051602062003bb683398151915260448201526064015b60405180910390fd5b600355565b620001e76420a226a4a760d91b3362000164565b620002245760405162461bcd60e51b8152602060048201526015602482015260008051602062003bb68339815191526044820152606401620001c5565b8082036200028b5760405162461bcd60e51b815260206004820152602d60248201527f6265666f7265546f6b656e496420616e64206166746572546f6b656e4964206360448201526c616e6e6f742062652073616d6560981b6064820152608401620001c5565b60009182526006602052604090912055565b620002b16420a226a4a760d91b3362000164565b620002ee5760405162461bcd60e51b8152602060048201526015602482015260008051602062003bb68339815191526044820152606401620001c5565b6004805460ff1916911515919091179055565b620003156420a226a4a760d91b3362000164565b620003525760405162461bcd60e51b8152602060048201526015602482015260008051602062003bb68339815191526044820152606401620001c5565b600480549115156101000261ff0019909216919091179055565b620003806420a226a4a760d91b3362000164565b620003bd5760405162461bcd60e51b8152602060048201526015602482015260008051602062003bb68339815191526044820152606401620001c5565b60048054911515620100000262ff000019909216919091179055565b620003ed6420a226a4a760d91b3362000164565b6200042a5760405162461bcd60e51b8152602060048201526015602482015260008051602062003bb68339815191526044820152606401620001c5565b6004805491151563010000000263ff00000019909216919091179055565b6200045c6420a226a4a760d91b3362000164565b620004995760405162461bcd60e51b8152602060048201526015602482015260008051602062003bb68339815191526044820152606401620001c5565b600480549115156401000000000260ff60201b19909216919091179055565b6001546001600160a01b03163314620005145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620001c5565b565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620005b3576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620005723390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6001600160a01b03811681146200015257600080fd5b60008060408385031215620005e157600080fd5b8251620005ee81620005b7565b60208401519092506200060181620005b7565b809150509250929050565b60805160a05161350d620006a9600039600081816104a101528181610a9501528181610c7c01528181610f9201528181611130015281816111df0152818161133d0152818161146c0152818161151b0152818161159c0152818161191101528181611b3801528181611bbc015281816120a601526123390152600081816108ae01528181610b6901528181610d370152610de7015261350d6000f3fe60806040526004361061029e5760003560e01c80637cb6475911610165578063b2acb865116100cc578063e755657011610085578063e755657014610867578063e907fd5814610887578063f0aa0a1d1461089c578063f2fde38b146108d0578063f8396f0b146108f0578063fc14175214610910578063fdf03cd51461098257600080fd5b8063b2acb865146107ca578063b612b343146107ea578063b71a7429146107ff578063d294861a14610814578063d547741f14610834578063d5a4f3651461085457600080fd5b80639906624e1161011e5780639906624e146106b4578063a217fddf146106d4578063a51dddfc146106e9578063a9e2acd514610716578063acaee38c14610736578063b1181735146107aa57600080fd5b80637cb64759146106015780637ee7a5e91461062157806383b962d5146106415780638da5cb5b1461066157806391d148541461067f578063926e94921461069f57600080fd5b80633c8fc198116102095780635d586ce0116101c25780635d586ce01461056d5780636b228db71461058d5780636f8b44b0146105a2578063715018a6146105c25780637374d6d1146105d757806377bd062f146105ec57600080fd5b80633c8fc1981461046f578063429a7d7a1461048f57806344a0d68a146104db57806347705cbc146104fb578063579afb311461054257806358303b101461055757600080fd5b80632a0acc6a1161025b5780632a0acc6a146103b35780632d345670146103cf5780632da63608146103ef5780632f2ff15d1461040f57806335bb3e161461042f57806336568abe1461044f57600080fd5b806301ffc9a7146102a3578063048e31b4146102d8578063054377cb146102fa578063104d899e1461031a578063150b7a021461033e578063248a9ca314610383575b600080fd5b3480156102af57600080fd5b506102c36102be366004612b52565b6109a2565b60405190151581526020015b60405180910390f35b3480156102e457600080fd5b506102f86102f3366004612b7c565b6109d9565b005b34801561030657600080fd5b506102f8610315366004612be9565b610a2c565b34801561032657600080fd5b5061033060075481565b6040519081526020016102cf565b34801561034a57600080fd5b5061036a610359366004612c3f565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020016102cf565b34801561038f57600080fd5b5061033061039e366004612cdd565b60009081526020819052604090206001015490565b3480156103bf57600080fd5b506103306420a226a4a760d91b81565b3480156103db57600080fd5b506102f86103ea366004612cf6565b610eea565b3480156103fb57600080fd5b506102f861040a366004612d13565b610f07565b34801561041b57600080fd5b506102f861042a366004612d4c565b611002565b34801561043b57600080fd5b506102f861044a366004612cf6565b61102c565b34801561045b57600080fd5b506102f861046a366004612d4c565b611046565b34801561047b57600080fd5b506102f861048a366004612cdd565b6110c0565b34801561049b57600080fd5b506104c37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102cf565b3480156104e757600080fd5b506102f86104f6366004612cdd565b6113b5565b34801561050757600080fd5b50610330610516366004612cf6565b60035460009081526005602081815260408084206001600160a01b039095168452939091019052205490565b34801561054e57600080fd5b50610330600281565b34801561056357600080fd5b5061033060035481565b34801561057957600080fd5b506102f8610588366004612cdd565b6113fa565b34801561059957600080fd5b50610330600381565b3480156105ae57600080fd5b506102f86105bd366004612cdd565b611614565b3480156105ce57600080fd5b506102f8611659565b3480156105e357600080fd5b50610330600681565b3480156105f857600080fd5b50610330600181565b34801561060d57600080fd5b506102f861061c366004612cdd565b61166d565b34801561062d57600080fd5b506102f861063c366004612d7c565b6116b2565b34801561064d57600080fd5b506102f861065c366004612d9e565b611757565b34801561066d57600080fd5b506001546001600160a01b03166104c3565b34801561068b57600080fd5b506102c361069a366004612d4c565b6117af565b3480156106ab57600080fd5b50610330600781565b3480156106c057600080fd5b506102f86106cf366004612dd9565b6117d8565b3480156106e057600080fd5b50610330600081565b3480156106f557600080fd5b50610330610704366004612cdd565b60066020526000908152604090205481565b34801561072257600080fd5b506102f8610731366004612cdd565b611c3c565b34801561074257600080fd5b506004546107789060ff808216916101008104821691620100008204811691630100000081048216916401000000009091041685565b60408051951515865293151560208601529115159284019290925290151560608301521515608082015260a0016102cf565b3480156107b657600080fd5b506102f86107c5366004612b7c565b611c80565b3480156107d657600080fd5b506102f86107e5366004612b7c565b611cce565b3480156107f657600080fd5b50610330600581565b34801561080b57600080fd5b50610330600881565b34801561082057600080fd5b506102f861082f366004612b7c565b611d0f565b34801561084057600080fd5b506102f861084f366004612d4c565b611d5b565b6102f8610862366004612e44565b611d80565b34801561087357600080fd5b506102f8610882366004612eb5565b61213f565b34801561089357600080fd5b50610330600481565b3480156108a857600080fd5b506104c37f000000000000000000000000000000000000000000000000000000000000000081565b3480156108dc57600080fd5b506102f86108eb366004612cf6565b612409565b3480156108fc57600080fd5b506102f861090b366004612b7c565b61247f565b34801561091c57600080fd5b5061095a61092b366004612cdd565b600560205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a0016102cf565b34801561098e57600080fd5b506102f861099d366004612cdd565b6124c7565b60006001600160e01b03198216637965db0b60e01b14806109d357506301ffc9a760e01b6001600160e01b03198316145b92915050565b6109eb6420a226a4a760d91b336117af565b610a105760405162461bcd60e51b8152600401610a0790612fa3565b60405180910390fd5b60048054911515620100000262ff000019909216919091179055565b610a346124fa565b600454640100000000900460ff1615610a5f5760405162461bcd60e51b8152600401610a0790612fd2565b8080610a7d5760405162461bcd60e51b8152600401610a0790612ffa565b604051627eeac760e11b815281906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169062fdd58e90610acc903390600890600401613029565b602060405180830381865afa158015610ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0d9190613042565b1015610b5b5760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e74204b6174617369726f2062616c616e63650000006044820152606401610a07565b60005b81811015610c6457337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e868685818110610ba857610ba861305b565b905060200201356040518263ffffffff1660e01b8152600401610bcd91815260200190565b602060405180830381865afa158015610bea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0e9190613071565b6001600160a01b031614610c545760405162461bcd60e51b815260206004820152600d60248201526c2737ba1021a7219037bbb732b960991b6044820152606401610a07565b610c5d816130a4565b9050610b5e565b50604051637a94c56560e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f5298aca90610cb690339060089087906004016130bd565b600060405180830381600087803b158015610cd057600080fd5b505af1158015610ce4573d6000803e3d6000fd5b5060009250829150610cf39050565b604051908082528060200260200182016040528015610d1c578160200160208202803683370190505b50604051632bc6d17360e21b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063af1b45cc90610d749087908790612b67908790600401613110565b600060405180830381600087803b158015610d8e57600080fd5b505af1158015610da2573d6000803e3d6000fd5b50506007549150600090505b83811015610ec0576000610dc28284613179565b604051632142170760e11b8152306004820152336024820152604481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e90606401600060405180830381600087803b158015610e3357600080fd5b505af1158015610e47573d6000803e3d6000fd5b50505050336001600160a01b03167f3e01a4a7be7d33cdf2a92e6b5bba0b4b1398c25eff1da803d4fa7811c9613ecc888885818110610e8857610e8861305b565b9050602002013583604051610ea7929190918252602082015260400190565b60405180910390a250610eb9816130a4565b9050610dae565b508260076000828254610ed39190613179565b9091555050600160025550610ee6915050565b5050565b610ef2612551565b610f046420a226a4a760d91b826125ab565b50565b610f196420a226a4a760d91b336117af565b610f355760405162461bcd60e51b8152600401610a0790612fa3565b60008211610f555760405162461bcd60e51b8152600401610a079061318c565b60035460009081526005602052604081208054849290610f76908490613179565b909155505060405163731133e960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063731133e990610fcb908490879087906004016131c3565b600060405180830381600087803b158015610fe557600080fd5b505af1158015610ff9573d6000803e3d6000fd5b50505050505050565b60008281526020819052604090206001015461101d81612610565b611027838361261a565b505050565b611034612551565b610f046420a226a4a760d91b8261261a565b6001600160a01b03811633146110b65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a07565b610ee682826125ab565b6110c86124fa565b3233146110e75760405162461bcd60e51b8152600401610a07906131f3565b600454610100900460ff161561110f5760405162461bcd60e51b8152600401610a0790612fd2565b8060001080156111ac5750604051627eeac760e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169062fdd58e90611167903390600190600401613029565b602060405180830381865afa158015611184573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a89190613042565b8111155b6111c85760405162461bcd60e51b8152600401610a079061322a565b604051637a94c56560e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f5298aca9061121990339060019086906004016130bd565b600060405180830381600087803b15801561123357600080fd5b505af1158015611247573d6000803e3d6000fd5b5060009250600391506112579050565b604051908082528060200260200182016040528015611280578160200160208202803683370190505b50905060005b82811015611314576000600361129d600143613259565b604080519140602083015281018490526060016040516020818303038152906040528051906020012060001c6112d3919061326c565b905060018382815181106112e9576112e961305b565b602002602001018181516112fd9190613179565b90525081905061130c816130a4565b915050611286565b506060806113218361269e565b604051630fbfeffd60e11b815291935091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631f7fdffa90611376903390869086906004016132c9565b600060405180830381600087803b15801561139057600080fd5b505af11580156113a4573d6000803e3d6000fd5b50505050505050610f046001600255565b6113c76420a226a4a760d91b336117af565b6113e35760405162461bcd60e51b8152600401610a0790612fa3565b600354600090815260056020526040902060020155565b6114026124fa565b3233146114215760405162461bcd60e51b8152600401610a07906131f3565b6004546301000000900460ff161561144b5760405162461bcd60e51b8152600401610a0790612fd2565b8060001080156114e85750604051627eeac760e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169062fdd58e906114a3903390600190600401613029565b602060405180830381865afa1580156114c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e49190613042565b8111155b6115045760405162461bcd60e51b8152600401610a079061322a565b604051637a94c56560e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f5298aca9061155590339060019086906004016130bd565b600060405180830381600087803b15801561156f57600080fd5b505af1158015611583573d6000803e3d6000fd5b505060405163731133e960e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063731133e991506115d890339060089086906004016131c3565b600060405180830381600087803b1580156115f257600080fd5b505af1158015611606573d6000803e3d6000fd5b50505050610f046001600255565b6116266420a226a4a760d91b336117af565b6116425760405162461bcd60e51b8152600401610a0790612fa3565b600354600090815260056020526040902060010155565b611661612551565b61166b6000612860565b565b61167f6420a226a4a760d91b336117af565b61169b5760405162461bcd60e51b8152600401610a0790612fa3565b600354600090815260056020526040902060040155565b6116c46420a226a4a760d91b336117af565b6116e05760405162461bcd60e51b8152600401610a0790612fa3565b8082036117455760405162461bcd60e51b815260206004820152602d60248201527f6265666f7265546f6b656e496420616e64206166746572546f6b656e4964206360448201526c616e6e6f742062652073616d6560981b6064820152608401610a07565b60009182526006602052604090912055565b6117696420a226a4a760d91b336117af565b6117855760405162461bcd60e51b8152600401610a0790612fa3565b60009485526005602052604090942060018101939093556002830191909155600382015560040155565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6117e06124fa565b60045462010000900460ff16156118095760405162461bcd60e51b8152600401610a0790612fd2565b826118265760405162461bcd60e51b8152600401610a0790612ffa565b82811461186d5760405162461bcd60e51b81526020600482015260156024820152741b195b99dd1a1cc8185c99481b9bdd08195c5d585b605a1b6044820152606401610a07565b6000836001600160401b0381111561188757611887612e9f565b6040519080825280602002602001820160405280156118b0578160200160208202803683370190505b50905060005b84811015611b205760008484838181106118d2576118d261305b565b90506020020135116118f65760405162461bcd60e51b8152600401610a079061322a565b8383828181106119085761190861305b565b905060200201357f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031662fdd58e338989868181106119505761195061305b565b905060200201356040518363ffffffff1660e01b8152600401611974929190613029565b602060405180830381865afa158015611991573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b59190613042565b10156119fa5760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401610a07565b600060066000888885818110611a1257611a1261305b565b90506020020135815260200190815260200160002054905060008111611a725760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a5908189d5c9b881d1bdad95b881a59605a1b6044820152606401610a07565b80838381518110611a8557611a8561305b565b6020908102919091010152337f9bd8fa729861ad47077f9a5627dbf5dbf64453706af8fd9388c4d8f8705f1fd8888885818110611ac457611ac461305b565b9050602002013583888887818110611ade57611ade61305b565b90506020020135604051611b05939291909283526020830191909152604082015260600190565b60405180910390a25080611b18816130a4565b9150506118b6565b50604051631ac8311560e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636b20c45490611b75903390899089908990899060040161331b565b600060405180830381600087803b158015611b8f57600080fd5b505af1158015611ba3573d6000803e3d6000fd5b5050604051630fbfeffd60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169250631f7fdffa9150611bf990339085908890889060040161335f565b600060405180830381600087803b158015611c1357600080fd5b505af1158015611c27573d6000803e3d6000fd5b5050505050611c366001600255565b50505050565b611c4e6420a226a4a760d91b336117af565b611c6a5760405162461bcd60e51b8152600401610a0790612fa3565b6003805460009081526005602052604090200155565b611c926420a226a4a760d91b336117af565b611cae5760405162461bcd60e51b8152600401610a0790612fa3565b600480549115156401000000000264ff0000000019909216919091179055565b611ce06420a226a4a760d91b336117af565b611cfc5760405162461bcd60e51b8152600401610a0790612fa3565b6004805460ff1916911515919091179055565b611d216420a226a4a760d91b336117af565b611d3d5760405162461bcd60e51b8152600401610a0790612fa3565b6004805491151563010000000263ff00000019909216919091179055565b600082815260208190526040902060010154611d7681612610565b61102783836125ab565b83836001600160f81b031660008211611dab5760405162461bcd60e51b8152600401610a079061318c565b6003805460009081526005602052604090200154821115611e1a5760405162461bcd60e51b8152602060048201526024808201527f6d6178206d696e7420616d6f756e74207065722073657373696f6e20657863656044820152631959195960e21b6064820152608401610a07565b600354600090815260056020526040902060018101549054611e3d908490613179565b1115611e5b5760405162461bcd60e51b8152600401610a07906133b3565b600354600090815260056020818152604080842033855290920190529020548190611e87908490613179565b1115611ee05760405162461bcd60e51b815260206004820152602260248201527f4164647265737320616c726561647920636c61696d6564206d617820616d6f756044820152611b9d60f21b6064820152608401610a07565b3385858560008484604051602001611f1d92919060609290921b6bffffffffffffffffffffffff1916825260081b60ff1916601482015260330190565b604051602081830303815290604052805190602001209050611f59838360056000600354815260200190815260200160002060040154846128b2565b611f9c5760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b21026b2b935b63290283937b7b360611b6044820152606401610a07565b611fa46124fa565b323314611fc35760405162461bcd60e51b8152600401610a07906131f3565b6003546000908152600560205260409020600201548b90611fe59082906133e3565b3410156120265760405162461bcd60e51b815260206004820152600f60248201526e3737ba1032b737bab3b41032ba341760891b6044820152606401610a07565b60045460ff16156120495760405162461bcd60e51b8152600401610a0790612fd2565b60035460009081526005602081815260408084203385529092019052812080548e9290612077908490613179565b9091555050600354600090815260056020526040812080548e929061209d908490613179565b925050819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663731133e93360018f6040518463ffffffff1660e01b81526004016120f5939291906131c3565b600060405180830381600087803b15801561210f57600080fd5b505af1158015612123573d6000803e3d6000fd5b50505050506121326001600255565b5050505050505050505050565b6121516420a226a4a760d91b336117af565b61216d5760405162461bcd60e51b8152600401610a0790612fa3565b805183146121bd5760405162461bcd60e51b815260206004820152601b60248201527f4172726179206c656e677468732061726520646966666572656e7400000000006044820152606401610a07565b600082116122075760405162461bcd60e51b8152602060048201526017602482015276546f6b656e2049442063616e6e6f74206265207a65726f60481b6044820152606401610a07565b6000805b825181101561224b578281815181106122265761222661305b565b6020026020010151826122399190613179565b9150612244816130a4565b905061220b565b506000811161229c5760405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401610a07565b6003546000908152600560205260409020600181015490546122bf908390613179565b11156122dd5760405162461bcd60e51b8152600401610a07906133b3565b60005b8251811015612401578281815181106122fb576122fb61305b565b6020026020010151600560006003548152602001908152602001600020600001600082825461232a9190613179565b90915550506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663731133e98787848181106123705761237061305b565b90506020020160208101906123859190612cf6565b868685815181106123985761239861305b565b60200260200101516040518463ffffffff1660e01b81526004016123be939291906131c3565b600060405180830381600087803b1580156123d857600080fd5b505af11580156123ec573d6000803e3d6000fd5b50505050806123fa906130a4565b90506122e0565b505050505050565b612411612551565b6001600160a01b0381166124765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a07565b610f0481612860565b6124916420a226a4a760d91b336117af565b6124ad5760405162461bcd60e51b8152600401610a0790612fa3565b600480549115156101000261ff0019909216919091179055565b6124d96420a226a4a760d91b336117af565b6124f55760405162461bcd60e51b8152600401610a0790612fa3565b600355565b600280540361254b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a07565b60028055565b6001546001600160a01b0316331461166b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a07565b6125b582826117af565b15610ee6576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610f0481336128ca565b61262482826117af565b610ee6576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561265a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60608082516001600160401b038111156126ba576126ba612e9f565b6040519080825280602002602001820160405280156126e3578160200160208202803683370190505b50915082516001600160401b038111156126ff576126ff612e9f565b604051908082528060200260200182016040528015612728578160200160208202803683370190505b5090506000805b600381101561285957600085828151811061274c5761274c61305b565b6020026020010151111561284757612765816002613179565b8483815181106127775761277761305b565b6020026020010181815250508481815181106127955761279561305b565b60200260200101518383815181106127af576127af61305b565b602002602001018181525050336001600160a01b03167f0f3ad0f0850041e4146f0aa366f84a75f428202563866db6032586ac2676b2c88584815181106127f8576127f861305b565b60200260200101518585815181106128125761281261305b565b6020026020010151604051612831929190918252602082015260400190565b60405180910390a2612844600183613179565b91505b80612851816130a4565b91505061272f565b5050915091565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826128c0868685612923565b1495945050505050565b6128d482826117af565b610ee6576128e18161296f565b6128ec836020612981565b6040516020016128fd92919061341e565b60408051601f198184030181529082905262461bcd60e51b8252610a079160040161348d565b600081815b8481101561296657612952828787848181106129465761294661305b565b90506020020135612b23565b91508061295e816130a4565b915050612928565b50949350505050565b60606109d36001600160a01b03831660145b606060006129908360026133e3565b61299b906002613179565b6001600160401b038111156129b2576129b2612e9f565b6040519080825280601f01601f1916602001820160405280156129dc576020820181803683370190505b509050600360fc1b816000815181106129f7576129f761305b565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612a2657612a2661305b565b60200101906001600160f81b031916908160001a9053506000612a4a8460026133e3565b612a55906001613179565b90505b6001811115612acd576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612a8957612a8961305b565b1a60f81b828281518110612a9f57612a9f61305b565b60200101906001600160f81b031916908160001a90535060049490941c93612ac6816134c0565b9050612a58565b508315612b1c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a07565b9392505050565b6000818310612b3f576000828152602084905260409020612b1c565b6000838152602083905260409020612b1c565b600060208284031215612b6457600080fd5b81356001600160e01b031981168114612b1c57600080fd5b600060208284031215612b8e57600080fd5b81358015158114612b1c57600080fd5b60008083601f840112612bb057600080fd5b5081356001600160401b03811115612bc757600080fd5b6020830191508360208260051b8501011115612be257600080fd5b9250929050565b60008060208385031215612bfc57600080fd5b82356001600160401b03811115612c1257600080fd5b612c1e85828601612b9e565b90969095509350505050565b6001600160a01b0381168114610f0457600080fd5b600080600080600060808688031215612c5757600080fd5b8535612c6281612c2a565b94506020860135612c7281612c2a565b93506040860135925060608601356001600160401b0380821115612c9557600080fd5b818801915088601f830112612ca957600080fd5b813581811115612cb857600080fd5b896020828501011115612cca57600080fd5b9699959850939650602001949392505050565b600060208284031215612cef57600080fd5b5035919050565b600060208284031215612d0857600080fd5b8135612b1c81612c2a565b600080600060608486031215612d2857600080fd5b83359250602084013591506040840135612d4181612c2a565b809150509250925092565b60008060408385031215612d5f57600080fd5b823591506020830135612d7181612c2a565b809150509250929050565b60008060408385031215612d8f57600080fd5b50508035926020909101359150565b600080600080600060a08688031215612db657600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060008060408587031215612def57600080fd5b84356001600160401b0380821115612e0657600080fd5b612e1288838901612b9e565b90965094506020870135915080821115612e2b57600080fd5b50612e3887828801612b9e565b95989497509550505050565b60008060008060608587031215612e5a57600080fd5b8435935060208501356001600160f81b0381168114612e7857600080fd5b925060408501356001600160401b03811115612e9357600080fd5b612e3887828801612b9e565b634e487b7160e01b600052604160045260246000fd5b60008060008060608587031215612ecb57600080fd5b84356001600160401b0380821115612ee257600080fd5b612eee88838901612b9e565b909650945060208781013594509150604087013581811115612f0f57600080fd5b8701601f81018913612f2057600080fd5b803582811115612f3257612f32612e9f565b8060051b604051601f19603f83011681018181108682111715612f5757612f57612e9f565b60405291825284820193508281018501918b831115612f7557600080fd5b928501925b82841015612f9357833585529385019392850192612f7a565b989b979a50959850505050505050565b60208082526015908201527421b0b63632b91034b9903737ba10309030b236b4b760591b604082015260600190565b6020808252600e908201526d34b9903737ba1030b1ba34bb329760911b604082015260600190565b6020808252601590820152746c656e6774682063616e6e6f74206265207a65726f60581b604082015260600190565b6001600160a01b03929092168252602082015260400190565b60006020828403121561305457600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561308357600080fd5b8151612b1c81612c2a565b634e487b7160e01b600052601160045260246000fd5b6000600182016130b6576130b661308e565b5060010190565b6001600160a01b039390931683526020830191909152604082015260600190565b81835260006001600160fb1b038311156130f757600080fd5b8260051b80836020870137939093016020019392505050565b6060815260006131246060830186886130de565b6001600160f81b038516602084810191909152838203604085015284518083528582019282019060005b8181101561316a5784518352938301939183019160010161314e565b50909998505050505050505050565b808201808211156109d3576109d361308e565b6020808252601a908201527f4d696e7420616d6f756e742063616e6e6f74206265207a65726f000000000000604082015260600190565b6001600160a01b039390931683526020830191909152604082015260806060820181905260009082015260a00190565b6020808252601f908201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163742e00604082015260600190565b602080825260159082015274616d6f756e742063616e6e6f74206265207a65726f60581b604082015260600190565b818103818111156109d3576109d361308e565b60008261328957634e487b7160e01b600052601260045260246000fd5b500690565b600081518084526020808501945080840160005b838110156132be578151875295820195908201906001016132a2565b509495945050505050565b6001600160a01b03841681526080602082018190526000906132ed9083018561328e565b82810360408401526132ff818561328e565b8381036060909401939093525050600081526020019392505050565b6001600160a01b038616815260606020820181905260009061334090830186886130de565b82810360408401526133538185876130de565b98975050505050505050565b6001600160a01b03851681526080602082018190526000906133839083018661328e565b82810360408401526133968185876130de565b838103606090940193909352505060008152602001949350505050565b6020808252601690820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b604082015260600190565b80820281158282048414176109d3576109d361308e565b60005b838110156134155781810151838201526020016133fd565b50506000910152565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516134508160178501602088016133fa565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516134818160288401602088016133fa565b01602801949350505050565b60208152600082518060208401526134ac8160408501602087016133fa565b601f01601f19169190910160400192915050565b6000816134cf576134cf61308e565b50600019019056fea26469706673582212207c27163851ea99bb99f6ec6f720e7fdf1bf5f6911be5ca1a996f93621be6700d64736f6c6343000813003343616c6c6572206973206e6f7420612061646d696e0000000000000000000000000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f06304000000000000000000000000828ad2904341f6026b4607a278349f5c840c4a2e
Deployed Bytecode
0x60806040526004361061029e5760003560e01c80637cb6475911610165578063b2acb865116100cc578063e755657011610085578063e755657014610867578063e907fd5814610887578063f0aa0a1d1461089c578063f2fde38b146108d0578063f8396f0b146108f0578063fc14175214610910578063fdf03cd51461098257600080fd5b8063b2acb865146107ca578063b612b343146107ea578063b71a7429146107ff578063d294861a14610814578063d547741f14610834578063d5a4f3651461085457600080fd5b80639906624e1161011e5780639906624e146106b4578063a217fddf146106d4578063a51dddfc146106e9578063a9e2acd514610716578063acaee38c14610736578063b1181735146107aa57600080fd5b80637cb64759146106015780637ee7a5e91461062157806383b962d5146106415780638da5cb5b1461066157806391d148541461067f578063926e94921461069f57600080fd5b80633c8fc198116102095780635d586ce0116101c25780635d586ce01461056d5780636b228db71461058d5780636f8b44b0146105a2578063715018a6146105c25780637374d6d1146105d757806377bd062f146105ec57600080fd5b80633c8fc1981461046f578063429a7d7a1461048f57806344a0d68a146104db57806347705cbc146104fb578063579afb311461054257806358303b101461055757600080fd5b80632a0acc6a1161025b5780632a0acc6a146103b35780632d345670146103cf5780632da63608146103ef5780632f2ff15d1461040f57806335bb3e161461042f57806336568abe1461044f57600080fd5b806301ffc9a7146102a3578063048e31b4146102d8578063054377cb146102fa578063104d899e1461031a578063150b7a021461033e578063248a9ca314610383575b600080fd5b3480156102af57600080fd5b506102c36102be366004612b52565b6109a2565b60405190151581526020015b60405180910390f35b3480156102e457600080fd5b506102f86102f3366004612b7c565b6109d9565b005b34801561030657600080fd5b506102f8610315366004612be9565b610a2c565b34801561032657600080fd5b5061033060075481565b6040519081526020016102cf565b34801561034a57600080fd5b5061036a610359366004612c3f565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020016102cf565b34801561038f57600080fd5b5061033061039e366004612cdd565b60009081526020819052604090206001015490565b3480156103bf57600080fd5b506103306420a226a4a760d91b81565b3480156103db57600080fd5b506102f86103ea366004612cf6565b610eea565b3480156103fb57600080fd5b506102f861040a366004612d13565b610f07565b34801561041b57600080fd5b506102f861042a366004612d4c565b611002565b34801561043b57600080fd5b506102f861044a366004612cf6565b61102c565b34801561045b57600080fd5b506102f861046a366004612d4c565b611046565b34801561047b57600080fd5b506102f861048a366004612cdd565b6110c0565b34801561049b57600080fd5b506104c37f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f0630481565b6040516001600160a01b0390911681526020016102cf565b3480156104e757600080fd5b506102f86104f6366004612cdd565b6113b5565b34801561050757600080fd5b50610330610516366004612cf6565b60035460009081526005602081815260408084206001600160a01b039095168452939091019052205490565b34801561054e57600080fd5b50610330600281565b34801561056357600080fd5b5061033060035481565b34801561057957600080fd5b506102f8610588366004612cdd565b6113fa565b34801561059957600080fd5b50610330600381565b3480156105ae57600080fd5b506102f86105bd366004612cdd565b611614565b3480156105ce57600080fd5b506102f8611659565b3480156105e357600080fd5b50610330600681565b3480156105f857600080fd5b50610330600181565b34801561060d57600080fd5b506102f861061c366004612cdd565b61166d565b34801561062d57600080fd5b506102f861063c366004612d7c565b6116b2565b34801561064d57600080fd5b506102f861065c366004612d9e565b611757565b34801561066d57600080fd5b506001546001600160a01b03166104c3565b34801561068b57600080fd5b506102c361069a366004612d4c565b6117af565b3480156106ab57600080fd5b50610330600781565b3480156106c057600080fd5b506102f86106cf366004612dd9565b6117d8565b3480156106e057600080fd5b50610330600081565b3480156106f557600080fd5b50610330610704366004612cdd565b60066020526000908152604090205481565b34801561072257600080fd5b506102f8610731366004612cdd565b611c3c565b34801561074257600080fd5b506004546107789060ff808216916101008104821691620100008204811691630100000081048216916401000000009091041685565b60408051951515865293151560208601529115159284019290925290151560608301521515608082015260a0016102cf565b3480156107b657600080fd5b506102f86107c5366004612b7c565b611c80565b3480156107d657600080fd5b506102f86107e5366004612b7c565b611cce565b3480156107f657600080fd5b50610330600581565b34801561080b57600080fd5b50610330600881565b34801561082057600080fd5b506102f861082f366004612b7c565b611d0f565b34801561084057600080fd5b506102f861084f366004612d4c565b611d5b565b6102f8610862366004612e44565b611d80565b34801561087357600080fd5b506102f8610882366004612eb5565b61213f565b34801561089357600080fd5b50610330600481565b3480156108a857600080fd5b506104c37f000000000000000000000000828ad2904341f6026b4607a278349f5c840c4a2e81565b3480156108dc57600080fd5b506102f86108eb366004612cf6565b612409565b3480156108fc57600080fd5b506102f861090b366004612b7c565b61247f565b34801561091c57600080fd5b5061095a61092b366004612cdd565b600560205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a0016102cf565b34801561098e57600080fd5b506102f861099d366004612cdd565b6124c7565b60006001600160e01b03198216637965db0b60e01b14806109d357506301ffc9a760e01b6001600160e01b03198316145b92915050565b6109eb6420a226a4a760d91b336117af565b610a105760405162461bcd60e51b8152600401610a0790612fa3565b60405180910390fd5b60048054911515620100000262ff000019909216919091179055565b610a346124fa565b600454640100000000900460ff1615610a5f5760405162461bcd60e51b8152600401610a0790612fd2565b8080610a7d5760405162461bcd60e51b8152600401610a0790612ffa565b604051627eeac760e11b815281906001600160a01b037f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f06304169062fdd58e90610acc903390600890600401613029565b602060405180830381865afa158015610ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0d9190613042565b1015610b5b5760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e74204b6174617369726f2062616c616e63650000006044820152606401610a07565b60005b81811015610c6457337f000000000000000000000000828ad2904341f6026b4607a278349f5c840c4a2e6001600160a01b0316636352211e868685818110610ba857610ba861305b565b905060200201356040518263ffffffff1660e01b8152600401610bcd91815260200190565b602060405180830381865afa158015610bea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0e9190613071565b6001600160a01b031614610c545760405162461bcd60e51b815260206004820152600d60248201526c2737ba1021a7219037bbb732b960991b6044820152606401610a07565b610c5d816130a4565b9050610b5e565b50604051637a94c56560e11b81526001600160a01b037f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f06304169063f5298aca90610cb690339060089087906004016130bd565b600060405180830381600087803b158015610cd057600080fd5b505af1158015610ce4573d6000803e3d6000fd5b5060009250829150610cf39050565b604051908082528060200260200182016040528015610d1c578160200160208202803683370190505b50604051632bc6d17360e21b81529091506001600160a01b037f000000000000000000000000828ad2904341f6026b4607a278349f5c840c4a2e169063af1b45cc90610d749087908790612b67908790600401613110565b600060405180830381600087803b158015610d8e57600080fd5b505af1158015610da2573d6000803e3d6000fd5b50506007549150600090505b83811015610ec0576000610dc28284613179565b604051632142170760e11b8152306004820152336024820152604481018290529091507f000000000000000000000000828ad2904341f6026b4607a278349f5c840c4a2e6001600160a01b0316906342842e0e90606401600060405180830381600087803b158015610e3357600080fd5b505af1158015610e47573d6000803e3d6000fd5b50505050336001600160a01b03167f3e01a4a7be7d33cdf2a92e6b5bba0b4b1398c25eff1da803d4fa7811c9613ecc888885818110610e8857610e8861305b565b9050602002013583604051610ea7929190918252602082015260400190565b60405180910390a250610eb9816130a4565b9050610dae565b508260076000828254610ed39190613179565b9091555050600160025550610ee6915050565b5050565b610ef2612551565b610f046420a226a4a760d91b826125ab565b50565b610f196420a226a4a760d91b336117af565b610f355760405162461bcd60e51b8152600401610a0790612fa3565b60008211610f555760405162461bcd60e51b8152600401610a079061318c565b60035460009081526005602052604081208054849290610f76908490613179565b909155505060405163731133e960e01b81526001600160a01b037f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f06304169063731133e990610fcb908490879087906004016131c3565b600060405180830381600087803b158015610fe557600080fd5b505af1158015610ff9573d6000803e3d6000fd5b50505050505050565b60008281526020819052604090206001015461101d81612610565b611027838361261a565b505050565b611034612551565b610f046420a226a4a760d91b8261261a565b6001600160a01b03811633146110b65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a07565b610ee682826125ab565b6110c86124fa565b3233146110e75760405162461bcd60e51b8152600401610a07906131f3565b600454610100900460ff161561110f5760405162461bcd60e51b8152600401610a0790612fd2565b8060001080156111ac5750604051627eeac760e11b81526001600160a01b037f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f06304169062fdd58e90611167903390600190600401613029565b602060405180830381865afa158015611184573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a89190613042565b8111155b6111c85760405162461bcd60e51b8152600401610a079061322a565b604051637a94c56560e11b81526001600160a01b037f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f06304169063f5298aca9061121990339060019086906004016130bd565b600060405180830381600087803b15801561123357600080fd5b505af1158015611247573d6000803e3d6000fd5b5060009250600391506112579050565b604051908082528060200260200182016040528015611280578160200160208202803683370190505b50905060005b82811015611314576000600361129d600143613259565b604080519140602083015281018490526060016040516020818303038152906040528051906020012060001c6112d3919061326c565b905060018382815181106112e9576112e961305b565b602002602001018181516112fd9190613179565b90525081905061130c816130a4565b915050611286565b506060806113218361269e565b604051630fbfeffd60e11b815291935091506001600160a01b037f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f063041690631f7fdffa90611376903390869086906004016132c9565b600060405180830381600087803b15801561139057600080fd5b505af11580156113a4573d6000803e3d6000fd5b50505050505050610f046001600255565b6113c76420a226a4a760d91b336117af565b6113e35760405162461bcd60e51b8152600401610a0790612fa3565b600354600090815260056020526040902060020155565b6114026124fa565b3233146114215760405162461bcd60e51b8152600401610a07906131f3565b6004546301000000900460ff161561144b5760405162461bcd60e51b8152600401610a0790612fd2565b8060001080156114e85750604051627eeac760e11b81526001600160a01b037f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f06304169062fdd58e906114a3903390600190600401613029565b602060405180830381865afa1580156114c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e49190613042565b8111155b6115045760405162461bcd60e51b8152600401610a079061322a565b604051637a94c56560e11b81526001600160a01b037f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f06304169063f5298aca9061155590339060019086906004016130bd565b600060405180830381600087803b15801561156f57600080fd5b505af1158015611583573d6000803e3d6000fd5b505060405163731133e960e01b81526001600160a01b037f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f0630416925063731133e991506115d890339060089086906004016131c3565b600060405180830381600087803b1580156115f257600080fd5b505af1158015611606573d6000803e3d6000fd5b50505050610f046001600255565b6116266420a226a4a760d91b336117af565b6116425760405162461bcd60e51b8152600401610a0790612fa3565b600354600090815260056020526040902060010155565b611661612551565b61166b6000612860565b565b61167f6420a226a4a760d91b336117af565b61169b5760405162461bcd60e51b8152600401610a0790612fa3565b600354600090815260056020526040902060040155565b6116c46420a226a4a760d91b336117af565b6116e05760405162461bcd60e51b8152600401610a0790612fa3565b8082036117455760405162461bcd60e51b815260206004820152602d60248201527f6265666f7265546f6b656e496420616e64206166746572546f6b656e4964206360448201526c616e6e6f742062652073616d6560981b6064820152608401610a07565b60009182526006602052604090912055565b6117696420a226a4a760d91b336117af565b6117855760405162461bcd60e51b8152600401610a0790612fa3565b60009485526005602052604090942060018101939093556002830191909155600382015560040155565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6117e06124fa565b60045462010000900460ff16156118095760405162461bcd60e51b8152600401610a0790612fd2565b826118265760405162461bcd60e51b8152600401610a0790612ffa565b82811461186d5760405162461bcd60e51b81526020600482015260156024820152741b195b99dd1a1cc8185c99481b9bdd08195c5d585b605a1b6044820152606401610a07565b6000836001600160401b0381111561188757611887612e9f565b6040519080825280602002602001820160405280156118b0578160200160208202803683370190505b50905060005b84811015611b205760008484838181106118d2576118d261305b565b90506020020135116118f65760405162461bcd60e51b8152600401610a079061322a565b8383828181106119085761190861305b565b905060200201357f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f063046001600160a01b031662fdd58e338989868181106119505761195061305b565b905060200201356040518363ffffffff1660e01b8152600401611974929190613029565b602060405180830381865afa158015611991573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b59190613042565b10156119fa5760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401610a07565b600060066000888885818110611a1257611a1261305b565b90506020020135815260200190815260200160002054905060008111611a725760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a5908189d5c9b881d1bdad95b881a59605a1b6044820152606401610a07565b80838381518110611a8557611a8561305b565b6020908102919091010152337f9bd8fa729861ad47077f9a5627dbf5dbf64453706af8fd9388c4d8f8705f1fd8888885818110611ac457611ac461305b565b9050602002013583888887818110611ade57611ade61305b565b90506020020135604051611b05939291909283526020830191909152604082015260600190565b60405180910390a25080611b18816130a4565b9150506118b6565b50604051631ac8311560e21b81526001600160a01b037f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f063041690636b20c45490611b75903390899089908990899060040161331b565b600060405180830381600087803b158015611b8f57600080fd5b505af1158015611ba3573d6000803e3d6000fd5b5050604051630fbfeffd60e11b81526001600160a01b037f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f06304169250631f7fdffa9150611bf990339085908890889060040161335f565b600060405180830381600087803b158015611c1357600080fd5b505af1158015611c27573d6000803e3d6000fd5b5050505050611c366001600255565b50505050565b611c4e6420a226a4a760d91b336117af565b611c6a5760405162461bcd60e51b8152600401610a0790612fa3565b6003805460009081526005602052604090200155565b611c926420a226a4a760d91b336117af565b611cae5760405162461bcd60e51b8152600401610a0790612fa3565b600480549115156401000000000264ff0000000019909216919091179055565b611ce06420a226a4a760d91b336117af565b611cfc5760405162461bcd60e51b8152600401610a0790612fa3565b6004805460ff1916911515919091179055565b611d216420a226a4a760d91b336117af565b611d3d5760405162461bcd60e51b8152600401610a0790612fa3565b6004805491151563010000000263ff00000019909216919091179055565b600082815260208190526040902060010154611d7681612610565b61102783836125ab565b83836001600160f81b031660008211611dab5760405162461bcd60e51b8152600401610a079061318c565b6003805460009081526005602052604090200154821115611e1a5760405162461bcd60e51b8152602060048201526024808201527f6d6178206d696e7420616d6f756e74207065722073657373696f6e20657863656044820152631959195960e21b6064820152608401610a07565b600354600090815260056020526040902060018101549054611e3d908490613179565b1115611e5b5760405162461bcd60e51b8152600401610a07906133b3565b600354600090815260056020818152604080842033855290920190529020548190611e87908490613179565b1115611ee05760405162461bcd60e51b815260206004820152602260248201527f4164647265737320616c726561647920636c61696d6564206d617820616d6f756044820152611b9d60f21b6064820152608401610a07565b3385858560008484604051602001611f1d92919060609290921b6bffffffffffffffffffffffff1916825260081b60ff1916601482015260330190565b604051602081830303815290604052805190602001209050611f59838360056000600354815260200190815260200160002060040154846128b2565b611f9c5760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b21026b2b935b63290283937b7b360611b6044820152606401610a07565b611fa46124fa565b323314611fc35760405162461bcd60e51b8152600401610a07906131f3565b6003546000908152600560205260409020600201548b90611fe59082906133e3565b3410156120265760405162461bcd60e51b815260206004820152600f60248201526e3737ba1032b737bab3b41032ba341760891b6044820152606401610a07565b60045460ff16156120495760405162461bcd60e51b8152600401610a0790612fd2565b60035460009081526005602081815260408084203385529092019052812080548e9290612077908490613179565b9091555050600354600090815260056020526040812080548e929061209d908490613179565b925050819055507f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f063046001600160a01b031663731133e93360018f6040518463ffffffff1660e01b81526004016120f5939291906131c3565b600060405180830381600087803b15801561210f57600080fd5b505af1158015612123573d6000803e3d6000fd5b50505050506121326001600255565b5050505050505050505050565b6121516420a226a4a760d91b336117af565b61216d5760405162461bcd60e51b8152600401610a0790612fa3565b805183146121bd5760405162461bcd60e51b815260206004820152601b60248201527f4172726179206c656e677468732061726520646966666572656e7400000000006044820152606401610a07565b600082116122075760405162461bcd60e51b8152602060048201526017602482015276546f6b656e2049442063616e6e6f74206265207a65726f60481b6044820152606401610a07565b6000805b825181101561224b578281815181106122265761222661305b565b6020026020010151826122399190613179565b9150612244816130a4565b905061220b565b506000811161229c5760405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401610a07565b6003546000908152600560205260409020600181015490546122bf908390613179565b11156122dd5760405162461bcd60e51b8152600401610a07906133b3565b60005b8251811015612401578281815181106122fb576122fb61305b565b6020026020010151600560006003548152602001908152602001600020600001600082825461232a9190613179565b90915550506001600160a01b037f000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f063041663731133e98787848181106123705761237061305b565b90506020020160208101906123859190612cf6565b868685815181106123985761239861305b565b60200260200101516040518463ffffffff1660e01b81526004016123be939291906131c3565b600060405180830381600087803b1580156123d857600080fd5b505af11580156123ec573d6000803e3d6000fd5b50505050806123fa906130a4565b90506122e0565b505050505050565b612411612551565b6001600160a01b0381166124765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a07565b610f0481612860565b6124916420a226a4a760d91b336117af565b6124ad5760405162461bcd60e51b8152600401610a0790612fa3565b600480549115156101000261ff0019909216919091179055565b6124d96420a226a4a760d91b336117af565b6124f55760405162461bcd60e51b8152600401610a0790612fa3565b600355565b600280540361254b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a07565b60028055565b6001546001600160a01b0316331461166b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a07565b6125b582826117af565b15610ee6576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610f0481336128ca565b61262482826117af565b610ee6576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561265a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60608082516001600160401b038111156126ba576126ba612e9f565b6040519080825280602002602001820160405280156126e3578160200160208202803683370190505b50915082516001600160401b038111156126ff576126ff612e9f565b604051908082528060200260200182016040528015612728578160200160208202803683370190505b5090506000805b600381101561285957600085828151811061274c5761274c61305b565b6020026020010151111561284757612765816002613179565b8483815181106127775761277761305b565b6020026020010181815250508481815181106127955761279561305b565b60200260200101518383815181106127af576127af61305b565b602002602001018181525050336001600160a01b03167f0f3ad0f0850041e4146f0aa366f84a75f428202563866db6032586ac2676b2c88584815181106127f8576127f861305b565b60200260200101518585815181106128125761281261305b565b6020026020010151604051612831929190918252602082015260400190565b60405180910390a2612844600183613179565b91505b80612851816130a4565b91505061272f565b5050915091565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826128c0868685612923565b1495945050505050565b6128d482826117af565b610ee6576128e18161296f565b6128ec836020612981565b6040516020016128fd92919061341e565b60408051601f198184030181529082905262461bcd60e51b8252610a079160040161348d565b600081815b8481101561296657612952828787848181106129465761294661305b565b90506020020135612b23565b91508061295e816130a4565b915050612928565b50949350505050565b60606109d36001600160a01b03831660145b606060006129908360026133e3565b61299b906002613179565b6001600160401b038111156129b2576129b2612e9f565b6040519080825280601f01601f1916602001820160405280156129dc576020820181803683370190505b509050600360fc1b816000815181106129f7576129f761305b565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612a2657612a2661305b565b60200101906001600160f81b031916908160001a9053506000612a4a8460026133e3565b612a55906001613179565b90505b6001811115612acd576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612a8957612a8961305b565b1a60f81b828281518110612a9f57612a9f61305b565b60200101906001600160f81b031916908160001a90535060049490941c93612ac6816134c0565b9050612a58565b508315612b1c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a07565b9392505050565b6000818310612b3f576000828152602084905260409020612b1c565b6000838152602083905260409020612b1c565b600060208284031215612b6457600080fd5b81356001600160e01b031981168114612b1c57600080fd5b600060208284031215612b8e57600080fd5b81358015158114612b1c57600080fd5b60008083601f840112612bb057600080fd5b5081356001600160401b03811115612bc757600080fd5b6020830191508360208260051b8501011115612be257600080fd5b9250929050565b60008060208385031215612bfc57600080fd5b82356001600160401b03811115612c1257600080fd5b612c1e85828601612b9e565b90969095509350505050565b6001600160a01b0381168114610f0457600080fd5b600080600080600060808688031215612c5757600080fd5b8535612c6281612c2a565b94506020860135612c7281612c2a565b93506040860135925060608601356001600160401b0380821115612c9557600080fd5b818801915088601f830112612ca957600080fd5b813581811115612cb857600080fd5b896020828501011115612cca57600080fd5b9699959850939650602001949392505050565b600060208284031215612cef57600080fd5b5035919050565b600060208284031215612d0857600080fd5b8135612b1c81612c2a565b600080600060608486031215612d2857600080fd5b83359250602084013591506040840135612d4181612c2a565b809150509250925092565b60008060408385031215612d5f57600080fd5b823591506020830135612d7181612c2a565b809150509250929050565b60008060408385031215612d8f57600080fd5b50508035926020909101359150565b600080600080600060a08688031215612db657600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060008060408587031215612def57600080fd5b84356001600160401b0380821115612e0657600080fd5b612e1288838901612b9e565b90965094506020870135915080821115612e2b57600080fd5b50612e3887828801612b9e565b95989497509550505050565b60008060008060608587031215612e5a57600080fd5b8435935060208501356001600160f81b0381168114612e7857600080fd5b925060408501356001600160401b03811115612e9357600080fd5b612e3887828801612b9e565b634e487b7160e01b600052604160045260246000fd5b60008060008060608587031215612ecb57600080fd5b84356001600160401b0380821115612ee257600080fd5b612eee88838901612b9e565b909650945060208781013594509150604087013581811115612f0f57600080fd5b8701601f81018913612f2057600080fd5b803582811115612f3257612f32612e9f565b8060051b604051601f19603f83011681018181108682111715612f5757612f57612e9f565b60405291825284820193508281018501918b831115612f7557600080fd5b928501925b82841015612f9357833585529385019392850192612f7a565b989b979a50959850505050505050565b60208082526015908201527421b0b63632b91034b9903737ba10309030b236b4b760591b604082015260600190565b6020808252600e908201526d34b9903737ba1030b1ba34bb329760911b604082015260600190565b6020808252601590820152746c656e6774682063616e6e6f74206265207a65726f60581b604082015260600190565b6001600160a01b03929092168252602082015260400190565b60006020828403121561305457600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561308357600080fd5b8151612b1c81612c2a565b634e487b7160e01b600052601160045260246000fd5b6000600182016130b6576130b661308e565b5060010190565b6001600160a01b039390931683526020830191909152604082015260600190565b81835260006001600160fb1b038311156130f757600080fd5b8260051b80836020870137939093016020019392505050565b6060815260006131246060830186886130de565b6001600160f81b038516602084810191909152838203604085015284518083528582019282019060005b8181101561316a5784518352938301939183019160010161314e565b50909998505050505050505050565b808201808211156109d3576109d361308e565b6020808252601a908201527f4d696e7420616d6f756e742063616e6e6f74206265207a65726f000000000000604082015260600190565b6001600160a01b039390931683526020830191909152604082015260806060820181905260009082015260a00190565b6020808252601f908201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163742e00604082015260600190565b602080825260159082015274616d6f756e742063616e6e6f74206265207a65726f60581b604082015260600190565b818103818111156109d3576109d361308e565b60008261328957634e487b7160e01b600052601260045260246000fd5b500690565b600081518084526020808501945080840160005b838110156132be578151875295820195908201906001016132a2565b509495945050505050565b6001600160a01b03841681526080602082018190526000906132ed9083018561328e565b82810360408401526132ff818561328e565b8381036060909401939093525050600081526020019392505050565b6001600160a01b038616815260606020820181905260009061334090830186886130de565b82810360408401526133538185876130de565b98975050505050505050565b6001600160a01b03851681526080602082018190526000906133839083018661328e565b82810360408401526133968185876130de565b838103606090940193909352505060008152602001949350505050565b6020808252601690820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b604082015260600190565b80820281158282048414176109d3576109d361308e565b60005b838110156134155781810151838201526020016133fd565b50506000910152565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516134508160178501602088016133fa565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516134818160288401602088016133fa565b01602801949350505050565b60208152600082518060208401526134ac8160408501602087016133fa565b601f01601f19169190910160400192915050565b6000816134cf576134cf61308e565b50600019019056fea26469706673582212207c27163851ea99bb99f6ec6f720e7fdf1bf5f6911be5ca1a996f93621be6700d64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f06304000000000000000000000000828ad2904341f6026b4607a278349f5c840c4a2e
-----Decoded View---------------
Arg [0] : _cncc (address): 0xe21252E5d82AE50451b88393aef1baACA4f06304
Arg [1] : _cnc (address): 0x828AD2904341f6026b4607A278349F5C840c4A2E
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000e21252e5d82ae50451b88393aef1baaca4f06304
Arg [1] : 000000000000000000000000828ad2904341f6026b4607a278349f5c840c4a2e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.