Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
Latest 25 from a total of 263 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Wrap | 20368522 | 4 days ago | IN | 0 ETH | 0.00061376 | ||||
Wrap | 20013405 | 54 days ago | IN | 0 ETH | 0.00112972 | ||||
Wrap | 19831696 | 79 days ago | IN | 0 ETH | 0.00047539 | ||||
Wrap | 19539013 | 120 days ago | IN | 0 ETH | 0.00525532 | ||||
Wrap | 18035081 | 331 days ago | IN | 0 ETH | 0.00340693 | ||||
Wrap | 18030187 | 332 days ago | IN | 0 ETH | 0.00227455 | ||||
Wrap | 18007534 | 335 days ago | IN | 0 ETH | 0.00177198 | ||||
Wrap | 17960640 | 341 days ago | IN | 0 ETH | 0.00293112 | ||||
Wrap | 17960638 | 341 days ago | IN | 0 ETH | 0.00294169 | ||||
Mint ERC721 | 17928517 | 346 days ago | IN | 0 ETH | 0.01062391 | ||||
Mint ERC721 | 17920361 | 347 days ago | IN | 0 ETH | 0.00764565 | ||||
Mint ERC721 | 17913586 | 348 days ago | IN | 0 ETH | 0.0093414 | ||||
Mint ERC721 | 17913522 | 348 days ago | IN | 0 ETH | 0.00857476 | ||||
Mint ERC721 | 17913493 | 348 days ago | IN | 0 ETH | 0.00760981 | ||||
Mint ERC721 | 17913461 | 348 days ago | IN | 0 ETH | 0.00791963 | ||||
Mint ERC721 | 17913435 | 348 days ago | IN | 0 ETH | 0.00761388 | ||||
Mint ERC721 | 17913152 | 348 days ago | IN | 0 ETH | 0.00797578 | ||||
Mint ERC721 | 17913124 | 348 days ago | IN | 0 ETH | 0.00733259 | ||||
Mint ERC721 | 17913090 | 348 days ago | IN | 0 ETH | 0.00767628 | ||||
Mint ERC721 | 17913069 | 348 days ago | IN | 0 ETH | 0.00720644 | ||||
Mint ERC721 | 17913046 | 348 days ago | IN | 0 ETH | 0.00700373 | ||||
Mint ERC721 | 17912995 | 348 days ago | IN | 0 ETH | 0.00633531 | ||||
Wrap | 17736532 | 373 days ago | IN | 0 ETH | 0.00902905 | ||||
Wrap | 17722359 | 375 days ago | IN | 0 ETH | 0.00551427 | ||||
Wrap | 17686956 | 380 days ago | IN | 0 ETH | 0.00586257 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
CryptoTeddiesMinter
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0-only // @author creco.xyz 🐊 2022 pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; interface OSS { function balanceOf(address _user, uint256 _tokenId) external view returns (uint256); function ownerOf(address _tokenId) external returns(bool); function safeTransferFrom( address _from, address _to, uint256 _id, uint256 _amount, bytes calldata _data ) external; } interface Shelf { function unlock(uint256 _tokenId, address _user) external; } interface CryptoTeddiesERC721 { function mintTokenId(address _to, uint256 _tokenId) external returns(uint256); function setDNA(uint256[] memory _tokenIds, uint256[] memory _dnaArr) external; function mintWithDNA(address _to, uint256 _dna) external returns(uint256); function transferFrom(address _from, address _to,uint256 _tokenId) external; function burn(uint256 _tokenId) external; function ownerOf(uint _tokenId) external returns (address); function getDNA(uint256 _tokenId) external returns(uint256); function LAST_MIGRATION_INDEX() external returns(uint256); } interface CryptoTeddiesERC1155 { function setDNA(uint256[] memory _tokenIds, uint256[] memory _dnaArr) external; function mintWithDNA(address _to, uint _amount, uint256 _dna) external returns(uint256); function mintTo(address _to, uint256 _quantity, uint256 _tokenId) external returns(uint256); function balanceOf(address, uint256) external view returns (uint256); function LAST_MIGRATION_INDEX() external returns(uint256); function safeTransferFrom( address _from, address _to, uint256 _id, uint256 _amount, bytes calldata _data ) external; function burn(address _from, uint256 _tokenId, uint256 _amount) external; } interface IMetadata { struct AttributeInfo { uint256 trait_type_index; string trait_type; uint256 trait_value_index; string trait_value; } function traitValues(uint256 trait_type_index, uint256 trait_value_index) external view returns (string memory); function setNames(uint[] memory dna, string[] memory _names) external; function setDescriptions(uint[] memory dna, string[] memory _descriptions) external; function writeTraitTypes(string[] memory trait_types) external; function extendMetadata(AttributeInfo[] calldata traits) external; } // FIXME minter can not be paused contract CryptoTeddiesMinter is AccessControlEnumerable { OSS storeFront = OSS(0x495f947276749Ce646f68AC8c248420045cb7b5e); Shelf shelf; CryptoTeddiesERC721 teddies; CryptoTeddiesERC1155 teddiesEditions; IMetadata metadata; // strofront id -> ERC721 tokenID (tokenID can be 0) mapping(uint256 => uint256) public wrapmap721; // token id -> storeFrontid mapping(uint256 => uint256) public unwrapmap721; // strofront id -> ERC1155 tokenID (tokenID can not be 0) mapping(uint256 => uint256) public wrapmap1155; // token id -> storeFrontid mapping(uint256 => uint256) public unwrapmap1155; modifier onlyAdmin { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "CryptoTeddies Minter: must have Admin role"); _; } constructor(address _shelf, address _teddies, address _teddiesEditions, address _metadata) { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); // set admin permissions shelf = Shelf(_shelf); teddies = CryptoTeddiesERC721(_teddies); // ERC721 Cryptoteddies contract teddiesEditions = CryptoTeddiesERC1155(_teddiesEditions); // ERC1155 Cryptoteddies contract metadata = IMetadata(_metadata); } function setMetadataContract(address _contractAddress) onlyAdmin public { metadata = IMetadata(_contractAddress); } /** @dev init ERC721 DNA for wrapping */ function initERC721DNA(uint256[] calldata _storeFrontIds, uint256[] calldata _tokenIds, uint256[] calldata _dna) onlyAdmin external { require(_tokenIds.length == _storeFrontIds.length, "CryptoTeddies Minter - data missing"); require(_tokenIds.length == _dna.length, "CryptoTeddies Minter - data missing"); uint items = _storeFrontIds.length; for (uint i = 0; i < items; i++) { uint storeFrontId = _storeFrontIds[i]; uint tokenId = _tokenIds[i]; wrapmap721[storeFrontId] = tokenId; unwrapmap721[tokenId] = storeFrontId; } teddies.setDNA(_tokenIds, _dna); } /** @dev init ERC1155 DNA for wrapping */ function initERC1155DNA(uint256[] calldata _storeFrontIds, uint256[] calldata _tokenIds, uint256[] calldata _dna) onlyAdmin external { require(_tokenIds.length == _storeFrontIds.length, "CryptoTeddies Minter - data missing"); require(_tokenIds.length == _dna.length, "CryptoTeddies Minter - data missing"); uint items = _storeFrontIds.length; for (uint i = 0; i < items; i++) { uint storeFrontId = _storeFrontIds[i]; uint tokenId = _tokenIds[i]; wrapmap1155[storeFrontId] = tokenId; unwrapmap1155[tokenId] = storeFrontId; } teddiesEditions.setDNA(_tokenIds, _dna); } /** @dev wrap OpenSea teddy to standalone contract */ function wrap(uint _storeFrontId) public { uint tokenId = wrapmap1155[_storeFrontId]; if(tokenId == 0) { wrapERC721(_storeFrontId); } else { wrapERC1155(_storeFrontId); } } /** @dev unwrap teddy from standalone contract to OpenSea */ function unwrap(uint _tokenId) public { uint storeFrontId = unwrapmap1155[_tokenId]; if(storeFrontId == 0) { unwrapERC721(_tokenId); } else { unwrapERC1155(_tokenId); } } /** @dev wrap ERC1155 teddy */ function wrapERC1155(uint _storeFrontId) internal { // make sure user owner of NFT require((storeFront.balanceOf(msg.sender, _storeFrontId) >= 1), "CryptoTeddies Minter: user not token owner"); uint tokenId = wrapmap1155[_storeFrontId]; require((tokenId != 0), "CryptoTeddies Minter: token not CryptoTeddies edition"); // lock storeFront teddy in shelf storeFront.safeTransferFrom(msg.sender, address(shelf), _storeFrontId, 1, ""); teddiesEditions.mintTo(msg.sender, 1, tokenId); } /** @dev unwrap ERC1155 teddy */ function unwrapERC1155(uint _tokenId) internal { require((teddiesEditions.balanceOf(msg.sender, _tokenId) >= 1), "CryptoTeddies Minter: user not token owner"); require(_tokenId <= teddiesEditions.LAST_MIGRATION_INDEX()); // can not unwrap unmigrated tokens uint storeFrontId = unwrapmap1155[_tokenId]; require((storeFront.balanceOf(address(shelf), storeFrontId) >= 1), "CryptoTeddies Minter: token not part of CryptoTeddies Collection"); // transfer ERC1155 teddy from user and burn -> user has to approve teddiesEditions.burn(msg.sender, _tokenId, 1); // unlock storefront teddy from shelf and send back to user shelf.unlock(storeFrontId, msg.sender); } /** @dev wrap ERC721 teddy */ function wrapERC721(uint _storeFrontId) internal { // make sure user owner of NFT require((storeFront.balanceOf(msg.sender, _storeFrontId) >= 1), "CryptoTeddies Minter: user not token owner"); uint tokenId = wrapmap721[_storeFrontId]; uint reverseId = unwrapmap721[tokenId]; // check for edge case tokenId 0, since 0 is the default uint value. Make sure that the tokenId 0 matches to exact the same storefront token. require((_storeFrontId == reverseId), "CryptoTeddies Minter: token not from CryptoTeddies collection"); storeFront.safeTransferFrom(msg.sender, address(shelf), _storeFrontId, 1, ""); teddies.mintTokenId(msg.sender, tokenId); } /** @dev unwrap ERC721 teddy */ function unwrapERC721(uint _tokenId) internal { // make sure user owner of NFT require(teddies.ownerOf(_tokenId) == msg.sender, "CryptoTeddies Minter: user not token owner"); require(_tokenId <= teddies.LAST_MIGRATION_INDEX()); // can not unwrap unmigrated tokens uint storeFrontId = unwrapmap721[_tokenId]; require((storeFront.balanceOf(address(shelf), storeFrontId) >= 1), "CryptoTeddies Minter: token not part of CryptoTeddies Collection"); // transfer ERC721 teddy from user and burn -> user has to approve teddies.transferFrom(msg.sender, address(this), _tokenId); teddies.burn(_tokenId); // unlock storefront teddy from shelf and send back to user shelf.unlock(storeFrontId, msg.sender); } function _compareStrings(string memory a, string memory b) internal pure returns (bool) { return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b)))); } function traitToIndex(uint trait_type_idx, string calldata trait_value) public view returns (uint) { uint idx = 0; while(true) { if(_compareStrings(trait_value, metadata.traitValues(trait_type_idx, idx))) { return idx; } // end reached if(_compareStrings("", metadata.traitValues(trait_type_idx, idx))) { return idx + 1; // return insert pos } idx++; } } function extendTraits(string[] calldata trait_values) public view returns(uint[] memory) { uint trait_count = trait_values.length; uint[] memory indices = new uint[](trait_count); for (uint index = 0; index < trait_count; index++) { indices[index] = traitToIndex(index, trait_values[index]); } return indices; } /** @dev mint new ERC721 teddy */ function mintERC721(address _to, uint _dna, string calldata name, string calldata description, IMetadata.AttributeInfo[] calldata traits) onlyAdmin public { teddies.mintWithDNA(_to, _dna); uint[] memory dna = new uint[](1); dna[0] = _dna; string[] memory names = new string[](1); names[0] = name; metadata.setNames(dna, names); string[] memory descriptions = new string[](1); descriptions[0] = description; metadata.setDescriptions(dna, descriptions); metadata.extendMetadata(traits); } /** @dev mint new ERC1155 teddy edition */ function mintERC1155(address _to, uint _amount, uint _dna, string calldata name, string calldata description, IMetadata.AttributeInfo[] calldata traits) onlyAdmin public { teddiesEditions.mintWithDNA(_to, _amount, _dna); uint[] memory dna = new uint[](1); dna[0] = _dna; string[] memory names = new string[](1); names[0] = name; metadata.setNames(dna, names); string[] memory descriptions = new string[](1); descriptions[0] = description; metadata.setDescriptions(dna, descriptions); metadata.extendMetadata(traits); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_shelf","type":"address"},{"internalType":"address","name":"_teddies","type":"address"},{"internalType":"address","name":"_teddiesEditions","type":"address"},{"internalType":"address","name":"_metadata","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string[]","name":"trait_values","type":"string[]"}],"name":"extendTraits","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_storeFrontIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_dna","type":"uint256[]"}],"name":"initERC1155DNA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_storeFrontIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_dna","type":"uint256[]"}],"name":"initERC721DNA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_dna","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"components":[{"internalType":"uint256","name":"trait_type_index","type":"uint256"},{"internalType":"string","name":"trait_type","type":"string"},{"internalType":"uint256","name":"trait_value_index","type":"uint256"},{"internalType":"string","name":"trait_value","type":"string"}],"internalType":"struct IMetadata.AttributeInfo[]","name":"traits","type":"tuple[]"}],"name":"mintERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_dna","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"components":[{"internalType":"uint256","name":"trait_type_index","type":"uint256"},{"internalType":"string","name":"trait_type","type":"string"},{"internalType":"uint256","name":"trait_value_index","type":"uint256"},{"internalType":"string","name":"trait_value","type":"string"}],"internalType":"struct IMetadata.AttributeInfo[]","name":"traits","type":"tuple[]"}],"name":"mintERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"}],"name":"setMetadataContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"trait_type_idx","type":"uint256"},{"internalType":"string","name":"trait_value","type":"string"}],"name":"traitToIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"unwrapmap1155","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"unwrapmap721","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_storeFrontId","type":"uint256"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"wrapmap1155","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"wrapmap721","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600280546001600160a01b03191673495f947276749ce646f68ac8c248420045cb7b5e1790553480156200003757600080fd5b5060405162002bed38038062002bed8339810160408190526200005a916200023d565b62000067600033620000bb565b600380546001600160a01b039586166001600160a01b03199182161790915560048054948616948216949094179093556005805492851692841692909217909155600680549190931691161790556200029a565b620000c78282620000cb565b5050565b620000e282826200010e60201b620010231760201c565b600082815260016020908152604090912062000109918390620010a7620001ae821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000c7576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200016a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001c5836001600160a01b038416620001ce565b90505b92915050565b60008181526001830160205260408120546200021757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001c8565b506000620001c8565b80516001600160a01b03811681146200023857600080fd5b919050565b600080600080608085870312156200025457600080fd5b6200025f8562000220565b93506200026f6020860162000220565b92506200027f6040860162000220565b91506200028f6060860162000220565b905092959194509250565b61294380620002aa6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c8063af6039cf116100b8578063d547741f1161007c578063d547741f146102fa578063de0e9a3e1461030d578063e5187f4314610320578063ea598cb014610333578063fba31f3614610346578063fcc353bc1461035957600080fd5b8063af6039cf14610267578063c87d8ab614610287578063ca15c873146102a7578063cc657a3f146102ba578063d136f16b146102da57600080fd5b80635ad218231161010a5780635ad21823146101db5780637ad8a7d7146101fb5780639010d07c1461020e578063907501061461023957806391d148541461024c578063a217fddf1461025f57600080fd5b806301ffc9a714610147578063248a9ca31461016f5780632f2ff15d146101a057806336568abe146101b55780635499f5a8146101c8575b600080fd5b61015a610155366004611e4a565b61036c565b60405190151581526020015b60405180910390f35b61019261017d366004611e74565b60009081526020819052604090206001015490565b604051908152602001610166565b6101b36101ae366004611ea2565b610397565b005b6101b36101c3366004611ea2565b6103c1565b6101926101d6366004611f1a565b610444565b6101926101e9366004611e74565b60096020526000908152604090205481565b6101b3610209366004611fa9565b610583565b61022161021c366004612042565b6106d8565b6040516001600160a01b039091168152602001610166565b6101b3610247366004612064565b6106f0565b61015a61025a366004611ea2565b610a24565b610192600081565b610192610275366004611e74565b600a6020526000908152604090205481565b610192610295366004611e74565b60076020526000908152604090205481565b6101926102b5366004611e74565b610a4d565b6101926102c8366004611e74565b60086020526000908152604090205481565b6102ed6102e8366004612125565b610a64565b60405161016691906121a1565b6101b3610308366004611ea2565b610b18565b6101b361031b366004611e74565b610b3d565b6101b361032e3660046121b4565b610b66565b6101b3610341366004611e74565b610baf565b6101b3610354366004611fa9565b610bd8565b6101b36103673660046121d1565b610cf3565b60006001600160e01b03198216635a05180f60e01b14806103915750610391826110bc565b92915050565b6000828152602081905260409020600101546103b2816110f1565b6103bc83836110fe565b505050565b6001600160a01b03811633146104365760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104408282611120565b5050565b6000805b6104ff84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050600654604051639079eeb960e01b8152600481018b9052602481018790526001600160a01b039091169250639079eeb991506044015b600060405180830381865afa1580156104d2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104fa91908101906122c0565b611142565b1561050b57905061057c565b60408051602081018252600081526006549151639079eeb960e01b81526004810188905260248101849052610552926001600160a01b031690639079eeb9906044016104b5565b1561056a57610562816001612382565b91505061057c565b8061057481612395565b915050610448565b9392505050565b61058e600033610a24565b6105aa5760405162461bcd60e51b815260040161042d906123ae565b8285146105c95760405162461bcd60e51b815260040161042d906123f8565b8281146105e85760405162461bcd60e51b815260040161042d906123f8565b8460005b818110156106675760008888838181106106085761060861243b565b90506020020135905060008787848181106106255761062561243b565b6000858152600760209081526040808320938202959095013592839055918152600890915291909120929092555081905061065f81612395565b9150506105ec565b5060048054604051631b9c03d760e11b81526001600160a01b039091169163373807ae9161069d91899189918991899101612483565b600060405180830381600087803b1580156106b757600080fd5b505af11580156106cb573d6000803e3d6000fd5b5050505050505050505050565b600082815260016020526040812061057c908361119b565b6106fb600033610a24565b6107175760405162461bcd60e51b815260040161042d906123ae565b600554604051632e2dc79f60e21b81526001600160a01b039091169063b8b71e7c9061074b908c908c908c906004016124aa565b6020604051808303816000875af115801561076a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078e91906124cb565b506040805160018082528183019092526000916020808301908036833701905050905087816000815181106107c5576107c561243b565b6020908102919091010152604080516001808252818301909252600091816020015b60608152602001906001900390816107e757905050905087878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052508551869450909250151590506108485761084861243b565b602090810291909101015260065460405163759351ab60e01b81526001600160a01b039091169063759351ab906108859085908590600401612510565b600060405180830381600087803b15801561089f57600080fd5b505af11580156108b3573d6000803e3d6000fd5b5060009250600191506108c39050565b6040519080825280602002602001820160405280156108f657816020015b60608152602001906001900390816108e15790505b50905086868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052508551869450909250151590506109435761094361243b565b60209081029190910101526006546040516320b8d44560e01b81526001600160a01b03909116906320b8d445906109809086908590600401612510565b600060405180830381600087803b15801561099a57600080fd5b505af11580156109ae573d6000803e3d6000fd5b505060065460405163220fa09160e21b81526001600160a01b03909116925063883e824491506109e490889088906004016125f0565b600060405180830381600087803b1580156109fe57600080fd5b505af1158015610a12573d6000803e3d6000fd5b50505050505050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000818152600160205260408120610391906111a7565b6060816000816001600160401b03811115610a8157610a81612286565b604051908082528060200260200182016040528015610aaa578160200160208202803683370190505b50905060005b82811015610b0f57610ae081878784818110610ace57610ace61243b565b90506020028101906101d691906126ae565b828281518110610af257610af261243b565b602090810291909101015280610b0781612395565b915050610ab0565b50949350505050565b600082815260208190526040902060010154610b33816110f1565b6103bc8383611120565b6000818152600a602052604081205490819003610b5d57610440826111b1565b61044082611499565b610b71600033610a24565b610b8d5760405162461bcd60e51b815260040161042d906123ae565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b60008181526009602052604081205490819003610bcf576104408261168b565b61044082611884565b610be3600033610a24565b610bff5760405162461bcd60e51b815260040161042d906123ae565b828514610c1e5760405162461bcd60e51b815260040161042d906123f8565b828114610c3d5760405162461bcd60e51b815260040161042d906123f8565b8460005b81811015610cbc576000888883818110610c5d57610c5d61243b565b9050602002013590506000878784818110610c7a57610c7a61243b565b6000858152600960209081526040808320938202959095013592839055918152600a909152919091209290925550819050610cb481612395565b915050610c41565b50600554604051631b9c03d760e11b81526001600160a01b039091169063373807ae9061069d908890889088908890600401612483565b610cfe600033610a24565b610d1a5760405162461bcd60e51b815260040161042d906123ae565b60048054604051633251c7ab60e11b81526001600160a01b03909116916364a38f5691610d4b918c918c91016126f4565b6020604051808303816000875af1158015610d6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8e91906124cb565b50604080516001808252818301909252600091602080830190803683370190505090508781600081518110610dc557610dc561243b565b6020908102919091010152604080516001808252818301909252600091816020015b6060815260200190600190039081610de757905050905087878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250855186945090925015159050610e4857610e4861243b565b602090810291909101015260065460405163759351ab60e01b81526001600160a01b039091169063759351ab90610e859085908590600401612510565b600060405180830381600087803b158015610e9f57600080fd5b505af1158015610eb3573d6000803e3d6000fd5b506000925060019150610ec39050565b604051908082528060200260200182016040528015610ef657816020015b6060815260200190600190039081610ee15790505b50905086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250855186945090925015159050610f4357610f4361243b565b60209081029190910101526006546040516320b8d44560e01b81526001600160a01b03909116906320b8d44590610f809086908590600401612510565b600060405180830381600087803b158015610f9a57600080fd5b505af1158015610fae573d6000803e3d6000fd5b505060065460405163220fa09160e21b81526001600160a01b03909116925063883e82449150610fe490889088906004016125f0565b600060405180830381600087803b158015610ffe57600080fd5b505af1158015611012573d6000803e3d6000fd5b505050505050505050505050505050565b61102d8282610a24565b610440576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556110633390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061057c836001600160a01b038416611a65565b60006001600160e01b03198216637965db0b60e01b148061039157506301ffc9a760e01b6001600160e01b0319831614610391565b6110fb8133611ab4565b50565b6111088282611023565b60008281526001602052604090206103bc90826110a7565b61112a8282611b18565b60008281526001602052604090206103bc9082611b7d565b600081604051602001611155919061270d565b604051602081830303815290604052805190602001208360405160200161117c919061270d565b6040516020818303038152906040528051906020012014905092915050565b600061057c8383611b92565b6000610391825490565b600480546040516331a9108f60e11b815291820183905233916001600160a01b0390911690636352211e906024016020604051808303816000875af11580156111fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112229190612729565b6001600160a01b0316146112485760405162461bcd60e51b815260040161042d90612746565b6004805460408051637c411c4760e01b815290516001600160a01b0390921692637c411c4792828201926020929082900301816000875af1158015611291573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b591906124cb565b8111156112c157600080fd5b60008181526008602052604090819020546002546003549251627eeac760e11b815291926001926001600160a01b039283169262fdd58e9261130a9291169086906004016126f4565b602060405180830381865afa158015611327573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134b91906124cb565b10156113695760405162461bcd60e51b815260040161042d90612790565b600480546040516323b872dd60e01b81523392810192909252306024830152604482018490526001600160a01b0316906323b872dd90606401600060405180830381600087803b1580156113bc57600080fd5b505af11580156113d0573d6000803e3d6000fd5b505060048054604051630852cd8d60e31b81529182018690526001600160a01b031692506342966c6891506024015b600060405180830381600087803b15801561141957600080fd5b505af115801561142d573d6000803e3d6000fd5b505060035460405163f1d2ec1d60e01b8152600481018590523360248201526001600160a01b03909116925063f1d2ec1d9150604401600060405180830381600087803b15801561147d57600080fd5b505af1158015611491573d6000803e3d6000fd5b505050505050565b600554604051627eeac760e11b81526001916001600160a01b03169062fdd58e906114ca90339086906004016126f4565b602060405180830381865afa1580156114e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150b91906124cb565b10156115295760405162461bcd60e51b815260040161042d90612746565b600560009054906101000a90046001600160a01b03166001600160a01b0316637c411c476040518163ffffffff1660e01b81526004016020604051808303816000875af115801561157e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a291906124cb565b8111156115ae57600080fd5b6000818152600a602052604090819020546002546003549251627eeac760e11b815291926001926001600160a01b039283169262fdd58e926115f79291169086906004016126f4565b602060405180830381865afa158015611614573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163891906124cb565b10156116565760405162461bcd60e51b815260040161042d90612790565b600554604051637a94c56560e11b81526001600160a01b039091169063f5298aca906113ff90339086906001906004016124aa565b600254604051627eeac760e11b81526001916001600160a01b03169062fdd58e906116bc90339086906004016126f4565b602060405180830381865afa1580156116d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116fd91906124cb565b101561171b5760405162461bcd60e51b815260040161042d90612746565b60008181526007602090815260408083205480845260089092529091205480831461179c5760405162461bcd60e51b815260206004820152603d60248201526000805160206128ee83398151915260448201527f66726f6d2043727970746f5465646469657320636f6c6c656374696f6e000000606482015260840161042d565b600254600354604051637921219560e11b81526001600160a01b039283169263f242432a926117d89233929091169088906001906004016127dc565b600060405180830381600087803b1580156117f257600080fd5b505af1158015611806573d6000803e3d6000fd5b50506004805460405163193b0e8b60e11b81526001600160a01b0390911693506332761d16925061183b9133918791016126f4565b6020604051808303816000875af115801561185a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187e91906124cb565b50505050565b600254604051627eeac760e11b81526001916001600160a01b03169062fdd58e906118b590339086906004016126f4565b602060405180830381865afa1580156118d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f691906124cb565b10156119145760405162461bcd60e51b815260040161042d90612746565b6000818152600960205260408120549081900361197f5760405162461bcd60e51b815260206004820152603560248201526000805160206128ee83398151915260448201527421b93cb83a37aa32b23234b2b99032b234ba34b7b760591b606482015260840161042d565b600254600354604051637921219560e11b81526001600160a01b039283169263f242432a926119bb9233929091169087906001906004016127dc565b600060405180830381600087803b1580156119d557600080fd5b505af11580156119e9573d6000803e3d6000fd5b5050600554604051632baf2acb60e01b81526001600160a01b039091169250632baf2acb9150611a2290339060019086906004016124aa565b6020604051808303816000875af1158015611a41573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103bc91906124cb565b6000818152600183016020526040812054611aac57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610391565b506000610391565b611abe8282610a24565b61044057611ad6816001600160a01b03166014611bbc565b611ae1836020611bbc565b604051602001611af2929190612814565b60408051601f198184030181529082905262461bcd60e51b825261042d91600401612883565b611b228282610a24565b15610440576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061057c836001600160a01b038416611d57565b6000826000018281548110611ba957611ba961243b565b9060005260206000200154905092915050565b60606000611bcb836002612896565b611bd6906002612382565b6001600160401b03811115611bed57611bed612286565b6040519080825280601f01601f191660200182016040528015611c17576020820181803683370190505b509050600360fc1b81600081518110611c3257611c3261243b565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c6157611c6161243b565b60200101906001600160f81b031916908160001a9053506000611c85846002612896565b611c90906001612382565b90505b6001811115611d08576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cc457611cc461243b565b1a60f81b828281518110611cda57611cda61243b565b60200101906001600160f81b031916908160001a90535060049490941c93611d01816128ad565b9050611c93565b50831561057c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161042d565b60008181526001830160205260408120548015611e40576000611d7b6001836128c4565b8554909150600090611d8f906001906128c4565b9050818114611df4576000866000018281548110611daf57611daf61243b565b9060005260206000200154905080876000018481548110611dd257611dd261243b565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611e0557611e056128d7565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610391565b6000915050610391565b600060208284031215611e5c57600080fd5b81356001600160e01b03198116811461057c57600080fd5b600060208284031215611e8657600080fd5b5035919050565b6001600160a01b03811681146110fb57600080fd5b60008060408385031215611eb557600080fd5b823591506020830135611ec781611e8d565b809150509250929050565b60008083601f840112611ee457600080fd5b5081356001600160401b03811115611efb57600080fd5b602083019150836020828501011115611f1357600080fd5b9250929050565b600080600060408486031215611f2f57600080fd5b8335925060208401356001600160401b03811115611f4c57600080fd5b611f5886828701611ed2565b9497909650939450505050565b60008083601f840112611f7757600080fd5b5081356001600160401b03811115611f8e57600080fd5b6020830191508360208260051b8501011115611f1357600080fd5b60008060008060008060608789031215611fc257600080fd5b86356001600160401b0380821115611fd957600080fd5b611fe58a838b01611f65565b90985096506020890135915080821115611ffe57600080fd5b61200a8a838b01611f65565b9096509450604089013591508082111561202357600080fd5b5061203089828a01611f65565b979a9699509497509295939492505050565b6000806040838503121561205557600080fd5b50508035926020909101359150565b600080600080600080600080600060c08a8c03121561208257600080fd5b893561208d81611e8d565b985060208a0135975060408a0135965060608a01356001600160401b03808211156120b757600080fd5b6120c38d838e01611ed2565b909850965060808c01359150808211156120dc57600080fd5b6120e88d838e01611ed2565b909650945060a08c013591508082111561210157600080fd5b5061210e8c828d01611f65565b915080935050809150509295985092959850929598565b6000806020838503121561213857600080fd5b82356001600160401b0381111561214e57600080fd5b61215a85828601611f65565b90969095509350505050565b600081518084526020808501945080840160005b838110156121965781518752958201959082019060010161217a565b509495945050505050565b60208152600061057c6020830184612166565b6000602082840312156121c657600080fd5b813561057c81611e8d565b60008060008060008060008060a0898b0312156121ed57600080fd5b88356121f881611e8d565b97506020890135965060408901356001600160401b038082111561221b57600080fd5b6122278c838d01611ed2565b909850965060608b013591508082111561224057600080fd5b61224c8c838d01611ed2565b909650945060808b013591508082111561226557600080fd5b506122728b828c01611f65565b999c989b5096995094979396929594505050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156122b757818101518382015260200161229f565b50506000910152565b6000602082840312156122d257600080fd5b81516001600160401b03808211156122e957600080fd5b818401915084601f8301126122fd57600080fd5b81518181111561230f5761230f612286565b604051601f8201601f19908116603f0116810190838211818310171561233757612337612286565b8160405282815287602084870101111561235057600080fd5b61236183602083016020880161229c565b979650505050505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103915761039161236c565b6000600182016123a7576123a761236c565b5060010190565b6020808252602a908201527f43727970746f54656464696573204d696e7465723a206d75737420686176652060408201526941646d696e20726f6c6560b01b606082015260800190565b60208082526023908201527f43727970746f54656464696573204d696e746572202d2064617461206d697373604082015262696e6760e81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b81835260006001600160fb1b0383111561246a57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000612497604083018688612451565b8281036020840152612361818587612451565b6001600160a01b039390931683526020830191909152604082015260600190565b6000602082840312156124dd57600080fd5b5051919050565b600081518084526124fc81602086016020860161229c565b601f01601f19169290920160200192915050565b6040815260006125236040830185612166565b6020838203818501528185518084528284019150828160051b85010183880160005b8381101561257357601f198784030185526125618383516124e4565b94860194925090850190600101612545565b50909998505050505050505050565b6000808335601e1984360301811261259957600080fd5b83016020810192503590506001600160401b038111156125b857600080fd5b803603821315611f1357600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208082528181018390526000906040808401600586901b850182018785805b8981101561269f57888403603f190185528235368c9003607e19018112612635578283fd5b8b0180358552608061264989830183612582565b828b89015261265b83890182846125c7565b925050508782013588870152606061267581840184612582565b9350878303828901526126898385836125c7565b988b019897505050938801935050600101612610565b50919998505050505050505050565b6000808335601e198436030181126126c557600080fd5b8301803591506001600160401b038211156126df57600080fd5b602001915036819003821315611f1357600080fd5b6001600160a01b03929092168252602082015260400190565b6000825161271f81846020870161229c565b9190910192915050565b60006020828403121561273b57600080fd5b815161057c81611e8d565b6020808252602a908201527f43727970746f54656464696573204d696e7465723a2075736572206e6f74207460408201526937b5b2b71037bbb732b960b11b606082015260800190565b602080825260409082018190526000805160206128ee833981519152908201527f70617274206f662043727970746f5465646469657320436f6c6c656374696f6e606082015260800190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81526000835161284681601785016020880161229c565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161287781602884016020880161229c565b01602801949350505050565b60208152600061057c60208301846124e4565b80820281158282048414176103915761039161236c565b6000816128bc576128bc61236c565b506000190190565b818103818111156103915761039161236c565b634e487b7160e01b600052603160045260246000fdfe43727970746f54656464696573204d696e7465723a20746f6b656e206e6f7420a26469706673582212203947e11cb641233c5c6754235760279c1223992a7dfc7ba425f4a258c0a4598d64736f6c63430008110033000000000000000000000000143280e96d3f8fda8b084623c7736b6e654e65c5000000000000000000000000441698f426365bbb1c16a46c1b722461567925aa000000000000000000000000d9fdf19006a6dece42ced19ea195d2116c8ee7170000000000000000000000005ca4322f29fab81fbecb1ce002b9e516eaa9b6ce
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101425760003560e01c8063af6039cf116100b8578063d547741f1161007c578063d547741f146102fa578063de0e9a3e1461030d578063e5187f4314610320578063ea598cb014610333578063fba31f3614610346578063fcc353bc1461035957600080fd5b8063af6039cf14610267578063c87d8ab614610287578063ca15c873146102a7578063cc657a3f146102ba578063d136f16b146102da57600080fd5b80635ad218231161010a5780635ad21823146101db5780637ad8a7d7146101fb5780639010d07c1461020e578063907501061461023957806391d148541461024c578063a217fddf1461025f57600080fd5b806301ffc9a714610147578063248a9ca31461016f5780632f2ff15d146101a057806336568abe146101b55780635499f5a8146101c8575b600080fd5b61015a610155366004611e4a565b61036c565b60405190151581526020015b60405180910390f35b61019261017d366004611e74565b60009081526020819052604090206001015490565b604051908152602001610166565b6101b36101ae366004611ea2565b610397565b005b6101b36101c3366004611ea2565b6103c1565b6101926101d6366004611f1a565b610444565b6101926101e9366004611e74565b60096020526000908152604090205481565b6101b3610209366004611fa9565b610583565b61022161021c366004612042565b6106d8565b6040516001600160a01b039091168152602001610166565b6101b3610247366004612064565b6106f0565b61015a61025a366004611ea2565b610a24565b610192600081565b610192610275366004611e74565b600a6020526000908152604090205481565b610192610295366004611e74565b60076020526000908152604090205481565b6101926102b5366004611e74565b610a4d565b6101926102c8366004611e74565b60086020526000908152604090205481565b6102ed6102e8366004612125565b610a64565b60405161016691906121a1565b6101b3610308366004611ea2565b610b18565b6101b361031b366004611e74565b610b3d565b6101b361032e3660046121b4565b610b66565b6101b3610341366004611e74565b610baf565b6101b3610354366004611fa9565b610bd8565b6101b36103673660046121d1565b610cf3565b60006001600160e01b03198216635a05180f60e01b14806103915750610391826110bc565b92915050565b6000828152602081905260409020600101546103b2816110f1565b6103bc83836110fe565b505050565b6001600160a01b03811633146104365760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104408282611120565b5050565b6000805b6104ff84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050600654604051639079eeb960e01b8152600481018b9052602481018790526001600160a01b039091169250639079eeb991506044015b600060405180830381865afa1580156104d2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104fa91908101906122c0565b611142565b1561050b57905061057c565b60408051602081018252600081526006549151639079eeb960e01b81526004810188905260248101849052610552926001600160a01b031690639079eeb9906044016104b5565b1561056a57610562816001612382565b91505061057c565b8061057481612395565b915050610448565b9392505050565b61058e600033610a24565b6105aa5760405162461bcd60e51b815260040161042d906123ae565b8285146105c95760405162461bcd60e51b815260040161042d906123f8565b8281146105e85760405162461bcd60e51b815260040161042d906123f8565b8460005b818110156106675760008888838181106106085761060861243b565b90506020020135905060008787848181106106255761062561243b565b6000858152600760209081526040808320938202959095013592839055918152600890915291909120929092555081905061065f81612395565b9150506105ec565b5060048054604051631b9c03d760e11b81526001600160a01b039091169163373807ae9161069d91899189918991899101612483565b600060405180830381600087803b1580156106b757600080fd5b505af11580156106cb573d6000803e3d6000fd5b5050505050505050505050565b600082815260016020526040812061057c908361119b565b6106fb600033610a24565b6107175760405162461bcd60e51b815260040161042d906123ae565b600554604051632e2dc79f60e21b81526001600160a01b039091169063b8b71e7c9061074b908c908c908c906004016124aa565b6020604051808303816000875af115801561076a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078e91906124cb565b506040805160018082528183019092526000916020808301908036833701905050905087816000815181106107c5576107c561243b565b6020908102919091010152604080516001808252818301909252600091816020015b60608152602001906001900390816107e757905050905087878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052508551869450909250151590506108485761084861243b565b602090810291909101015260065460405163759351ab60e01b81526001600160a01b039091169063759351ab906108859085908590600401612510565b600060405180830381600087803b15801561089f57600080fd5b505af11580156108b3573d6000803e3d6000fd5b5060009250600191506108c39050565b6040519080825280602002602001820160405280156108f657816020015b60608152602001906001900390816108e15790505b50905086868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052508551869450909250151590506109435761094361243b565b60209081029190910101526006546040516320b8d44560e01b81526001600160a01b03909116906320b8d445906109809086908590600401612510565b600060405180830381600087803b15801561099a57600080fd5b505af11580156109ae573d6000803e3d6000fd5b505060065460405163220fa09160e21b81526001600160a01b03909116925063883e824491506109e490889088906004016125f0565b600060405180830381600087803b1580156109fe57600080fd5b505af1158015610a12573d6000803e3d6000fd5b50505050505050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000818152600160205260408120610391906111a7565b6060816000816001600160401b03811115610a8157610a81612286565b604051908082528060200260200182016040528015610aaa578160200160208202803683370190505b50905060005b82811015610b0f57610ae081878784818110610ace57610ace61243b565b90506020028101906101d691906126ae565b828281518110610af257610af261243b565b602090810291909101015280610b0781612395565b915050610ab0565b50949350505050565b600082815260208190526040902060010154610b33816110f1565b6103bc8383611120565b6000818152600a602052604081205490819003610b5d57610440826111b1565b61044082611499565b610b71600033610a24565b610b8d5760405162461bcd60e51b815260040161042d906123ae565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b60008181526009602052604081205490819003610bcf576104408261168b565b61044082611884565b610be3600033610a24565b610bff5760405162461bcd60e51b815260040161042d906123ae565b828514610c1e5760405162461bcd60e51b815260040161042d906123f8565b828114610c3d5760405162461bcd60e51b815260040161042d906123f8565b8460005b81811015610cbc576000888883818110610c5d57610c5d61243b565b9050602002013590506000878784818110610c7a57610c7a61243b565b6000858152600960209081526040808320938202959095013592839055918152600a909152919091209290925550819050610cb481612395565b915050610c41565b50600554604051631b9c03d760e11b81526001600160a01b039091169063373807ae9061069d908890889088908890600401612483565b610cfe600033610a24565b610d1a5760405162461bcd60e51b815260040161042d906123ae565b60048054604051633251c7ab60e11b81526001600160a01b03909116916364a38f5691610d4b918c918c91016126f4565b6020604051808303816000875af1158015610d6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8e91906124cb565b50604080516001808252818301909252600091602080830190803683370190505090508781600081518110610dc557610dc561243b565b6020908102919091010152604080516001808252818301909252600091816020015b6060815260200190600190039081610de757905050905087878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250855186945090925015159050610e4857610e4861243b565b602090810291909101015260065460405163759351ab60e01b81526001600160a01b039091169063759351ab90610e859085908590600401612510565b600060405180830381600087803b158015610e9f57600080fd5b505af1158015610eb3573d6000803e3d6000fd5b506000925060019150610ec39050565b604051908082528060200260200182016040528015610ef657816020015b6060815260200190600190039081610ee15790505b50905086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250855186945090925015159050610f4357610f4361243b565b60209081029190910101526006546040516320b8d44560e01b81526001600160a01b03909116906320b8d44590610f809086908590600401612510565b600060405180830381600087803b158015610f9a57600080fd5b505af1158015610fae573d6000803e3d6000fd5b505060065460405163220fa09160e21b81526001600160a01b03909116925063883e82449150610fe490889088906004016125f0565b600060405180830381600087803b158015610ffe57600080fd5b505af1158015611012573d6000803e3d6000fd5b505050505050505050505050505050565b61102d8282610a24565b610440576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556110633390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061057c836001600160a01b038416611a65565b60006001600160e01b03198216637965db0b60e01b148061039157506301ffc9a760e01b6001600160e01b0319831614610391565b6110fb8133611ab4565b50565b6111088282611023565b60008281526001602052604090206103bc90826110a7565b61112a8282611b18565b60008281526001602052604090206103bc9082611b7d565b600081604051602001611155919061270d565b604051602081830303815290604052805190602001208360405160200161117c919061270d565b6040516020818303038152906040528051906020012014905092915050565b600061057c8383611b92565b6000610391825490565b600480546040516331a9108f60e11b815291820183905233916001600160a01b0390911690636352211e906024016020604051808303816000875af11580156111fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112229190612729565b6001600160a01b0316146112485760405162461bcd60e51b815260040161042d90612746565b6004805460408051637c411c4760e01b815290516001600160a01b0390921692637c411c4792828201926020929082900301816000875af1158015611291573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b591906124cb565b8111156112c157600080fd5b60008181526008602052604090819020546002546003549251627eeac760e11b815291926001926001600160a01b039283169262fdd58e9261130a9291169086906004016126f4565b602060405180830381865afa158015611327573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134b91906124cb565b10156113695760405162461bcd60e51b815260040161042d90612790565b600480546040516323b872dd60e01b81523392810192909252306024830152604482018490526001600160a01b0316906323b872dd90606401600060405180830381600087803b1580156113bc57600080fd5b505af11580156113d0573d6000803e3d6000fd5b505060048054604051630852cd8d60e31b81529182018690526001600160a01b031692506342966c6891506024015b600060405180830381600087803b15801561141957600080fd5b505af115801561142d573d6000803e3d6000fd5b505060035460405163f1d2ec1d60e01b8152600481018590523360248201526001600160a01b03909116925063f1d2ec1d9150604401600060405180830381600087803b15801561147d57600080fd5b505af1158015611491573d6000803e3d6000fd5b505050505050565b600554604051627eeac760e11b81526001916001600160a01b03169062fdd58e906114ca90339086906004016126f4565b602060405180830381865afa1580156114e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150b91906124cb565b10156115295760405162461bcd60e51b815260040161042d90612746565b600560009054906101000a90046001600160a01b03166001600160a01b0316637c411c476040518163ffffffff1660e01b81526004016020604051808303816000875af115801561157e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a291906124cb565b8111156115ae57600080fd5b6000818152600a602052604090819020546002546003549251627eeac760e11b815291926001926001600160a01b039283169262fdd58e926115f79291169086906004016126f4565b602060405180830381865afa158015611614573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163891906124cb565b10156116565760405162461bcd60e51b815260040161042d90612790565b600554604051637a94c56560e11b81526001600160a01b039091169063f5298aca906113ff90339086906001906004016124aa565b600254604051627eeac760e11b81526001916001600160a01b03169062fdd58e906116bc90339086906004016126f4565b602060405180830381865afa1580156116d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116fd91906124cb565b101561171b5760405162461bcd60e51b815260040161042d90612746565b60008181526007602090815260408083205480845260089092529091205480831461179c5760405162461bcd60e51b815260206004820152603d60248201526000805160206128ee83398151915260448201527f66726f6d2043727970746f5465646469657320636f6c6c656374696f6e000000606482015260840161042d565b600254600354604051637921219560e11b81526001600160a01b039283169263f242432a926117d89233929091169088906001906004016127dc565b600060405180830381600087803b1580156117f257600080fd5b505af1158015611806573d6000803e3d6000fd5b50506004805460405163193b0e8b60e11b81526001600160a01b0390911693506332761d16925061183b9133918791016126f4565b6020604051808303816000875af115801561185a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187e91906124cb565b50505050565b600254604051627eeac760e11b81526001916001600160a01b03169062fdd58e906118b590339086906004016126f4565b602060405180830381865afa1580156118d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f691906124cb565b10156119145760405162461bcd60e51b815260040161042d90612746565b6000818152600960205260408120549081900361197f5760405162461bcd60e51b815260206004820152603560248201526000805160206128ee83398151915260448201527421b93cb83a37aa32b23234b2b99032b234ba34b7b760591b606482015260840161042d565b600254600354604051637921219560e11b81526001600160a01b039283169263f242432a926119bb9233929091169087906001906004016127dc565b600060405180830381600087803b1580156119d557600080fd5b505af11580156119e9573d6000803e3d6000fd5b5050600554604051632baf2acb60e01b81526001600160a01b039091169250632baf2acb9150611a2290339060019086906004016124aa565b6020604051808303816000875af1158015611a41573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103bc91906124cb565b6000818152600183016020526040812054611aac57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610391565b506000610391565b611abe8282610a24565b61044057611ad6816001600160a01b03166014611bbc565b611ae1836020611bbc565b604051602001611af2929190612814565b60408051601f198184030181529082905262461bcd60e51b825261042d91600401612883565b611b228282610a24565b15610440576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061057c836001600160a01b038416611d57565b6000826000018281548110611ba957611ba961243b565b9060005260206000200154905092915050565b60606000611bcb836002612896565b611bd6906002612382565b6001600160401b03811115611bed57611bed612286565b6040519080825280601f01601f191660200182016040528015611c17576020820181803683370190505b509050600360fc1b81600081518110611c3257611c3261243b565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c6157611c6161243b565b60200101906001600160f81b031916908160001a9053506000611c85846002612896565b611c90906001612382565b90505b6001811115611d08576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cc457611cc461243b565b1a60f81b828281518110611cda57611cda61243b565b60200101906001600160f81b031916908160001a90535060049490941c93611d01816128ad565b9050611c93565b50831561057c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161042d565b60008181526001830160205260408120548015611e40576000611d7b6001836128c4565b8554909150600090611d8f906001906128c4565b9050818114611df4576000866000018281548110611daf57611daf61243b565b9060005260206000200154905080876000018481548110611dd257611dd261243b565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611e0557611e056128d7565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610391565b6000915050610391565b600060208284031215611e5c57600080fd5b81356001600160e01b03198116811461057c57600080fd5b600060208284031215611e8657600080fd5b5035919050565b6001600160a01b03811681146110fb57600080fd5b60008060408385031215611eb557600080fd5b823591506020830135611ec781611e8d565b809150509250929050565b60008083601f840112611ee457600080fd5b5081356001600160401b03811115611efb57600080fd5b602083019150836020828501011115611f1357600080fd5b9250929050565b600080600060408486031215611f2f57600080fd5b8335925060208401356001600160401b03811115611f4c57600080fd5b611f5886828701611ed2565b9497909650939450505050565b60008083601f840112611f7757600080fd5b5081356001600160401b03811115611f8e57600080fd5b6020830191508360208260051b8501011115611f1357600080fd5b60008060008060008060608789031215611fc257600080fd5b86356001600160401b0380821115611fd957600080fd5b611fe58a838b01611f65565b90985096506020890135915080821115611ffe57600080fd5b61200a8a838b01611f65565b9096509450604089013591508082111561202357600080fd5b5061203089828a01611f65565b979a9699509497509295939492505050565b6000806040838503121561205557600080fd5b50508035926020909101359150565b600080600080600080600080600060c08a8c03121561208257600080fd5b893561208d81611e8d565b985060208a0135975060408a0135965060608a01356001600160401b03808211156120b757600080fd5b6120c38d838e01611ed2565b909850965060808c01359150808211156120dc57600080fd5b6120e88d838e01611ed2565b909650945060a08c013591508082111561210157600080fd5b5061210e8c828d01611f65565b915080935050809150509295985092959850929598565b6000806020838503121561213857600080fd5b82356001600160401b0381111561214e57600080fd5b61215a85828601611f65565b90969095509350505050565b600081518084526020808501945080840160005b838110156121965781518752958201959082019060010161217a565b509495945050505050565b60208152600061057c6020830184612166565b6000602082840312156121c657600080fd5b813561057c81611e8d565b60008060008060008060008060a0898b0312156121ed57600080fd5b88356121f881611e8d565b97506020890135965060408901356001600160401b038082111561221b57600080fd5b6122278c838d01611ed2565b909850965060608b013591508082111561224057600080fd5b61224c8c838d01611ed2565b909650945060808b013591508082111561226557600080fd5b506122728b828c01611f65565b999c989b5096995094979396929594505050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156122b757818101518382015260200161229f565b50506000910152565b6000602082840312156122d257600080fd5b81516001600160401b03808211156122e957600080fd5b818401915084601f8301126122fd57600080fd5b81518181111561230f5761230f612286565b604051601f8201601f19908116603f0116810190838211818310171561233757612337612286565b8160405282815287602084870101111561235057600080fd5b61236183602083016020880161229c565b979650505050505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103915761039161236c565b6000600182016123a7576123a761236c565b5060010190565b6020808252602a908201527f43727970746f54656464696573204d696e7465723a206d75737420686176652060408201526941646d696e20726f6c6560b01b606082015260800190565b60208082526023908201527f43727970746f54656464696573204d696e746572202d2064617461206d697373604082015262696e6760e81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b81835260006001600160fb1b0383111561246a57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000612497604083018688612451565b8281036020840152612361818587612451565b6001600160a01b039390931683526020830191909152604082015260600190565b6000602082840312156124dd57600080fd5b5051919050565b600081518084526124fc81602086016020860161229c565b601f01601f19169290920160200192915050565b6040815260006125236040830185612166565b6020838203818501528185518084528284019150828160051b85010183880160005b8381101561257357601f198784030185526125618383516124e4565b94860194925090850190600101612545565b50909998505050505050505050565b6000808335601e1984360301811261259957600080fd5b83016020810192503590506001600160401b038111156125b857600080fd5b803603821315611f1357600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208082528181018390526000906040808401600586901b850182018785805b8981101561269f57888403603f190185528235368c9003607e19018112612635578283fd5b8b0180358552608061264989830183612582565b828b89015261265b83890182846125c7565b925050508782013588870152606061267581840184612582565b9350878303828901526126898385836125c7565b988b019897505050938801935050600101612610565b50919998505050505050505050565b6000808335601e198436030181126126c557600080fd5b8301803591506001600160401b038211156126df57600080fd5b602001915036819003821315611f1357600080fd5b6001600160a01b03929092168252602082015260400190565b6000825161271f81846020870161229c565b9190910192915050565b60006020828403121561273b57600080fd5b815161057c81611e8d565b6020808252602a908201527f43727970746f54656464696573204d696e7465723a2075736572206e6f74207460408201526937b5b2b71037bbb732b960b11b606082015260800190565b602080825260409082018190526000805160206128ee833981519152908201527f70617274206f662043727970746f5465646469657320436f6c6c656374696f6e606082015260800190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81526000835161284681601785016020880161229c565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161287781602884016020880161229c565b01602801949350505050565b60208152600061057c60208301846124e4565b80820281158282048414176103915761039161236c565b6000816128bc576128bc61236c565b506000190190565b818103818111156103915761039161236c565b634e487b7160e01b600052603160045260246000fdfe43727970746f54656464696573204d696e7465723a20746f6b656e206e6f7420a26469706673582212203947e11cb641233c5c6754235760279c1223992a7dfc7ba425f4a258c0a4598d64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000143280e96d3f8fda8b084623c7736b6e654e65c5000000000000000000000000441698f426365bbb1c16a46c1b722461567925aa000000000000000000000000d9fdf19006a6dece42ced19ea195d2116c8ee7170000000000000000000000005ca4322f29fab81fbecb1ce002b9e516eaa9b6ce
-----Decoded View---------------
Arg [0] : _shelf (address): 0x143280e96d3f8FDa8b084623c7736b6E654E65C5
Arg [1] : _teddies (address): 0x441698f426365Bbb1c16a46c1b722461567925AA
Arg [2] : _teddiesEditions (address): 0xD9FDF19006A6dEce42CED19EA195D2116c8ee717
Arg [3] : _metadata (address): 0x5Ca4322f29FAb81FbECb1ce002b9e516eaA9b6cE
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000143280e96d3f8fda8b084623c7736b6e654e65c5
Arg [1] : 000000000000000000000000441698f426365bbb1c16a46c1b722461567925aa
Arg [2] : 000000000000000000000000d9fdf19006a6dece42ced19ea195d2116c8ee717
Arg [3] : 0000000000000000000000005ca4322f29fab81fbecb1ce002b9e516eaa9b6ce
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.