Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 4,434 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 16640309 | 681 days ago | IN | 0 ETH | 0.00308134 | ||||
Claim | 16640307 | 681 days ago | IN | 0 ETH | 0.00384771 | ||||
Claim | 16566659 | 692 days ago | IN | 0 ETH | 0.0022842 | ||||
Withdraw Ethers | 16435326 | 710 days ago | IN | 0 ETH | 0.00137762 | ||||
Claim | 16383144 | 717 days ago | IN | 0 ETH | 0.0022879 | ||||
Claim | 16383126 | 717 days ago | IN | 0 ETH | 0.0021 | ||||
Buy | 16382321 | 718 days ago | IN | 0.15 ETH | 0.00187974 | ||||
Claim | 16374997 | 719 days ago | IN | 0 ETH | 0.00052649 | ||||
Claim | 16374997 | 719 days ago | IN | 0 ETH | 0.00166991 | ||||
Claim | 16374996 | 719 days ago | IN | 0 ETH | 0.00176481 | ||||
Claim | 16374994 | 719 days ago | IN | 0 ETH | 0.00202386 | ||||
Claim | 16371701 | 719 days ago | IN | 0 ETH | 0.00354877 | ||||
Claim | 16371656 | 719 days ago | IN | 0 ETH | 0.00345202 | ||||
Claim | 16363865 | 720 days ago | IN | 0 ETH | 0.00243226 | ||||
Claim | 16363864 | 720 days ago | IN | 0 ETH | 0.00244283 | ||||
Claim | 16363863 | 720 days ago | IN | 0 ETH | 0.00244334 | ||||
Claim | 16363861 | 720 days ago | IN | 0 ETH | 0.00221807 | ||||
Claim | 16363672 | 720 days ago | IN | 0 ETH | 0.00260922 | ||||
Buy | 16339294 | 724 days ago | IN | 0.75 ETH | 0.00545039 | ||||
Claim | 16282173 | 731 days ago | IN | 0 ETH | 0.00177053 | ||||
Claim | 16246513 | 736 days ago | IN | 0 ETH | 0.00159521 | ||||
Claim | 16193594 | 744 days ago | IN | 0 ETH | 0.00183166 | ||||
Buy | 16182174 | 745 days ago | IN | 0.15 ETH | 0.00204124 | ||||
Claim | 16103511 | 756 days ago | IN | 0 ETH | 0.00150676 | ||||
Claim | 16103503 | 756 days ago | IN | 0 ETH | 0.00167183 |
Loading...
Loading
Contract Name:
AvatarMarket
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.0; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "./access/BaseAccessControl.sol"; import "./AvatarToken.sol"; contract AvatarMarket is BaseAccessControl, ReentrancyGuard, Pausable { string public constant BAD_ADDRESS_ERROR = "AvatarMarket: bad address"; string public constant BAD_COUNT_ERROR = "AvatarMarket: bad count"; string public constant TOTAL_SUPPLY_LIMIT_ERROR = "AvatarMarket: total supply exceeded"; string public constant BAD_AMOUNT_ERROR = "AvatarMarket: bad amount"; string public constant ALLOW_PRESALE_ERROR = "AvatarMarket: unable to allow presale"; string public constant PRESALE_COUNT_TOTAL_LIMIT_ERROR = "AvatarMarket: total allowed presale exceeded"; string public constant PRESALE_COUNT_USER_LIMIT_ERROR = "AvatarMarket: presale count per user exceeded"; string public constant CLAIM_ERROR = "AvatarMarket: unable to claim"; using Address for address payable; address private _tokenAddress; bool private _publicSaleStarted = false; uint private _currentPresaleCount; uint private _presaleRemainingCount; uint private _maxBuyCount; uint private _presaleMaxBuyCount; uint private _totalAllowedPresaleCount; uint private _presalePrice; uint private _publicPrice; mapping(address => uint) private _presales; event AvatarPresold(address indexed buyer, address indexed to, uint count); event AvatarBought(address indexed buyer, address indexed to, uint tokenId); event AvatarClaimed(address indexed claimer, address indexed to, uint tokenId); event PresaleAllowed(address operator, uint totalAllowedPresaleCount, uint presalePrice); event PublicSaleStarted(address operator, uint publicPrice); event EthersWithdrawn(address operator, address indexed to, uint amount); constructor(address avatarToken, address accessControl) BaseAccessControl(accessControl) { _tokenAddress = avatarToken; _presaleMaxBuyCount = 5; _maxBuyCount = 5; } function tokenAddress() public view returns (address) { return _tokenAddress; } function setTokenAddress(address newAddress) external onlyRole(COO_ROLE) { address previousAddress = _tokenAddress; _tokenAddress = newAddress; emit AddressChanged("token", previousAddress, newAddress); } function presalePrice() public view returns (uint) { return _presalePrice; } function setPresalePrice(uint newValue) external onlyRole(CFO_ROLE) { uint previousValue = _presalePrice; _presalePrice = newValue; emit ValueChanged("presalePrice", previousValue, newValue); } function presaleMaxBuyCount() public view returns (uint) { return _presaleMaxBuyCount; } function setPresaleMaxBuyCount(uint newValue) external onlyRole(CFO_ROLE) { uint previousValue = _presaleMaxBuyCount; _presaleMaxBuyCount = newValue; emit ValueChanged("presaleMaxBuyCount", previousValue, newValue); } function totalAllowedPresaleCount() public view returns (uint) { return _totalAllowedPresaleCount; } function currentPresaleCount() public view returns (uint) { return _currentPresaleCount; } function presaleRemainingCount() public view returns (uint) { return _presaleRemainingCount; } function allowPresale(uint presaleCount, uint price) external onlyRole(CFO_ROLE) { require(!publicSaleStarted(), ALLOW_PRESALE_ERROR); uint totalTokenSupply = AvatarToken(tokenAddress()).totalTokenSupply(); require(presaleRemainingCount() + presaleCount <= totalTokenSupply, TOTAL_SUPPLY_LIMIT_ERROR); _totalAllowedPresaleCount = presaleCount; _presalePrice = price; _currentPresaleCount = 0; emit PresaleAllowed(_msgSender(), presaleCount, price); } function publicPrice() public view returns (uint) { return _publicPrice; } function setPublicPrice(uint newValue) external onlyRole(CFO_ROLE) { uint previousValue = _publicPrice; _publicPrice = newValue; emit ValueChanged("publicPrice", previousValue, newValue); } function maxBuyCount() public view returns(uint) { return _maxBuyCount; } function setMaxBuyCount(uint newValue) external onlyRole(CFO_ROLE) { uint previousValue = _maxBuyCount; _maxBuyCount = newValue; emit ValueChanged("maxBuyCount", previousValue, newValue); } function publicSaleStarted() public view returns(bool) { return _publicSaleStarted; } function togglePublicSaleStarted(uint price) external onlyRole(CFO_ROLE) { _publicSaleStarted = true; _publicPrice = price; emit PublicSaleStarted(_msgSender(), price); } function buy(address to, uint count) external payable nonReentrant whenNotPaused { require(!Address.isContract(to), BAD_ADDRESS_ERROR); if (publicSaleStarted()) { _buy(to, count); } else { _presaleBuy(to, count); } } function claim(address to, uint count) external nonReentrant whenNotPaused { require(publicSaleStarted(), CLAIM_ERROR); require(!Address.isContract(to), BAD_ADDRESS_ERROR); require(_presales[_msgSender()] >= count, BAD_COUNT_ERROR); AvatarToken at = AvatarToken(tokenAddress()); for (uint i = 0; i < count; i++) { uint tokenId = at.mint(to); emit AvatarClaimed(_msgSender(), to, tokenId); } _presales[_msgSender()] -= count; _presaleRemainingCount -= count; } function _buy(address to, uint count) internal { require(count <= maxBuyCount(), BAD_COUNT_ERROR); AvatarToken at = AvatarToken(tokenAddress()); uint totalTokenSupply = at.totalTokenSupply(); uint currentTokenCount = at.currentTokenCount(); require(presaleRemainingCount() + currentTokenCount + count <= totalTokenSupply, TOTAL_SUPPLY_LIMIT_ERROR); require(msg.value >= count * publicPrice(), BAD_AMOUNT_ERROR); for (uint i = 0; i < count; i++) { uint tokenId = at.mint(to); emit AvatarBought(_msgSender(), to, tokenId); } } function _presaleBuy(address to, uint count) internal { require(currentPresaleCount() + count <= totalAllowedPresaleCount(), PRESALE_COUNT_TOTAL_LIMIT_ERROR); require(_presales[to] + count <= presaleMaxBuyCount(), PRESALE_COUNT_USER_LIMIT_ERROR); require(msg.value >= count * presalePrice(), BAD_AMOUNT_ERROR); _presales[to] += count; _currentPresaleCount += count; _presaleRemainingCount += count; emit AvatarPresold(_msgSender(), to, count); } function pause() external onlyRole(COO_ROLE) { _pause(); } function unpause() external onlyRole(COO_ROLE) { _unpause(); } function withdrawEthers(uint amount, address payable to) external onlyRole(CFO_ROLE) { require(!to.isContract(), BAD_ADDRESS_ERROR); to.sendValue(amount); emit EthersWithdrawn(_msgSender(), to, amount); } }
// SPDX-License-Identifier: MIT 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 make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 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 pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/IAccessControl.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "../interfaces/IChangeableVariables.sol"; abstract contract BaseAccessControl is Context, IChangeableVariables { bytes32 public constant CEO_ROLE = keccak256("CEO"); bytes32 public constant CFO_ROLE = keccak256("CFO"); bytes32 public constant COO_ROLE = keccak256("COO"); address private _accessControl; modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } constructor (address accessControl) Context() { _accessControl = accessControl; } function accessControlAddress() public view returns (address) { return _accessControl; } function setAccessControlAddress(address newAddress) external onlyRole(COO_ROLE) { address previousAddress = _accessControl; _accessControl = newAddress; emit AddressChanged("accessControl", previousAddress, newAddress); } function hasRole(bytes32 role, address account) public view returns (bool) { IAccessControl accessControl = IAccessControl(accessControlAddress()); return accessControl.hasRole(role, account) || accessControl.hasRole(CEO_ROLE, account); } function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.0; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "./access/BaseAccessControl.sol"; import "./structs/AvatarInfo.sol"; contract AvatarToken is ERC721, BaseAccessControl, Pausable { string public constant NON_EXISTENT_TOKEN_ERROR = "AvatarToken: nonexistent token"; string public constant NOT_ENOUGH_PRIVILEGES_ERROR = "AvatarToken: not enough privileges"; string public constant BAD_ADDRESS_ERROR = "AvatarToken: bad address"; string public constant BAD_AMOUNT_ERROR = "AvatarToken: bad amount"; string public constant SUPPLY_LIMIT_ERROR = "AvatarToken: total supply has exceeded"; string public constant GROW_UP_OWNER_ERROR = "AvatarToken: caller is not owner"; string public constant GROW_UP_TIME_ERROR = "AvatarToken: it is not time to grow up"; string public constant GROW_UP_ADULT_ERROR = "AvatarToken: already adult"; string public constant SET_ADULT_IMAGE_ERROR = "AvatarToken: the avatar is not adult"; string public constant COLLECTION_REVEALED_ERROR = "AvatarToken: already revealed"; string public constant COLLECTION_NOT_REVEALED_ERROR = "AvatarToken: the collection is not revealed"; using Address for address payable; using Counters for Counters.Counter; using Address for address; using Strings for uint256; Counters.Counter private _avatarIds; address private _avatarMarketAddress; uint private _growTime; //in secs string private _baseUri; uint private _priceOfGrowingUp; uint private _totalTokenSupply; string private _defaultBabyUri; uint private _revealedAt = 0; // Mapping token id to avatar details mapping(uint => uint) private _info; event Revealed(address indexed operator, string baseUri); event AvatarCreated(address indexed operator, address indexed to, uint tokenId); event AvatarGrown(address indexed operator, uint tokenId); event SetAdultImage(address indexed operator, uint tokenId); event EthersWithdrawn(address operator, address indexed to, uint amount); constructor( uint totalSupply, string memory defaultBabyUri, uint gt, uint price, address accessControl) ERC721("Novatar", "NVT") BaseAccessControl(accessControl) { _totalTokenSupply = totalSupply; _defaultBabyUri = defaultBabyUri; _growTime = gt; _priceOfGrowingUp = price; } function totalTokenSupply() public view returns (uint) { return _totalTokenSupply; } function currentTokenCount() public view returns (uint) { return uint(_avatarIds.current()); } function avatarMarketAddress() public view returns (address) { return _avatarMarketAddress; } function setAvatarMarketAddress(address newAddress) external onlyRole(COO_ROLE) { require(newAddress.isContract(), BAD_ADDRESS_ERROR); address previousAddress = _avatarMarketAddress; _avatarMarketAddress = newAddress; emit AddressChanged("avatarMarket", previousAddress, newAddress); } function growUpTime() public view returns (uint) { return _growTime; } function setGrowUpTime(uint newValue) external onlyRole(COO_ROLE) { uint previousValue = _growTime; _growTime = newValue; emit ValueChanged("growUpTime", previousValue, newValue); } function priceOfGrowingUp() public view returns (uint) { return _priceOfGrowingUp; } function setPriceOfGrowingUp(uint newValue) external onlyRole(CFO_ROLE) { uint previousValue = _priceOfGrowingUp; _priceOfGrowingUp = newValue; emit ValueChanged("priceOfGrowingUp", previousValue, newValue); } function _defaultBabyURI() internal view returns (string memory) { return _defaultBabyUri; } function setDefaultBabyURI(string memory newDefaultUri) external onlyRole(COO_ROLE) { string memory previousValue = _defaultBabyUri; _defaultBabyUri = newDefaultUri; emit StringValueChanged("defaultBabyUri", previousValue, newDefaultUri); } function _baseURI() internal view virtual override returns (string memory) { return _baseUri; } function revealBabyAvatars(string memory baseUri) external onlyRole(COO_ROLE) { require(_revealedAt == 0, COLLECTION_REVEALED_ERROR); _baseUri = baseUri; _revealedAt = block.timestamp; emit Revealed(_msgSender(), baseUri); } function setAdultImage(uint tokenId) external onlyRole(COO_ROLE) { require(_exists(tokenId), NON_EXISTENT_TOKEN_ERROR); AvatarInfo.Details memory details = AvatarInfo.getDetails(_info[tokenId]); require(details.grownAt > 0, SET_ADULT_IMAGE_ERROR); details.hasAdultImage = true; _info[tokenId] = AvatarInfo.getValue(details); emit SetAdultImage(_msgSender(), tokenId); } function avatar(uint tokenId) external view returns (AvatarInfo.Details memory) { require(_exists(tokenId), NON_EXISTENT_TOKEN_ERROR); return AvatarInfo.getDetails(_info[tokenId]); } function hasAdultImage(uint tokenId) public view returns (bool) { require(_exists(tokenId), NON_EXISTENT_TOKEN_ERROR); AvatarInfo.Details memory details = AvatarInfo.getDetails(_info[tokenId]); return details.hasAdultImage; } function isAdult(uint tokenId) public view returns (bool) { require(_exists(tokenId), NON_EXISTENT_TOKEN_ERROR); AvatarInfo.Details memory details = AvatarInfo.getDetails(_info[tokenId]); return details.grownAt > 0; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), NON_EXISTENT_TOKEN_ERROR); AvatarInfo.Details memory details = AvatarInfo.getDetails(_info[tokenId]); return (details.grownAt > 0) ? string( abi.encodePacked( _baseURI(), "/adult/", details.hasAdultImage ? tokenId.toString() : "default", ".json")) : (_revealedAt > 0) ? string( abi.encodePacked( _baseURI(), "/baby/", tokenId.toString(), ".json")) : _defaultBabyURI(); } function mint(address to) external returns (uint) { require(_msgSender() == avatarMarketAddress(), NOT_ENOUGH_PRIVILEGES_ERROR); require(!to.isContract(), BAD_ADDRESS_ERROR); require(currentTokenCount() < totalTokenSupply(), SUPPLY_LIMIT_ERROR); _avatarIds.increment(); uint newAvatarId = uint(_avatarIds.current()); _info[newAvatarId] = AvatarInfo.getValue(AvatarInfo.Details({ mintedAt: block.timestamp, grownAt: 0, hasAdultImage: false })); _mint(to, newAvatarId); emit AvatarCreated(_msgSender(), to, newAvatarId); return newAvatarId; } function growUp(uint tokenId) external payable whenNotPaused { require(_exists(tokenId), NON_EXISTENT_TOKEN_ERROR); require(_revealedAt > 0, COLLECTION_NOT_REVEALED_ERROR); require(ownerOf(tokenId) == _msgSender(), GROW_UP_OWNER_ERROR); AvatarInfo.Details memory details = AvatarInfo.getDetails(_info[tokenId]); require(details.grownAt == 0, GROW_UP_ADULT_ERROR); require(_revealedAt + growUpTime() <= block.timestamp, GROW_UP_TIME_ERROR); require(msg.value >= priceOfGrowingUp(), BAD_AMOUNT_ERROR); details.grownAt = block.timestamp; _info[tokenId] = AvatarInfo.getValue(details); emit AvatarGrown(_msgSender(), tokenId); } function pause() external onlyRole(COO_ROLE) { _pause(); } function unpause() external onlyRole(COO_ROLE) { _unpause(); } function withdrawEthers(uint amount, address payable to) external onlyRole(CFO_ROLE) { require(!to.isContract(), BAD_ADDRESS_ERROR); to.sendValue(amount); emit EthersWithdrawn(_msgSender(), to, amount); } }
// SPDX-License-Identifier: MIT 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 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 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: GPL-3.0-only pragma solidity ^0.8.0; interface IChangeableVariables { event AddressChanged(string fieldName, address previousAddress, address newAddress); event ValueChanged(string fieldName, uint previousValue, uint newValue); event StringValueChanged(string fieldName, string previousValue, string newValue); event BoolValueChanged(string fieldName, bool previousValue, bool newValue); }
// SPDX-License-Identifier: MIT 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 overriden 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 { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_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 || getApproved(tokenId) == spender || isApprovedForAll(owner, 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); } /** * @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); } /** * @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 of token that is not own"); 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); } /** * @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 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 {} }
// SPDX-License-Identifier: MIT 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: GPL-3.0-only pragma solidity ^0.8.0; library AvatarInfo { struct Details { uint mintedAt; uint grownAt; bool hasAdultImage; } function getDetails(uint value) internal pure returns (Details memory) { return Details ( { mintedAt: uint256(uint64(value)), grownAt: uint256(uint64(value >> 64)), hasAdultImage: uint8(value >> 128) > 0 } ); } function getValue(Details memory details) internal pure returns (uint) { uint result = uint(details.mintedAt); result |= uint(details.grownAt) << 64; result |= uint(details.hasAdultImage ? 1 : 0) << 128; return result; } }
// SPDX-License-Identifier: MIT 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`, 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 Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT 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 `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT 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 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 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); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"avatarToken","type":"address"},{"internalType":"address","name":"accessControl","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"fieldName","type":"string"},{"indexed":false,"internalType":"address","name":"previousAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"AvatarBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"AvatarClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"count","type":"uint256"}],"name":"AvatarPresold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"fieldName","type":"string"},{"indexed":false,"internalType":"bool","name":"previousValue","type":"bool"},{"indexed":false,"internalType":"bool","name":"newValue","type":"bool"}],"name":"BoolValueChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EthersWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalAllowedPresaleCount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"presalePrice","type":"uint256"}],"name":"PresaleAllowed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"publicPrice","type":"uint256"}],"name":"PublicSaleStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"fieldName","type":"string"},{"indexed":false,"internalType":"string","name":"previousValue","type":"string"},{"indexed":false,"internalType":"string","name":"newValue","type":"string"}],"name":"StringValueChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"fieldName","type":"string"},{"indexed":false,"internalType":"uint256","name":"previousValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"ValueChanged","type":"event"},{"inputs":[],"name":"ALLOW_PRESALE_ERROR","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BAD_ADDRESS_ERROR","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BAD_AMOUNT_ERROR","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BAD_COUNT_ERROR","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CEO_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CFO_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CLAIM_ERROR","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COO_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_COUNT_TOTAL_LIMIT_ERROR","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_COUNT_USER_LIMIT_ERROR","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_SUPPLY_LIMIT_ERROR","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accessControlAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"presaleCount","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"allowPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentPresaleCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"maxBuyCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleMaxBuyCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleRemainingCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setAccessControlAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"setMaxBuyCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"setPresaleMaxBuyCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"setPresalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"setPublicPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"togglePublicSaleStarted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllowedPresaleCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"to","type":"address"}],"name":"withdrawEthers","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000600260156101000a81548160ff0219169083151502179055503480156200002c57600080fd5b50604051620034ce380380620034ce833981810160405281019062000052919062000125565b80806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600180819055506000600260006101000a81548160ff02191690831515021790555081600260016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506005600681905550600580819055505050620001b4565b6000815190506200011f816200019a565b92915050565b600080604083850312156200013957600080fd5b600062000149858286016200010e565b92505060206200015c858286016200010e565b9150509250929050565b600062000173826200017a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b620001a58162000166565b8114620001b157600080fd5b50565b61330a80620001c46000396000f3fe60806040526004361061020e5760003560e01c80636674137711610118578063a945bf80116100a0578063b81ef2831161006f578063b81ef28314610724578063c62752551461074d578063cce7ec1314610776578063de2f588f14610792578063e8d56b8b146107bd5761020e565b8063a945bf801461067a578063aad3ec96146106a5578063b396c0b8146106ce578063b514be63146106f95761020e565b80639c9604cc116100e75780639c9604cc146105a35780639d263f69146105ce5780639d76ea58146105f95780639f6f50ed14610624578063a2e914771461064f5761020e565b806366741377146104f95780637740d868146105245780638456cb591461054f57806391d14854146105665761020e565b80633549345e1161019b578063403309d31161016a578063403309d3146104245780635070c6b01461044f57806359474f47146104785780635c975abb146104a3578063601b1353146104ce5761020e565b80633549345e1461038e578063373bb185146103b75780633acfd44f146103e25780633f4ba83a1461040d5761020e565b806326a4e8d2116101e257806326a4e8d2146102bd578063272d723b146102e6578063298fb95c146103115780632a6e5e111461033a5780633215c236146103635761020e565b80620e7fa8146102135780630f7b9b7a1461023e5780631a5ebecf1461026957806320e42bb614610294575b600080fd5b34801561021f57600080fd5b506102286107e6565b6040516102359190612f45565b60405180910390f35b34801561024a57600080fd5b506102536107f0565b6040516102609190612cfb565b60405180910390f35b34801561027557600080fd5b5061027e61080c565b60405161028b9190612f45565b60405180910390f35b3480156102a057600080fd5b506102bb60048036038101906102b691906126a2565b610816565b005b3480156102c957600080fd5b506102e460048036038101906102df91906125d8565b610894565b005b3480156102f257600080fd5b506102fb61096c565b6040516103089190612cfb565b60405180910390f35b34801561031d57600080fd5b50610338600480360381019061033391906126a2565b610988565b005b34801561034657600080fd5b50610361600480360381019061035c91906126f4565b610a20565b005b34801561036f57600080fd5b50610378610b6f565b6040516103859190612f45565b60405180910390f35b34801561039a57600080fd5b506103b560048036038101906103b091906126a2565b610b79565b005b3480156103c357600080fd5b506103cc610bf7565b6040516103d99190612f45565b60405180910390f35b3480156103ee57600080fd5b506103f7610c01565b6040516104049190612cb7565b60405180910390f35b34801561041957600080fd5b50610422610c25565b005b34801561043057600080fd5b50610439610c62565b6040516104469190612cfb565b60405180910390f35b34801561045b57600080fd5b5061047660048036038101906104719190612730565b610c7e565b005b34801561048457600080fd5b5061048d610e6c565b60405161049a9190612f45565b60405180910390f35b3480156104af57600080fd5b506104b8610e76565b6040516104c59190612c9c565b60405180910390f35b3480156104da57600080fd5b506104e3610e8d565b6040516104f09190612cfb565b60405180910390f35b34801561050557600080fd5b5061050e610ec6565b60405161051b9190612c21565b60405180910390f35b34801561053057600080fd5b50610539610eef565b6040516105469190612cfb565b60405180910390f35b34801561055b57600080fd5b50610564610f0b565b005b34801561057257600080fd5b5061058d60048036038101906105889190612666565b610f48565b60405161059a9190612c9c565b60405180910390f35b3480156105af57600080fd5b506105b861109b565b6040516105c59190612cfb565b60405180910390f35b3480156105da57600080fd5b506105e36110d4565b6040516105f09190612f45565b60405180910390f35b34801561060557600080fd5b5061060e6110de565b60405161061b9190612c21565b60405180910390f35b34801561063057600080fd5b50610639611108565b6040516106469190612cb7565b60405180910390f35b34801561065b57600080fd5b5061066461112c565b6040516106719190612c9c565b60405180910390f35b34801561068657600080fd5b5061068f611143565b60405161069c9190612f45565b60405180910390f35b3480156106b157600080fd5b506106cc60048036038101906106c79190612601565b61114d565b005b3480156106da57600080fd5b506106e3611550565b6040516106f09190612cfb565b60405180910390f35b34801561070557600080fd5b5061070e611589565b60405161071b9190612cb7565b60405180910390f35b34801561073057600080fd5b5061074b600480360381019061074691906126a2565b6115ad565b005b34801561075957600080fd5b50610774600480360381019061076f91906126a2565b61162b565b005b610790600480360381019061078b9190612601565b6116a9565b005b34801561079e57600080fd5b506107a76117f3565b6040516107b49190612cfb565b60405180910390f35b3480156107c957600080fd5b506107e460048036038101906107df91906125d8565b61182c565b005b6000600854905090565b6040518060600160405280602581526020016132616025913981565b6000600554905090565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc61084881610843611902565b61190a565b60006006549050826006819055507fe98e5fcd3d43c7e5dd114bafcc428bc7ff8525b014fe3b51fc721ba5671f98fb8184604051610887929190612d99565b60405180910390a1505050565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b139696108c6816108c1611902565b61190a565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082600260016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f4ca142703425bec1d507d5581fac3a3e61eadcbeafbd7c0a03e2897d96de1cc5818460405161095f929190612e71565b60405180910390a1505050565b6040518060600160405280602d8152602001613234602d913981565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc6109ba816109b5611902565b61190a565b6001600260156101000a81548160ff021916908315150217905550816009819055507fc325d2ac60d7daf289657fb87715784752670ab7724fa710395d5b64e29da7f4610a05611902565b83604051610a14929190612c3c565b60405180910390a15050565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc610a5281610a4d611902565b61190a565b610a718273ffffffffffffffffffffffffffffffffffffffff166119a7565b156040518060400160405280601981526020017f4176617461724d61726b65743a2062616420616464726573730000000000000081525090610ae9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae09190612cfb565b60405180910390fd5b50610b13838373ffffffffffffffffffffffffffffffffffffffff166119ba90919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff167f372bb9ce23c45af0229f3ad425305ebadfb790c0b0453fa3077a02d7d8c987bb610b53611902565b85604051610b62929190612c3c565b60405180910390a2505050565b6000600754905090565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc610bab81610ba6611902565b61190a565b60006008549050826008819055507fe98e5fcd3d43c7e5dd114bafcc428bc7ff8525b014fe3b51fc721ba5671f98fb8184604051610bea929190612df5565b60405180910390a1505050565b6000600654905090565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b1396981565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b13969610c5781610c52611902565b61190a565b610c5f611aae565b50565b6040518060600160405280602381526020016132866023913981565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc610cb081610cab611902565b61190a565b610cb861112c565b156040518060600160405280602581526020016132616025913990610d13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0a9190612cfb565b60405180910390fd5b506000610d1e6110de565b73ffffffffffffffffffffffffffffffffffffffff16631ca8b6cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d6357600080fd5b505afa158015610d77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9b91906126cb565b90508084610da76110d4565b610db19190612f92565b11156040518060600160405280602381526020016132866023913990610e0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e049190612cfb565b60405180910390fd5b50836007819055508260088190555060006003819055507f38c3026eb99d218aa493faa20fd7b509f16e54738ea73948d7edfe9fc8e869a2610e4d611902565b8585604051610e5e93929190612c65565b60405180910390a150505050565b6000600354905090565b6000600260009054906101000a900460ff16905090565b6040518060400160405280601881526020017f4176617461724d61726b65743a2062616420616d6f756e74000000000000000081525081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6040518060600160405280602c81526020016132a9602c913981565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b13969610f3d81610f38611902565b61190a565b610f45611b50565b50565b600080610f53610ec6565b90508073ffffffffffffffffffffffffffffffffffffffff166391d1485485856040518363ffffffff1660e01b8152600401610f90929190612cd2565b60206040518083038186803b158015610fa857600080fd5b505afa158015610fbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe0919061263d565b8061109257508073ffffffffffffffffffffffffffffffffffffffff166391d148547fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d856040518363ffffffff1660e01b8152600401611041929190612cd2565b60206040518083038186803b15801561105957600080fd5b505afa15801561106d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611091919061263d565b5b91505092915050565b6040518060400160405280601d81526020017f4176617461724d61726b65743a20756e61626c6520746f20636c61696d00000081525081565b6000600454905090565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc81565b6000600260159054906101000a900460ff16905090565b6000600954905090565b60026001541415611193576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118a90612f25565b60405180910390fd5b60026001819055506111a3610e76565b156111e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111da90612e51565b60405180910390fd5b6111eb61112c565b6040518060400160405280601d81526020017f4176617461724d61726b65743a20756e61626c6520746f20636c61696d00000081525090611262576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112599190612cfb565b60405180910390fd5b5061126c826119a7565b156040518060400160405280601981526020017f4176617461724d61726b65743a20626164206164647265737300000000000000815250906112e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112db9190612cfb565b60405180910390fd5b5080600a60006112f2611902565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156040518060400160405280601781526020017f4176617461724d61726b65743a2062616420636f756e74000000000000000000815250906113a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139d9190612cfb565b60405180910390fd5b5060006113b16110de565b905060005b828110156114cd5760008273ffffffffffffffffffffffffffffffffffffffff16636a627842866040518263ffffffff1660e01b81526004016113f99190612c21565b602060405180830381600087803b15801561141357600080fd5b505af1158015611427573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144b91906126cb565b90508473ffffffffffffffffffffffffffffffffffffffff1661146c611902565b73ffffffffffffffffffffffffffffffffffffffff167fa3ffb7672390a0ed6449781b840e610ff83bbcc99600efadad6d34ad5d70a05d836040516114b19190612f45565b60405180910390a35080806114c590613137565b9150506113b6565b5081600a60006114db611902565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546115249190613042565b92505081905550816004600082825461153d9190613042565b9250508190555050600180819055505050565b6040518060400160405280601781526020017f4176617461724d61726b65743a2062616420636f756e7400000000000000000081525081565b7fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d81565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc6115df816115da611902565b61190a565b60006005549050826005819055507fe98e5fcd3d43c7e5dd114bafcc428bc7ff8525b014fe3b51fc721ba5671f98fb818460405161161e929190612ead565b60405180910390a1505050565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc61165d81611658611902565b61190a565b60006009549050826009819055507fe98e5fcd3d43c7e5dd114bafcc428bc7ff8525b014fe3b51fc721ba5671f98fb818460405161169c929190612ee9565b60405180910390a1505050565b600260015414156116ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e690612f25565b60405180910390fd5b60026001819055506116ff610e76565b1561173f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173690612e51565b60405180910390fd5b611748826119a7565b156040518060400160405280601981526020017f4176617461724d61726b65743a20626164206164647265737300000000000000815250906117c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117b79190612cfb565b60405180910390fd5b506117c961112c565b156117dd576117d88282611bf3565b6117e8565b6117e78282611fb2565b5b600180819055505050565b6040518060400160405280601981526020017f4176617461724d61726b65743a2062616420616464726573730000000000000081525081565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b1396961185e81611859611902565b61190a565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f4ca142703425bec1d507d5581fac3a3e61eadcbeafbd7c0a03e2897d96de1cc581846040516118f5929190612d5d565b60405180910390a1505050565b600033905090565b6119148282610f48565b6119a3576119398173ffffffffffffffffffffffffffffffffffffffff166014612260565b6119478360001c6020612260565b604051602001611958929190612be7565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199a9190612cfb565b60405180910390fd5b5050565b600080823b905060008111915050919050565b804710156119fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f490612e31565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1682604051611a2390612bd2565b60006040518083038185875af1925050503d8060008114611a60576040519150601f19603f3d011682016040523d82523d6000602084013e611a65565b606091505b5050905080611aa9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa090612dd5565b60405180910390fd5b505050565b611ab6610e76565b611af5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aec90612d3d565b60405180910390fd5b6000600260006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611b39611902565b604051611b469190612c21565b60405180910390a1565b611b58610e76565b15611b98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b8f90612e51565b60405180910390fd5b6001600260006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611bdc611902565b604051611be99190612c21565b60405180910390a1565b611bfb61080c565b8111156040518060400160405280601781526020017f4176617461724d61726b65743a2062616420636f756e7400000000000000000081525090611c75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6c9190612cfb565b60405180910390fd5b506000611c806110de565b905060008173ffffffffffffffffffffffffffffffffffffffff16631ca8b6cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cca57600080fd5b505afa158015611cde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0291906126cb565b905060008273ffffffffffffffffffffffffffffffffffffffff166311b639d96040518163ffffffff1660e01b815260040160206040518083038186803b158015611d4c57600080fd5b505afa158015611d60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8491906126cb565b9050818482611d916110d4565b611d9b9190612f92565b611da59190612f92565b11156040518060600160405280602381526020016132866023913990611e01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df89190612cfb565b60405180910390fd5b50611e0a611143565b84611e159190612fe8565b3410156040518060400160405280601881526020017f4176617461724d61726b65743a2062616420616d6f756e74000000000000000081525090611e8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e869190612cfb565b60405180910390fd5b5060005b84811015611faa5760008473ffffffffffffffffffffffffffffffffffffffff16636a627842886040518263ffffffff1660e01b8152600401611ed69190612c21565b602060405180830381600087803b158015611ef057600080fd5b505af1158015611f04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f2891906126cb565b90508673ffffffffffffffffffffffffffffffffffffffff16611f49611902565b73ffffffffffffffffffffffffffffffffffffffff167f73879c581b78b9f41cfd6225eca8145a59d7dfb300b8773caade372018e8219c83604051611f8e9190612f45565b60405180910390a3508080611fa290613137565b915050611e93565b505050505050565b611fba610b6f565b81611fc3610e6c565b611fcd9190612f92565b11156040518060600160405280602c81526020016132a9602c913990612029576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120209190612cfb565b60405180910390fd5b50612032610bf7565b81600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461207d9190612f92565b11156040518060600160405280602d8152602001613234602d9139906120d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d09190612cfb565b60405180910390fd5b506120e26107e6565b816120ed9190612fe8565b3410156040518060400160405280601881526020017f4176617461724d61726b65743a2062616420616d6f756e74000000000000000081525090612167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215e9190612cfb565b60405180910390fd5b5080600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546121b79190612f92565b9250508190555080600360008282546121d09190612f92565b9250508190555080600460008282546121e99190612f92565b925050819055508173ffffffffffffffffffffffffffffffffffffffff1661220f611902565b73ffffffffffffffffffffffffffffffffffffffff167f94474feda554c5a8bbdb084da084d3446db466a344d2a874bd8cd48f9ffe28bc836040516122549190612f45565b60405180910390a35050565b6060600060028360026122739190612fe8565b61227d9190612f92565b67ffffffffffffffff8111156122bc577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156122ee5781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061234c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106123d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026124169190612fe8565b6124209190612f92565b90505b600181111561250c577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110612488577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b1a60f81b8282815181106124c5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c9450806125059061310d565b9050612423565b5060008414612550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254790612d1d565b60405180910390fd5b8091505092915050565b600081359050612569816131c0565b92915050565b60008135905061257e816131d7565b92915050565b600081519050612593816131ee565b92915050565b6000813590506125a881613205565b92915050565b6000813590506125bd8161321c565b92915050565b6000815190506125d28161321c565b92915050565b6000602082840312156125ea57600080fd5b60006125f88482850161255a565b91505092915050565b6000806040838503121561261457600080fd5b60006126228582860161255a565b9250506020612633858286016125ae565b9150509250929050565b60006020828403121561264f57600080fd5b600061265d84828501612584565b91505092915050565b6000806040838503121561267957600080fd5b600061268785828601612599565b92505060206126988582860161255a565b9150509250929050565b6000602082840312156126b457600080fd5b60006126c2848285016125ae565b91505092915050565b6000602082840312156126dd57600080fd5b60006126eb848285016125c3565b91505092915050565b6000806040838503121561270757600080fd5b6000612715858286016125ae565b92505060206127268582860161256f565b9150509250929050565b6000806040838503121561274357600080fd5b6000612751858286016125ae565b9250506020612762858286016125ae565b9150509250929050565b61277581613076565b82525050565b6127848161309a565b82525050565b612793816130a6565b82525050565b60006127a482612f60565b6127ae8185612f76565b93506127be8185602086016130da565b6127c7816131af565b840191505092915050565b60006127dd82612f60565b6127e78185612f87565b93506127f78185602086016130da565b80840191505092915050565b6000612810602083612f76565b91507f537472696e67733a20686578206c656e67746820696e73756666696369656e746000830152602082019050919050565b6000612850601483612f76565b91507f5061757361626c653a206e6f74207061757365640000000000000000000000006000830152602082019050919050565b6000612890600d83612f76565b91507f616363657373436f6e74726f6c000000000000000000000000000000000000006000830152602082019050919050565b60006128d0601283612f76565b91507f70726573616c654d6178427579436f756e7400000000000000000000000000006000830152602082019050919050565b6000612910603a83612f76565b91507f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008301527f6563697069656e74206d617920686176652072657665727465640000000000006020830152604082019050919050565b6000612976600c83612f76565b91507f70726573616c65507269636500000000000000000000000000000000000000006000830152602082019050919050565b60006129b6601d83612f76565b91507f416464726573733a20696e73756666696369656e742062616c616e63650000006000830152602082019050919050565b60006129f6601083612f76565b91507f5061757361626c653a20706175736564000000000000000000000000000000006000830152602082019050919050565b6000612a36600583612f76565b91507f746f6b656e0000000000000000000000000000000000000000000000000000006000830152602082019050919050565b6000612a76600b83612f76565b91507f6d6178427579436f756e740000000000000000000000000000000000000000006000830152602082019050919050565b6000612ab6600083612f6b565b9150600082019050919050565b6000612ad0600b83612f76565b91507f7075626c696350726963650000000000000000000000000000000000000000006000830152602082019050919050565b6000612b10601783612f87565b91507f416363657373436f6e74726f6c3a206163636f756e74200000000000000000006000830152601782019050919050565b6000612b50601f83612f76565b91507f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006000830152602082019050919050565b6000612b90601183612f87565b91507f206973206d697373696e6720726f6c65200000000000000000000000000000006000830152601182019050919050565b612bcc816130d0565b82525050565b6000612bdd82612aa9565b9150819050919050565b6000612bf282612b03565b9150612bfe82856127d2565b9150612c0982612b83565b9150612c1582846127d2565b91508190509392505050565b6000602082019050612c36600083018461276c565b92915050565b6000604082019050612c51600083018561276c565b612c5e6020830184612bc3565b9392505050565b6000606082019050612c7a600083018661276c565b612c876020830185612bc3565b612c946040830184612bc3565b949350505050565b6000602082019050612cb1600083018461277b565b92915050565b6000602082019050612ccc600083018461278a565b92915050565b6000604082019050612ce7600083018561278a565b612cf4602083018461276c565b9392505050565b60006020820190508181036000830152612d158184612799565b905092915050565b60006020820190508181036000830152612d3681612803565b9050919050565b60006020820190508181036000830152612d5681612843565b9050919050565b60006060820190508181036000830152612d7681612883565b9050612d85602083018561276c565b612d92604083018461276c565b9392505050565b60006060820190508181036000830152612db2816128c3565b9050612dc16020830185612bc3565b612dce6040830184612bc3565b9392505050565b60006020820190508181036000830152612dee81612903565b9050919050565b60006060820190508181036000830152612e0e81612969565b9050612e1d6020830185612bc3565b612e2a6040830184612bc3565b9392505050565b60006020820190508181036000830152612e4a816129a9565b9050919050565b60006020820190508181036000830152612e6a816129e9565b9050919050565b60006060820190508181036000830152612e8a81612a29565b9050612e99602083018561276c565b612ea6604083018461276c565b9392505050565b60006060820190508181036000830152612ec681612a69565b9050612ed56020830185612bc3565b612ee26040830184612bc3565b9392505050565b60006060820190508181036000830152612f0281612ac3565b9050612f116020830185612bc3565b612f1e6040830184612bc3565b9392505050565b60006020820190508181036000830152612f3e81612b43565b9050919050565b6000602082019050612f5a6000830184612bc3565b92915050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000612f9d826130d0565b9150612fa8836130d0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612fdd57612fdc613180565b5b828201905092915050565b6000612ff3826130d0565b9150612ffe836130d0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561303757613036613180565b5b828202905092915050565b600061304d826130d0565b9150613058836130d0565b92508282101561306b5761306a613180565b5b828203905092915050565b6000613081826130b0565b9050919050565b6000613093826130b0565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b838110156130f85780820151818401526020810190506130dd565b83811115613107576000848401525b50505050565b6000613118826130d0565b9150600082141561312c5761312b613180565b5b600182039050919050565b6000613142826130d0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561317557613174613180565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b6131c981613076565b81146131d457600080fd5b50565b6131e081613088565b81146131eb57600080fd5b50565b6131f78161309a565b811461320257600080fd5b50565b61320e816130a6565b811461321957600080fd5b50565b613225816130d0565b811461323057600080fd5b5056fe4176617461724d61726b65743a2070726573616c6520636f756e742070657220757365722065786365656465644176617461724d61726b65743a20756e61626c6520746f20616c6c6f772070726573616c654176617461724d61726b65743a20746f74616c20737570706c792065786365656465644176617461724d61726b65743a20746f74616c20616c6c6f7765642070726573616c65206578636565646564a2646970667358221220843a7a9a962cf967f4bea239376a2b8873b0f04e798eb549b2c2252116ab8aca64736f6c63430008000033000000000000000000000000c4bf56ff8000f0864c8298ea7fdbcbb7376da357000000000000000000000000a54102176c054a20dee3d4e772a7010ed641417d
Deployed Bytecode
0x60806040526004361061020e5760003560e01c80636674137711610118578063a945bf80116100a0578063b81ef2831161006f578063b81ef28314610724578063c62752551461074d578063cce7ec1314610776578063de2f588f14610792578063e8d56b8b146107bd5761020e565b8063a945bf801461067a578063aad3ec96146106a5578063b396c0b8146106ce578063b514be63146106f95761020e565b80639c9604cc116100e75780639c9604cc146105a35780639d263f69146105ce5780639d76ea58146105f95780639f6f50ed14610624578063a2e914771461064f5761020e565b806366741377146104f95780637740d868146105245780638456cb591461054f57806391d14854146105665761020e565b80633549345e1161019b578063403309d31161016a578063403309d3146104245780635070c6b01461044f57806359474f47146104785780635c975abb146104a3578063601b1353146104ce5761020e565b80633549345e1461038e578063373bb185146103b75780633acfd44f146103e25780633f4ba83a1461040d5761020e565b806326a4e8d2116101e257806326a4e8d2146102bd578063272d723b146102e6578063298fb95c146103115780632a6e5e111461033a5780633215c236146103635761020e565b80620e7fa8146102135780630f7b9b7a1461023e5780631a5ebecf1461026957806320e42bb614610294575b600080fd5b34801561021f57600080fd5b506102286107e6565b6040516102359190612f45565b60405180910390f35b34801561024a57600080fd5b506102536107f0565b6040516102609190612cfb565b60405180910390f35b34801561027557600080fd5b5061027e61080c565b60405161028b9190612f45565b60405180910390f35b3480156102a057600080fd5b506102bb60048036038101906102b691906126a2565b610816565b005b3480156102c957600080fd5b506102e460048036038101906102df91906125d8565b610894565b005b3480156102f257600080fd5b506102fb61096c565b6040516103089190612cfb565b60405180910390f35b34801561031d57600080fd5b50610338600480360381019061033391906126a2565b610988565b005b34801561034657600080fd5b50610361600480360381019061035c91906126f4565b610a20565b005b34801561036f57600080fd5b50610378610b6f565b6040516103859190612f45565b60405180910390f35b34801561039a57600080fd5b506103b560048036038101906103b091906126a2565b610b79565b005b3480156103c357600080fd5b506103cc610bf7565b6040516103d99190612f45565b60405180910390f35b3480156103ee57600080fd5b506103f7610c01565b6040516104049190612cb7565b60405180910390f35b34801561041957600080fd5b50610422610c25565b005b34801561043057600080fd5b50610439610c62565b6040516104469190612cfb565b60405180910390f35b34801561045b57600080fd5b5061047660048036038101906104719190612730565b610c7e565b005b34801561048457600080fd5b5061048d610e6c565b60405161049a9190612f45565b60405180910390f35b3480156104af57600080fd5b506104b8610e76565b6040516104c59190612c9c565b60405180910390f35b3480156104da57600080fd5b506104e3610e8d565b6040516104f09190612cfb565b60405180910390f35b34801561050557600080fd5b5061050e610ec6565b60405161051b9190612c21565b60405180910390f35b34801561053057600080fd5b50610539610eef565b6040516105469190612cfb565b60405180910390f35b34801561055b57600080fd5b50610564610f0b565b005b34801561057257600080fd5b5061058d60048036038101906105889190612666565b610f48565b60405161059a9190612c9c565b60405180910390f35b3480156105af57600080fd5b506105b861109b565b6040516105c59190612cfb565b60405180910390f35b3480156105da57600080fd5b506105e36110d4565b6040516105f09190612f45565b60405180910390f35b34801561060557600080fd5b5061060e6110de565b60405161061b9190612c21565b60405180910390f35b34801561063057600080fd5b50610639611108565b6040516106469190612cb7565b60405180910390f35b34801561065b57600080fd5b5061066461112c565b6040516106719190612c9c565b60405180910390f35b34801561068657600080fd5b5061068f611143565b60405161069c9190612f45565b60405180910390f35b3480156106b157600080fd5b506106cc60048036038101906106c79190612601565b61114d565b005b3480156106da57600080fd5b506106e3611550565b6040516106f09190612cfb565b60405180910390f35b34801561070557600080fd5b5061070e611589565b60405161071b9190612cb7565b60405180910390f35b34801561073057600080fd5b5061074b600480360381019061074691906126a2565b6115ad565b005b34801561075957600080fd5b50610774600480360381019061076f91906126a2565b61162b565b005b610790600480360381019061078b9190612601565b6116a9565b005b34801561079e57600080fd5b506107a76117f3565b6040516107b49190612cfb565b60405180910390f35b3480156107c957600080fd5b506107e460048036038101906107df91906125d8565b61182c565b005b6000600854905090565b6040518060600160405280602581526020016132616025913981565b6000600554905090565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc61084881610843611902565b61190a565b60006006549050826006819055507fe98e5fcd3d43c7e5dd114bafcc428bc7ff8525b014fe3b51fc721ba5671f98fb8184604051610887929190612d99565b60405180910390a1505050565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b139696108c6816108c1611902565b61190a565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082600260016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f4ca142703425bec1d507d5581fac3a3e61eadcbeafbd7c0a03e2897d96de1cc5818460405161095f929190612e71565b60405180910390a1505050565b6040518060600160405280602d8152602001613234602d913981565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc6109ba816109b5611902565b61190a565b6001600260156101000a81548160ff021916908315150217905550816009819055507fc325d2ac60d7daf289657fb87715784752670ab7724fa710395d5b64e29da7f4610a05611902565b83604051610a14929190612c3c565b60405180910390a15050565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc610a5281610a4d611902565b61190a565b610a718273ffffffffffffffffffffffffffffffffffffffff166119a7565b156040518060400160405280601981526020017f4176617461724d61726b65743a2062616420616464726573730000000000000081525090610ae9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae09190612cfb565b60405180910390fd5b50610b13838373ffffffffffffffffffffffffffffffffffffffff166119ba90919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff167f372bb9ce23c45af0229f3ad425305ebadfb790c0b0453fa3077a02d7d8c987bb610b53611902565b85604051610b62929190612c3c565b60405180910390a2505050565b6000600754905090565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc610bab81610ba6611902565b61190a565b60006008549050826008819055507fe98e5fcd3d43c7e5dd114bafcc428bc7ff8525b014fe3b51fc721ba5671f98fb8184604051610bea929190612df5565b60405180910390a1505050565b6000600654905090565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b1396981565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b13969610c5781610c52611902565b61190a565b610c5f611aae565b50565b6040518060600160405280602381526020016132866023913981565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc610cb081610cab611902565b61190a565b610cb861112c565b156040518060600160405280602581526020016132616025913990610d13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0a9190612cfb565b60405180910390fd5b506000610d1e6110de565b73ffffffffffffffffffffffffffffffffffffffff16631ca8b6cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d6357600080fd5b505afa158015610d77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9b91906126cb565b90508084610da76110d4565b610db19190612f92565b11156040518060600160405280602381526020016132866023913990610e0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e049190612cfb565b60405180910390fd5b50836007819055508260088190555060006003819055507f38c3026eb99d218aa493faa20fd7b509f16e54738ea73948d7edfe9fc8e869a2610e4d611902565b8585604051610e5e93929190612c65565b60405180910390a150505050565b6000600354905090565b6000600260009054906101000a900460ff16905090565b6040518060400160405280601881526020017f4176617461724d61726b65743a2062616420616d6f756e74000000000000000081525081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6040518060600160405280602c81526020016132a9602c913981565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b13969610f3d81610f38611902565b61190a565b610f45611b50565b50565b600080610f53610ec6565b90508073ffffffffffffffffffffffffffffffffffffffff166391d1485485856040518363ffffffff1660e01b8152600401610f90929190612cd2565b60206040518083038186803b158015610fa857600080fd5b505afa158015610fbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe0919061263d565b8061109257508073ffffffffffffffffffffffffffffffffffffffff166391d148547fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d856040518363ffffffff1660e01b8152600401611041929190612cd2565b60206040518083038186803b15801561105957600080fd5b505afa15801561106d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611091919061263d565b5b91505092915050565b6040518060400160405280601d81526020017f4176617461724d61726b65743a20756e61626c6520746f20636c61696d00000081525081565b6000600454905090565b6000600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc81565b6000600260159054906101000a900460ff16905090565b6000600954905090565b60026001541415611193576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118a90612f25565b60405180910390fd5b60026001819055506111a3610e76565b156111e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111da90612e51565b60405180910390fd5b6111eb61112c565b6040518060400160405280601d81526020017f4176617461724d61726b65743a20756e61626c6520746f20636c61696d00000081525090611262576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112599190612cfb565b60405180910390fd5b5061126c826119a7565b156040518060400160405280601981526020017f4176617461724d61726b65743a20626164206164647265737300000000000000815250906112e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112db9190612cfb565b60405180910390fd5b5080600a60006112f2611902565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156040518060400160405280601781526020017f4176617461724d61726b65743a2062616420636f756e74000000000000000000815250906113a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139d9190612cfb565b60405180910390fd5b5060006113b16110de565b905060005b828110156114cd5760008273ffffffffffffffffffffffffffffffffffffffff16636a627842866040518263ffffffff1660e01b81526004016113f99190612c21565b602060405180830381600087803b15801561141357600080fd5b505af1158015611427573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144b91906126cb565b90508473ffffffffffffffffffffffffffffffffffffffff1661146c611902565b73ffffffffffffffffffffffffffffffffffffffff167fa3ffb7672390a0ed6449781b840e610ff83bbcc99600efadad6d34ad5d70a05d836040516114b19190612f45565b60405180910390a35080806114c590613137565b9150506113b6565b5081600a60006114db611902565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546115249190613042565b92505081905550816004600082825461153d9190613042565b9250508190555050600180819055505050565b6040518060400160405280601781526020017f4176617461724d61726b65743a2062616420636f756e7400000000000000000081525081565b7fdc0d7a095c4e917ecbeb7deda7c942ff9744013d419e37549215a413915e421d81565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc6115df816115da611902565b61190a565b60006005549050826005819055507fe98e5fcd3d43c7e5dd114bafcc428bc7ff8525b014fe3b51fc721ba5671f98fb818460405161161e929190612ead565b60405180910390a1505050565b7f33fa24d9aab6b79237248a16094d5f78ea83bb51e42c123ce925a264e7d816cc61165d81611658611902565b61190a565b60006009549050826009819055507fe98e5fcd3d43c7e5dd114bafcc428bc7ff8525b014fe3b51fc721ba5671f98fb818460405161169c929190612ee9565b60405180910390a1505050565b600260015414156116ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e690612f25565b60405180910390fd5b60026001819055506116ff610e76565b1561173f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173690612e51565b60405180910390fd5b611748826119a7565b156040518060400160405280601981526020017f4176617461724d61726b65743a20626164206164647265737300000000000000815250906117c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117b79190612cfb565b60405180910390fd5b506117c961112c565b156117dd576117d88282611bf3565b6117e8565b6117e78282611fb2565b5b600180819055505050565b6040518060400160405280601981526020017f4176617461724d61726b65743a2062616420616464726573730000000000000081525081565b7fefa080c67ecf4a6bf40c9dc64173420c08f359250ca6562d7c80f7c7b9b1396961185e81611859611902565b61190a565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f4ca142703425bec1d507d5581fac3a3e61eadcbeafbd7c0a03e2897d96de1cc581846040516118f5929190612d5d565b60405180910390a1505050565b600033905090565b6119148282610f48565b6119a3576119398173ffffffffffffffffffffffffffffffffffffffff166014612260565b6119478360001c6020612260565b604051602001611958929190612be7565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199a9190612cfb565b60405180910390fd5b5050565b600080823b905060008111915050919050565b804710156119fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f490612e31565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1682604051611a2390612bd2565b60006040518083038185875af1925050503d8060008114611a60576040519150601f19603f3d011682016040523d82523d6000602084013e611a65565b606091505b5050905080611aa9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa090612dd5565b60405180910390fd5b505050565b611ab6610e76565b611af5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aec90612d3d565b60405180910390fd5b6000600260006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611b39611902565b604051611b469190612c21565b60405180910390a1565b611b58610e76565b15611b98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b8f90612e51565b60405180910390fd5b6001600260006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611bdc611902565b604051611be99190612c21565b60405180910390a1565b611bfb61080c565b8111156040518060400160405280601781526020017f4176617461724d61726b65743a2062616420636f756e7400000000000000000081525090611c75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6c9190612cfb565b60405180910390fd5b506000611c806110de565b905060008173ffffffffffffffffffffffffffffffffffffffff16631ca8b6cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cca57600080fd5b505afa158015611cde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0291906126cb565b905060008273ffffffffffffffffffffffffffffffffffffffff166311b639d96040518163ffffffff1660e01b815260040160206040518083038186803b158015611d4c57600080fd5b505afa158015611d60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8491906126cb565b9050818482611d916110d4565b611d9b9190612f92565b611da59190612f92565b11156040518060600160405280602381526020016132866023913990611e01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df89190612cfb565b60405180910390fd5b50611e0a611143565b84611e159190612fe8565b3410156040518060400160405280601881526020017f4176617461724d61726b65743a2062616420616d6f756e74000000000000000081525090611e8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e869190612cfb565b60405180910390fd5b5060005b84811015611faa5760008473ffffffffffffffffffffffffffffffffffffffff16636a627842886040518263ffffffff1660e01b8152600401611ed69190612c21565b602060405180830381600087803b158015611ef057600080fd5b505af1158015611f04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f2891906126cb565b90508673ffffffffffffffffffffffffffffffffffffffff16611f49611902565b73ffffffffffffffffffffffffffffffffffffffff167f73879c581b78b9f41cfd6225eca8145a59d7dfb300b8773caade372018e8219c83604051611f8e9190612f45565b60405180910390a3508080611fa290613137565b915050611e93565b505050505050565b611fba610b6f565b81611fc3610e6c565b611fcd9190612f92565b11156040518060600160405280602c81526020016132a9602c913990612029576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120209190612cfb565b60405180910390fd5b50612032610bf7565b81600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461207d9190612f92565b11156040518060600160405280602d8152602001613234602d9139906120d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d09190612cfb565b60405180910390fd5b506120e26107e6565b816120ed9190612fe8565b3410156040518060400160405280601881526020017f4176617461724d61726b65743a2062616420616d6f756e74000000000000000081525090612167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215e9190612cfb565b60405180910390fd5b5080600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546121b79190612f92565b9250508190555080600360008282546121d09190612f92565b9250508190555080600460008282546121e99190612f92565b925050819055508173ffffffffffffffffffffffffffffffffffffffff1661220f611902565b73ffffffffffffffffffffffffffffffffffffffff167f94474feda554c5a8bbdb084da084d3446db466a344d2a874bd8cd48f9ffe28bc836040516122549190612f45565b60405180910390a35050565b6060600060028360026122739190612fe8565b61227d9190612f92565b67ffffffffffffffff8111156122bc577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156122ee5781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061234c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106123d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026124169190612fe8565b6124209190612f92565b90505b600181111561250c577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110612488577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b1a60f81b8282815181106124c5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c9450806125059061310d565b9050612423565b5060008414612550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254790612d1d565b60405180910390fd5b8091505092915050565b600081359050612569816131c0565b92915050565b60008135905061257e816131d7565b92915050565b600081519050612593816131ee565b92915050565b6000813590506125a881613205565b92915050565b6000813590506125bd8161321c565b92915050565b6000815190506125d28161321c565b92915050565b6000602082840312156125ea57600080fd5b60006125f88482850161255a565b91505092915050565b6000806040838503121561261457600080fd5b60006126228582860161255a565b9250506020612633858286016125ae565b9150509250929050565b60006020828403121561264f57600080fd5b600061265d84828501612584565b91505092915050565b6000806040838503121561267957600080fd5b600061268785828601612599565b92505060206126988582860161255a565b9150509250929050565b6000602082840312156126b457600080fd5b60006126c2848285016125ae565b91505092915050565b6000602082840312156126dd57600080fd5b60006126eb848285016125c3565b91505092915050565b6000806040838503121561270757600080fd5b6000612715858286016125ae565b92505060206127268582860161256f565b9150509250929050565b6000806040838503121561274357600080fd5b6000612751858286016125ae565b9250506020612762858286016125ae565b9150509250929050565b61277581613076565b82525050565b6127848161309a565b82525050565b612793816130a6565b82525050565b60006127a482612f60565b6127ae8185612f76565b93506127be8185602086016130da565b6127c7816131af565b840191505092915050565b60006127dd82612f60565b6127e78185612f87565b93506127f78185602086016130da565b80840191505092915050565b6000612810602083612f76565b91507f537472696e67733a20686578206c656e67746820696e73756666696369656e746000830152602082019050919050565b6000612850601483612f76565b91507f5061757361626c653a206e6f74207061757365640000000000000000000000006000830152602082019050919050565b6000612890600d83612f76565b91507f616363657373436f6e74726f6c000000000000000000000000000000000000006000830152602082019050919050565b60006128d0601283612f76565b91507f70726573616c654d6178427579436f756e7400000000000000000000000000006000830152602082019050919050565b6000612910603a83612f76565b91507f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008301527f6563697069656e74206d617920686176652072657665727465640000000000006020830152604082019050919050565b6000612976600c83612f76565b91507f70726573616c65507269636500000000000000000000000000000000000000006000830152602082019050919050565b60006129b6601d83612f76565b91507f416464726573733a20696e73756666696369656e742062616c616e63650000006000830152602082019050919050565b60006129f6601083612f76565b91507f5061757361626c653a20706175736564000000000000000000000000000000006000830152602082019050919050565b6000612a36600583612f76565b91507f746f6b656e0000000000000000000000000000000000000000000000000000006000830152602082019050919050565b6000612a76600b83612f76565b91507f6d6178427579436f756e740000000000000000000000000000000000000000006000830152602082019050919050565b6000612ab6600083612f6b565b9150600082019050919050565b6000612ad0600b83612f76565b91507f7075626c696350726963650000000000000000000000000000000000000000006000830152602082019050919050565b6000612b10601783612f87565b91507f416363657373436f6e74726f6c3a206163636f756e74200000000000000000006000830152601782019050919050565b6000612b50601f83612f76565b91507f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006000830152602082019050919050565b6000612b90601183612f87565b91507f206973206d697373696e6720726f6c65200000000000000000000000000000006000830152601182019050919050565b612bcc816130d0565b82525050565b6000612bdd82612aa9565b9150819050919050565b6000612bf282612b03565b9150612bfe82856127d2565b9150612c0982612b83565b9150612c1582846127d2565b91508190509392505050565b6000602082019050612c36600083018461276c565b92915050565b6000604082019050612c51600083018561276c565b612c5e6020830184612bc3565b9392505050565b6000606082019050612c7a600083018661276c565b612c876020830185612bc3565b612c946040830184612bc3565b949350505050565b6000602082019050612cb1600083018461277b565b92915050565b6000602082019050612ccc600083018461278a565b92915050565b6000604082019050612ce7600083018561278a565b612cf4602083018461276c565b9392505050565b60006020820190508181036000830152612d158184612799565b905092915050565b60006020820190508181036000830152612d3681612803565b9050919050565b60006020820190508181036000830152612d5681612843565b9050919050565b60006060820190508181036000830152612d7681612883565b9050612d85602083018561276c565b612d92604083018461276c565b9392505050565b60006060820190508181036000830152612db2816128c3565b9050612dc16020830185612bc3565b612dce6040830184612bc3565b9392505050565b60006020820190508181036000830152612dee81612903565b9050919050565b60006060820190508181036000830152612e0e81612969565b9050612e1d6020830185612bc3565b612e2a6040830184612bc3565b9392505050565b60006020820190508181036000830152612e4a816129a9565b9050919050565b60006020820190508181036000830152612e6a816129e9565b9050919050565b60006060820190508181036000830152612e8a81612a29565b9050612e99602083018561276c565b612ea6604083018461276c565b9392505050565b60006060820190508181036000830152612ec681612a69565b9050612ed56020830185612bc3565b612ee26040830184612bc3565b9392505050565b60006060820190508181036000830152612f0281612ac3565b9050612f116020830185612bc3565b612f1e6040830184612bc3565b9392505050565b60006020820190508181036000830152612f3e81612b43565b9050919050565b6000602082019050612f5a6000830184612bc3565b92915050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000612f9d826130d0565b9150612fa8836130d0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612fdd57612fdc613180565b5b828201905092915050565b6000612ff3826130d0565b9150612ffe836130d0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561303757613036613180565b5b828202905092915050565b600061304d826130d0565b9150613058836130d0565b92508282101561306b5761306a613180565b5b828203905092915050565b6000613081826130b0565b9050919050565b6000613093826130b0565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b838110156130f85780820151818401526020810190506130dd565b83811115613107576000848401525b50505050565b6000613118826130d0565b9150600082141561312c5761312b613180565b5b600182039050919050565b6000613142826130d0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561317557613174613180565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b6131c981613076565b81146131d457600080fd5b50565b6131e081613088565b81146131eb57600080fd5b50565b6131f78161309a565b811461320257600080fd5b50565b61320e816130a6565b811461321957600080fd5b50565b613225816130d0565b811461323057600080fd5b5056fe4176617461724d61726b65743a2070726573616c6520636f756e742070657220757365722065786365656465644176617461724d61726b65743a20756e61626c6520746f20616c6c6f772070726573616c654176617461724d61726b65743a20746f74616c20737570706c792065786365656465644176617461724d61726b65743a20746f74616c20616c6c6f7765642070726573616c65206578636565646564a2646970667358221220843a7a9a962cf967f4bea239376a2b8873b0f04e798eb549b2c2252116ab8aca64736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c4bf56ff8000f0864c8298ea7fdbcbb7376da357000000000000000000000000a54102176c054a20dee3d4e772a7010ed641417d
-----Decoded View---------------
Arg [0] : avatarToken (address): 0xC4BF56FF8000F0864C8298eA7FDbcbb7376DA357
Arg [1] : accessControl (address): 0xa54102176C054A20Dee3d4E772A7010Ed641417D
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c4bf56ff8000f0864c8298ea7fdbcbb7376da357
Arg [1] : 000000000000000000000000a54102176c054a20dee3d4e772a7010ed641417d
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.