Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 126 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Revoke Role | 18398768 | 457 days ago | IN | 0 ETH | 0.00019151 | ||||
Grant Role | 18398767 | 457 days ago | IN | 0 ETH | 0.00033956 | ||||
Set Order | 17066931 | 644 days ago | IN | 0 ETH | 0.00899249 | ||||
Set Order | 16776438 | 685 days ago | IN | 0 ETH | 0.00793786 | ||||
Set Order | 16658998 | 702 days ago | IN | 0 ETH | 0.0055224 | ||||
Set Order | 16578490 | 713 days ago | IN | 0 ETH | 0.01295234 | ||||
Set Order | 16481514 | 727 days ago | IN | 0 ETH | 0.00415435 | ||||
Set Order | 16481505 | 727 days ago | IN | 0 ETH | 0.00413523 | ||||
Set Order | 16481489 | 727 days ago | IN | 0 ETH | 0.0043795 | ||||
Set Order | 16481483 | 727 days ago | IN | 0 ETH | 0.00411982 | ||||
Set Order | 16481478 | 727 days ago | IN | 0 ETH | 0.00449065 | ||||
Set Order | 16481469 | 727 days ago | IN | 0 ETH | 0.00448834 | ||||
Set Order | 16481456 | 727 days ago | IN | 0 ETH | 0.00436504 | ||||
Set Order | 16452576 | 731 days ago | IN | 0 ETH | 0.00439706 | ||||
Set Order | 16452569 | 731 days ago | IN | 0 ETH | 0.00465121 | ||||
Set Order | 16452561 | 731 days ago | IN | 0 ETH | 0.0048013 | ||||
Set Order | 16452554 | 731 days ago | IN | 0 ETH | 0.00455946 | ||||
Set Order | 16452548 | 731 days ago | IN | 0 ETH | 0.00497226 | ||||
Set Order | 16452542 | 731 days ago | IN | 0 ETH | 0.00481982 | ||||
Set Order | 16419488 | 735 days ago | IN | 0 ETH | 0.00428838 | ||||
Set Order | 15779405 | 825 days ago | IN | 0 ETH | 0.004787 | ||||
Set Order | 15689638 | 837 days ago | IN | 0 ETH | 0.0049084 | ||||
Set Order | 15685249 | 838 days ago | IN | 0 ETH | 0.0035012 | ||||
Set Order | 15666459 | 840 days ago | IN | 0 ETH | 0.00297595 | ||||
Complete Order | 15628369 | 846 days ago | IN | 0 ETH | 0.0017213 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
CGMarketPlaceContract
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./interfaces/IMarket.sol"; import "./interfaces/IUtils.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/IAccessControl.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; // Market Place Implementation contract CGMarketPlaceContract is IMarket, AccessControl, Pausable { using SafeERC20 for IERC20; using Counters for Counters.Counter; Counters.Counter private _orderIds; Counters.Counter private _bidIds; address public _adminAddress = 0xAbb590532A0FA89F0DAB20f3C121712957A7976D; // CG VAULT ADDRESS For Commission // To store commission percentage for each mint uint8 private _adminCommissionPercentage = 25; // Mapping from token to the current ask for the token mapping(uint256 => IUtils.Order) private _orders; // Mapping from token to the current ask for the token mapping(uint256 => IUtils.Bid) private _bids; mapping(address => bool) public approvedCurrency; mapping(address => bool) public approvedNfts; uint256 private constant EXPO = 1e18; uint256 private constant BASE = 1000 * EXPO; constructor() { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); } /** * Update Admin wallet where all commission will go. */ function setAdminAddress(address _newAdminWallet) external override returns (bool) { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Caller is not a admin"); require(_newAdminWallet != address(0), "Admin Wallet cannot be empty address"); emit UpdateAdminWallet(_adminAddress, _newAdminWallet); _adminAddress = _newAdminWallet; return true; } // Get Current Order Id function getCurrentOrderId() public view returns (uint256) { return _orderIds.current(); } // Get Current Bid Id function getCurrentBidId() public view returns (uint256) { return _bidIds.current(); } /** * @dev Update Pause State */ function setPauseStatus(bool _pauseStatus) external returns (bool) { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Caller is not a admin"); if (_pauseStatus) { _pause(); } else { _unpause(); } return true; } /** * @dev See {IMarket} */ function setCommissionPercentage(uint8 _commissionPercentage) external override returns (bool) { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Caller is not a admin"); _adminCommissionPercentage = _commissionPercentage; emit CommissionUpdated(_adminCommissionPercentage); return true; } /** * @dev See {IMarket} */ function updateCurrency(address _tokenAddress, bool _status) external override returns (bool) { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Caller is not a admin"); approvedCurrency[_tokenAddress] = _status; return true; } /** * @dev See {IMarket} */ function updateNFTContract(address _tokenAddress, bool _status) external override returns (bool) { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Caller is not a admin"); approvedNfts[_tokenAddress] = _status; return true; } /** * @dev See {IMarket} */ function getCommissionPercentage() external view override returns (uint8) { return _adminCommissionPercentage; } // end of function /** * @dev See {IMarket} */ function setOrder(address _nftContract, uint256 _tokenId, address _currency, uint256 _askAmount, uint256 _expiryTime) whenNotPaused external override { _orderIds.increment(); require(approvedNfts[_nftContract], "NFT is not approved by admin"); require(approvedCurrency[_currency], "Currency is not approved by admin"); require(_askAmount > 0, "Ask Amount Cannot be Zero"); require(_expiryTime > block.timestamp, "Expiry Time cannot be in Past"); ERC721 nftContract = ERC721(_nftContract); require(nftContract.ownerOf(_tokenId) == msg.sender, "You are not owner of Token Id"); bool isAllTokenApproved = nftContract.isApprovedForAll(_msgSender(), address(this)); address approvedSpenderOfToken = nftContract.getApproved(_tokenId); require((isAllTokenApproved || approvedSpenderOfToken == address(this)), "Market Contract is not allowed to manage this Token ID"); uint256 currentOrderId = _orderIds.current(); IUtils.Order storage order = _orders[currentOrderId]; order.orderId = currentOrderId; order.sender = _msgSender(); order.askAmount = _askAmount; order.currency = _currency; order.nftContract = _nftContract; order.tokenId = _tokenId; order.expiryTime = _expiryTime; order.orderStatus = IUtils.OrderStatus.OPEN; order.createdAt = block.timestamp; order.updatedAt = block.timestamp; emit OrderCreated(currentOrderId, order); } // end of create order /** * @dev See {IMarket} */ function getOrder(uint256 _orderId) external override view returns (IUtils.Order memory) { return _orders[_orderId]; } /** * @dev See {IMarket} */ function cancelOrder(uint256 _orderId) whenNotPaused external override returns (bool) { IUtils.Order storage order = _orders[_orderId]; require(order.sender != address(0), "Invalid Order Id"); require(order.orderStatus == IUtils.OrderStatus.OPEN, "Order status is not Open"); bool hasAdminRole = hasRole(DEFAULT_ADMIN_ROLE, _msgSender()); require(order.sender == _msgSender() || hasAdminRole, "You Don't have right to cancel order"); order.orderStatus = IUtils.OrderStatus.CANCELED; emit OrderRemoved(_orderId, order); return true; } // end of cancel order /** * @dev See {IMarket} */ function completeOrder(uint256 _orderId) whenNotPaused external override returns (bool) { IUtils.Order storage order = _orders[_orderId]; require(order.sender != address(0), "Invalid Order Id"); require(order.orderStatus == IUtils.OrderStatus.OPEN, "Order status is not Open"); IERC20 token = IERC20(order.currency); ERC721 nft = ERC721(order.nftContract); require(block.timestamp <= order.expiryTime, "Order is expired"); require(token.balanceOf(_msgSender()) >= order.askAmount, "Not enough funds available to buy"); require( token.allowance(_msgSender(), address(this)) >= order.askAmount, "Please Approve Tokens Before You Buy" ); uint256 _amountToDistribute = order.askAmount; uint256 adminCommission = (_amountToDistribute * (_adminCommissionPercentage * EXPO)) / (BASE); uint256 _amount = _amountToDistribute - adminCommission; token.safeTransferFrom(_msgSender(), _adminAddress, adminCommission); token.safeTransferFrom(_msgSender(), order.sender, _amount); nft.transferFrom(order.sender, _msgSender(), order.tokenId); order.orderStatus = IUtils.OrderStatus.COMPLETED; order.recipient = _msgSender(); emit OrderCompleted(order.orderId, order); return true; } // end of function /** * @dev See {IMarket} */ function getBid(uint256 _bidId) external override view returns (IUtils.Bid memory) { return _bids[_bidId]; } /** * @dev See {IMarket} */ function addBid(address _nftContract, uint256 _tokenId, address _currency, uint256 _bidAmount, uint256 _expiryTime) whenNotPaused external override { _bidIds.increment(); require(approvedNfts[_nftContract], "NFT is not approved by admin"); require(approvedCurrency[_currency], "Currency is not approved by admin"); require(_bidAmount > 0, "Bid Amount Cannot be Zero"); require(_expiryTime > block.timestamp, "Expiry Time cannot be in Past"); ERC721 nft = ERC721(_nftContract); require(nft.ownerOf(_tokenId) != msg.sender, "You Can't Bid on your Own Token"); IERC20 token = IERC20(_currency); require(token.balanceOf(_msgSender()) >= _bidAmount, "Not enough funds available to add bid"); require( token.allowance(_msgSender(), address(this)) >= _bidAmount, "Please Approve Tokens Before You Bid" ); uint256 currentBidId = _bidIds.current(); IUtils.Bid storage bid = _bids[currentBidId]; bid.bidId = currentBidId; bid.sender = _msgSender(); bid.bidAmount = _bidAmount; bid.currency = _currency; bid.nftContract = _nftContract; bid.tokenId = _tokenId; bid.expiryTime = _expiryTime; bid.bidStatus = IUtils.OrderStatus.OPEN; bid.createdAt = block.timestamp; bid.updatedAt = block.timestamp; emit BidAdded(currentBidId, bid); } // end of create order /** * @dev See {IMarket} */ function cancelBid(uint256 _bidId) whenNotPaused external override returns (bool) { IUtils.Bid storage bid = _bids[_bidId]; require(bid.sender != address(0), "Invalid Bid Id"); require(bid.bidStatus == IUtils.OrderStatus.OPEN, "Bid status is not Open"); bool hasAdminRole = hasRole(DEFAULT_ADMIN_ROLE, _msgSender()); ERC721 nft = ERC721(bid.nftContract); require(bid.sender == _msgSender() || nft.ownerOf(bid.tokenId) == _msgSender() || hasAdminRole, "You Don't have right to cancel order"); bid.bidStatus = IUtils.OrderStatus.CANCELED; emit BidRemoved(_bidId, bid); return true; } // end of cancel bid /** * @dev See {IMarket} */ function acceptBid(uint256 _bidId) whenNotPaused external override returns (bool) { IUtils.Bid storage bid = _bids[_bidId]; require(bid.sender != address(0), "Invalid Order Id"); require(bid.bidStatus == IUtils.OrderStatus.OPEN, "Bid status is not Open"); require(block.timestamp <= bid.expiryTime, "Bid is expired"); IERC20 token = IERC20(bid.currency); ERC721 nft = ERC721(bid.nftContract); require(nft.ownerOf(bid.tokenId) == msg.sender, "You are not owner of Token Id"); require(token.balanceOf(bid.sender) >= bid.bidAmount, "Bidder don't have Enough Funds"); require( token.allowance(bid.sender, address(this)) >= bid.bidAmount, "Bidder has not Approved Tokens" ); bool isAllTokenApproved = nft.isApprovedForAll(_msgSender(), address(this)); address approvedSpenderOfToken = nft.getApproved(bid.tokenId); require((isAllTokenApproved || approvedSpenderOfToken == address(this)), "Market Contract is not allowed to manage this Token ID"); uint256 _amountToDistribute = bid.bidAmount; uint256 adminCommission = (_amountToDistribute * (_adminCommissionPercentage * EXPO)) / (BASE); uint256 _amount = _amountToDistribute - adminCommission; nft.transferFrom(_msgSender(), bid.sender, bid.tokenId); token.safeTransferFrom(bid.sender, _adminAddress, adminCommission); token.safeTransferFrom(bid.sender, _msgSender(), _amount); bid.bidStatus = IUtils.OrderStatus.COMPLETED; bid.recipient = _msgSender(); emit BidAccepted(bid.bidId, bid); return true; } // end of function } // end of contract
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IUtils { // To keep track of orders enum OrderStatus { COMPLETED, OPEN, CANCELED, EXPIRED, INVALID } struct Order { // Unique Order Id for each item. uint256 orderId; //this is to check in Ask function if _sender is the token Owner address sender; // Amount of the currency being asked uint256 askAmount; // Address to the ERC20 token being asked address currency; // Address to the ERC721 token being sold address nftContract; // Token Id of ERC721 for bieng sold. uint256 tokenId; // The Expiry Time of order uint256 expiryTime; // Address of the recipient address recipient; OrderStatus orderStatus; // created time uint256 createdAt; // created time uint256 updatedAt; } struct Bid { // Unique Bid Id for each item. uint256 bidId; //this is to check in Ask function if _sender is the token Owner address sender; // Amount of the currency being asked uint256 bidAmount; // Address to the ERC20 token being asked address currency; // Address to the ERC721 token being sold address nftContract; // Token Id of ERC721 for being sold. uint256 tokenId; // The Expiry Time of order uint256 expiryTime; // Address of the recipient address recipient; OrderStatus bidStatus; // created time uint256 createdAt; // created time uint256 updatedAt; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IUtils.sol"; interface IMarket { // For Fee dividend struct Collaborators { address[] _collaborators; uint8[] _percentages; bool _receiveCollabShare; } // All EVENTS Related To Market event OrderCreated(uint256 indexed orderId, IUtils.Order order); event OrderCompleted(uint256 indexed orderId, IUtils.Order order); event OrderRemoved(uint256 indexed orderId, IUtils.Order order); event BidAdded(uint256 indexed bidId, IUtils.Bid bid); event BidAccepted(uint256 indexed bidId, IUtils.Bid bid); event BidRemoved(uint256 indexed bidId, IUtils.Bid bid); event CommissionUpdated(uint8 commissionPercentage); event UpdateAdminWallet(address indexed _oldWallet, address indexed _newAdminWallet); /** * @notice This Method is used to set Admin's Address * * @param _newAdminAddress Admin's Address To set * * @return bool Transaction status */ function setAdminAddress(address _newAdminAddress) external returns (bool); /** * @notice This Method is used to set Commission percentage of The Admin * * @param _commissionPercentage New Commission Percentage To set * * @return bool Transaction status */ function setCommissionPercentage(uint8 _commissionPercentage) external returns (bool); /** * @notice This method is used to get Admin's Commission Percentage * * @return uint8 Commission Percentage */ function getCommissionPercentage() external view returns (uint8); function updateCurrency(address _tokenAddress, bool _status) external returns (bool); function updateNFTContract(address _tokenAddress, bool _status) external returns (bool); /** * @notice Sets the order on a particular NFT. */ function setOrder(address _nftContract, uint256 _tokenId, address _currency, uint256 _askAmount, uint256 expiryTime) external; function getOrder(uint256 _orderId) external view returns (IUtils.Order memory); function cancelOrder(uint256 _orderId) external returns (bool); function completeOrder(uint256 _orderId) external returns (bool); /** * @notice Sets the Bid on a particular NFT. */ function addBid(address _nftContract, uint256 _tokenId, address _currency, uint256 _bidAmount, uint256 expiryTime) external; function getBid(uint256 _bidId) external view returns (IUtils.Bid memory); function cancelBid(uint256 _bidId) external returns (bool); function acceptBid(uint256 _bidId) external returns (bool); } //end of interface marketplace
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// 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 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 (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// 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.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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 be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @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. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// 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.6.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(uint160(account), 20), " 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. */ 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. */ 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`. */ 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. * * [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. */ 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. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"bidId","type":"uint256"},{"components":[{"internalType":"uint256","name":"bidId","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"bidAmount","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"enum IUtils.OrderStatus","name":"bidStatus","type":"uint8"},{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"}],"indexed":false,"internalType":"struct IUtils.Bid","name":"bid","type":"tuple"}],"name":"BidAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"bidId","type":"uint256"},{"components":[{"internalType":"uint256","name":"bidId","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"bidAmount","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"enum IUtils.OrderStatus","name":"bidStatus","type":"uint8"},{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"}],"indexed":false,"internalType":"struct IUtils.Bid","name":"bid","type":"tuple"}],"name":"BidAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"bidId","type":"uint256"},{"components":[{"internalType":"uint256","name":"bidId","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"bidAmount","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"enum IUtils.OrderStatus","name":"bidStatus","type":"uint8"},{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"}],"indexed":false,"internalType":"struct IUtils.Bid","name":"bid","type":"tuple"}],"name":"BidRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"commissionPercentage","type":"uint8"}],"name":"CommissionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"orderId","type":"uint256"},{"components":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"askAmount","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"enum IUtils.OrderStatus","name":"orderStatus","type":"uint8"},{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"}],"indexed":false,"internalType":"struct IUtils.Order","name":"order","type":"tuple"}],"name":"OrderCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"orderId","type":"uint256"},{"components":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"askAmount","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"enum IUtils.OrderStatus","name":"orderStatus","type":"uint8"},{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"}],"indexed":false,"internalType":"struct IUtils.Order","name":"order","type":"tuple"}],"name":"OrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"orderId","type":"uint256"},{"components":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"askAmount","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"enum IUtils.OrderStatus","name":"orderStatus","type":"uint8"},{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"}],"indexed":false,"internalType":"struct IUtils.Order","name":"order","type":"tuple"}],"name":"OrderRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_oldWallet","type":"address"},{"indexed":true,"internalType":"address","name":"_newAdminWallet","type":"address"}],"name":"UpdateAdminWallet","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_adminAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bidId","type":"uint256"}],"name":"acceptBid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_currency","type":"address"},{"internalType":"uint256","name":"_bidAmount","type":"uint256"},{"internalType":"uint256","name":"_expiryTime","type":"uint256"}],"name":"addBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedCurrency","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedNfts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bidId","type":"uint256"}],"name":"cancelBid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_orderId","type":"uint256"}],"name":"cancelOrder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_orderId","type":"uint256"}],"name":"completeOrder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bidId","type":"uint256"}],"name":"getBid","outputs":[{"components":[{"internalType":"uint256","name":"bidId","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"bidAmount","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"enum IUtils.OrderStatus","name":"bidStatus","type":"uint8"},{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"}],"internalType":"struct IUtils.Bid","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCommissionPercentage","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentBidId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentOrderId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_orderId","type":"uint256"}],"name":"getOrder","outputs":[{"components":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"askAmount","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"enum IUtils.OrderStatus","name":"orderStatus","type":"uint8"},{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"}],"internalType":"struct IUtils.Order","name":"","type":"tuple"}],"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":"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":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","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":"address","name":"_newAdminWallet","type":"address"}],"name":"setAdminAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_commissionPercentage","type":"uint8"}],"name":"setCommissionPercentage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_currency","type":"address"},{"internalType":"uint256","name":"_askAmount","type":"uint256"},{"internalType":"uint256","name":"_expiryTime","type":"uint256"}],"name":"setOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_pauseStatus","type":"bool"}],"name":"setPauseStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"_tokenAddress","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"updateCurrency","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"updateNFTContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405273abb590532a0fa89f0dab20f3c121712957a7976d600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506019600460146101000a81548160ff021916908360ff1602179055503480156200008257600080fd5b506000600160006101000a81548160ff021916908315150217905550620000c26000801b620000b6620000c860201b60201c565b620000d060201b60201c565b62000241565b600033905090565b620000e28282620000e660201b60201c565b5050565b620000f88282620001d760201b60201c565b620001d357600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555062000178620000c860201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b615ade80620002516000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80635c1cb691116100f9578063b996a65c11610097578063d09ef24111610071578063d09ef24114610542578063d547741f14610572578063dd3dff871461058e578063deaf25f5146105be576101a9565b8063b996a65c146104d8578063c1671e73146104f6578063c38bb53714610512576101a9565b80639703ef35116100d35780639703ef351461043c578063a217fddf1461046c578063a5dbd8141461048a578063b6adaaff146104a8576101a9565b80635c1cb691146103d05780635c975abb146103ee57806391d148541461040c576101a9565b80632f2ff15d1161016657806336568abe1161014057806336568abe146103365780633c889e6f14610352578063514fcac71461038257806352e9282a146103b2576101a9565b80632f2ff15d146102ba5780632ff3b115146102d65780633351199514610306576101a9565b806301ffc9a7146101ae57806315ae9d8a146101de57806316993ada146101fa578063248a9ca31461022a5780632b1fd58a1461025a5780632c1e816d1461028a575b600080fd5b6101c860048036038101906101c39190613cf7565b6105ee565b6040516101d59190613d3f565b60405180910390f35b6101f860048036038101906101f39190613dee565b610668565b005b610214600480360381019061020f9190613e95565b610c5a565b6040516102219190613d3f565b60405180910390f35b610244600480360381019061023f9190613f0b565b610d10565b6040516102519190613f47565b60405180910390f35b610274600480360381019061026f9190613f62565b610d2f565b6040516102819190613d3f565b60405180910390f35b6102a4600480360381019061029f9190613f8f565b611603565b6040516102b19190613d3f565b60405180910390f35b6102d460048036038101906102cf9190613fbc565b61178d565b005b6102f060048036038101906102eb9190613f8f565b6117ae565b6040516102fd9190613d3f565b60405180910390f35b610320600480360381019061031b9190613f8f565b6117ce565b60405161032d9190613d3f565b60405180910390f35b610350600480360381019061034b9190613fbc565b6117ee565b005b61036c60048036038101906103679190613f62565b611871565b6040516103799190614172565b60405180910390f35b61039c60048036038101906103979190613f62565b611a6e565b6040516103a99190613d3f565b60405180910390f35b6103ba611d03565b6040516103c7919061419d565b60405180910390f35b6103d8611d14565b6040516103e591906141c7565b60405180910390f35b6103f6611d3a565b6040516104039190613d3f565b60405180910390f35b61042660048036038101906104219190613fbc565b611d51565b6040516104339190613d3f565b60405180910390f35b61045660048036038101906104519190613f62565b611dbb565b6040516104639190613d3f565b60405180910390f35b610474612134565b6040516104819190613f47565b60405180910390f35b61049261213b565b60405161049f91906141fe565b60405180910390f35b6104c260048036038101906104bd9190613f62565b612152565b6040516104cf9190613d3f565b60405180910390f35b6104e0612763565b6040516104ed919061419d565b60405180910390f35b610510600480360381019061050b9190613dee565b612774565b005b61052c60048036038101906105279190614219565b612d77565b6040516105399190613d3f565b60405180910390f35b61055c60048036038101906105579190613f62565b612df1565b6040516105699190614327565b60405180910390f35b61058c60048036038101906105879190613fbc565b612fee565b005b6105a860048036038101906105a39190613e95565b61300f565b6040516105b59190613d3f565b60405180910390f35b6105d860048036038101906105d3919061436f565b6130c5565b6040516105e59190613d3f565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610661575061066082613184565b5b9050919050565b610670611d3a565b156106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a7906143f9565b60405180910390fd5b6106ba60026131ee565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610746576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073d90614465565b60405180910390fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166107d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c9906144f7565b60405180910390fd5b60008211610815576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080c90614563565b60405180910390fd5b428111610857576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084e906145cf565b60405180910390fd5b60008590503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16636352211e876040518263ffffffff1660e01b81526004016108ac919061419d565b602060405180830381865afa1580156108c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ed9190614604565b73ffffffffffffffffffffffffffffffffffffffff1614610943576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061467d565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1663e985e9c5610969613204565b306040518363ffffffff1660e01b815260040161098792919061469d565b602060405180830381865afa1580156109a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c891906146db565b905060008273ffffffffffffffffffffffffffffffffffffffff1663081812fc886040518263ffffffff1660e01b8152600401610a05919061419d565b602060405180830381865afa158015610a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a469190614604565b90508180610a7f57503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610abe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab59061477a565b60405180910390fd5b6000610aca600261320c565b90506000600560008381526020019081526020016000209050818160000181905550610af4613204565b8160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550868160020181905550878160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550898160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555088816005018190555085816006018190555060018160070160146101000a81548160ff02191690836004811115610bff57610bfe61401a565b5b0217905550428160080181905550428160090181905550817fd8b53b1c1a6fd85509c122902e4c474a73f266ee6986de091e7c464f815f4c0882604051610c46919061498b565b60405180910390a250505050505050505050565b6000610c706000801b610c6b613204565b611d51565b610caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca6906149f3565b60405180910390fd5b81600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b6000806000838152602001908152602001600020600101549050919050565b6000610d39611d3a565b15610d79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d70906143f9565b60405180910390fd5b6000600660008481526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610e23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1a90614a5f565b60405180910390fd5b60016004811115610e3757610e3661401a565b5b8160070160149054906101000a900460ff166004811115610e5b57610e5a61401a565b5b14610e9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9290614acb565b60405180910390fd5b8060060154421115610ee2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed990614b37565b60405180910390fd5b60008160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008260040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16636352211e85600501546040518263ffffffff1660e01b8152600401610f88919061419d565b602060405180830381865afa158015610fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc99190614604565b73ffffffffffffffffffffffffffffffffffffffff161461101f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110169061467d565b60405180910390fd5b82600201548273ffffffffffffffffffffffffffffffffffffffff166370a082318560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161108191906141c7565b602060405180830381865afa15801561109e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c29190614b6c565b1015611103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fa90614be5565b60405180910390fd5b82600201548273ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e8560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16306040518363ffffffff1660e01b815260040161116792919061469d565b602060405180830381865afa158015611184573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a89190614b6c565b10156111e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e090614c51565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1663e985e9c561120f613204565b306040518363ffffffff1660e01b815260040161122d92919061469d565b602060405180830381865afa15801561124a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126e91906146db565b905060008273ffffffffffffffffffffffffffffffffffffffff1663081812fc86600501546040518263ffffffff1660e01b81526004016112af919061419d565b602060405180830381865afa1580156112cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f09190614604565b9050818061132957503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135f9061477a565b60405180910390fd5b6000856002015490506000670de0b6b3a76400006103e86113899190614ca0565b670de0b6b3a7640000600460149054906101000a900460ff1660ff166113af9190614ca0565b836113ba9190614ca0565b6113c49190614d29565b9050600081836113d49190614d5a565b90508573ffffffffffffffffffffffffffffffffffffffff166323b872dd6113fa613204565b8a60010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b600501546040518463ffffffff1660e01b815260040161144293929190614d8e565b600060405180830381600087803b15801561145c57600080fd5b505af1158015611470573d6000803e3d6000fd5b505050506114e78860010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848a73ffffffffffffffffffffffffffffffffffffffff1661321a909392919063ffffffff16565b61153f8860010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611517613204565b838a73ffffffffffffffffffffffffffffffffffffffff1661321a909392919063ffffffff16565b60008860070160146101000a81548160ff021916908360048111156115675761156661401a565b5b0217905550611574613204565b8860070160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555087600001547f62e38e76981d22f0ad754376312096a86974b911d398c381a285faf34c8f3dee896040516115ea9190614f17565b60405180910390a2600198505050505050505050919050565b60006116196000801b611614613204565b611d51565b611658576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164f906149f3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036116c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116be90614fa5565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f06de0372582884f3d14e781830bd7a3722b8bbf83e9f61aef642e2c68f278a3060405160405180910390a381600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b61179682610d10565b61179f816132a3565b6117a983836132b7565b505050565b60076020528060005260406000206000915054906101000a900460ff1681565b60086020528060005260406000206000915054906101000a900460ff1681565b6117f6613204565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185a90615037565b60405180910390fd5b61186d8282613397565b5050565b611879613b12565b6006600083815260200190815260200160002060405180610160016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160058201548152602001600682015481526020016007820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016007820160149054906101000a900460ff166004811115611a3d57611a3c61401a565b5b6004811115611a4f57611a4e61401a565b5b8152602001600882015481526020016009820154815250509050919050565b6000611a78611d3a565b15611ab8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aaf906143f9565b60405180910390fd5b6000600560008481526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611b62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5990614a5f565b60405180910390fd5b60016004811115611b7657611b7561401a565b5b8160070160149054906101000a900460ff166004811115611b9a57611b9961401a565b5b14611bda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd1906150a3565b60405180910390fd5b6000611bf06000801b611beb613204565b611d51565b9050611bfa613204565b73ffffffffffffffffffffffffffffffffffffffff168260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611c545750805b611c93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c8a90615135565b60405180910390fd5b60028260070160146101000a81548160ff02191690836004811115611cbb57611cba61401a565b5b0217905550837f06f5abbc88e42a993340ecf91d2e34b612a89a6b46b63b975d1618e3e04a534083604051611cf0919061498b565b60405180910390a2600192505050919050565b6000611d0f600261320c565b905090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160009054906101000a900460ff16905090565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000611dc5611d3a565b15611e05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dfc906143f9565b60405180910390fd5b6000600660008481526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611eaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ea6906151a1565b60405180910390fd5b60016004811115611ec357611ec261401a565b5b8160070160149054906101000a900460ff166004811115611ee757611ee661401a565b5b14611f27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f1e90614acb565b60405180910390fd5b6000611f3d6000801b611f38613204565b611d51565b905060008260040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611f70613204565b73ffffffffffffffffffffffffffffffffffffffff168360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061207c5750611fd0613204565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16636352211e85600501546040518263ffffffff1660e01b8152600401612023919061419d565b602060405180830381865afa158015612040573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120649190614604565b73ffffffffffffffffffffffffffffffffffffffff16145b806120845750815b6120c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ba90615135565b60405180910390fd5b60028360070160146101000a81548160ff021916908360048111156120eb576120ea61401a565b5b0217905550847f55fcf0d9ac4757995e0ca159643db3c1a26b55050c6b1109ab2987b59907a10f846040516121209190614f17565b60405180910390a260019350505050919050565b6000801b81565b6000600460149054906101000a900460ff16905090565b600061215c611d3a565b1561219c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612193906143f9565b60405180910390fd5b6000600560008481526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603612246576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223d90614a5f565b60405180910390fd5b6001600481111561225a5761225961401a565b5b8160070160149054906101000a900460ff16600481111561227e5761227d61401a565b5b146122be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122b5906150a3565b60405180910390fd5b60008160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008260040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508260060154421115612357576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234e9061520d565b60405180910390fd5b82600201548273ffffffffffffffffffffffffffffffffffffffff166370a08231612380613204565b6040518263ffffffff1660e01b815260040161239c91906141c7565b602060405180830381865afa1580156123b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123dd9190614b6c565b101561241e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124159061529f565b60405180910390fd5b82600201548273ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e612447613204565b306040518363ffffffff1660e01b815260040161246592919061469d565b602060405180830381865afa158015612482573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a69190614b6c565b10156124e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124de90615331565b60405180910390fd5b6000836002015490506000670de0b6b3a76400006103e86125089190614ca0565b670de0b6b3a7640000600460149054906101000a900460ff1660ff1661252e9190614ca0565b836125399190614ca0565b6125439190614d29565b9050600081836125539190614d5a565b90506125ab612560613204565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848873ffffffffffffffffffffffffffffffffffffffff1661321a909392919063ffffffff16565b6126036125b6613204565b8760010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838873ffffffffffffffffffffffffffffffffffffffff1661321a909392919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8760010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661264c613204565b89600501546040518463ffffffff1660e01b815260040161266f93929190614d8e565b600060405180830381600087803b15801561268957600080fd5b505af115801561269d573d6000803e3d6000fd5b5050505060008660070160146101000a81548160ff021916908360048111156126c9576126c861401a565b5b02179055506126d6613204565b8660070160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085600001547fb7a6763b935108cabd10b6ed269dff8b9c28d2db9fec43233a7df469139591dc8760405161274c919061498b565b60405180910390a260019650505050505050919050565b600061276f600361320c565b905090565b61277c611d3a565b156127bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127b3906143f9565b60405180910390fd5b6127c660036131ee565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612852576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161284990614465565b60405180910390fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166128de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128d5906144f7565b60405180910390fd5b60008211612921576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129189061539d565b60405180910390fd5b428111612963576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161295a906145cf565b60405180910390fd5b60008590503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16636352211e876040518263ffffffff1660e01b81526004016129b8919061419d565b602060405180830381865afa1580156129d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129f99190614604565b73ffffffffffffffffffffffffffffffffffffffff1603612a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4690615409565b60405180910390fd5b6000849050838173ffffffffffffffffffffffffffffffffffffffff166370a08231612a79613204565b6040518263ffffffff1660e01b8152600401612a9591906141c7565b602060405180830381865afa158015612ab2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ad69190614b6c565b1015612b17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b0e9061549b565b60405180910390fd5b838173ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e612b3c613204565b306040518363ffffffff1660e01b8152600401612b5a92919061469d565b602060405180830381865afa158015612b77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b9b9190614b6c565b1015612bdc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bd39061552d565b60405180910390fd5b6000612be8600361320c565b90506000600660008381526020019081526020016000209050818160000181905550612c12613204565b8160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550858160020181905550868160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550888160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555087816005018190555084816006018190555060018160070160146101000a81548160ff02191690836004811115612d1d57612d1c61401a565b5b0217905550428160080181905550428160090181905550817f997fb33a8979cdf498fc89fc8e7940c671e8d350c134f66d896ab32963d9af7282604051612d649190614f17565b60405180910390a2505050505050505050565b6000612d8d6000801b612d88613204565b611d51565b612dcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dc3906149f3565b60405180910390fd5b8115612ddf57612dda613478565b612de8565b612de761351a565b5b60019050919050565b612df9613bd6565b6005600083815260200190815260200160002060405180610160016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160058201548152602001600682015481526020016007820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016007820160149054906101000a900460ff166004811115612fbd57612fbc61401a565b5b6004811115612fcf57612fce61401a565b5b8152602001600882015481526020016009820154815250509050919050565b612ff782610d10565b613000816132a3565b61300a8383613397565b505050565b60006130256000801b613020613204565b611d51565b613064576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161305b906149f3565b60405180910390fd5b81600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b60006130db6000801b6130d6613204565b611d51565b61311a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613111906149f3565b60405180910390fd5b81600460146101000a81548160ff021916908360ff1602179055507f4efba83883126fe608cbfdb56958cc0a1ff6fe60e94a6ffa8171cca407c607f1600460149054906101000a900460ff1660405161317391906141fe565b60405180910390a160019050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6001816000016000828254019250508190555050565b600033905090565b600081600001549050919050565b61329d846323b872dd60e01b85858560405160240161323b93929190614d8e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506135bc565b50505050565b6132b4816132af613204565b613683565b50565b6132c18282611d51565b61339357600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550613338613204565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6133a18282611d51565b1561347457600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550613419613204565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b613480611d3a565b156134c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134b7906143f9565b60405180910390fd5b60018060006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613503613204565b60405161351091906141c7565b60405180910390a1565b613522611d3a565b613561576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161355890615599565b60405180910390fd5b6000600160006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6135a5613204565b6040516135b291906141c7565b60405180910390a1565b600061361e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166137209092919063ffffffff16565b905060008151111561367e578080602001905181019061363e91906146db565b61367d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136749061562b565b60405180910390fd5b5b505050565b61368d8282611d51565b61371c576136b28173ffffffffffffffffffffffffffffffffffffffff166014613738565b6136c08360001c6020613738565b6040516020016136d192919061575d565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161371391906157e1565b60405180910390fd5b5050565b606061372f8484600085613974565b90509392505050565b60606000600283600261374b9190614ca0565b6137559190615803565b67ffffffffffffffff81111561376e5761376d615859565b5b6040519080825280601f01601f1916602001820160405280156137a05781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106137d8576137d7615888565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061383c5761383b615888565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000600184600261387c9190614ca0565b6138869190615803565b90505b6001811115613926577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106138c8576138c7615888565b5b1a60f81b8282815181106138df576138de615888565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061391f906158b7565b9050613889565b506000841461396a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139619061592c565b60405180910390fd5b8091505092915050565b6060824710156139b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139b0906159be565b60405180910390fd5b6139c285613a88565b613a01576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139f890615a2a565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051613a2a9190615a91565b60006040518083038185875af1925050503d8060008114613a67576040519150601f19603f3d011682016040523d82523d6000602084013e613a6c565b606091505b5091509150613a7c828286613aab565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315613abb57829050613b0b565b600083511115613ace5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b0291906157e1565b60405180910390fd5b9392505050565b60405180610160016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160006004811115613bc257613bc161401a565b5b815260200160008152602001600081525090565b60405180610160016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160006004811115613c8657613c8561401a565b5b815260200160008152602001600081525090565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613cd481613c9f565b8114613cdf57600080fd5b50565b600081359050613cf181613ccb565b92915050565b600060208284031215613d0d57613d0c613c9a565b5b6000613d1b84828501613ce2565b91505092915050565b60008115159050919050565b613d3981613d24565b82525050565b6000602082019050613d546000830184613d30565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613d8582613d5a565b9050919050565b613d9581613d7a565b8114613da057600080fd5b50565b600081359050613db281613d8c565b92915050565b6000819050919050565b613dcb81613db8565b8114613dd657600080fd5b50565b600081359050613de881613dc2565b92915050565b600080600080600060a08688031215613e0a57613e09613c9a565b5b6000613e1888828901613da3565b9550506020613e2988828901613dd9565b9450506040613e3a88828901613da3565b9350506060613e4b88828901613dd9565b9250506080613e5c88828901613dd9565b9150509295509295909350565b613e7281613d24565b8114613e7d57600080fd5b50565b600081359050613e8f81613e69565b92915050565b60008060408385031215613eac57613eab613c9a565b5b6000613eba85828601613da3565b9250506020613ecb85828601613e80565b9150509250929050565b6000819050919050565b613ee881613ed5565b8114613ef357600080fd5b50565b600081359050613f0581613edf565b92915050565b600060208284031215613f2157613f20613c9a565b5b6000613f2f84828501613ef6565b91505092915050565b613f4181613ed5565b82525050565b6000602082019050613f5c6000830184613f38565b92915050565b600060208284031215613f7857613f77613c9a565b5b6000613f8684828501613dd9565b91505092915050565b600060208284031215613fa557613fa4613c9a565b5b6000613fb384828501613da3565b91505092915050565b60008060408385031215613fd357613fd2613c9a565b5b6000613fe185828601613ef6565b9250506020613ff285828601613da3565b9150509250929050565b61400581613db8565b82525050565b61401481613d7a565b82525050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6005811061405a5761405961401a565b5b50565b600081905061406b82614049565b919050565b600061407b8261405d565b9050919050565b61408b81614070565b82525050565b610160820160008201516140a86000850182613ffc565b5060208201516140bb602085018261400b565b5060408201516140ce6040850182613ffc565b5060608201516140e1606085018261400b565b5060808201516140f4608085018261400b565b5060a082015161410760a0850182613ffc565b5060c082015161411a60c0850182613ffc565b5060e082015161412d60e085018261400b565b50610100820151614142610100850182614082565b50610120820151614157610120850182613ffc565b5061014082015161416c610140850182613ffc565b50505050565b6000610160820190506141886000830184614091565b92915050565b61419781613db8565b82525050565b60006020820190506141b2600083018461418e565b92915050565b6141c181613d7a565b82525050565b60006020820190506141dc60008301846141b8565b92915050565b600060ff82169050919050565b6141f8816141e2565b82525050565b600060208201905061421360008301846141ef565b92915050565b60006020828403121561422f5761422e613c9a565b5b600061423d84828501613e80565b91505092915050565b6101608201600082015161425d6000850182613ffc565b506020820151614270602085018261400b565b5060408201516142836040850182613ffc565b506060820151614296606085018261400b565b5060808201516142a9608085018261400b565b5060a08201516142bc60a0850182613ffc565b5060c08201516142cf60c0850182613ffc565b5060e08201516142e260e085018261400b565b506101008201516142f7610100850182614082565b5061012082015161430c610120850182613ffc565b50610140820151614321610140850182613ffc565b50505050565b60006101608201905061433d6000830184614246565b92915050565b61434c816141e2565b811461435757600080fd5b50565b60008135905061436981614343565b92915050565b60006020828403121561438557614384613c9a565b5b60006143938482850161435a565b91505092915050565b600082825260208201905092915050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b60006143e360108361439c565b91506143ee826143ad565b602082019050919050565b60006020820190508181036000830152614412816143d6565b9050919050565b7f4e4654206973206e6f7420617070726f7665642062792061646d696e00000000600082015250565b600061444f601c8361439c565b915061445a82614419565b602082019050919050565b6000602082019050818103600083015261447e81614442565b9050919050565b7f43757272656e6379206973206e6f7420617070726f7665642062792061646d6960008201527f6e00000000000000000000000000000000000000000000000000000000000000602082015250565b60006144e160218361439c565b91506144ec82614485565b604082019050919050565b60006020820190508181036000830152614510816144d4565b9050919050565b7f41736b20416d6f756e742043616e6e6f74206265205a65726f00000000000000600082015250565b600061454d60198361439c565b915061455882614517565b602082019050919050565b6000602082019050818103600083015261457c81614540565b9050919050565b7f4578706972792054696d652063616e6e6f7420626520696e2050617374000000600082015250565b60006145b9601d8361439c565b91506145c482614583565b602082019050919050565b600060208201905081810360008301526145e8816145ac565b9050919050565b6000815190506145fe81613d8c565b92915050565b60006020828403121561461a57614619613c9a565b5b6000614628848285016145ef565b91505092915050565b7f596f7520617265206e6f74206f776e6572206f6620546f6b656e204964000000600082015250565b6000614667601d8361439c565b915061467282614631565b602082019050919050565b600060208201905081810360008301526146968161465a565b9050919050565b60006040820190506146b260008301856141b8565b6146bf60208301846141b8565b9392505050565b6000815190506146d581613e69565b92915050565b6000602082840312156146f1576146f0613c9a565b5b60006146ff848285016146c6565b91505092915050565b7f4d61726b657420436f6e7472616374206973206e6f7420616c6c6f776564207460008201527f6f206d616e616765207468697320546f6b656e20494400000000000000000000602082015250565b600061476460368361439c565b915061476f82614708565b604082019050919050565b6000602082019050818103600083015261479381614757565b9050919050565b60008160001c9050919050565b6000819050919050565b60006147c46147bf8361479a565b6147a7565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006147fe6147f98361479a565b6147cb565b9050919050565b60008160a01c9050919050565b600060ff82169050919050565b600061483261482d83614805565b614812565b9050919050565b6101608201600080830154905061484f816147b1565b61485c6000860182613ffc565b506001830154905061486d816147eb565b61487a602086018261400b565b506002830154905061488b816147b1565b6148986040860182613ffc565b50600383015490506148a9816147eb565b6148b6606086018261400b565b50600483015490506148c7816147eb565b6148d4608086018261400b565b50600583015490506148e5816147b1565b6148f260a0860182613ffc565b5060068301549050614903816147b1565b61491060c0860182613ffc565b5060078301549050614921816147eb565b61492e60e086018261400b565b506149388161481f565b614946610100860182614082565b5060088301549050614957816147b1565b614965610120860182613ffc565b5060098301549050614976816147b1565b614984610140860182613ffc565b5050505050565b6000610160820190506149a16000830184614839565b92915050565b7f43616c6c6572206973206e6f7420612061646d696e0000000000000000000000600082015250565b60006149dd60158361439c565b91506149e8826149a7565b602082019050919050565b60006020820190508181036000830152614a0c816149d0565b9050919050565b7f496e76616c6964204f7264657220496400000000000000000000000000000000600082015250565b6000614a4960108361439c565b9150614a5482614a13565b602082019050919050565b60006020820190508181036000830152614a7881614a3c565b9050919050565b7f42696420737461747573206973206e6f74204f70656e00000000000000000000600082015250565b6000614ab560168361439c565b9150614ac082614a7f565b602082019050919050565b60006020820190508181036000830152614ae481614aa8565b9050919050565b7f4269642069732065787069726564000000000000000000000000000000000000600082015250565b6000614b21600e8361439c565b9150614b2c82614aeb565b602082019050919050565b60006020820190508181036000830152614b5081614b14565b9050919050565b600081519050614b6681613dc2565b92915050565b600060208284031215614b8257614b81613c9a565b5b6000614b9084828501614b57565b91505092915050565b7f42696464657220646f6e2774206861766520456e6f7567682046756e64730000600082015250565b6000614bcf601e8361439c565b9150614bda82614b99565b602082019050919050565b60006020820190508181036000830152614bfe81614bc2565b9050919050565b7f42696464657220686173206e6f7420417070726f76656420546f6b656e730000600082015250565b6000614c3b601e8361439c565b9150614c4682614c05565b602082019050919050565b60006020820190508181036000830152614c6a81614c2e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614cab82613db8565b9150614cb683613db8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614cef57614cee614c71565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000614d3482613db8565b9150614d3f83613db8565b925082614d4f57614d4e614cfa565b5b828204905092915050565b6000614d6582613db8565b9150614d7083613db8565b925082821015614d8357614d82614c71565b5b828203905092915050565b6000606082019050614da360008301866141b8565b614db060208301856141b8565b614dbd604083018461418e565b949350505050565b61016082016000808301549050614ddb816147b1565b614de86000860182613ffc565b5060018301549050614df9816147eb565b614e06602086018261400b565b5060028301549050614e17816147b1565b614e246040860182613ffc565b5060038301549050614e35816147eb565b614e42606086018261400b565b5060048301549050614e53816147eb565b614e60608086018261400b565b5060058301549050614e71816147b1565b614e7e60a0860182613ffc565b5060068301549050614e8f816147b1565b614e9c60c0860182613ffc565b5060078301549050614ead816147eb565b614eba60e086018261400b565b50614ec48161481f565b614ed2610100860182614082565b5060088301549050614ee3816147b1565b614ef1610120860182613ffc565b5060098301549050614f02816147b1565b614f10610140860182613ffc565b5050505050565b600061016082019050614f2d6000830184614dc5565b92915050565b7f41646d696e2057616c6c65742063616e6e6f7420626520656d7074792061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000614f8f60248361439c565b9150614f9a82614f33565b604082019050919050565b60006020820190508181036000830152614fbe81614f82565b9050919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000615021602f8361439c565b915061502c82614fc5565b604082019050919050565b6000602082019050818103600083015261505081615014565b9050919050565b7f4f7264657220737461747573206973206e6f74204f70656e0000000000000000600082015250565b600061508d60188361439c565b915061509882615057565b602082019050919050565b600060208201905081810360008301526150bc81615080565b9050919050565b7f596f7520446f6e2774206861766520726967687420746f2063616e63656c206f60008201527f7264657200000000000000000000000000000000000000000000000000000000602082015250565b600061511f60248361439c565b915061512a826150c3565b604082019050919050565b6000602082019050818103600083015261514e81615112565b9050919050565b7f496e76616c696420426964204964000000000000000000000000000000000000600082015250565b600061518b600e8361439c565b915061519682615155565b602082019050919050565b600060208201905081810360008301526151ba8161517e565b9050919050565b7f4f72646572206973206578706972656400000000000000000000000000000000600082015250565b60006151f760108361439c565b9150615202826151c1565b602082019050919050565b60006020820190508181036000830152615226816151ea565b9050919050565b7f4e6f7420656e6f7567682066756e647320617661696c61626c6520746f20627560008201527f7900000000000000000000000000000000000000000000000000000000000000602082015250565b600061528960218361439c565b91506152948261522d565b604082019050919050565b600060208201905081810360008301526152b88161527c565b9050919050565b7f506c6561736520417070726f766520546f6b656e73204265666f726520596f7560008201527f2042757900000000000000000000000000000000000000000000000000000000602082015250565b600061531b60248361439c565b9150615326826152bf565b604082019050919050565b6000602082019050818103600083015261534a8161530e565b9050919050565b7f42696420416d6f756e742043616e6e6f74206265205a65726f00000000000000600082015250565b600061538760198361439c565b915061539282615351565b602082019050919050565b600060208201905081810360008301526153b68161537a565b9050919050565b7f596f752043616e277420426964206f6e20796f7572204f776e20546f6b656e00600082015250565b60006153f3601f8361439c565b91506153fe826153bd565b602082019050919050565b60006020820190508181036000830152615422816153e6565b9050919050565b7f4e6f7420656e6f7567682066756e647320617661696c61626c6520746f20616460008201527f6420626964000000000000000000000000000000000000000000000000000000602082015250565b600061548560258361439c565b915061549082615429565b604082019050919050565b600060208201905081810360008301526154b481615478565b9050919050565b7f506c6561736520417070726f766520546f6b656e73204265666f726520596f7560008201527f2042696400000000000000000000000000000000000000000000000000000000602082015250565b600061551760248361439c565b9150615522826154bb565b604082019050919050565b600060208201905081810360008301526155468161550a565b9050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b600061558360148361439c565b915061558e8261554d565b602082019050919050565b600060208201905081810360008301526155b281615576565b9050919050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000615615602a8361439c565b9150615620826155b9565b604082019050919050565b6000602082019050818103600083015261564481615608565b9050919050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b600061568c60178361564b565b915061569782615656565b601782019050919050565b600081519050919050565b60005b838110156156cb5780820151818401526020810190506156b0565b838111156156da576000848401525b50505050565b60006156eb826156a2565b6156f5818561564b565b93506157058185602086016156ad565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b600061574760118361564b565b915061575282615711565b601182019050919050565b60006157688261567f565b915061577482856156e0565b915061577f8261573a565b915061578b82846156e0565b91508190509392505050565b6000601f19601f8301169050919050565b60006157b3826156a2565b6157bd818561439c565b93506157cd8185602086016156ad565b6157d681615797565b840191505092915050565b600060208201905081810360008301526157fb81846157a8565b905092915050565b600061580e82613db8565b915061581983613db8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561584e5761584d614c71565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006158c282613db8565b9150600082036158d5576158d4614c71565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b600061591660208361439c565b9150615921826158e0565b602082019050919050565b6000602082019050818103600083015261594581615909565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006159a860268361439c565b91506159b38261594c565b604082019050919050565b600060208201905081810360008301526159d78161599b565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000615a14601d8361439c565b9150615a1f826159de565b602082019050919050565b60006020820190508181036000830152615a4381615a07565b9050919050565b600081519050919050565b600081905092915050565b6000615a6b82615a4a565b615a758185615a55565b9350615a858185602086016156ad565b80840191505092915050565b6000615a9d8284615a60565b91508190509291505056fea2646970667358221220e403b55bdda65acc650cfa292c952e20ee7bb364a9322728cf07377449b91d6364736f6c634300080f0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80635c1cb691116100f9578063b996a65c11610097578063d09ef24111610071578063d09ef24114610542578063d547741f14610572578063dd3dff871461058e578063deaf25f5146105be576101a9565b8063b996a65c146104d8578063c1671e73146104f6578063c38bb53714610512576101a9565b80639703ef35116100d35780639703ef351461043c578063a217fddf1461046c578063a5dbd8141461048a578063b6adaaff146104a8576101a9565b80635c1cb691146103d05780635c975abb146103ee57806391d148541461040c576101a9565b80632f2ff15d1161016657806336568abe1161014057806336568abe146103365780633c889e6f14610352578063514fcac71461038257806352e9282a146103b2576101a9565b80632f2ff15d146102ba5780632ff3b115146102d65780633351199514610306576101a9565b806301ffc9a7146101ae57806315ae9d8a146101de57806316993ada146101fa578063248a9ca31461022a5780632b1fd58a1461025a5780632c1e816d1461028a575b600080fd5b6101c860048036038101906101c39190613cf7565b6105ee565b6040516101d59190613d3f565b60405180910390f35b6101f860048036038101906101f39190613dee565b610668565b005b610214600480360381019061020f9190613e95565b610c5a565b6040516102219190613d3f565b60405180910390f35b610244600480360381019061023f9190613f0b565b610d10565b6040516102519190613f47565b60405180910390f35b610274600480360381019061026f9190613f62565b610d2f565b6040516102819190613d3f565b60405180910390f35b6102a4600480360381019061029f9190613f8f565b611603565b6040516102b19190613d3f565b60405180910390f35b6102d460048036038101906102cf9190613fbc565b61178d565b005b6102f060048036038101906102eb9190613f8f565b6117ae565b6040516102fd9190613d3f565b60405180910390f35b610320600480360381019061031b9190613f8f565b6117ce565b60405161032d9190613d3f565b60405180910390f35b610350600480360381019061034b9190613fbc565b6117ee565b005b61036c60048036038101906103679190613f62565b611871565b6040516103799190614172565b60405180910390f35b61039c60048036038101906103979190613f62565b611a6e565b6040516103a99190613d3f565b60405180910390f35b6103ba611d03565b6040516103c7919061419d565b60405180910390f35b6103d8611d14565b6040516103e591906141c7565b60405180910390f35b6103f6611d3a565b6040516104039190613d3f565b60405180910390f35b61042660048036038101906104219190613fbc565b611d51565b6040516104339190613d3f565b60405180910390f35b61045660048036038101906104519190613f62565b611dbb565b6040516104639190613d3f565b60405180910390f35b610474612134565b6040516104819190613f47565b60405180910390f35b61049261213b565b60405161049f91906141fe565b60405180910390f35b6104c260048036038101906104bd9190613f62565b612152565b6040516104cf9190613d3f565b60405180910390f35b6104e0612763565b6040516104ed919061419d565b60405180910390f35b610510600480360381019061050b9190613dee565b612774565b005b61052c60048036038101906105279190614219565b612d77565b6040516105399190613d3f565b60405180910390f35b61055c60048036038101906105579190613f62565b612df1565b6040516105699190614327565b60405180910390f35b61058c60048036038101906105879190613fbc565b612fee565b005b6105a860048036038101906105a39190613e95565b61300f565b6040516105b59190613d3f565b60405180910390f35b6105d860048036038101906105d3919061436f565b6130c5565b6040516105e59190613d3f565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610661575061066082613184565b5b9050919050565b610670611d3a565b156106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a7906143f9565b60405180910390fd5b6106ba60026131ee565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610746576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073d90614465565b60405180910390fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166107d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c9906144f7565b60405180910390fd5b60008211610815576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080c90614563565b60405180910390fd5b428111610857576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084e906145cf565b60405180910390fd5b60008590503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16636352211e876040518263ffffffff1660e01b81526004016108ac919061419d565b602060405180830381865afa1580156108c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ed9190614604565b73ffffffffffffffffffffffffffffffffffffffff1614610943576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061467d565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1663e985e9c5610969613204565b306040518363ffffffff1660e01b815260040161098792919061469d565b602060405180830381865afa1580156109a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c891906146db565b905060008273ffffffffffffffffffffffffffffffffffffffff1663081812fc886040518263ffffffff1660e01b8152600401610a05919061419d565b602060405180830381865afa158015610a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a469190614604565b90508180610a7f57503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610abe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab59061477a565b60405180910390fd5b6000610aca600261320c565b90506000600560008381526020019081526020016000209050818160000181905550610af4613204565b8160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550868160020181905550878160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550898160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555088816005018190555085816006018190555060018160070160146101000a81548160ff02191690836004811115610bff57610bfe61401a565b5b0217905550428160080181905550428160090181905550817fd8b53b1c1a6fd85509c122902e4c474a73f266ee6986de091e7c464f815f4c0882604051610c46919061498b565b60405180910390a250505050505050505050565b6000610c706000801b610c6b613204565b611d51565b610caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca6906149f3565b60405180910390fd5b81600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b6000806000838152602001908152602001600020600101549050919050565b6000610d39611d3a565b15610d79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d70906143f9565b60405180910390fd5b6000600660008481526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610e23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1a90614a5f565b60405180910390fd5b60016004811115610e3757610e3661401a565b5b8160070160149054906101000a900460ff166004811115610e5b57610e5a61401a565b5b14610e9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9290614acb565b60405180910390fd5b8060060154421115610ee2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed990614b37565b60405180910390fd5b60008160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008260040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16636352211e85600501546040518263ffffffff1660e01b8152600401610f88919061419d565b602060405180830381865afa158015610fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc99190614604565b73ffffffffffffffffffffffffffffffffffffffff161461101f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110169061467d565b60405180910390fd5b82600201548273ffffffffffffffffffffffffffffffffffffffff166370a082318560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161108191906141c7565b602060405180830381865afa15801561109e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c29190614b6c565b1015611103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fa90614be5565b60405180910390fd5b82600201548273ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e8560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16306040518363ffffffff1660e01b815260040161116792919061469d565b602060405180830381865afa158015611184573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a89190614b6c565b10156111e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e090614c51565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1663e985e9c561120f613204565b306040518363ffffffff1660e01b815260040161122d92919061469d565b602060405180830381865afa15801561124a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126e91906146db565b905060008273ffffffffffffffffffffffffffffffffffffffff1663081812fc86600501546040518263ffffffff1660e01b81526004016112af919061419d565b602060405180830381865afa1580156112cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f09190614604565b9050818061132957503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135f9061477a565b60405180910390fd5b6000856002015490506000670de0b6b3a76400006103e86113899190614ca0565b670de0b6b3a7640000600460149054906101000a900460ff1660ff166113af9190614ca0565b836113ba9190614ca0565b6113c49190614d29565b9050600081836113d49190614d5a565b90508573ffffffffffffffffffffffffffffffffffffffff166323b872dd6113fa613204565b8a60010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b600501546040518463ffffffff1660e01b815260040161144293929190614d8e565b600060405180830381600087803b15801561145c57600080fd5b505af1158015611470573d6000803e3d6000fd5b505050506114e78860010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848a73ffffffffffffffffffffffffffffffffffffffff1661321a909392919063ffffffff16565b61153f8860010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611517613204565b838a73ffffffffffffffffffffffffffffffffffffffff1661321a909392919063ffffffff16565b60008860070160146101000a81548160ff021916908360048111156115675761156661401a565b5b0217905550611574613204565b8860070160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555087600001547f62e38e76981d22f0ad754376312096a86974b911d398c381a285faf34c8f3dee896040516115ea9190614f17565b60405180910390a2600198505050505050505050919050565b60006116196000801b611614613204565b611d51565b611658576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164f906149f3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036116c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116be90614fa5565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f06de0372582884f3d14e781830bd7a3722b8bbf83e9f61aef642e2c68f278a3060405160405180910390a381600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b61179682610d10565b61179f816132a3565b6117a983836132b7565b505050565b60076020528060005260406000206000915054906101000a900460ff1681565b60086020528060005260406000206000915054906101000a900460ff1681565b6117f6613204565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185a90615037565b60405180910390fd5b61186d8282613397565b5050565b611879613b12565b6006600083815260200190815260200160002060405180610160016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160058201548152602001600682015481526020016007820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016007820160149054906101000a900460ff166004811115611a3d57611a3c61401a565b5b6004811115611a4f57611a4e61401a565b5b8152602001600882015481526020016009820154815250509050919050565b6000611a78611d3a565b15611ab8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aaf906143f9565b60405180910390fd5b6000600560008481526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611b62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5990614a5f565b60405180910390fd5b60016004811115611b7657611b7561401a565b5b8160070160149054906101000a900460ff166004811115611b9a57611b9961401a565b5b14611bda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd1906150a3565b60405180910390fd5b6000611bf06000801b611beb613204565b611d51565b9050611bfa613204565b73ffffffffffffffffffffffffffffffffffffffff168260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611c545750805b611c93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c8a90615135565b60405180910390fd5b60028260070160146101000a81548160ff02191690836004811115611cbb57611cba61401a565b5b0217905550837f06f5abbc88e42a993340ecf91d2e34b612a89a6b46b63b975d1618e3e04a534083604051611cf0919061498b565b60405180910390a2600192505050919050565b6000611d0f600261320c565b905090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160009054906101000a900460ff16905090565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000611dc5611d3a565b15611e05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dfc906143f9565b60405180910390fd5b6000600660008481526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611eaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ea6906151a1565b60405180910390fd5b60016004811115611ec357611ec261401a565b5b8160070160149054906101000a900460ff166004811115611ee757611ee661401a565b5b14611f27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f1e90614acb565b60405180910390fd5b6000611f3d6000801b611f38613204565b611d51565b905060008260040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611f70613204565b73ffffffffffffffffffffffffffffffffffffffff168360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061207c5750611fd0613204565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16636352211e85600501546040518263ffffffff1660e01b8152600401612023919061419d565b602060405180830381865afa158015612040573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120649190614604565b73ffffffffffffffffffffffffffffffffffffffff16145b806120845750815b6120c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ba90615135565b60405180910390fd5b60028360070160146101000a81548160ff021916908360048111156120eb576120ea61401a565b5b0217905550847f55fcf0d9ac4757995e0ca159643db3c1a26b55050c6b1109ab2987b59907a10f846040516121209190614f17565b60405180910390a260019350505050919050565b6000801b81565b6000600460149054906101000a900460ff16905090565b600061215c611d3a565b1561219c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612193906143f9565b60405180910390fd5b6000600560008481526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603612246576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223d90614a5f565b60405180910390fd5b6001600481111561225a5761225961401a565b5b8160070160149054906101000a900460ff16600481111561227e5761227d61401a565b5b146122be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122b5906150a3565b60405180910390fd5b60008160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008260040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508260060154421115612357576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234e9061520d565b60405180910390fd5b82600201548273ffffffffffffffffffffffffffffffffffffffff166370a08231612380613204565b6040518263ffffffff1660e01b815260040161239c91906141c7565b602060405180830381865afa1580156123b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123dd9190614b6c565b101561241e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124159061529f565b60405180910390fd5b82600201548273ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e612447613204565b306040518363ffffffff1660e01b815260040161246592919061469d565b602060405180830381865afa158015612482573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a69190614b6c565b10156124e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124de90615331565b60405180910390fd5b6000836002015490506000670de0b6b3a76400006103e86125089190614ca0565b670de0b6b3a7640000600460149054906101000a900460ff1660ff1661252e9190614ca0565b836125399190614ca0565b6125439190614d29565b9050600081836125539190614d5a565b90506125ab612560613204565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848873ffffffffffffffffffffffffffffffffffffffff1661321a909392919063ffffffff16565b6126036125b6613204565b8760010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838873ffffffffffffffffffffffffffffffffffffffff1661321a909392919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8760010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661264c613204565b89600501546040518463ffffffff1660e01b815260040161266f93929190614d8e565b600060405180830381600087803b15801561268957600080fd5b505af115801561269d573d6000803e3d6000fd5b5050505060008660070160146101000a81548160ff021916908360048111156126c9576126c861401a565b5b02179055506126d6613204565b8660070160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085600001547fb7a6763b935108cabd10b6ed269dff8b9c28d2db9fec43233a7df469139591dc8760405161274c919061498b565b60405180910390a260019650505050505050919050565b600061276f600361320c565b905090565b61277c611d3a565b156127bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127b3906143f9565b60405180910390fd5b6127c660036131ee565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612852576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161284990614465565b60405180910390fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166128de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128d5906144f7565b60405180910390fd5b60008211612921576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129189061539d565b60405180910390fd5b428111612963576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161295a906145cf565b60405180910390fd5b60008590503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16636352211e876040518263ffffffff1660e01b81526004016129b8919061419d565b602060405180830381865afa1580156129d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129f99190614604565b73ffffffffffffffffffffffffffffffffffffffff1603612a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4690615409565b60405180910390fd5b6000849050838173ffffffffffffffffffffffffffffffffffffffff166370a08231612a79613204565b6040518263ffffffff1660e01b8152600401612a9591906141c7565b602060405180830381865afa158015612ab2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ad69190614b6c565b1015612b17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b0e9061549b565b60405180910390fd5b838173ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e612b3c613204565b306040518363ffffffff1660e01b8152600401612b5a92919061469d565b602060405180830381865afa158015612b77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b9b9190614b6c565b1015612bdc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bd39061552d565b60405180910390fd5b6000612be8600361320c565b90506000600660008381526020019081526020016000209050818160000181905550612c12613204565b8160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550858160020181905550868160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550888160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555087816005018190555084816006018190555060018160070160146101000a81548160ff02191690836004811115612d1d57612d1c61401a565b5b0217905550428160080181905550428160090181905550817f997fb33a8979cdf498fc89fc8e7940c671e8d350c134f66d896ab32963d9af7282604051612d649190614f17565b60405180910390a2505050505050505050565b6000612d8d6000801b612d88613204565b611d51565b612dcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dc3906149f3565b60405180910390fd5b8115612ddf57612dda613478565b612de8565b612de761351a565b5b60019050919050565b612df9613bd6565b6005600083815260200190815260200160002060405180610160016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160058201548152602001600682015481526020016007820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016007820160149054906101000a900460ff166004811115612fbd57612fbc61401a565b5b6004811115612fcf57612fce61401a565b5b8152602001600882015481526020016009820154815250509050919050565b612ff782610d10565b613000816132a3565b61300a8383613397565b505050565b60006130256000801b613020613204565b611d51565b613064576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161305b906149f3565b60405180910390fd5b81600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b60006130db6000801b6130d6613204565b611d51565b61311a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613111906149f3565b60405180910390fd5b81600460146101000a81548160ff021916908360ff1602179055507f4efba83883126fe608cbfdb56958cc0a1ff6fe60e94a6ffa8171cca407c607f1600460149054906101000a900460ff1660405161317391906141fe565b60405180910390a160019050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6001816000016000828254019250508190555050565b600033905090565b600081600001549050919050565b61329d846323b872dd60e01b85858560405160240161323b93929190614d8e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506135bc565b50505050565b6132b4816132af613204565b613683565b50565b6132c18282611d51565b61339357600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550613338613204565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6133a18282611d51565b1561347457600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550613419613204565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b613480611d3a565b156134c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134b7906143f9565b60405180910390fd5b60018060006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613503613204565b60405161351091906141c7565b60405180910390a1565b613522611d3a565b613561576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161355890615599565b60405180910390fd5b6000600160006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6135a5613204565b6040516135b291906141c7565b60405180910390a1565b600061361e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166137209092919063ffffffff16565b905060008151111561367e578080602001905181019061363e91906146db565b61367d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136749061562b565b60405180910390fd5b5b505050565b61368d8282611d51565b61371c576136b28173ffffffffffffffffffffffffffffffffffffffff166014613738565b6136c08360001c6020613738565b6040516020016136d192919061575d565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161371391906157e1565b60405180910390fd5b5050565b606061372f8484600085613974565b90509392505050565b60606000600283600261374b9190614ca0565b6137559190615803565b67ffffffffffffffff81111561376e5761376d615859565b5b6040519080825280601f01601f1916602001820160405280156137a05781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106137d8576137d7615888565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061383c5761383b615888565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000600184600261387c9190614ca0565b6138869190615803565b90505b6001811115613926577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106138c8576138c7615888565b5b1a60f81b8282815181106138df576138de615888565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061391f906158b7565b9050613889565b506000841461396a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139619061592c565b60405180910390fd5b8091505092915050565b6060824710156139b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139b0906159be565b60405180910390fd5b6139c285613a88565b613a01576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139f890615a2a565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051613a2a9190615a91565b60006040518083038185875af1925050503d8060008114613a67576040519150601f19603f3d011682016040523d82523d6000602084013e613a6c565b606091505b5091509150613a7c828286613aab565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315613abb57829050613b0b565b600083511115613ace5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b0291906157e1565b60405180910390fd5b9392505050565b60405180610160016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160006004811115613bc257613bc161401a565b5b815260200160008152602001600081525090565b60405180610160016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160006004811115613c8657613c8561401a565b5b815260200160008152602001600081525090565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613cd481613c9f565b8114613cdf57600080fd5b50565b600081359050613cf181613ccb565b92915050565b600060208284031215613d0d57613d0c613c9a565b5b6000613d1b84828501613ce2565b91505092915050565b60008115159050919050565b613d3981613d24565b82525050565b6000602082019050613d546000830184613d30565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613d8582613d5a565b9050919050565b613d9581613d7a565b8114613da057600080fd5b50565b600081359050613db281613d8c565b92915050565b6000819050919050565b613dcb81613db8565b8114613dd657600080fd5b50565b600081359050613de881613dc2565b92915050565b600080600080600060a08688031215613e0a57613e09613c9a565b5b6000613e1888828901613da3565b9550506020613e2988828901613dd9565b9450506040613e3a88828901613da3565b9350506060613e4b88828901613dd9565b9250506080613e5c88828901613dd9565b9150509295509295909350565b613e7281613d24565b8114613e7d57600080fd5b50565b600081359050613e8f81613e69565b92915050565b60008060408385031215613eac57613eab613c9a565b5b6000613eba85828601613da3565b9250506020613ecb85828601613e80565b9150509250929050565b6000819050919050565b613ee881613ed5565b8114613ef357600080fd5b50565b600081359050613f0581613edf565b92915050565b600060208284031215613f2157613f20613c9a565b5b6000613f2f84828501613ef6565b91505092915050565b613f4181613ed5565b82525050565b6000602082019050613f5c6000830184613f38565b92915050565b600060208284031215613f7857613f77613c9a565b5b6000613f8684828501613dd9565b91505092915050565b600060208284031215613fa557613fa4613c9a565b5b6000613fb384828501613da3565b91505092915050565b60008060408385031215613fd357613fd2613c9a565b5b6000613fe185828601613ef6565b9250506020613ff285828601613da3565b9150509250929050565b61400581613db8565b82525050565b61401481613d7a565b82525050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6005811061405a5761405961401a565b5b50565b600081905061406b82614049565b919050565b600061407b8261405d565b9050919050565b61408b81614070565b82525050565b610160820160008201516140a86000850182613ffc565b5060208201516140bb602085018261400b565b5060408201516140ce6040850182613ffc565b5060608201516140e1606085018261400b565b5060808201516140f4608085018261400b565b5060a082015161410760a0850182613ffc565b5060c082015161411a60c0850182613ffc565b5060e082015161412d60e085018261400b565b50610100820151614142610100850182614082565b50610120820151614157610120850182613ffc565b5061014082015161416c610140850182613ffc565b50505050565b6000610160820190506141886000830184614091565b92915050565b61419781613db8565b82525050565b60006020820190506141b2600083018461418e565b92915050565b6141c181613d7a565b82525050565b60006020820190506141dc60008301846141b8565b92915050565b600060ff82169050919050565b6141f8816141e2565b82525050565b600060208201905061421360008301846141ef565b92915050565b60006020828403121561422f5761422e613c9a565b5b600061423d84828501613e80565b91505092915050565b6101608201600082015161425d6000850182613ffc565b506020820151614270602085018261400b565b5060408201516142836040850182613ffc565b506060820151614296606085018261400b565b5060808201516142a9608085018261400b565b5060a08201516142bc60a0850182613ffc565b5060c08201516142cf60c0850182613ffc565b5060e08201516142e260e085018261400b565b506101008201516142f7610100850182614082565b5061012082015161430c610120850182613ffc565b50610140820151614321610140850182613ffc565b50505050565b60006101608201905061433d6000830184614246565b92915050565b61434c816141e2565b811461435757600080fd5b50565b60008135905061436981614343565b92915050565b60006020828403121561438557614384613c9a565b5b60006143938482850161435a565b91505092915050565b600082825260208201905092915050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b60006143e360108361439c565b91506143ee826143ad565b602082019050919050565b60006020820190508181036000830152614412816143d6565b9050919050565b7f4e4654206973206e6f7420617070726f7665642062792061646d696e00000000600082015250565b600061444f601c8361439c565b915061445a82614419565b602082019050919050565b6000602082019050818103600083015261447e81614442565b9050919050565b7f43757272656e6379206973206e6f7420617070726f7665642062792061646d6960008201527f6e00000000000000000000000000000000000000000000000000000000000000602082015250565b60006144e160218361439c565b91506144ec82614485565b604082019050919050565b60006020820190508181036000830152614510816144d4565b9050919050565b7f41736b20416d6f756e742043616e6e6f74206265205a65726f00000000000000600082015250565b600061454d60198361439c565b915061455882614517565b602082019050919050565b6000602082019050818103600083015261457c81614540565b9050919050565b7f4578706972792054696d652063616e6e6f7420626520696e2050617374000000600082015250565b60006145b9601d8361439c565b91506145c482614583565b602082019050919050565b600060208201905081810360008301526145e8816145ac565b9050919050565b6000815190506145fe81613d8c565b92915050565b60006020828403121561461a57614619613c9a565b5b6000614628848285016145ef565b91505092915050565b7f596f7520617265206e6f74206f776e6572206f6620546f6b656e204964000000600082015250565b6000614667601d8361439c565b915061467282614631565b602082019050919050565b600060208201905081810360008301526146968161465a565b9050919050565b60006040820190506146b260008301856141b8565b6146bf60208301846141b8565b9392505050565b6000815190506146d581613e69565b92915050565b6000602082840312156146f1576146f0613c9a565b5b60006146ff848285016146c6565b91505092915050565b7f4d61726b657420436f6e7472616374206973206e6f7420616c6c6f776564207460008201527f6f206d616e616765207468697320546f6b656e20494400000000000000000000602082015250565b600061476460368361439c565b915061476f82614708565b604082019050919050565b6000602082019050818103600083015261479381614757565b9050919050565b60008160001c9050919050565b6000819050919050565b60006147c46147bf8361479a565b6147a7565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006147fe6147f98361479a565b6147cb565b9050919050565b60008160a01c9050919050565b600060ff82169050919050565b600061483261482d83614805565b614812565b9050919050565b6101608201600080830154905061484f816147b1565b61485c6000860182613ffc565b506001830154905061486d816147eb565b61487a602086018261400b565b506002830154905061488b816147b1565b6148986040860182613ffc565b50600383015490506148a9816147eb565b6148b6606086018261400b565b50600483015490506148c7816147eb565b6148d4608086018261400b565b50600583015490506148e5816147b1565b6148f260a0860182613ffc565b5060068301549050614903816147b1565b61491060c0860182613ffc565b5060078301549050614921816147eb565b61492e60e086018261400b565b506149388161481f565b614946610100860182614082565b5060088301549050614957816147b1565b614965610120860182613ffc565b5060098301549050614976816147b1565b614984610140860182613ffc565b5050505050565b6000610160820190506149a16000830184614839565b92915050565b7f43616c6c6572206973206e6f7420612061646d696e0000000000000000000000600082015250565b60006149dd60158361439c565b91506149e8826149a7565b602082019050919050565b60006020820190508181036000830152614a0c816149d0565b9050919050565b7f496e76616c6964204f7264657220496400000000000000000000000000000000600082015250565b6000614a4960108361439c565b9150614a5482614a13565b602082019050919050565b60006020820190508181036000830152614a7881614a3c565b9050919050565b7f42696420737461747573206973206e6f74204f70656e00000000000000000000600082015250565b6000614ab560168361439c565b9150614ac082614a7f565b602082019050919050565b60006020820190508181036000830152614ae481614aa8565b9050919050565b7f4269642069732065787069726564000000000000000000000000000000000000600082015250565b6000614b21600e8361439c565b9150614b2c82614aeb565b602082019050919050565b60006020820190508181036000830152614b5081614b14565b9050919050565b600081519050614b6681613dc2565b92915050565b600060208284031215614b8257614b81613c9a565b5b6000614b9084828501614b57565b91505092915050565b7f42696464657220646f6e2774206861766520456e6f7567682046756e64730000600082015250565b6000614bcf601e8361439c565b9150614bda82614b99565b602082019050919050565b60006020820190508181036000830152614bfe81614bc2565b9050919050565b7f42696464657220686173206e6f7420417070726f76656420546f6b656e730000600082015250565b6000614c3b601e8361439c565b9150614c4682614c05565b602082019050919050565b60006020820190508181036000830152614c6a81614c2e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614cab82613db8565b9150614cb683613db8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614cef57614cee614c71565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000614d3482613db8565b9150614d3f83613db8565b925082614d4f57614d4e614cfa565b5b828204905092915050565b6000614d6582613db8565b9150614d7083613db8565b925082821015614d8357614d82614c71565b5b828203905092915050565b6000606082019050614da360008301866141b8565b614db060208301856141b8565b614dbd604083018461418e565b949350505050565b61016082016000808301549050614ddb816147b1565b614de86000860182613ffc565b5060018301549050614df9816147eb565b614e06602086018261400b565b5060028301549050614e17816147b1565b614e246040860182613ffc565b5060038301549050614e35816147eb565b614e42606086018261400b565b5060048301549050614e53816147eb565b614e60608086018261400b565b5060058301549050614e71816147b1565b614e7e60a0860182613ffc565b5060068301549050614e8f816147b1565b614e9c60c0860182613ffc565b5060078301549050614ead816147eb565b614eba60e086018261400b565b50614ec48161481f565b614ed2610100860182614082565b5060088301549050614ee3816147b1565b614ef1610120860182613ffc565b5060098301549050614f02816147b1565b614f10610140860182613ffc565b5050505050565b600061016082019050614f2d6000830184614dc5565b92915050565b7f41646d696e2057616c6c65742063616e6e6f7420626520656d7074792061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000614f8f60248361439c565b9150614f9a82614f33565b604082019050919050565b60006020820190508181036000830152614fbe81614f82565b9050919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000615021602f8361439c565b915061502c82614fc5565b604082019050919050565b6000602082019050818103600083015261505081615014565b9050919050565b7f4f7264657220737461747573206973206e6f74204f70656e0000000000000000600082015250565b600061508d60188361439c565b915061509882615057565b602082019050919050565b600060208201905081810360008301526150bc81615080565b9050919050565b7f596f7520446f6e2774206861766520726967687420746f2063616e63656c206f60008201527f7264657200000000000000000000000000000000000000000000000000000000602082015250565b600061511f60248361439c565b915061512a826150c3565b604082019050919050565b6000602082019050818103600083015261514e81615112565b9050919050565b7f496e76616c696420426964204964000000000000000000000000000000000000600082015250565b600061518b600e8361439c565b915061519682615155565b602082019050919050565b600060208201905081810360008301526151ba8161517e565b9050919050565b7f4f72646572206973206578706972656400000000000000000000000000000000600082015250565b60006151f760108361439c565b9150615202826151c1565b602082019050919050565b60006020820190508181036000830152615226816151ea565b9050919050565b7f4e6f7420656e6f7567682066756e647320617661696c61626c6520746f20627560008201527f7900000000000000000000000000000000000000000000000000000000000000602082015250565b600061528960218361439c565b91506152948261522d565b604082019050919050565b600060208201905081810360008301526152b88161527c565b9050919050565b7f506c6561736520417070726f766520546f6b656e73204265666f726520596f7560008201527f2042757900000000000000000000000000000000000000000000000000000000602082015250565b600061531b60248361439c565b9150615326826152bf565b604082019050919050565b6000602082019050818103600083015261534a8161530e565b9050919050565b7f42696420416d6f756e742043616e6e6f74206265205a65726f00000000000000600082015250565b600061538760198361439c565b915061539282615351565b602082019050919050565b600060208201905081810360008301526153b68161537a565b9050919050565b7f596f752043616e277420426964206f6e20796f7572204f776e20546f6b656e00600082015250565b60006153f3601f8361439c565b91506153fe826153bd565b602082019050919050565b60006020820190508181036000830152615422816153e6565b9050919050565b7f4e6f7420656e6f7567682066756e647320617661696c61626c6520746f20616460008201527f6420626964000000000000000000000000000000000000000000000000000000602082015250565b600061548560258361439c565b915061549082615429565b604082019050919050565b600060208201905081810360008301526154b481615478565b9050919050565b7f506c6561736520417070726f766520546f6b656e73204265666f726520596f7560008201527f2042696400000000000000000000000000000000000000000000000000000000602082015250565b600061551760248361439c565b9150615522826154bb565b604082019050919050565b600060208201905081810360008301526155468161550a565b9050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b600061558360148361439c565b915061558e8261554d565b602082019050919050565b600060208201905081810360008301526155b281615576565b9050919050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000615615602a8361439c565b9150615620826155b9565b604082019050919050565b6000602082019050818103600083015261564481615608565b9050919050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b600061568c60178361564b565b915061569782615656565b601782019050919050565b600081519050919050565b60005b838110156156cb5780820151818401526020810190506156b0565b838111156156da576000848401525b50505050565b60006156eb826156a2565b6156f5818561564b565b93506157058185602086016156ad565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b600061574760118361564b565b915061575282615711565b601182019050919050565b60006157688261567f565b915061577482856156e0565b915061577f8261573a565b915061578b82846156e0565b91508190509392505050565b6000601f19601f8301169050919050565b60006157b3826156a2565b6157bd818561439c565b93506157cd8185602086016156ad565b6157d681615797565b840191505092915050565b600060208201905081810360008301526157fb81846157a8565b905092915050565b600061580e82613db8565b915061581983613db8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561584e5761584d614c71565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006158c282613db8565b9150600082036158d5576158d4614c71565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b600061591660208361439c565b9150615921826158e0565b602082019050919050565b6000602082019050818103600083015261594581615909565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006159a860268361439c565b91506159b38261594c565b604082019050919050565b600060208201905081810360008301526159d78161599b565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000615a14601d8361439c565b9150615a1f826159de565b602082019050919050565b60006020820190508181036000830152615a4381615a07565b9050919050565b600081519050919050565b600081905092915050565b6000615a6b82615a4a565b615a758185615a55565b9350615a858185602086016156ad565b80840191505092915050565b6000615a9d8284615a60565b91508190509291505056fea2646970667358221220e403b55bdda65acc650cfa292c952e20ee7bb364a9322728cf07377449b91d6364736f6c634300080f0033
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.