Feature Tip: Add private address tag to any address under My Name Tag !
NFT
Overview
TokenID
1047
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Character
Compiler Version
v0.8.15+commit.e14f2714
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "./interfaces/ICharacter.sol"; import "./helpers/MinterManaged.sol"; /** * @dev ASM The Next Legends - Character contract */ contract Character is ICharacter, ERC721Royalty, MinterManaged { uint256 public totalSupply; string public baseURI; mapping(uint256 => bytes32) private _hash; // tokenId => hashId (used for tokenURI) mapping(bytes32 => bool) private _used; // list of used hashIDs event BaseURIChanged(string newBaseURI); constructor(address manager, address asm) MinterManaged(manager, asm) ERC721("TNL Character", "TNLC") {} /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(MinterManaged, ICharacter, ERC721Royalty) returns (bool) { if (MinterManaged.supportsInterface(interfaceId)) { return true; } return interfaceId == type(ICharacter).interfaceId || interfaceId == type(IERC165).interfaceId || interfaceId == type(IERC721).interfaceId || interfaceId == type(ERC721Royalty).interfaceId || interfaceId == type(IERC721Metadata).interfaceId; } /** ---------------------------------- * ! Public functions * ----------------------------------- */ /** * @notice * @dev This function can only be called from contracts or wallets with MINTER_ROLE * @param recipient The wallet address to receive a minted token */ function mint(address recipient, bytes32 hashId) external onlyRole(MINTER_ROLE) returns (uint256) { if (recipient == address(0)) revert InvalidInput(INVALID_ADDRESS); if (_used[hashId]) revert MintingError(TOKEN_ALREADY_MINTED, 0); _mint(recipient, totalSupply); _hash[totalSupply] = hashId; _used[hashId] = true; return totalSupply++; } /** * @notice Get tokenURI for `tokenId` * @notice returns baseURI + hashID of the tokenID * @param `tokenId` The token ID * @return The tokenURL as a string */ function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { if (!_exists(tokenId)) revert AccessError(WRONG_TOKEN_ID); string memory hashString = Strings.toHexString(uint256(_hash[tokenId]), 32); return string(abi.encodePacked(_baseURI(), hashString)); } /** * @notice Get base URI for the tokenURI * @return address the baseURI */ function _baseURI() internal view override returns (string memory) { return baseURI; } /** ---------------------------------- * ! Manager's functions * ----------------------------------- */ /** * @notice Set base URI for the tokenURI * @dev emit an Event with new baseURI * @dev only MANAGER_ROLE can call this function * @param newURI new baseURI to set */ function setBaseURI(string calldata newURI) external onlyRole(MANAGER_ROLE) { baseURI = newURI; emit BaseURIChanged(newURI); } /** * @notice Set the default royalty amount * @dev only MANAGER_ROLE can call this function * @param receiver wallet to collect royalties * @param feeNumerator percent of royalties, e.g. 2550 = 25.5%, 17.01% = 1701 */ function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyRole(MANAGER_ROLE) { _setDefaultRoyalty(receiver, feeNumerator); } /** * @notice Set the royalty amount for the specific token * @dev only MANAGER_ROLE can call this function * @param tokenId specific tokenId to setup royalty * @param receiver wallet to collect royalties * @param feeNumerator percent of royalties, e.g. 2550 = 25.5%, 17.01% = 1701 */ function setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) external onlyRole(MANAGER_ROLE) { _setTokenRoyalty(tokenId, receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function resetTokenRoyalty(uint256 tokenId) external onlyRole(MANAGER_ROLE) { _resetTokenRoyalty(tokenId); } /** * @dev Removes default royalty information. */ function deleteDefaultRoyalty() external onlyRole(MANAGER_ROLE) { _deleteDefaultRoyalty(); } }
// 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 v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/ERC721Royalty.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../common/ERC2981.sol"; import "../../../utils/introspection/ERC165.sol"; /** * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment * information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC721Royalty is ERC2981, ERC721 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } /** * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); _resetTokenRoyalty(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.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/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 pragma solidity 0.8.15; /** * @dev ASM The Next Legends - Error definition contract */ contract Errors { error InvalidInput(string errMsg); string constant INVALID_MULTISIG = "Invalid Multisig contract"; string constant INVALID_MANAGER = "Invalid Manager contract"; string constant INVALID_SIGNER = "Invalid signer address"; string constant INVALID_MINTER = "Invalid Minter contract"; string constant INVALID_SIGNATURE = "Invalid signature"; string constant INVALID_CURRENCY = "Invalid currency"; string constant INVALID_ADDRESS = "Invalid wallet address"; string constant INVALID_AMOUNT = "Invalid amount"; error UpgradeError(string errMsg); string constant WRONG_CHARACTER_CONTRACT = "Wrong character contract"; string constant WRONG_BAG_CONTRACT = "Wrong bag contract"; string constant WRONG_UNPACKER_CONTRACT = "Wrong unpacker contract"; string constant WRONG_MINTER_CONTRACT = "Wrong minter contract"; string constant WRONG_ASSET_CONTRACT = "Wrong asset contract"; string constant WRONG_PAYMENT_CONTRACT = "Wrong payment contract"; string constant WRONG_ASTO_CONTRACT = "Wrong ASTO contract"; string constant WRONG_LP_CONTRACT = "Wrong LP contract"; error AccessError(string errMsg); string constant WRONG_TOKEN_ID = "Wrong token ID"; string constant WRONG_TOKEN_OWNER = "Wrong token owner"; string constant WRONG_HASH = "Wrong hash"; string constant NOT_ASSIGNED = "Address not assigned"; error PaymentError(string errMsg, uint256 requiredAmount, uint256 receivedAmount); string constant INSUFFICIENT_BALANCE = "Insufficient balance"; string constant NO_PAYMENT_RECEIVED = "No payment received"; string constant NO_PAYMENT_RECOGNIZED = "MintType/Currency not recognized"; string constant CURRENCY_DOES_NOT_SUIT_TYPE = "Currency doesn't suit type"; string constant MINT_TYPE_IS_NOT_SUPPORTED = "MintType isn't supported"; error MintingError(string errMsg, uint256 expiry); error OpenError(string errMsg); string constant MINT_EXPIRED = "Mint hash has expired"; string constant TOKEN_ALREADY_MINTED = "Token has already minted"; string constant NOT_ALLOWED = "Currently is not allowed"; string constant TOTAL_SUPPLY_EXCEEDED = "Total supply exceeded"; error ManagementError(string errMsg); string constant CANT_SEND = "Failed to send Ether"; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "../interfaces/IMinterManaged.sol"; import "./Permissions.sol"; import "./Errors.sol"; /** * @dev Minter Manager * @notice Manage minter access controls */ contract MinterManaged is IMinterManaged, AccessControl, Ownable, Errors { address private _manager; constructor(address manager, address asm) { if (manager == address(0)) revert InvalidInput(INVALID_MANAGER); _grantRole(MANAGER_ROLE, manager); transferOwnership(asm); // OpenSea checks the ownership of the contract _manager = manager; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IMinterManaged, AccessControl) returns (bool) { return interfaceId == type(IERC165).interfaceId || interfaceId == type(IMinterManaged).interfaceId || interfaceId == type(AccessControl).interfaceId; } /** ---------------------------------- * ! Manager's functions * ----------------------------------- */ /** * @notice Set manager address (contract or wallet) to manage this contract * @dev This function can only to called from contracts or wallets with MANAGER_ROLE * @dev The old manager will be removed * @param newManager The new manager address to be granted */ function setManager(address newManager) external onlyRole(MANAGER_ROLE) { if (newManager == address(0)) revert InvalidInput(INVALID_ADDRESS); _grantRole(MANAGER_ROLE, newManager); _revokeRole(MANAGER_ROLE, _manager); _manager = newManager; } /** * @notice Add minter address (contract or wallet) to manage this contract * @dev This function can only to called from contracts or wallets with MANAGER_ROLE * @dev The old manager will be retained * @param newMinter The new minter address to be granted */ function addMinter(address newMinter) external onlyRole(MANAGER_ROLE) { _grantRole(MINTER_ROLE, newMinter); } /** * @notice Revoke minter address (contract or wallet) to manage this contract * @dev This function can only to called from contracts or wallets with MANAGER_ROLE * @param oldMinter The old minter address to be revoked */ function revokeMinter(address oldMinter) external onlyRole(MANAGER_ROLE) { _revokeRole(MINTER_ROLE, oldMinter); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; /** * @dev ASM The Next Legends - Roles */ bytes32 constant MULTISIG_ROLE = keccak256("MULTISIG_ROLE"); bytes32 constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); bytes32 constant MINTER_ROLE = keccak256("MINTER_ROLE");
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; interface ICharacter { function mint(address, bytes32) external returns (uint256); function setBaseURI(string calldata) external; function totalSupply() external returns (uint256); function supportsInterface(bytes4 interfaceId) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; interface IMinterManaged { function setManager(address) external; function addMinter(address) external; function revokeMinter(address) external; function supportsInterface(bytes4 interfaceId) external returns (bool); }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"manager","type":"address"},{"internalType":"address","name":"asm","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"errMsg","type":"string"}],"name":"AccessError","type":"error"},{"inputs":[{"internalType":"string","name":"errMsg","type":"string"}],"name":"InvalidInput","type":"error"},{"inputs":[{"internalType":"string","name":"errMsg","type":"string"}],"name":"ManagementError","type":"error"},{"inputs":[{"internalType":"string","name":"errMsg","type":"string"},{"internalType":"uint256","name":"expiry","type":"uint256"}],"name":"MintingError","type":"error"},{"inputs":[{"internalType":"string","name":"errMsg","type":"string"}],"name":"OpenError","type":"error"},{"inputs":[{"internalType":"string","name":"errMsg","type":"string"},{"internalType":"uint256","name":"requiredAmount","type":"uint256"},{"internalType":"uint256","name":"receivedAmount","type":"uint256"}],"name":"PaymentError","type":"error"},{"inputs":[{"internalType":"string","name":"errMsg","type":"string"}],"name":"UpgradeError","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newBaseURI","type":"string"}],"name":"BaseURIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newMinter","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bytes32","name":"hashId","type":"bytes32"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resetTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"oldMinter","type":"address"}],"name":"revokeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newManager","type":"address"}],"name":"setManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200298238038062002982833981016040819052620000349162000372565b81816040518060400160405280600d81526020016c2a27261021b430b930b1ba32b960991b81525060405180604001604052806004815260200163544e4c4360e01b81525081600290816200008a91906200044f565b5060036200009982826200044f565b505050620000b6620000b06200017d60201b60201c565b62000181565b6001600160a01b0382166200011c57604080518082018252601881527f496e76616c6964204d616e6167657220636f6e747261637400000000000000006020820152905163d647364f60e01b81526200011391906004016200051b565b60405180910390fd5b620001487f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0883620001d3565b620001538162000278565b50600a80546001600160a01b0319166001600160a01b039290921691909117905550620005739050565b3390565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16620002745760008281526008602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002333390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b62000282620002f7565b6001600160a01b038116620002e95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840162000113565b620002f48162000181565b50565b6009546001600160a01b03163314620003535760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000113565b565b80516001600160a01b03811681146200036d57600080fd5b919050565b600080604083850312156200038657600080fd5b620003918362000355565b9150620003a16020840162000355565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620003d557607f821691505b602082108103620003f657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200044a57600081815260208120601f850160051c81016020861015620004255750805b601f850160051c820191505b81811015620004465782815560010162000431565b5050505b505050565b81516001600160401b038111156200046b576200046b620003aa565b62000483816200047c8454620003c0565b84620003fc565b602080601f831160018114620004bb5760008415620004a25750858301515b600019600386901b1c1916600185901b17855562000446565b600085815260208120601f198616915b82811015620004ec57888601518255948401946001909101908401620004cb565b50858210156200050b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208083528351808285015260005b818110156200054a578581018301518582016040015282016200052c565b818111156200055d576000604083870101525b50601f01601f1916929092016040019392505050565b6123ff80620005836000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c806370a082311161011a578063a22cb465116100ad578063cfbd48851161007c578063cfbd48851461045d578063d0ebdbe714610470578063d547741f14610483578063e985e9c514610496578063f2fde38b146104d257600080fd5b8063a22cb4651461041c578063aa1b103f1461042f578063b88d4fde14610437578063c87b56dd1461044a57600080fd5b806391d14854116100e957806391d14854146103e657806395d89b41146103f9578063983b2d5614610401578063a217fddf1461041457600080fd5b806370a08231146103a7578063715018a6146103ba5780638a616bc0146103c25780638da5cb5b146103d557600080fd5b80632a55205a1161019d57806342842e0e1161016c57806342842e0e1461035357806355f804b3146103665780635944c753146103795780636352211e1461038c5780636c0360eb1461039f57600080fd5b80632a55205a146102e85780632cfd30051461031a5780632f2ff15d1461032d57806336568abe1461034057600080fd5b8063095ea7b3116101d9578063095ea7b31461028857806318160ddd1461029b57806323b872dd146102b2578063248a9ca3146102c557600080fd5b806301ffc9a71461020b57806304634d8d1461023357806306fdde0314610248578063081812fc1461025d575b600080fd5b61021e610219366004611b88565b6104e5565b60405190151581526020015b60405180910390f35b610246610241366004611bd8565b610583565b005b6102506105aa565b60405161022a9190611c63565b61027061026b366004611c76565b61063c565b6040516001600160a01b03909116815260200161022a565b610246610296366004611c8f565b610663565b6102a4600b5481565b60405190815260200161022a565b6102466102c0366004611cb9565b610778565b6102a46102d3366004611c76565b60009081526008602052604090206001015490565b6102fb6102f6366004611cf5565b6107a9565b604080516001600160a01b03909316835260208301919091520161022a565b6102a4610328366004611c8f565b610855565b61024661033b366004611d17565b61098c565b61024661034e366004611d17565b6109b1565b610246610361366004611cb9565b610a2f565b610246610374366004611d3a565b610a4a565b610246610387366004611dac565b610aae565b61027061039a366004611c76565b610ad7565b610250610b37565b6102a46103b5366004611de8565b610bc5565b610246610c4b565b6102466103d0366004611c76565b610c5f565b6009546001600160a01b0316610270565b61021e6103f4366004611d17565b610c89565b610250610cb4565b61024661040f366004611de8565b610cc3565b6102a4600081565b61024661042a366004611e03565b610d05565b610246610d10565b610246610445366004611e55565b610d34565b610250610458366004611c76565b610d66565b61024661046b366004611de8565b610e0f565b61024661047e366004611de8565b610e51565b610246610491366004611d17565b610f1c565b61021e6104a4366004611f31565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6102466104e0366004611de8565b610f41565b60006104f082610fb7565b156104fd57506001919050565b6001600160e01b0319821663183b3c3360e21b148061052c57506001600160e01b031982166301ffc9a760e01b145b8061054757506001600160e01b031982166380ac58cd60e01b145b8061056257506001600160e01b031982166301ffc9a760e01b145b8061057d57506001600160e01b03198216635b5e139f60e01b145b92915050565b6000805160206123aa83398151915261059b81611008565b6105a58383611012565b505050565b6060600280546105b990611f5b565b80601f01602080910402602001604051908101604052809291908181526020018280546105e590611f5b565b80156106325780601f1061060757610100808354040283529160200191610632565b820191906000526020600020905b81548152906001019060200180831161061557829003601f168201915b5050505050905090565b6000610647826110cc565b506000908152600660205260409020546001600160a01b031690565b600061066e82610ad7565b9050806001600160a01b0316836001600160a01b0316036106e05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806106fc57506106fc81336104a4565b61076e5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016106d7565b6105a5838361112b565b6107823382611199565b61079e5760405162461bcd60e51b81526004016106d790611f95565b6105a5838383611218565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161081e5750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101516000906127109061083d906001600160601b031687611ff9565b6108479190612018565b915196919550909350505050565b60007f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661088181611008565b6001600160a01b0384166108d4576040805180820182526016815275496e76616c69642077616c6c6574206164647265737360501b6020820152905163d647364f60e01b81526106d79190600401611c63565b6000838152600e602052604090205460ff161561093a57604080518082018252601881527f546f6b656e2068617320616c7265616479206d696e746564000000000000000060208201529051638dc66ba160e01b81526106d7919060009060040161203a565b61094684600b546113b4565b600b80546000908152600d60209081526040808320879055868352600e9091528120805460ff19166001179055815491906109808361205c565b90915550949350505050565b6000828152600860205260409020600101546109a781611008565b6105a583836114f6565b6001600160a01b0381163314610a215760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106d7565b610a2b828261157c565b5050565b6105a583838360405180602001604052806000815250610d34565b6000805160206123aa833981519152610a6281611008565b600c610a6f8385836120c3565b507f5411e8ebf1636d9e83d5fc4900bf80cbac82e8790da2a4c94db4895e889eedf68383604051610aa1929190612184565b60405180910390a1505050565b6000805160206123aa833981519152610ac681611008565b610ad18484846115e3565b50505050565b6000818152600460205260408120546001600160a01b03168061057d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106d7565b600c8054610b4490611f5b565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7090611f5b565b8015610bbd5780601f10610b9257610100808354040283529160200191610bbd565b820191906000526020600020905b815481529060010190602001808311610ba057829003601f168201915b505050505081565b60006001600160a01b038216610c2f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016106d7565b506001600160a01b031660009081526005602052604090205490565b610c536116ae565b610c5d6000611708565b565b6000805160206123aa833981519152610c7781611008565b50600090815260016020526040812055565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600380546105b990611f5b565b6000805160206123aa833981519152610cdb81611008565b610a2b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6836114f6565b610a2b33838361175a565b6000805160206123aa833981519152610d2881611008565b610d3160008055565b50565b610d3e3383611199565b610d5a5760405162461bcd60e51b81526004016106d790611f95565b610ad184848484611828565b6000818152600460205260409020546060906001600160a01b0316610dc257604080518082018252600e81526d15dc9bdb99c81d1bdad95b88125160921b6020820152905163048e2d4960e41b81526106d79190600401611c63565b6000828152600d60209081526040822054610ddc9161185b565b9050610de66119fe565b81604051602001610df89291906121b3565b604051602081830303815290604052915050919050565b6000805160206123aa833981519152610e2781611008565b610a2b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68361157c565b6000805160206123aa833981519152610e6981611008565b6001600160a01b038216610ebc576040805180820182526016815275496e76616c69642077616c6c6574206164647265737360501b6020820152905163d647364f60e01b81526106d79190600401611c63565b610ed46000805160206123aa833981519152836114f6565b600a54610ef9906000805160206123aa833981519152906001600160a01b031661157c565b50600a80546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260086020526040902060010154610f3781611008565b6105a5838361157c565b610f496116ae565b6001600160a01b038116610fae5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106d7565b610d3181611708565b60006001600160e01b031982166301ffc9a760e01b1480610fe857506001600160e01b03198216638692779360e01b145b8061057d57506001600160e01b0319821663da8def7360e01b1492915050565b610d318133611a0d565b6127106001600160601b038216111561103d5760405162461bcd60e51b81526004016106d7906121e2565b6001600160a01b0382166110935760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016106d7565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b6000818152600460205260409020546001600160a01b0316610d315760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106d7565b600081815260066020526040902080546001600160a01b0319166001600160a01b038416908117909155819061116082610ad7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806111a583610ad7565b9050806001600160a01b0316846001600160a01b031614806111ec57506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b806112105750836001600160a01b03166112058461063c565b6001600160a01b0316145b949350505050565b826001600160a01b031661122b82610ad7565b6001600160a01b03161461128f5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016106d7565b6001600160a01b0382166112f15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106d7565b6112fc60008261112b565b6001600160a01b038316600090815260056020526040812080546001929061132590849061222c565b90915550506001600160a01b0382166000908152600560205260408120805460019290611353908490612243565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b03821661140a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106d7565b6000818152600460205260409020546001600160a01b03161561146f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106d7565b6001600160a01b0382166000908152600560205260408120805460019290611498908490612243565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6115008282610c89565b610a2b5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556115383390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6115868282610c89565b15610a2b5760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6127106001600160601b038216111561160e5760405162461bcd60e51b81526004016106d7906121e2565b6001600160a01b0382166116645760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d6574657273000000000060448201526064016106d7565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600190529190942093519051909116600160a01b029116179055565b6009546001600160a01b03163314610c5d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106d7565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036117bb5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106d7565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611833848484611218565b61183f84848484611a71565b610ad15760405162461bcd60e51b81526004016106d79061225b565b6060600061186a836002611ff9565b611875906002612243565b67ffffffffffffffff81111561188d5761188d611e3f565b6040519080825280601f01601f1916602001820160405280156118b7576020820181803683370190505b509050600360fc1b816000815181106118d2576118d26122ad565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611901576119016122ad565b60200101906001600160f81b031916908160001a9053506000611925846002611ff9565b611930906001612243565b90505b60018111156119a8576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611964576119646122ad565b1a60f81b82828151811061197a5761197a6122ad565b60200101906001600160f81b031916908160001a90535060049490941c936119a1816122c3565b9050611933565b5083156119f75760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106d7565b9392505050565b6060600c80546105b990611f5b565b611a178282610c89565b610a2b57611a2f816001600160a01b0316601461185b565b611a3a83602061185b565b604051602001611a4b9291906122da565b60408051601f198184030181529082905262461bcd60e51b82526106d791600401611c63565b60006001600160a01b0384163b15611b6757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611ab590339089908890889060040161234f565b6020604051808303816000875af1925050508015611af0575060408051601f3d908101601f19168201909252611aed9181019061238c565b60015b611b4d573d808015611b1e576040519150601f19603f3d011682016040523d82523d6000602084013e611b23565b606091505b508051600003611b455760405162461bcd60e51b81526004016106d79061225b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611210565b506001949350505050565b6001600160e01b031981168114610d3157600080fd5b600060208284031215611b9a57600080fd5b81356119f781611b72565b80356001600160a01b0381168114611bbc57600080fd5b919050565b80356001600160601b0381168114611bbc57600080fd5b60008060408385031215611beb57600080fd5b611bf483611ba5565b9150611c0260208401611bc1565b90509250929050565b60005b83811015611c26578181015183820152602001611c0e565b83811115610ad15750506000910152565b60008151808452611c4f816020860160208601611c0b565b601f01601f19169290920160200192915050565b6020815260006119f76020830184611c37565b600060208284031215611c8857600080fd5b5035919050565b60008060408385031215611ca257600080fd5b611cab83611ba5565b946020939093013593505050565b600080600060608486031215611cce57600080fd5b611cd784611ba5565b9250611ce560208501611ba5565b9150604084013590509250925092565b60008060408385031215611d0857600080fd5b50508035926020909101359150565b60008060408385031215611d2a57600080fd5b82359150611c0260208401611ba5565b60008060208385031215611d4d57600080fd5b823567ffffffffffffffff80821115611d6557600080fd5b818501915085601f830112611d7957600080fd5b813581811115611d8857600080fd5b866020828501011115611d9a57600080fd5b60209290920196919550909350505050565b600080600060608486031215611dc157600080fd5b83359250611dd160208501611ba5565b9150611ddf60408501611bc1565b90509250925092565b600060208284031215611dfa57600080fd5b6119f782611ba5565b60008060408385031215611e1657600080fd5b611e1f83611ba5565b915060208301358015158114611e3457600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215611e6b57600080fd5b611e7485611ba5565b9350611e8260208601611ba5565b925060408501359150606085013567ffffffffffffffff80821115611ea657600080fd5b818701915087601f830112611eba57600080fd5b813581811115611ecc57611ecc611e3f565b604051601f8201601f19908116603f01168101908382118183101715611ef457611ef4611e3f565b816040528281528a6020848701011115611f0d57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215611f4457600080fd5b611f4d83611ba5565b9150611c0260208401611ba5565b600181811c90821680611f6f57607f821691505b602082108103611f8f57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561201357612013611fe3565b500290565b60008261203557634e487b7160e01b600052601260045260246000fd5b500490565b60408152600061204d6040830185611c37565b90508260208301529392505050565b60006001820161206e5761206e611fe3565b5060010190565b601f8211156105a557600081815260208120601f850160051c8101602086101561209c5750805b601f850160051c820191505b818110156120bb578281556001016120a8565b505050505050565b67ffffffffffffffff8311156120db576120db611e3f565b6120ef836120e98354611f5b565b83612075565b6000601f841160018114612123576000851561210b5750838201355b600019600387901b1c1916600186901b17835561217d565b600083815260209020601f19861690835b828110156121545786850135825560209485019460019092019101612134565b50868210156121715760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b600083516121c5818460208801611c0b565b8351908301906121d9818360208801611c0b565b01949350505050565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60008282101561223e5761223e611fe3565b500390565b6000821982111561225657612256611fe3565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000816122d2576122d2611fe3565b506000190190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612312816017850160208801611c0b565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612343816028840160208801611c0b565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061238290830184611c37565b9695505050505050565b60006020828403121561239e57600080fd5b81516119f781611b7256fe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08a26469706673582212201f7b00583f992fad8c136ce5d52d56aab0b823a2b3260a8b53a1c79021d0896f64736f6c634300080f00330000000000000000000000005f3f357194c32f9c2f1176cc39b9d6c214a1fdca0000000000000000000000000be1d9a27e6483105770e5eb081c0807cf2d163c
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102065760003560e01c806370a082311161011a578063a22cb465116100ad578063cfbd48851161007c578063cfbd48851461045d578063d0ebdbe714610470578063d547741f14610483578063e985e9c514610496578063f2fde38b146104d257600080fd5b8063a22cb4651461041c578063aa1b103f1461042f578063b88d4fde14610437578063c87b56dd1461044a57600080fd5b806391d14854116100e957806391d14854146103e657806395d89b41146103f9578063983b2d5614610401578063a217fddf1461041457600080fd5b806370a08231146103a7578063715018a6146103ba5780638a616bc0146103c25780638da5cb5b146103d557600080fd5b80632a55205a1161019d57806342842e0e1161016c57806342842e0e1461035357806355f804b3146103665780635944c753146103795780636352211e1461038c5780636c0360eb1461039f57600080fd5b80632a55205a146102e85780632cfd30051461031a5780632f2ff15d1461032d57806336568abe1461034057600080fd5b8063095ea7b3116101d9578063095ea7b31461028857806318160ddd1461029b57806323b872dd146102b2578063248a9ca3146102c557600080fd5b806301ffc9a71461020b57806304634d8d1461023357806306fdde0314610248578063081812fc1461025d575b600080fd5b61021e610219366004611b88565b6104e5565b60405190151581526020015b60405180910390f35b610246610241366004611bd8565b610583565b005b6102506105aa565b60405161022a9190611c63565b61027061026b366004611c76565b61063c565b6040516001600160a01b03909116815260200161022a565b610246610296366004611c8f565b610663565b6102a4600b5481565b60405190815260200161022a565b6102466102c0366004611cb9565b610778565b6102a46102d3366004611c76565b60009081526008602052604090206001015490565b6102fb6102f6366004611cf5565b6107a9565b604080516001600160a01b03909316835260208301919091520161022a565b6102a4610328366004611c8f565b610855565b61024661033b366004611d17565b61098c565b61024661034e366004611d17565b6109b1565b610246610361366004611cb9565b610a2f565b610246610374366004611d3a565b610a4a565b610246610387366004611dac565b610aae565b61027061039a366004611c76565b610ad7565b610250610b37565b6102a46103b5366004611de8565b610bc5565b610246610c4b565b6102466103d0366004611c76565b610c5f565b6009546001600160a01b0316610270565b61021e6103f4366004611d17565b610c89565b610250610cb4565b61024661040f366004611de8565b610cc3565b6102a4600081565b61024661042a366004611e03565b610d05565b610246610d10565b610246610445366004611e55565b610d34565b610250610458366004611c76565b610d66565b61024661046b366004611de8565b610e0f565b61024661047e366004611de8565b610e51565b610246610491366004611d17565b610f1c565b61021e6104a4366004611f31565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6102466104e0366004611de8565b610f41565b60006104f082610fb7565b156104fd57506001919050565b6001600160e01b0319821663183b3c3360e21b148061052c57506001600160e01b031982166301ffc9a760e01b145b8061054757506001600160e01b031982166380ac58cd60e01b145b8061056257506001600160e01b031982166301ffc9a760e01b145b8061057d57506001600160e01b03198216635b5e139f60e01b145b92915050565b6000805160206123aa83398151915261059b81611008565b6105a58383611012565b505050565b6060600280546105b990611f5b565b80601f01602080910402602001604051908101604052809291908181526020018280546105e590611f5b565b80156106325780601f1061060757610100808354040283529160200191610632565b820191906000526020600020905b81548152906001019060200180831161061557829003601f168201915b5050505050905090565b6000610647826110cc565b506000908152600660205260409020546001600160a01b031690565b600061066e82610ad7565b9050806001600160a01b0316836001600160a01b0316036106e05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806106fc57506106fc81336104a4565b61076e5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016106d7565b6105a5838361112b565b6107823382611199565b61079e5760405162461bcd60e51b81526004016106d790611f95565b6105a5838383611218565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161081e5750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101516000906127109061083d906001600160601b031687611ff9565b6108479190612018565b915196919550909350505050565b60007f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661088181611008565b6001600160a01b0384166108d4576040805180820182526016815275496e76616c69642077616c6c6574206164647265737360501b6020820152905163d647364f60e01b81526106d79190600401611c63565b6000838152600e602052604090205460ff161561093a57604080518082018252601881527f546f6b656e2068617320616c7265616479206d696e746564000000000000000060208201529051638dc66ba160e01b81526106d7919060009060040161203a565b61094684600b546113b4565b600b80546000908152600d60209081526040808320879055868352600e9091528120805460ff19166001179055815491906109808361205c565b90915550949350505050565b6000828152600860205260409020600101546109a781611008565b6105a583836114f6565b6001600160a01b0381163314610a215760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106d7565b610a2b828261157c565b5050565b6105a583838360405180602001604052806000815250610d34565b6000805160206123aa833981519152610a6281611008565b600c610a6f8385836120c3565b507f5411e8ebf1636d9e83d5fc4900bf80cbac82e8790da2a4c94db4895e889eedf68383604051610aa1929190612184565b60405180910390a1505050565b6000805160206123aa833981519152610ac681611008565b610ad18484846115e3565b50505050565b6000818152600460205260408120546001600160a01b03168061057d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106d7565b600c8054610b4490611f5b565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7090611f5b565b8015610bbd5780601f10610b9257610100808354040283529160200191610bbd565b820191906000526020600020905b815481529060010190602001808311610ba057829003601f168201915b505050505081565b60006001600160a01b038216610c2f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016106d7565b506001600160a01b031660009081526005602052604090205490565b610c536116ae565b610c5d6000611708565b565b6000805160206123aa833981519152610c7781611008565b50600090815260016020526040812055565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600380546105b990611f5b565b6000805160206123aa833981519152610cdb81611008565b610a2b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6836114f6565b610a2b33838361175a565b6000805160206123aa833981519152610d2881611008565b610d3160008055565b50565b610d3e3383611199565b610d5a5760405162461bcd60e51b81526004016106d790611f95565b610ad184848484611828565b6000818152600460205260409020546060906001600160a01b0316610dc257604080518082018252600e81526d15dc9bdb99c81d1bdad95b88125160921b6020820152905163048e2d4960e41b81526106d79190600401611c63565b6000828152600d60209081526040822054610ddc9161185b565b9050610de66119fe565b81604051602001610df89291906121b3565b604051602081830303815290604052915050919050565b6000805160206123aa833981519152610e2781611008565b610a2b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68361157c565b6000805160206123aa833981519152610e6981611008565b6001600160a01b038216610ebc576040805180820182526016815275496e76616c69642077616c6c6574206164647265737360501b6020820152905163d647364f60e01b81526106d79190600401611c63565b610ed46000805160206123aa833981519152836114f6565b600a54610ef9906000805160206123aa833981519152906001600160a01b031661157c565b50600a80546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260086020526040902060010154610f3781611008565b6105a5838361157c565b610f496116ae565b6001600160a01b038116610fae5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106d7565b610d3181611708565b60006001600160e01b031982166301ffc9a760e01b1480610fe857506001600160e01b03198216638692779360e01b145b8061057d57506001600160e01b0319821663da8def7360e01b1492915050565b610d318133611a0d565b6127106001600160601b038216111561103d5760405162461bcd60e51b81526004016106d7906121e2565b6001600160a01b0382166110935760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016106d7565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b6000818152600460205260409020546001600160a01b0316610d315760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106d7565b600081815260066020526040902080546001600160a01b0319166001600160a01b038416908117909155819061116082610ad7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806111a583610ad7565b9050806001600160a01b0316846001600160a01b031614806111ec57506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b806112105750836001600160a01b03166112058461063c565b6001600160a01b0316145b949350505050565b826001600160a01b031661122b82610ad7565b6001600160a01b03161461128f5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016106d7565b6001600160a01b0382166112f15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106d7565b6112fc60008261112b565b6001600160a01b038316600090815260056020526040812080546001929061132590849061222c565b90915550506001600160a01b0382166000908152600560205260408120805460019290611353908490612243565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b03821661140a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106d7565b6000818152600460205260409020546001600160a01b03161561146f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106d7565b6001600160a01b0382166000908152600560205260408120805460019290611498908490612243565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6115008282610c89565b610a2b5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556115383390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6115868282610c89565b15610a2b5760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6127106001600160601b038216111561160e5760405162461bcd60e51b81526004016106d7906121e2565b6001600160a01b0382166116645760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d6574657273000000000060448201526064016106d7565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600190529190942093519051909116600160a01b029116179055565b6009546001600160a01b03163314610c5d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106d7565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036117bb5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106d7565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611833848484611218565b61183f84848484611a71565b610ad15760405162461bcd60e51b81526004016106d79061225b565b6060600061186a836002611ff9565b611875906002612243565b67ffffffffffffffff81111561188d5761188d611e3f565b6040519080825280601f01601f1916602001820160405280156118b7576020820181803683370190505b509050600360fc1b816000815181106118d2576118d26122ad565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611901576119016122ad565b60200101906001600160f81b031916908160001a9053506000611925846002611ff9565b611930906001612243565b90505b60018111156119a8576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611964576119646122ad565b1a60f81b82828151811061197a5761197a6122ad565b60200101906001600160f81b031916908160001a90535060049490941c936119a1816122c3565b9050611933565b5083156119f75760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106d7565b9392505050565b6060600c80546105b990611f5b565b611a178282610c89565b610a2b57611a2f816001600160a01b0316601461185b565b611a3a83602061185b565b604051602001611a4b9291906122da565b60408051601f198184030181529082905262461bcd60e51b82526106d791600401611c63565b60006001600160a01b0384163b15611b6757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611ab590339089908890889060040161234f565b6020604051808303816000875af1925050508015611af0575060408051601f3d908101601f19168201909252611aed9181019061238c565b60015b611b4d573d808015611b1e576040519150601f19603f3d011682016040523d82523d6000602084013e611b23565b606091505b508051600003611b455760405162461bcd60e51b81526004016106d79061225b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611210565b506001949350505050565b6001600160e01b031981168114610d3157600080fd5b600060208284031215611b9a57600080fd5b81356119f781611b72565b80356001600160a01b0381168114611bbc57600080fd5b919050565b80356001600160601b0381168114611bbc57600080fd5b60008060408385031215611beb57600080fd5b611bf483611ba5565b9150611c0260208401611bc1565b90509250929050565b60005b83811015611c26578181015183820152602001611c0e565b83811115610ad15750506000910152565b60008151808452611c4f816020860160208601611c0b565b601f01601f19169290920160200192915050565b6020815260006119f76020830184611c37565b600060208284031215611c8857600080fd5b5035919050565b60008060408385031215611ca257600080fd5b611cab83611ba5565b946020939093013593505050565b600080600060608486031215611cce57600080fd5b611cd784611ba5565b9250611ce560208501611ba5565b9150604084013590509250925092565b60008060408385031215611d0857600080fd5b50508035926020909101359150565b60008060408385031215611d2a57600080fd5b82359150611c0260208401611ba5565b60008060208385031215611d4d57600080fd5b823567ffffffffffffffff80821115611d6557600080fd5b818501915085601f830112611d7957600080fd5b813581811115611d8857600080fd5b866020828501011115611d9a57600080fd5b60209290920196919550909350505050565b600080600060608486031215611dc157600080fd5b83359250611dd160208501611ba5565b9150611ddf60408501611bc1565b90509250925092565b600060208284031215611dfa57600080fd5b6119f782611ba5565b60008060408385031215611e1657600080fd5b611e1f83611ba5565b915060208301358015158114611e3457600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215611e6b57600080fd5b611e7485611ba5565b9350611e8260208601611ba5565b925060408501359150606085013567ffffffffffffffff80821115611ea657600080fd5b818701915087601f830112611eba57600080fd5b813581811115611ecc57611ecc611e3f565b604051601f8201601f19908116603f01168101908382118183101715611ef457611ef4611e3f565b816040528281528a6020848701011115611f0d57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215611f4457600080fd5b611f4d83611ba5565b9150611c0260208401611ba5565b600181811c90821680611f6f57607f821691505b602082108103611f8f57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561201357612013611fe3565b500290565b60008261203557634e487b7160e01b600052601260045260246000fd5b500490565b60408152600061204d6040830185611c37565b90508260208301529392505050565b60006001820161206e5761206e611fe3565b5060010190565b601f8211156105a557600081815260208120601f850160051c8101602086101561209c5750805b601f850160051c820191505b818110156120bb578281556001016120a8565b505050505050565b67ffffffffffffffff8311156120db576120db611e3f565b6120ef836120e98354611f5b565b83612075565b6000601f841160018114612123576000851561210b5750838201355b600019600387901b1c1916600186901b17835561217d565b600083815260209020601f19861690835b828110156121545786850135825560209485019460019092019101612134565b50868210156121715760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b600083516121c5818460208801611c0b565b8351908301906121d9818360208801611c0b565b01949350505050565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60008282101561223e5761223e611fe3565b500390565b6000821982111561225657612256611fe3565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000816122d2576122d2611fe3565b506000190190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612312816017850160208801611c0b565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612343816028840160208801611c0b565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061238290830184611c37565b9695505050505050565b60006020828403121561239e57600080fd5b81516119f781611b7256fe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08a26469706673582212201f7b00583f992fad8c136ce5d52d56aab0b823a2b3260a8b53a1c79021d0896f64736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005f3f357194c32f9c2f1176cc39b9d6c214a1fdca0000000000000000000000000be1d9a27e6483105770e5eb081c0807cf2d163c
-----Decoded View---------------
Arg [0] : manager (address): 0x5F3F357194C32f9c2f1176CC39B9d6c214A1fDCA
Arg [1] : asm (address): 0x0be1d9a27E6483105770e5eb081c0807cf2D163c
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000005f3f357194c32f9c2f1176cc39b9d6c214a1fdca
Arg [1] : 0000000000000000000000000be1d9a27e6483105770e5eb081c0807cf2d163c
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.