Source Code
Overview
POL Balance
POL Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 78 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Safe Transfer Fr... | 32209463 | 1334 days ago | IN | 0 POL | 0.00159131 | ||||
| Safe Transfer Fr... | 32207696 | 1334 days ago | IN | 0 POL | 0.00443156 | ||||
| Safe Transfer Fr... | 28816662 | 1422 days ago | IN | 0 POL | 0.00332563 | ||||
| Withdraw | 28679902 | 1425 days ago | IN | 0 POL | 0.00100258 | ||||
| Set Withdraw Wal... | 28679753 | 1425 days ago | IN | 0 POL | 0.00122691 | ||||
| Mint | 28642231 | 1426 days ago | IN | 29 POL | 0.00372706 | ||||
| Mint | 28638084 | 1426 days ago | IN | 9 POL | 0.003503 | ||||
| Mint | 28627304 | 1426 days ago | IN | 29 POL | 0.00355047 | ||||
| Mint | 28605620 | 1427 days ago | IN | 9 POL | 0.00678407 | ||||
| Mint | 28563720 | 1428 days ago | IN | 9 POL | 0.00416468 | ||||
| Mint | 28563474 | 1428 days ago | IN | 499 POL | 0.00335897 | ||||
| Mint | 28562869 | 1428 days ago | IN | 9 POL | 0.00388011 | ||||
| Mint | 28536320 | 1428 days ago | IN | 9 POL | 0.00387091 | ||||
| Mint | 28530564 | 1429 days ago | IN | 29 POL | 0.00317231 | ||||
| Mint | 28530408 | 1429 days ago | IN | 29 POL | 0.00336386 | ||||
| Mint | 28517837 | 1429 days ago | IN | 29 POL | 0.00388208 | ||||
| Mint | 28516051 | 1429 days ago | IN | 9 POL | 0.00494219 | ||||
| Mint | 28510667 | 1429 days ago | IN | 9 POL | 0.01366331 | ||||
| Set Approval For... | 28500856 | 1429 days ago | IN | 0 POL | 0.01526877 | ||||
| Mint | 28499764 | 1429 days ago | IN | 79 POL | 0.00306125 | ||||
| Mint | 28498516 | 1429 days ago | IN | 9 POL | 0.00554281 | ||||
| Mint | 28479187 | 1430 days ago | IN | 9 POL | 0.01327119 | ||||
| Mint | 28472348 | 1430 days ago | IN | 9 POL | 0.01795582 | ||||
| Mint | 28464317 | 1430 days ago | IN | 29 POL | 0.00479143 | ||||
| Mint | 28442452 | 1431 days ago | IN | 29 POL | 0.00356572 |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
DeveloperDAOforUkraine
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./@eip2981/ERC2981ContractWideRoyalties.sol";
/// @author Developer DAO
/// @title Developer DAO for Ukraine smart contract that is compliant with ERC721 and ERC2981 standards.
contract DeveloperDAOforUkraine is
ERC721URIStorage,
ReentrancyGuard,
AccessControlEnumerable,
ERC2981ContractWideRoyalties
{
using Counters for Counters.Counter;
string public baseURI =
"ipfs://QmNpRFikK2XhreaNfEgud8BECpEu3pm3TV9cq5X779MRYE/";
string public contractURI =
"ipfs://QmPpNijoDZ4e5VZhdB7vs16EJoi7BumsSizd1UGokh5YaC/";
bool public contractActive = true;
mapping(string => uint256) public tiers;
address public withdrawWallet = 0xb37b3b78022E6964fe80030C9161525880274010; // Unchain.fund
bytes32 public constant WITHDRAW_ROLE = keccak256("WITHDRAW_ROLE");
Counters.Counter private _tokenIds;
event BaseURIUpdated(string indexed oldValue, string indexed newValue);
event ContractURIUpdated(string indexed oldValue, string indexed newValue);
event ContractStateUpdated(bool indexed oldValue, bool indexed newValue);
event LogTokenMinted(
address indexed minter,
uint256 indexed tokenId,
string indexed tier
);
event TierPricingUpdated(
string indexed tier,
uint256 indexed oldValue,
uint256 indexed newValue
);
event WithdrawWalletUpdated(
address indexed oldValue,
address indexed newValue
);
constructor() ERC721("Developer DAO for Ukraine", "DEVDAO-UKRAINE") {
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(WITHDRAW_ROLE, msg.sender);
setRoyalties(1000); // set royalties to 10%.
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, AccessControlEnumerable, ERC2981Base)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
function setBaseURI(string memory _newBaseURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
emit BaseURIUpdated(baseURI, _newBaseURI);
baseURI = _newBaseURI;
}
function setContractURI(string memory _contractURI)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
emit ContractURIUpdated(contractURI, _contractURI);
contractURI = _contractURI;
}
function setTierPricing(
uint256 steel,
uint256 bronze,
uint256 silver,
uint256 gold,
uint256 diamond,
uint256 platinum
) public onlyRole(DEFAULT_ADMIN_ROLE) {
emit TierPricingUpdated("steel", tiers["steel"], steel);
emit TierPricingUpdated("bronze", tiers["bronze"], bronze);
emit TierPricingUpdated("silver", tiers["silver"], silver);
emit TierPricingUpdated("gold", tiers["gold"], gold);
emit TierPricingUpdated("diamond", tiers["diamond"], diamond);
emit TierPricingUpdated("platinum", tiers["platinum"], platinum);
tiers["steel"] = steel;
tiers["bronze"] = bronze;
tiers["silver"] = silver;
tiers["gold"] = gold;
tiers["diamond"] = diamond;
tiers["platinum"] = platinum;
}
function mint() public payable nonReentrant {
require(
msg.value >= tiers["steel"],
"Please send enough MATIC to meet the minimum threshold of a tier."
);
require(
contractActive,
"This contract has been deactivated by the owner and does not currently accept anymore donations."
);
_tokenIds.increment();
uint256 _token = _tokenIds.current();
_safeMint(msg.sender, _token);
string memory _tier = "steel";
if (msg.value >= tiers["platinum"]) {
_tier = "platinum";
} else if (msg.value >= tiers["diamond"]) {
_tier = "diamond";
} else if (msg.value >= tiers["gold"]) {
_tier = "gold";
} else if (msg.value >= tiers["silver"]) {
_tier = "silver";
} else if (msg.value >= tiers["bronze"]) {
_tier = "bronze";
}
emit LogTokenMinted(msg.sender, _token, _tier);
_setTokenURI(_token, _tier);
}
function withdraw() public onlyRole(WITHDRAW_ROLE) {
payable(withdrawWallet).transfer(address(this).balance);
}
function toggleContractState() public onlyRole(DEFAULT_ADMIN_ROLE) {
emit ContractStateUpdated(contractActive, !contractActive);
contractActive = !contractActive;
}
function setWithdrawWallet(address _withdrawWallet)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
emit WithdrawWalletUpdated(withdrawWallet, _withdrawWallet);
withdrawWallet = _withdrawWallet;
}
function setRoyalties(uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
_setRoyalties(address(this), amount);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)
pragma solidity ^0.8.0;
import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";
/**
* @dev Extension of {AccessControl} that allows enumerating the members of each role.
*/
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
using EnumerableSet for EnumerableSet.AddressSet;
mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
return _roleMembers[role].at(index);
}
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
return _roleMembers[role].length();
}
/**
* @dev Overload {_grantRole} to track enumerable memberships
*/
function _grantRole(bytes32 role, address account) internal virtual override {
super._grantRole(role, account);
_roleMembers[role].add(account);
}
/**
* @dev Overload {_revokeRole} to track enumerable memberships
*/
function _revokeRole(bytes32 role, address account) internal virtual override {
super._revokeRole(role, account);
_roleMembers[role].remove(account);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol)
pragma solidity ^0.8.0;
import "../ERC721.sol";
/**
* @dev ERC721 token with storage based token URI management.
*/
abstract contract ERC721URIStorage is ERC721 {
using Strings for uint256;
// Optional mapping for token URIs
mapping(uint256 => string) private _tokenURIs;
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token");
string memory _tokenURI = _tokenURIs[tokenId];
string memory base = _baseURI();
// If there is no base URI, return the token URI.
if (bytes(base).length == 0) {
return _tokenURI;
}
// If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
if (bytes(_tokenURI).length > 0) {
return string(abi.encodePacked(base, _tokenURI));
}
return super.tokenURI(tokenId);
}
/**
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
_tokenURIs[tokenId] = _tokenURI;
}
/**
* @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 override {
super._burn(tokenId);
if (bytes(_tokenURIs[tokenId]).length != 0) {
delete _tokenURIs[tokenId];
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "./ERC2981Base.sol";
/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
/// @dev This implementation has the same royalties for each and every tokens
abstract contract ERC2981ContractWideRoyalties is ERC2981Base {
RoyaltyInfo private _royalties;
event RoyaltyUpdated(
address oldRecipient,
uint256 oldValue,
address newRecipient,
uint256 newValue
);
/// @dev Sets token royalties
/// @param recipient recipient of the royalties
/// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0)
function _setRoyalties(address recipient, uint256 value) internal {
emit RoyaltyUpdated(
_royalties.recipient,
_royalties.amount,
recipient,
value
);
require(value <= 10000, "ERC2981Royalties: Too high");
_royalties = RoyaltyInfo(recipient, uint24(value));
}
/// @inheritdoc IERC2981Royalties
function royaltyInfo(uint256, uint256 value)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
RoyaltyInfo memory royalties = _royalties;
receiver = royalties.recipient;
royaltyAmount = (value * royalties.amount) / 10000;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
/**
* @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
*/
interface IAccessControlEnumerable is IAccessControl {
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) external view returns (address);
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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, _msgSender());
_;
}
/**
* @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 `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)
pragma solidity ^0.8.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping(bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
// Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
if (lastIndex != toDeleteIndex) {
bytes32 lastvalue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastvalue;
// Update the index for the moved value
set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
return _values(set._inner);
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
assembly {
result := store
}
return result;
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
assembly {
result := store
}
return result;
}
}// 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 v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/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`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// 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.5.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "./IERC2981Royalties.sol";
/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
abstract contract ERC2981Base is ERC165, IERC2981Royalties {
struct RoyaltyInfo {
address recipient;
uint24 amount;
}
/// @inheritdoc ERC165
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
return
interfaceId == type(IERC2981Royalties).interfaceId ||
super.supportsInterface(interfaceId);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
/// @title IERC2981Royalties
/// @dev Interface for the ERC2981 - Token Royalty standard
interface IERC2981Royalties {
/// @notice Called with the sale price to determine how much royalty
// is owed and to whom.
/// @param _tokenId - the NFT asset queried for royalty information
/// @param _value - the sale price of the NFT asset specified by _tokenId
/// @return _receiver - address of who should be sent the royalty payment
/// @return _royaltyAmount - the royalty payment amount for value sale price
function royaltyInfo(uint256 _tokenId, uint256 _value)
external
view
returns (address _receiver, uint256 _royaltyAmount);
}{
"optimizer": {
"enabled": true,
"runs": 1000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"string","name":"oldValue","type":"string"},{"indexed":true,"internalType":"string","name":"newValue","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"oldValue","type":"bool"},{"indexed":true,"internalType":"bool","name":"newValue","type":"bool"}],"name":"ContractStateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"oldValue","type":"string"},{"indexed":true,"internalType":"string","name":"newValue","type":"string"}],"name":"ContractURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"string","name":"tier","type":"string"}],"name":"LogTokenMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"address","name":"newRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"RoyaltyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"tier","type":"string"},{"indexed":true,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"TierPricingUpdated","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldValue","type":"address"},{"indexed":true,"internalType":"address","name":"newValue","type":"address"}],"name":"WithdrawWalletUpdated","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","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":"contractActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"steel","type":"uint256"},{"internalType":"uint256","name":"bronze","type":"uint256"},{"internalType":"uint256","name":"silver","type":"uint256"},{"internalType":"uint256","name":"gold","type":"uint256"},{"internalType":"uint256","name":"diamond","type":"uint256"},{"internalType":"uint256","name":"platinum","type":"uint256"}],"name":"setTierPricing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_withdrawWallet","type":"address"}],"name":"setWithdrawWallet","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":"string","name":"","type":"string"}],"name":"tiers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleContractState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60e0604052603660808181529062003bb060a03980516200002991600b9160209091019062000646565b5060405180606001604052806036815260200162003b7a6036913980516200005a91600c9160209091019062000646565b50600d805460ff19166001179055600f80546001600160a01b03191673b37b3b78022e6964fe80030c91615258802740101790553480156200009b57600080fd5b50604080518082018252601981527f446576656c6f7065722044414f20666f7220556b7261696e650000000000000060208083019182528351808501909452600e84526d44455644414f2d554b5241494e4560901b908401528151919291620001079160009162000646565b5080516200011d90600190602084019062000646565b50506001600755506200013260003362000171565b6200015e7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec3362000171565b6200016b6103e8620001b4565b620008a3565b620001888282620001d260201b620019271760201c565b6000828152600960209081526040909120620001af918390620019c962000276821b17901c565b505050565b6000620001c2813362000296565b620001ce30836200033c565b5050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16620001ce5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002323390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006200028d836001600160a01b0384166200043b565b90505b92915050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16620001ce57620002e2816001600160a01b031660146200048d60201b620019de1760201c565b620002f8836020620019de6200048d821b17811c565b6040516020016200030b9291906200071f565b60408051601f198184030181529082905262461bcd60e51b8252620003339160040162000798565b60405180910390fd5b600a54604080516001600160a01b038084168252600160a01b90930462ffffff16602082015291841690820152606081018290527fd4ad75825e8d1c1e74bc1b56ec2653bd9a7bee36e96f6f03c055f444b375568d9060800160405180910390a1612710811115620003f15760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f2068696768000000000000604482015260640162000333565b604080518082019091526001600160a01b0390921680835262ffffff9091166020909201829052600a8054600160a01b9093026001600160b81b0319909316909117919091179055565b6000818152600183016020526040812054620004845750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000290565b50600062000290565b606060006200049e836002620007e3565b620004ab90600262000805565b6001600160401b03811115620004c557620004c562000820565b6040519080825280601f01601f191660200182016040528015620004f0576020820181803683370190505b509050600360fc1b816000815181106200050e576200050e62000836565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062000540576200054062000836565b60200101906001600160f81b031916908160001a905350600062000566846002620007e3565b6200057390600162000805565b90505b6001811115620005f5576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110620005ab57620005ab62000836565b1a60f81b828281518110620005c457620005c462000836565b60200101906001600160f81b031916908160001a90535060049490941c93620005ed816200084c565b905062000576565b5083156200028d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640162000333565b828054620006549062000866565b90600052602060002090601f016020900481019282620006785760008555620006c3565b82601f106200069357805160ff1916838001178555620006c3565b82800160010185558215620006c3579182015b82811115620006c3578251825591602001919060010190620006a6565b50620006d1929150620006d5565b5090565b5b80821115620006d15760008155600101620006d6565b60005b8381101562000709578181015183820152602001620006ef565b8381111562000719576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835162000759816017850160208801620006ec565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516200078c816028840160208801620006ec565b01602801949350505050565b6020815260008251806020840152620007b9816040850160208701620006ec565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615620008005762000800620007cd565b500290565b600082198211156200081b576200081b620007cd565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816200085e576200085e620007cd565b506000190190565b600181811c908216806200087b57607f821691505b602082108114156200089d57634e487b7160e01b600052602260045260246000fd5b50919050565b6132c780620008b36000396000f3fe60806040526004361061024f5760003560e01c806370a0823111610138578063b88d4fde116100b0578063e02023a11161007f578063e8a3d48511610064578063e8a3d485146106c7578063e985e9c5146106dc578063fe551b051461072557600080fd5b8063e02023a114610679578063e289fcb6146106ad57600080fd5b8063b88d4fde146105f9578063c87b56dd14610619578063ca15c87314610639578063d547741f1461065957600080fd5b80639373f4321161010757806395d89b41116100ec57806395d89b41146105af578063a217fddf146105c4578063a22cb465146105d957600080fd5b80639373f4321461056f578063938e3d7b1461058f57600080fd5b806370a08231146104c957806385d178f4146104e95780639010d07c1461050957806391d148541461052957600080fd5b80632a55205a116101cb5780633ccfd60b1161019a57806355f804b31161017f57806355f804b3146104745780636352211e146104945780636c0360eb146104b457600080fd5b80633ccfd60b1461043f57806342842e0e1461045457600080fd5b80632a55205a146103a05780632b80183f146103df5780632f2ff15d146103ff57806336568abe1461041f57600080fd5b80630cd9c9dd1161022257806323b872dd1161020757806323b872dd1461032d578063248a9ca31461034d57806324fde1e21461038b57600080fd5b80630cd9c9dd146103055780631249c58b1461032557600080fd5b806301ffc9a71461025457806306fdde0314610289578063081812fc146102ab578063095ea7b3146102e3575b600080fd5b34801561026057600080fd5b5061027461026f366004612c0f565b61075d565b60405190151581526020015b60405180910390f35b34801561029557600080fd5b5061029e61076e565b6040516102809190612c84565b3480156102b757600080fd5b506102cb6102c6366004612c97565b610800565b6040516001600160a01b039091168152602001610280565b3480156102ef57600080fd5b506103036102fe366004612ccc565b61089a565b005b34801561031157600080fd5b50610303610320366004612cf6565b6109cc565b610303610d3e565b34801561033957600080fd5b50610303610348366004612d39565b611105565b34801561035957600080fd5b5061037d610368366004612c97565b60009081526008602052604090206001015490565b604051908152602001610280565b34801561039757600080fd5b5061030361118c565b3480156103ac57600080fd5b506103c06103bb366004612d75565b6111e3565b604080516001600160a01b039093168352602083019190915201610280565b3480156103eb57600080fd5b506103036103fa366004612c97565b611238565b34801561040b57600080fd5b5061030361041a366004612d97565b611252565b34801561042b57600080fd5b5061030361043a366004612d97565b611278565b34801561044b57600080fd5b50610303611300565b34801561046057600080fd5b5061030361046f366004612d39565b611364565b34801561048057600080fd5b5061030361048f366004612e4f565b61137f565b3480156104a057600080fd5b506102cb6104af366004612c97565b6113f3565b3480156104c057600080fd5b5061029e61147e565b3480156104d557600080fd5b5061037d6104e4366004612e98565b61150c565b3480156104f557600080fd5b50600f546102cb906001600160a01b031681565b34801561051557600080fd5b506102cb610524366004612d75565b6115a6565b34801561053557600080fd5b50610274610544366004612d97565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561057b57600080fd5b5061030361058a366004612e98565b6115c5565b34801561059b57600080fd5b506103036105aa366004612e4f565b61163b565b3480156105bb57600080fd5b5061029e6116af565b3480156105d057600080fd5b5061037d600081565b3480156105e557600080fd5b506103036105f4366004612eb3565b6116be565b34801561060557600080fd5b50610303610614366004612eef565b6116c9565b34801561062557600080fd5b5061029e610634366004612c97565b611757565b34801561064557600080fd5b5061037d610654366004612c97565b6118dd565b34801561066557600080fd5b50610303610674366004612d97565b6118f4565b34801561068557600080fd5b5061037d7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec81565b3480156106b957600080fd5b50600d546102749060ff1681565b3480156106d357600080fd5b5061029e61191a565b3480156106e857600080fd5b506102746106f7366004612f6b565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561073157600080fd5b5061037d610740366004612e4f565b8051602081830181018051600e8252928201919093012091525481565b600061076882611ba3565b92915050565b60606000805461077d90612f95565b80601f01602080910402602001604051908101604052809291908181526020018280546107a990612f95565b80156107f65780601f106107cb576101008083540402835291602001916107f6565b820191906000526020600020905b8154815290600101906020018083116107d957829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661087e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006108a5826113f3565b9050806001600160a01b0316836001600160a01b0316141561092f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610875565b336001600160a01b038216148061094b575061094b81336106f7565b6109bd5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610875565b6109c78383611be1565b505050565b60006109d88133611c5c565b86600e6040516109f390641cdd19595b60da1b815260050190565b90815260405190819003602001812054641cdd19595b60da1b825290600501604051908190038120907fc3bc9193735d04679abbad1bc82dd8317fe8623287b45e84003e66f2e4510f2090600090a485600e604051610a5e906562726f6e7a6560d01b815260060190565b908152604051908190036020018120546562726f6e7a6560d01b825290600601604051908190038120907fc3bc9193735d04679abbad1bc82dd8317fe8623287b45e84003e66f2e4510f2090600090a484600e604051610aca906539b4b63b32b960d11b815260060190565b908152604051908190036020018120546539b4b63b32b960d11b825290600601604051908190038120907fc3bc9193735d04679abbad1bc82dd8317fe8623287b45e84003e66f2e4510f2090600090a483600e604051610b34906319dbdb1960e21b815260040190565b908152604051908190036020018120546319dbdb1960e21b825290600401604051908190038120907fc3bc9193735d04679abbad1bc82dd8317fe8623287b45e84003e66f2e4510f2090600090a482600e604051610b9f9066191a585b5bdb9960ca1b815260070190565b9081526040519081900360200181205466191a585b5bdb9960ca1b825290600701604051908190038120907fc3bc9193735d04679abbad1bc82dd8317fe8623287b45e84003e66f2e4510f2090600090a481600e604051610c0e9067706c6174696e756d60c01b815260080190565b9081526040519081900360200181205467706c6174696e756d60c01b825290600801604051908190038120907fc3bc9193735d04679abbad1bc82dd8317fe8623287b45e84003e66f2e4510f2090600090a486600e604051610c7b90641cdd19595b60da1b815260050190565b90815260408051918290036020018220929092556562726f6e7a6560d01b8152600e6006808301829052835192839003602690810184209a909a556539b4b63b32b960d11b835282018190528251918290039098018120969096556319dbdb1960e21b8652600486018790528051958690036024018620949094555066191a585b5bdb9960ca1b84526007840185905282519384900360270184209190915567706c6174696e756d60c01b83526008830193909352519081900360280190205550565b60026007541415610d915760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610875565b6002600755604051641cdd19595b60da1b8152600e90600501908152602001604051809103902054341015610e545760405162461bcd60e51b815260206004820152604160248201527f506c656173652073656e6420656e6f756768204d4154494320746f206d65657460448201527f20746865206d696e696d756d207468726573686f6c64206f662061207469657260648201527f2e00000000000000000000000000000000000000000000000000000000000000608482015260a401610875565b600d5460ff16610ef25760405162461bcd60e51b815260206004820152606060248201527f5468697320636f6e747261637420686173206265656e2064656163746976617460448201527f656420627920746865206f776e657220616e6420646f6573206e6f742063757260648201527f72656e746c792061636365707420616e796d6f726520646f6e6174696f6e732e608482015260a401610875565b610f00601080546001019055565b6000610f0b60105490565b9050610f173382611cdc565b60408051808201825260058152641cdd19595b60da1b6020820152905167706c6174696e756d60c01b8152600e906008019081526020016040518091039020543410610f825750604080518082019091526008815267706c6174696e756d60c01b60208201526110b0565b60405166191a585b5bdb9960ca1b8152600e906007019081526020016040518091039020543410610fd15750604080518082019091526007815266191a585b5bdb9960ca1b60208201526110b0565b6040516319dbdb1960e21b8152600e90600401908152602001604051809103902054341061101a575060408051808201909152600481526319dbdb1960e21b60208201526110b0565b6040516539b4b63b32b960d11b8152600e906006019081526020016040518091039020543410611067575060408051808201909152600681526539b4b63b32b960d11b60208201526110b0565b6040516562726f6e7a6560d01b8152600e9060060190815260200160405180910390205434106110b0575060408051808201909152600681526562726f6e7a6560d01b60208201525b806040516110be9190612fd0565b60405190819003812090839033907fd24e8d35e8d0bc0851b0d6249b090ae8ba18fe7cbff4df2e7dc4d4d591f59f0a90600090a46110fc8282611cf6565b50506001600755565b61110f3382611d9f565b6111815760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610875565b6109c7838383611e92565b60006111988133611c5c565b600d5460405160ff90911615908115907fe3048a2fbdb5d0325f217d8d1345240961758ee1c8bc3d78f69edacaca8d873190600090a350600d805460ff19811660ff90911615179055565b60408051808201909152600a546001600160a01b038116808352600160a01b90910462ffffff16602083018190529091600091612710906112249086613002565b61122e9190613037565b9150509250929050565b60006112448133611c5c565b61124e308361206c565b5050565b60008281526008602052604090206001015461126e8133611c5c565b6109c78383612181565b6001600160a01b03811633146112f65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610875565b61124e82826121a3565b7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec61132b8133611c5c565b600f546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505015801561124e573d6000803e3d6000fd5b6109c7838383604051806020016040528060008152506116c9565b600061138b8133611c5c565b816040516113999190612fd0565b6040518091039020600b6040516113b0919061304b565b604051908190038120907f309b29ded109b9e28fb9885757b3e0096eb75c51d23aa4635d68bcd569f6adc190600090a381516109c790600b906020850190612b5d565b6000818152600260205260408120546001600160a01b0316806107685760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610875565b600b805461148b90612f95565b80601f01602080910402602001604051908101604052809291908181526020018280546114b790612f95565b80156115045780601f106114d957610100808354040283529160200191611504565b820191906000526020600020905b8154815290600101906020018083116114e757829003601f168201915b505050505081565b60006001600160a01b03821661158a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610875565b506001600160a01b031660009081526003602052604090205490565b60008281526009602052604081206115be90836121c5565b9392505050565b60006115d18133611c5c565b600f546040516001600160a01b038085169216907f1a1281546ab2ddcd5ce0feb2e11fbe991326fa5936d8b8444506706dd3a6fa7f90600090a350600f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60006116478133611c5c565b816040516116559190612fd0565b6040518091039020600c60405161166c919061304b565b604051908190038120907fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a1690600090a381516109c790600c906020850190612b5d565b60606001805461077d90612f95565b61124e3383836121d1565b6116d33383611d9f565b6117455760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610875565b611751848484846122a0565b50505050565b6000818152600260205260409020546060906001600160a01b03166117e45760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f722060448201527f6e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006064820152608401610875565b600082815260066020526040812080546117fd90612f95565b80601f016020809104026020016040519081016040528092919081815260200182805461182990612f95565b80156118765780601f1061184b57610100808354040283529160200191611876565b820191906000526020600020905b81548152906001019060200180831161185957829003601f168201915b50505050509050600061188761231e565b905080516000141561189a575092915050565b8151156118cc5780826040516020016118b49291906130e7565b60405160208183030381529060405292505050919050565b6118d58461232d565b949350505050565b600081815260096020526040812061076890612415565b6000828152600860205260409020600101546119108133611c5c565b6109c783836121a3565b600c805461148b90612f95565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff1661124e5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556119853390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115be836001600160a01b03841661241f565b606060006119ed836002613002565b6119f8906002613116565b67ffffffffffffffff811115611a1057611a10612dc3565b6040519080825280601f01601f191660200182016040528015611a3a576020820181803683370190505b509050600360fc1b81600081518110611a5557611a5561312e565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611aa057611aa061312e565b60200101906001600160f81b031916908160001a9053506000611ac4846002613002565b611acf906001613116565b90505b6001811115611b54577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611b1057611b1061312e565b1a60f81b828281518110611b2657611b2661312e565b60200101906001600160f81b031916908160001a90535060049490941c93611b4d81613144565b9050611ad2565b5083156115be5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610875565b60006001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000148061076857506107688261246e565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190611c23826113f3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff1661124e57611c9a816001600160a01b031660146119de565b611ca58360206119de565b604051602001611cb692919061315b565b60408051601f198184030181529082905262461bcd60e51b825261087591600401612c84565b61124e8282604051806020016040528060008152506124ac565b6000828152600260205260409020546001600160a01b0316611d805760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201527f6578697374656e7420746f6b656e0000000000000000000000000000000000006064820152608401610875565b600082815260066020908152604090912082516109c792840190612b5d565b6000818152600260205260408120546001600160a01b0316611e185760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610875565b6000611e23836113f3565b9050806001600160a01b0316846001600160a01b03161480611e5e5750836001600160a01b0316611e5384610800565b6001600160a01b0316145b806118d557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff166118d5565b826001600160a01b0316611ea5826113f3565b6001600160a01b031614611f215760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610875565b6001600160a01b038216611f9c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610875565b611fa7600082611be1565b6001600160a01b0383166000908152600360205260408120805460019290611fd09084906131dc565b90915550506001600160a01b0382166000908152600360205260408120805460019290611ffe908490613116565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a54604080516001600160a01b038084168252600160a01b90930462ffffff16602082015291841690820152606081018290527fd4ad75825e8d1c1e74bc1b56ec2653bd9a7bee36e96f6f03c055f444b375568d9060800160405180910390a161271081111561211f5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610875565b604080518082019091526001600160a01b0390921680835262ffffff9091166020909201829052600a8054600160a01b9093027fffffffffffffffffff0000000000000000000000000000000000000000000000909316909117919091179055565b61218b8282611927565b60008281526009602052604090206109c790826119c9565b6121ad828261252a565b60008281526009602052604090206109c790826125ad565b60006115be83836125c2565b816001600160a01b0316836001600160a01b031614156122335760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610875565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6122ab848484611e92565b6122b7848484846125ec565b6117515760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610875565b6060600b805461077d90612f95565b6000818152600260205260409020546060906001600160a01b03166123ba5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610875565b60006123c461231e565b905060008151116123e457604051806020016040528060008152506115be565b806123ee84612744565b6040516020016123ff9291906130e7565b6040516020818303038152906040529392505050565b6000610768825490565b600081815260018301602052604081205461246657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610768565b506000610768565b60006001600160e01b031982167f5a05180f000000000000000000000000000000000000000000000000000000001480610768575061076882612842565b6124b68383612880565b6124c360008484846125ec565b6109c75760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610875565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff161561124e5760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115be836001600160a01b0384166129cf565b60008260000182815481106125d9576125d961312e565b9060005260206000200154905092915050565b60006001600160a01b0384163b1561273957604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126309033908990889088906004016131f3565b602060405180830381600087803b15801561264a57600080fd5b505af192505050801561267a575060408051601f3d908101601f191682019092526126779181019061322f565b60015b61271f573d8080156126a8576040519150601f19603f3d011682016040523d82523d6000602084013e6126ad565b606091505b5080516127175760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610875565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506118d5565b506001949350505050565b6060816127685750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612792578061277c8161324c565b915061278b9050600a83613037565b915061276c565b60008167ffffffffffffffff8111156127ad576127ad612dc3565b6040519080825280601f01601f1916602001820160405280156127d7576020820181803683370190505b5090505b84156118d5576127ec6001836131dc565b91506127f9600a86613267565b612804906030613116565b60f81b8183815181106128195761281961312e565b60200101906001600160f81b031916908160001a90535061283b600a86613037565b94506127db565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610768575061076882612ac2565b6001600160a01b0382166128d65760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610875565b6000818152600260205260409020546001600160a01b03161561293b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610875565b6001600160a01b0382166000908152600360205260408120805460019290612964908490613116565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008181526001830160205260408120548015612ab85760006129f36001836131dc565b8554909150600090612a07906001906131dc565b9050818114612a6c576000866000018281548110612a2757612a2761312e565b9060005260206000200154905080876000018481548110612a4a57612a4a61312e565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612a7d57612a7d61327b565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610768565b6000915050610768565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480612b2557506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061076857507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610768565b828054612b6990612f95565b90600052602060002090601f016020900481019282612b8b5760008555612bd1565b82601f10612ba457805160ff1916838001178555612bd1565b82800160010185558215612bd1579182015b82811115612bd1578251825591602001919060010190612bb6565b50612bdd929150612be1565b5090565b5b80821115612bdd5760008155600101612be2565b6001600160e01b031981168114612c0c57600080fd5b50565b600060208284031215612c2157600080fd5b81356115be81612bf6565b60005b83811015612c47578181015183820152602001612c2f565b838111156117515750506000910152565b60008151808452612c70816020860160208601612c2c565b601f01601f19169290920160200192915050565b6020815260006115be6020830184612c58565b600060208284031215612ca957600080fd5b5035919050565b80356001600160a01b0381168114612cc757600080fd5b919050565b60008060408385031215612cdf57600080fd5b612ce883612cb0565b946020939093013593505050565b60008060008060008060c08789031215612d0f57600080fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b600080600060608486031215612d4e57600080fd5b612d5784612cb0565b9250612d6560208501612cb0565b9150604084013590509250925092565b60008060408385031215612d8857600080fd5b50508035926020909101359150565b60008060408385031215612daa57600080fd5b82359150612dba60208401612cb0565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612df457612df4612dc3565b604051601f8501601f19908116603f01168101908282118183101715612e1c57612e1c612dc3565b81604052809350858152868686011115612e3557600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612e6157600080fd5b813567ffffffffffffffff811115612e7857600080fd5b8201601f81018413612e8957600080fd5b6118d584823560208401612dd9565b600060208284031215612eaa57600080fd5b6115be82612cb0565b60008060408385031215612ec657600080fd5b612ecf83612cb0565b915060208301358015158114612ee457600080fd5b809150509250929050565b60008060008060808587031215612f0557600080fd5b612f0e85612cb0565b9350612f1c60208601612cb0565b925060408501359150606085013567ffffffffffffffff811115612f3f57600080fd5b8501601f81018713612f5057600080fd5b612f5f87823560208401612dd9565b91505092959194509250565b60008060408385031215612f7e57600080fd5b612f8783612cb0565b9150612dba60208401612cb0565b600181811c90821680612fa957607f821691505b60208210811415612fca57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251612fe2818460208701612c2c565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561301c5761301c612fec565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261304657613046613021565b500490565b600080835481600182811c91508083168061306757607f831692505b602080841082141561308757634e487b7160e01b86526022600452602486fd5b81801561309b57600181146130ac576130d9565b60ff198616895284890196506130d9565b60008a81526020902060005b868110156130d15781548b8201529085019083016130b8565b505084890196505b509498975050505050505050565b600083516130f9818460208801612c2c565b83519083019061310d818360208801612c2c565b01949350505050565b6000821982111561312957613129612fec565b500190565b634e487b7160e01b600052603260045260246000fd5b60008161315357613153612fec565b506000190190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613193816017850160208801612c2c565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516131d0816028840160208801612c2c565b01602801949350505050565b6000828210156131ee576131ee612fec565b500390565b60006001600160a01b038087168352808616602084015250836040830152608060608301526132256080830184612c58565b9695505050505050565b60006020828403121561324157600080fd5b81516115be81612bf6565b600060001982141561326057613260612fec565b5060010190565b60008261327657613276613021565b500690565b634e487b7160e01b600052603160045260246000fdfea26469706673582212205a7269a7f340514f8c6234496e3ebe317d95d1e2af40567e37ee1a55b7bf855864736f6c63430008090033697066733a2f2f516d50704e696a6f445a346535565a6864423776733136454a6f693742756d7353697a643155476f6b68355961432f697066733a2f2f516d4e705246696b4b3258687265614e66456775643842454370457533706d33545639637135583737394d5259452f
Deployed Bytecode
0x60806040526004361061024f5760003560e01c806370a0823111610138578063b88d4fde116100b0578063e02023a11161007f578063e8a3d48511610064578063e8a3d485146106c7578063e985e9c5146106dc578063fe551b051461072557600080fd5b8063e02023a114610679578063e289fcb6146106ad57600080fd5b8063b88d4fde146105f9578063c87b56dd14610619578063ca15c87314610639578063d547741f1461065957600080fd5b80639373f4321161010757806395d89b41116100ec57806395d89b41146105af578063a217fddf146105c4578063a22cb465146105d957600080fd5b80639373f4321461056f578063938e3d7b1461058f57600080fd5b806370a08231146104c957806385d178f4146104e95780639010d07c1461050957806391d148541461052957600080fd5b80632a55205a116101cb5780633ccfd60b1161019a57806355f804b31161017f57806355f804b3146104745780636352211e146104945780636c0360eb146104b457600080fd5b80633ccfd60b1461043f57806342842e0e1461045457600080fd5b80632a55205a146103a05780632b80183f146103df5780632f2ff15d146103ff57806336568abe1461041f57600080fd5b80630cd9c9dd1161022257806323b872dd1161020757806323b872dd1461032d578063248a9ca31461034d57806324fde1e21461038b57600080fd5b80630cd9c9dd146103055780631249c58b1461032557600080fd5b806301ffc9a71461025457806306fdde0314610289578063081812fc146102ab578063095ea7b3146102e3575b600080fd5b34801561026057600080fd5b5061027461026f366004612c0f565b61075d565b60405190151581526020015b60405180910390f35b34801561029557600080fd5b5061029e61076e565b6040516102809190612c84565b3480156102b757600080fd5b506102cb6102c6366004612c97565b610800565b6040516001600160a01b039091168152602001610280565b3480156102ef57600080fd5b506103036102fe366004612ccc565b61089a565b005b34801561031157600080fd5b50610303610320366004612cf6565b6109cc565b610303610d3e565b34801561033957600080fd5b50610303610348366004612d39565b611105565b34801561035957600080fd5b5061037d610368366004612c97565b60009081526008602052604090206001015490565b604051908152602001610280565b34801561039757600080fd5b5061030361118c565b3480156103ac57600080fd5b506103c06103bb366004612d75565b6111e3565b604080516001600160a01b039093168352602083019190915201610280565b3480156103eb57600080fd5b506103036103fa366004612c97565b611238565b34801561040b57600080fd5b5061030361041a366004612d97565b611252565b34801561042b57600080fd5b5061030361043a366004612d97565b611278565b34801561044b57600080fd5b50610303611300565b34801561046057600080fd5b5061030361046f366004612d39565b611364565b34801561048057600080fd5b5061030361048f366004612e4f565b61137f565b3480156104a057600080fd5b506102cb6104af366004612c97565b6113f3565b3480156104c057600080fd5b5061029e61147e565b3480156104d557600080fd5b5061037d6104e4366004612e98565b61150c565b3480156104f557600080fd5b50600f546102cb906001600160a01b031681565b34801561051557600080fd5b506102cb610524366004612d75565b6115a6565b34801561053557600080fd5b50610274610544366004612d97565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561057b57600080fd5b5061030361058a366004612e98565b6115c5565b34801561059b57600080fd5b506103036105aa366004612e4f565b61163b565b3480156105bb57600080fd5b5061029e6116af565b3480156105d057600080fd5b5061037d600081565b3480156105e557600080fd5b506103036105f4366004612eb3565b6116be565b34801561060557600080fd5b50610303610614366004612eef565b6116c9565b34801561062557600080fd5b5061029e610634366004612c97565b611757565b34801561064557600080fd5b5061037d610654366004612c97565b6118dd565b34801561066557600080fd5b50610303610674366004612d97565b6118f4565b34801561068557600080fd5b5061037d7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec81565b3480156106b957600080fd5b50600d546102749060ff1681565b3480156106d357600080fd5b5061029e61191a565b3480156106e857600080fd5b506102746106f7366004612f6b565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561073157600080fd5b5061037d610740366004612e4f565b8051602081830181018051600e8252928201919093012091525481565b600061076882611ba3565b92915050565b60606000805461077d90612f95565b80601f01602080910402602001604051908101604052809291908181526020018280546107a990612f95565b80156107f65780601f106107cb576101008083540402835291602001916107f6565b820191906000526020600020905b8154815290600101906020018083116107d957829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661087e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006108a5826113f3565b9050806001600160a01b0316836001600160a01b0316141561092f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610875565b336001600160a01b038216148061094b575061094b81336106f7565b6109bd5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610875565b6109c78383611be1565b505050565b60006109d88133611c5c565b86600e6040516109f390641cdd19595b60da1b815260050190565b90815260405190819003602001812054641cdd19595b60da1b825290600501604051908190038120907fc3bc9193735d04679abbad1bc82dd8317fe8623287b45e84003e66f2e4510f2090600090a485600e604051610a5e906562726f6e7a6560d01b815260060190565b908152604051908190036020018120546562726f6e7a6560d01b825290600601604051908190038120907fc3bc9193735d04679abbad1bc82dd8317fe8623287b45e84003e66f2e4510f2090600090a484600e604051610aca906539b4b63b32b960d11b815260060190565b908152604051908190036020018120546539b4b63b32b960d11b825290600601604051908190038120907fc3bc9193735d04679abbad1bc82dd8317fe8623287b45e84003e66f2e4510f2090600090a483600e604051610b34906319dbdb1960e21b815260040190565b908152604051908190036020018120546319dbdb1960e21b825290600401604051908190038120907fc3bc9193735d04679abbad1bc82dd8317fe8623287b45e84003e66f2e4510f2090600090a482600e604051610b9f9066191a585b5bdb9960ca1b815260070190565b9081526040519081900360200181205466191a585b5bdb9960ca1b825290600701604051908190038120907fc3bc9193735d04679abbad1bc82dd8317fe8623287b45e84003e66f2e4510f2090600090a481600e604051610c0e9067706c6174696e756d60c01b815260080190565b9081526040519081900360200181205467706c6174696e756d60c01b825290600801604051908190038120907fc3bc9193735d04679abbad1bc82dd8317fe8623287b45e84003e66f2e4510f2090600090a486600e604051610c7b90641cdd19595b60da1b815260050190565b90815260408051918290036020018220929092556562726f6e7a6560d01b8152600e6006808301829052835192839003602690810184209a909a556539b4b63b32b960d11b835282018190528251918290039098018120969096556319dbdb1960e21b8652600486018790528051958690036024018620949094555066191a585b5bdb9960ca1b84526007840185905282519384900360270184209190915567706c6174696e756d60c01b83526008830193909352519081900360280190205550565b60026007541415610d915760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610875565b6002600755604051641cdd19595b60da1b8152600e90600501908152602001604051809103902054341015610e545760405162461bcd60e51b815260206004820152604160248201527f506c656173652073656e6420656e6f756768204d4154494320746f206d65657460448201527f20746865206d696e696d756d207468726573686f6c64206f662061207469657260648201527f2e00000000000000000000000000000000000000000000000000000000000000608482015260a401610875565b600d5460ff16610ef25760405162461bcd60e51b815260206004820152606060248201527f5468697320636f6e747261637420686173206265656e2064656163746976617460448201527f656420627920746865206f776e657220616e6420646f6573206e6f742063757260648201527f72656e746c792061636365707420616e796d6f726520646f6e6174696f6e732e608482015260a401610875565b610f00601080546001019055565b6000610f0b60105490565b9050610f173382611cdc565b60408051808201825260058152641cdd19595b60da1b6020820152905167706c6174696e756d60c01b8152600e906008019081526020016040518091039020543410610f825750604080518082019091526008815267706c6174696e756d60c01b60208201526110b0565b60405166191a585b5bdb9960ca1b8152600e906007019081526020016040518091039020543410610fd15750604080518082019091526007815266191a585b5bdb9960ca1b60208201526110b0565b6040516319dbdb1960e21b8152600e90600401908152602001604051809103902054341061101a575060408051808201909152600481526319dbdb1960e21b60208201526110b0565b6040516539b4b63b32b960d11b8152600e906006019081526020016040518091039020543410611067575060408051808201909152600681526539b4b63b32b960d11b60208201526110b0565b6040516562726f6e7a6560d01b8152600e9060060190815260200160405180910390205434106110b0575060408051808201909152600681526562726f6e7a6560d01b60208201525b806040516110be9190612fd0565b60405190819003812090839033907fd24e8d35e8d0bc0851b0d6249b090ae8ba18fe7cbff4df2e7dc4d4d591f59f0a90600090a46110fc8282611cf6565b50506001600755565b61110f3382611d9f565b6111815760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610875565b6109c7838383611e92565b60006111988133611c5c565b600d5460405160ff90911615908115907fe3048a2fbdb5d0325f217d8d1345240961758ee1c8bc3d78f69edacaca8d873190600090a350600d805460ff19811660ff90911615179055565b60408051808201909152600a546001600160a01b038116808352600160a01b90910462ffffff16602083018190529091600091612710906112249086613002565b61122e9190613037565b9150509250929050565b60006112448133611c5c565b61124e308361206c565b5050565b60008281526008602052604090206001015461126e8133611c5c565b6109c78383612181565b6001600160a01b03811633146112f65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610875565b61124e82826121a3565b7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec61132b8133611c5c565b600f546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505015801561124e573d6000803e3d6000fd5b6109c7838383604051806020016040528060008152506116c9565b600061138b8133611c5c565b816040516113999190612fd0565b6040518091039020600b6040516113b0919061304b565b604051908190038120907f309b29ded109b9e28fb9885757b3e0096eb75c51d23aa4635d68bcd569f6adc190600090a381516109c790600b906020850190612b5d565b6000818152600260205260408120546001600160a01b0316806107685760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610875565b600b805461148b90612f95565b80601f01602080910402602001604051908101604052809291908181526020018280546114b790612f95565b80156115045780601f106114d957610100808354040283529160200191611504565b820191906000526020600020905b8154815290600101906020018083116114e757829003601f168201915b505050505081565b60006001600160a01b03821661158a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610875565b506001600160a01b031660009081526003602052604090205490565b60008281526009602052604081206115be90836121c5565b9392505050565b60006115d18133611c5c565b600f546040516001600160a01b038085169216907f1a1281546ab2ddcd5ce0feb2e11fbe991326fa5936d8b8444506706dd3a6fa7f90600090a350600f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60006116478133611c5c565b816040516116559190612fd0565b6040518091039020600c60405161166c919061304b565b604051908190038120907fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a1690600090a381516109c790600c906020850190612b5d565b60606001805461077d90612f95565b61124e3383836121d1565b6116d33383611d9f565b6117455760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610875565b611751848484846122a0565b50505050565b6000818152600260205260409020546060906001600160a01b03166117e45760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f722060448201527f6e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006064820152608401610875565b600082815260066020526040812080546117fd90612f95565b80601f016020809104026020016040519081016040528092919081815260200182805461182990612f95565b80156118765780601f1061184b57610100808354040283529160200191611876565b820191906000526020600020905b81548152906001019060200180831161185957829003601f168201915b50505050509050600061188761231e565b905080516000141561189a575092915050565b8151156118cc5780826040516020016118b49291906130e7565b60405160208183030381529060405292505050919050565b6118d58461232d565b949350505050565b600081815260096020526040812061076890612415565b6000828152600860205260409020600101546119108133611c5c565b6109c783836121a3565b600c805461148b90612f95565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff1661124e5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556119853390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115be836001600160a01b03841661241f565b606060006119ed836002613002565b6119f8906002613116565b67ffffffffffffffff811115611a1057611a10612dc3565b6040519080825280601f01601f191660200182016040528015611a3a576020820181803683370190505b509050600360fc1b81600081518110611a5557611a5561312e565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611aa057611aa061312e565b60200101906001600160f81b031916908160001a9053506000611ac4846002613002565b611acf906001613116565b90505b6001811115611b54577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611b1057611b1061312e565b1a60f81b828281518110611b2657611b2661312e565b60200101906001600160f81b031916908160001a90535060049490941c93611b4d81613144565b9050611ad2565b5083156115be5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610875565b60006001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000148061076857506107688261246e565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190611c23826113f3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff1661124e57611c9a816001600160a01b031660146119de565b611ca58360206119de565b604051602001611cb692919061315b565b60408051601f198184030181529082905262461bcd60e51b825261087591600401612c84565b61124e8282604051806020016040528060008152506124ac565b6000828152600260205260409020546001600160a01b0316611d805760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201527f6578697374656e7420746f6b656e0000000000000000000000000000000000006064820152608401610875565b600082815260066020908152604090912082516109c792840190612b5d565b6000818152600260205260408120546001600160a01b0316611e185760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610875565b6000611e23836113f3565b9050806001600160a01b0316846001600160a01b03161480611e5e5750836001600160a01b0316611e5384610800565b6001600160a01b0316145b806118d557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff166118d5565b826001600160a01b0316611ea5826113f3565b6001600160a01b031614611f215760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610875565b6001600160a01b038216611f9c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610875565b611fa7600082611be1565b6001600160a01b0383166000908152600360205260408120805460019290611fd09084906131dc565b90915550506001600160a01b0382166000908152600360205260408120805460019290611ffe908490613116565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a54604080516001600160a01b038084168252600160a01b90930462ffffff16602082015291841690820152606081018290527fd4ad75825e8d1c1e74bc1b56ec2653bd9a7bee36e96f6f03c055f444b375568d9060800160405180910390a161271081111561211f5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610875565b604080518082019091526001600160a01b0390921680835262ffffff9091166020909201829052600a8054600160a01b9093027fffffffffffffffffff0000000000000000000000000000000000000000000000909316909117919091179055565b61218b8282611927565b60008281526009602052604090206109c790826119c9565b6121ad828261252a565b60008281526009602052604090206109c790826125ad565b60006115be83836125c2565b816001600160a01b0316836001600160a01b031614156122335760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610875565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6122ab848484611e92565b6122b7848484846125ec565b6117515760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610875565b6060600b805461077d90612f95565b6000818152600260205260409020546060906001600160a01b03166123ba5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610875565b60006123c461231e565b905060008151116123e457604051806020016040528060008152506115be565b806123ee84612744565b6040516020016123ff9291906130e7565b6040516020818303038152906040529392505050565b6000610768825490565b600081815260018301602052604081205461246657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610768565b506000610768565b60006001600160e01b031982167f5a05180f000000000000000000000000000000000000000000000000000000001480610768575061076882612842565b6124b68383612880565b6124c360008484846125ec565b6109c75760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610875565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff161561124e5760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115be836001600160a01b0384166129cf565b60008260000182815481106125d9576125d961312e565b9060005260206000200154905092915050565b60006001600160a01b0384163b1561273957604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126309033908990889088906004016131f3565b602060405180830381600087803b15801561264a57600080fd5b505af192505050801561267a575060408051601f3d908101601f191682019092526126779181019061322f565b60015b61271f573d8080156126a8576040519150601f19603f3d011682016040523d82523d6000602084013e6126ad565b606091505b5080516127175760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610875565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506118d5565b506001949350505050565b6060816127685750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612792578061277c8161324c565b915061278b9050600a83613037565b915061276c565b60008167ffffffffffffffff8111156127ad576127ad612dc3565b6040519080825280601f01601f1916602001820160405280156127d7576020820181803683370190505b5090505b84156118d5576127ec6001836131dc565b91506127f9600a86613267565b612804906030613116565b60f81b8183815181106128195761281961312e565b60200101906001600160f81b031916908160001a90535061283b600a86613037565b94506127db565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610768575061076882612ac2565b6001600160a01b0382166128d65760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610875565b6000818152600260205260409020546001600160a01b03161561293b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610875565b6001600160a01b0382166000908152600360205260408120805460019290612964908490613116565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008181526001830160205260408120548015612ab85760006129f36001836131dc565b8554909150600090612a07906001906131dc565b9050818114612a6c576000866000018281548110612a2757612a2761312e565b9060005260206000200154905080876000018481548110612a4a57612a4a61312e565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612a7d57612a7d61327b565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610768565b6000915050610768565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480612b2557506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061076857507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610768565b828054612b6990612f95565b90600052602060002090601f016020900481019282612b8b5760008555612bd1565b82601f10612ba457805160ff1916838001178555612bd1565b82800160010185558215612bd1579182015b82811115612bd1578251825591602001919060010190612bb6565b50612bdd929150612be1565b5090565b5b80821115612bdd5760008155600101612be2565b6001600160e01b031981168114612c0c57600080fd5b50565b600060208284031215612c2157600080fd5b81356115be81612bf6565b60005b83811015612c47578181015183820152602001612c2f565b838111156117515750506000910152565b60008151808452612c70816020860160208601612c2c565b601f01601f19169290920160200192915050565b6020815260006115be6020830184612c58565b600060208284031215612ca957600080fd5b5035919050565b80356001600160a01b0381168114612cc757600080fd5b919050565b60008060408385031215612cdf57600080fd5b612ce883612cb0565b946020939093013593505050565b60008060008060008060c08789031215612d0f57600080fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b600080600060608486031215612d4e57600080fd5b612d5784612cb0565b9250612d6560208501612cb0565b9150604084013590509250925092565b60008060408385031215612d8857600080fd5b50508035926020909101359150565b60008060408385031215612daa57600080fd5b82359150612dba60208401612cb0565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612df457612df4612dc3565b604051601f8501601f19908116603f01168101908282118183101715612e1c57612e1c612dc3565b81604052809350858152868686011115612e3557600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612e6157600080fd5b813567ffffffffffffffff811115612e7857600080fd5b8201601f81018413612e8957600080fd5b6118d584823560208401612dd9565b600060208284031215612eaa57600080fd5b6115be82612cb0565b60008060408385031215612ec657600080fd5b612ecf83612cb0565b915060208301358015158114612ee457600080fd5b809150509250929050565b60008060008060808587031215612f0557600080fd5b612f0e85612cb0565b9350612f1c60208601612cb0565b925060408501359150606085013567ffffffffffffffff811115612f3f57600080fd5b8501601f81018713612f5057600080fd5b612f5f87823560208401612dd9565b91505092959194509250565b60008060408385031215612f7e57600080fd5b612f8783612cb0565b9150612dba60208401612cb0565b600181811c90821680612fa957607f821691505b60208210811415612fca57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251612fe2818460208701612c2c565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561301c5761301c612fec565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261304657613046613021565b500490565b600080835481600182811c91508083168061306757607f831692505b602080841082141561308757634e487b7160e01b86526022600452602486fd5b81801561309b57600181146130ac576130d9565b60ff198616895284890196506130d9565b60008a81526020902060005b868110156130d15781548b8201529085019083016130b8565b505084890196505b509498975050505050505050565b600083516130f9818460208801612c2c565b83519083019061310d818360208801612c2c565b01949350505050565b6000821982111561312957613129612fec565b500190565b634e487b7160e01b600052603260045260246000fd5b60008161315357613153612fec565b506000190190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613193816017850160208801612c2c565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516131d0816028840160208801612c2c565b01602801949350505050565b6000828210156131ee576131ee612fec565b500390565b60006001600160a01b038087168352808616602084015250836040830152608060608301526132256080830184612c58565b9695505050505050565b60006020828403121561324157600080fd5b81516115be81612bf6565b600060001982141561326057613260612fec565b5060010190565b60008261327657613276613021565b500690565b634e487b7160e01b600052603160045260246000fdfea26469706673582212205a7269a7f340514f8c6234496e3ebe317d95d1e2af40567e37ee1a55b7bf855864736f6c63430008090033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in POL
Multichain Portfolio | 32 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.