Source Code
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 10,066 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Safe Transfer Fr... | 42015442 | 31 days ago | IN | 0 ETH | 0.00000102 | ||||
| Set Approval For... | 41128868 | 51 days ago | IN | 0 ETH | 0.00000018 | ||||
| Set Approval For... | 39323301 | 93 days ago | IN | 0 ETH | 0.00000008 | ||||
| Safe Transfer Fr... | 39225019 | 95 days ago | IN | 0 ETH | 0.00000006 | ||||
| Set Approval For... | 38700415 | 108 days ago | IN | 0 ETH | 0.00000032 | ||||
| Set Approval For... | 38254867 | 118 days ago | IN | 0 ETH | 0.00000006 | ||||
| Set Approval For... | 36583446 | 157 days ago | IN | 0 ETH | 0.00000019 | ||||
| Set Approval For... | 36494133 | 159 days ago | IN | 0 ETH | 0.00000051 | ||||
| Set Approval For... | 35951722 | 171 days ago | IN | 0 ETH | 0.00000008 | ||||
| Set Approval For... | 35674239 | 178 days ago | IN | 0 ETH | 0.00000062 | ||||
| Set Approval For... | 35603646 | 179 days ago | IN | 0 ETH | 0.00000015 | ||||
| Set Approval For... | 35458111 | 183 days ago | IN | 0 ETH | 0.00000035 | ||||
| Set Approval For... | 34905990 | 195 days ago | IN | 0 ETH | 0.0000001 | ||||
| Set Approval For... | 33810159 | 221 days ago | IN | 0 ETH | 0.00000133 | ||||
| Set Approval For... | 33803548 | 221 days ago | IN | 0 ETH | 0.00000015 | ||||
| Set Approval For... | 33493057 | 228 days ago | IN | 0 ETH | 0.00000067 | ||||
| Set Approval For... | 33355381 | 231 days ago | IN | 0 ETH | 0.00000012 | ||||
| Set Approval For... | 33266458 | 233 days ago | IN | 0 ETH | 0.00000046 | ||||
| Safe Transfer Fr... | 32937184 | 241 days ago | IN | 0 ETH | 0.00000021 | ||||
| Set Approval For... | 32842130 | 243 days ago | IN | 0 ETH | 0.00000044 | ||||
| Set Approval For... | 32616352 | 248 days ago | IN | 0 ETH | 0.00000007 | ||||
| Set Approval For... | 32294929 | 256 days ago | IN | 0 ETH | 0.00000077 | ||||
| Set Approval For... | 31590226 | 272 days ago | IN | 0 ETH | 0.00000007 | ||||
| Set Approval For... | 31074696 | 284 days ago | IN | 0 ETH | 0.00000055 | ||||
| Set Approval For... | 30893381 | 288 days ago | IN | 0 ETH | 0.00000014 |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
AccessPass
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
contract AccessPass is ERC1155URIStorage, AccessControl, ReentrancyGuard {
uint256 private publicPrice = 0.03 ether;
uint256 private publicMintId = 1;
bool public publicPaused = false;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
constructor(address adminAddress) ERC1155("Botto Access Passess"){
_grantRole(DEFAULT_ADMIN_ROLE, adminAddress);
}
function mint(address to, uint256 id, uint256 amount, bytes memory data) public onlyRole(MINTER_ROLE){
_mint(to, id, amount, data);
}
function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public onlyRole(MINTER_ROLE){
_mintBatch(to, ids, amounts, data);
}
function mintPublic(address to, uint256 amount) external payable nonReentrant{
require(!publicPaused, "Minting is paused");
require(msg.value >= publicPrice * amount, "Sorry, not enough amount sent!");
_mint(to, publicMintId, amount, "");
}
// ADMIN FUNCTIONS
function setBaseURI(string memory baseURI) public onlyRole(DEFAULT_ADMIN_ROLE) {
_setBaseURI(baseURI);
}
function setURI(uint256 tokenId, string memory tokenURI) public onlyRole(DEFAULT_ADMIN_ROLE) {
_setURI(tokenId, tokenURI);
}
function withdraw() public onlyRole(DEFAULT_ADMIN_ROLE) {
uint256 balance = address(this).balance;
require(payable(msg.sender).send(balance));
}
function flipPaused() public onlyRole(DEFAULT_ADMIN_ROLE) {
publicPaused = !publicPaused;
}
function setPricePublic(uint256 _newPrice) public onlyRole(DEFAULT_ADMIN_ROLE) {
publicPrice = _newPrice;
}
function setPublicMintId(uint256 _id) public onlyRole(DEFAULT_ADMIN_ROLE) {
publicMintId = _id;
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, AccessControl) returns (bool) {
return super.supportsInterface(interfaceId);
}
receive() external payable {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../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:
*
* ```solidity
* 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}:
*
* ```solidity
* 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. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address account => bool) hasRole;
bytes32 adminRole;
}
mapping(bytes32 role => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with an {AccessControlUnauthorizedAccount} error including the required role.
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual returns (bool) {
return _roles[role].hasRole[account];
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
* is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
* is missing `role`.
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert AccessControlUnauthorizedAccount(account, role);
}
}
/**
* @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 returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual 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 `callerConfirmation`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address callerConfirmation) public virtual {
if (callerConfirmation != _msgSender()) {
revert AccessControlBadConfirmation();
}
_revokeRole(role, callerConfirmation);
}
/**
* @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 Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
if (!hasRole(role, account)) {
_roles[role].hasRole[account] = true;
emit RoleGranted(role, account, _msgSender());
return true;
} else {
return false;
}
}
/**
* @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
if (hasRole(role, account)) {
_roles[role].hasRole[account] = false;
emit RoleRevoked(role, account, _msgSender());
return true;
} else {
return false;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @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;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
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() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155URIStorage.sol)
pragma solidity ^0.8.20;
import {Strings} from "../../../utils/Strings.sol";
import {ERC1155} from "../ERC1155.sol";
/**
* @dev ERC1155 token with storage based token URI management.
* Inspired by the ERC721URIStorage extension
*/
abstract contract ERC1155URIStorage is ERC1155 {
using Strings for uint256;
// Optional base URI
string private _baseURI = "";
// Optional mapping for token URIs
mapping(uint256 tokenId => string) private _tokenURIs;
/**
* @dev See {IERC1155MetadataURI-uri}.
*
* This implementation returns the concatenation of the `_baseURI`
* and the token-specific uri if the latter is set
*
* This enables the following behaviors:
*
* - if `_tokenURIs[tokenId]` is set, then the result is the concatenation
* of `_baseURI` and `_tokenURIs[tokenId]` (keep in mind that `_baseURI`
* is empty per default);
*
* - if `_tokenURIs[tokenId]` is NOT set then we fallback to `super.uri()`
* which in most cases will contain `ERC1155._uri`;
*
* - if `_tokenURIs[tokenId]` is NOT set, and if the parents do not have a
* uri value set, then the result is empty.
*/
function uri(uint256 tokenId) public view virtual override returns (string memory) {
string memory tokenURI = _tokenURIs[tokenId];
// If token URI is set, concatenate base URI and tokenURI (via string.concat).
return bytes(tokenURI).length > 0 ? string.concat(_baseURI, tokenURI) : super.uri(tokenId);
}
/**
* @dev Sets `tokenURI` as the tokenURI of `tokenId`.
*/
function _setURI(uint256 tokenId, string memory tokenURI) internal virtual {
_tokenURIs[tokenId] = tokenURI;
emit URI(uri(tokenId), tokenId);
}
/**
* @dev Sets `baseURI` as the `_baseURI` for all tokens
*/
function _setBaseURI(string memory baseURI) internal virtual {
_baseURI = baseURI;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol)
pragma solidity ^0.8.20;
import {IERC1155} from "./IERC1155.sol";
import {IERC1155Receiver} from "./IERC1155Receiver.sol";
import {IERC1155MetadataURI} from "./extensions/IERC1155MetadataURI.sol";
import {Context} from "../../utils/Context.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";
import {Arrays} from "../../utils/Arrays.sol";
import {IERC1155Errors} from "../../interfaces/draft-IERC6093.sol";
/**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*/
abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors {
using Arrays for uint256[];
using Arrays for address[];
mapping(uint256 id => mapping(address account => uint256)) private _balances;
mapping(address account => mapping(address operator => bool)) private _operatorApprovals;
// Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
string private _uri;
/**
* @dev See {_setURI}.
*/
constructor(string memory uri_) {
_setURI(uri_);
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC1155).interfaceId ||
interfaceId == type(IERC1155MetadataURI).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC1155MetadataURI-uri}.
*
* This implementation returns the same URI for *all* token types. It relies
* on the token type ID substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* Clients calling this function must replace the `\{id\}` substring with the
* actual token type ID.
*/
function uri(uint256 /* id */) public view virtual returns (string memory) {
return _uri;
}
/**
* @dev See {IERC1155-balanceOf}.
*/
function balanceOf(address account, uint256 id) public view virtual returns (uint256) {
return _balances[id][account];
}
/**
* @dev See {IERC1155-balanceOfBatch}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(
address[] memory accounts,
uint256[] memory ids
) public view virtual returns (uint256[] memory) {
if (accounts.length != ids.length) {
revert ERC1155InvalidArrayLength(ids.length, accounts.length);
}
uint256[] memory batchBalances = new uint256[](accounts.length);
for (uint256 i = 0; i < accounts.length; ++i) {
batchBalances[i] = balanceOf(accounts.unsafeMemoryAccess(i), ids.unsafeMemoryAccess(i));
}
return batchBalances;
}
/**
* @dev See {IERC1155-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC1155-isApprovedForAll}.
*/
function isApprovedForAll(address account, address operator) public view virtual returns (bool) {
return _operatorApprovals[account][operator];
}
/**
* @dev See {IERC1155-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual {
address sender = _msgSender();
if (from != sender && !isApprovedForAll(from, sender)) {
revert ERC1155MissingApprovalForAll(sender, from);
}
_safeTransferFrom(from, to, id, value, data);
}
/**
* @dev See {IERC1155-safeBatchTransferFrom}.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) public virtual {
address sender = _msgSender();
if (from != sender && !isApprovedForAll(from, sender)) {
revert ERC1155MissingApprovalForAll(sender, from);
}
_safeBatchTransferFrom(from, to, ids, values, data);
}
/**
* @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from`
* (or `to`) is the zero address.
*
* Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received}
* or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value.
* - `ids` and `values` must have the same length.
*
* NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead.
*/
function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual {
if (ids.length != values.length) {
revert ERC1155InvalidArrayLength(ids.length, values.length);
}
address operator = _msgSender();
for (uint256 i = 0; i < ids.length; ++i) {
uint256 id = ids.unsafeMemoryAccess(i);
uint256 value = values.unsafeMemoryAccess(i);
if (from != address(0)) {
uint256 fromBalance = _balances[id][from];
if (fromBalance < value) {
revert ERC1155InsufficientBalance(from, fromBalance, value, id);
}
unchecked {
// Overflow not possible: value <= fromBalance
_balances[id][from] = fromBalance - value;
}
}
if (to != address(0)) {
_balances[id][to] += value;
}
}
if (ids.length == 1) {
uint256 id = ids.unsafeMemoryAccess(0);
uint256 value = values.unsafeMemoryAccess(0);
emit TransferSingle(operator, from, to, id, value);
} else {
emit TransferBatch(operator, from, to, ids, values);
}
}
/**
* @dev Version of {_update} that performs the token acceptance check by calling
* {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it
* contains code (eg. is a smart contract at the moment of execution).
*
* IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any
* update to the contract state after this function would break the check-effect-interaction pattern. Consider
* overriding {_update} instead.
*/
function _updateWithAcceptanceCheck(
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) internal virtual {
_update(from, to, ids, values);
if (to != address(0)) {
address operator = _msgSender();
if (ids.length == 1) {
uint256 id = ids.unsafeMemoryAccess(0);
uint256 value = values.unsafeMemoryAccess(0);
_doSafeTransferAcceptanceCheck(operator, from, to, id, value, data);
} else {
_doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, values, data);
}
}
}
/**
* @dev Transfers a `value` tokens of token type `id` from `from` to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `from` must have a balance of tokens of type `id` of at least `value` amount.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function _safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) internal {
if (to == address(0)) {
revert ERC1155InvalidReceiver(address(0));
}
if (from == address(0)) {
revert ERC1155InvalidSender(address(0));
}
(uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
_updateWithAcceptanceCheck(from, to, ids, values, data);
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
* - `ids` and `values` must have the same length.
*/
function _safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) internal {
if (to == address(0)) {
revert ERC1155InvalidReceiver(address(0));
}
if (from == address(0)) {
revert ERC1155InvalidSender(address(0));
}
_updateWithAcceptanceCheck(from, to, ids, values, data);
}
/**
* @dev Sets a new URI for all token types, by relying on the token type ID
* substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* By this mechanism, any occurrence of the `\{id\}` substring in either the
* URI or any of the values in the JSON file at said URI will be replaced by
* clients with the token type ID.
*
* For example, the `https://token-cdn-domain/\{id\}.json` URI would be
* interpreted by clients as
* `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
* for token type ID 0x4cce0.
*
* See {uri}.
*
* Because these URIs cannot be meaningfully represented by the {URI} event,
* this function emits no events.
*/
function _setURI(string memory newuri) internal virtual {
_uri = newuri;
}
/**
* @dev Creates a `value` amount of tokens of type `id`, and assigns them to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function _mint(address to, uint256 id, uint256 value, bytes memory data) internal {
if (to == address(0)) {
revert ERC1155InvalidReceiver(address(0));
}
(uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
_updateWithAcceptanceCheck(address(0), to, ids, values, data);
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - `ids` and `values` must have the same length.
* - `to` cannot be the zero address.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function _mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) internal {
if (to == address(0)) {
revert ERC1155InvalidReceiver(address(0));
}
_updateWithAcceptanceCheck(address(0), to, ids, values, data);
}
/**
* @dev Destroys a `value` amount of tokens of type `id` from `from`
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `from` must have at least `value` amount of tokens of type `id`.
*/
function _burn(address from, uint256 id, uint256 value) internal {
if (from == address(0)) {
revert ERC1155InvalidSender(address(0));
}
(uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
_updateWithAcceptanceCheck(from, address(0), ids, values, "");
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `from` must have at least `value` amount of tokens of type `id`.
* - `ids` and `values` must have the same length.
*/
function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal {
if (from == address(0)) {
revert ERC1155InvalidSender(address(0));
}
_updateWithAcceptanceCheck(from, address(0), ids, values, "");
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - `operator` cannot be the zero address.
*/
function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
if (operator == address(0)) {
revert ERC1155InvalidOperator(address(0));
}
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Performs an acceptance check by calling {IERC1155-onERC1155Received} on the `to` address
* if it contains code at the moment of execution.
*/
function _doSafeTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256 id,
uint256 value,
bytes memory data
) private {
if (to.code.length > 0) {
try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) {
if (response != IERC1155Receiver.onERC1155Received.selector) {
// Tokens rejected
revert ERC1155InvalidReceiver(to);
}
} catch (bytes memory reason) {
if (reason.length == 0) {
// non-ERC1155Receiver implementer
revert ERC1155InvalidReceiver(to);
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
}
/**
* @dev Performs a batch acceptance check by calling {IERC1155-onERC1155BatchReceived} on the `to` address
* if it contains code at the moment of execution.
*/
function _doSafeBatchTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) private {
if (to.code.length > 0) {
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns (
bytes4 response
) {
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
// Tokens rejected
revert ERC1155InvalidReceiver(to);
}
} catch (bytes memory reason) {
if (reason.length == 0) {
// non-ERC1155Receiver implementer
revert ERC1155InvalidReceiver(to);
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
}
/**
* @dev Creates an array in memory with only one value for each of the elements provided.
*/
function _asSingletonArrays(
uint256 element1,
uint256 element2
) private pure returns (uint256[] memory array1, uint256[] memory array2) {
/// @solidity memory-safe-assembly
assembly {
// Load the free memory pointer
array1 := mload(0x40)
// Set array length to 1
mstore(array1, 1)
// Store the single element at the next word after the length (where content starts)
mstore(add(array1, 0x20), element1)
// Repeat for next array locating it right after the first array
array2 := add(array1, 0x40)
mstore(array2, 1)
mstore(add(array2, 0x20), element2)
// Update the free memory pointer by pointing after the second array
mstore(0x40, add(array2, 0x40))
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)
pragma solidity ^0.8.20;
import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant HEX_DIGITS = "0123456789abcdef";
uint8 private constant ADDRESS_LENGTH = 20;
/**
* @dev The `value` string doesn't fit in the specified `length`.
*/
error StringsInsufficientHexLength(uint256 value, uint256 length);
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toStringSigned(int256 value) internal pure returns (string memory) {
return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
uint256 localValue = value;
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_DIGITS[localValue & 0xf];
localValue >>= 4;
}
if (localValue != 0) {
revert StringsInsufficientHexLength(value, length);
}
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
* representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard ERC20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Arrays.sol)
pragma solidity ^0.8.20;
import {StorageSlot} from "./StorageSlot.sol";
import {Math} from "./math/Math.sol";
/**
* @dev Collection of functions related to array types.
*/
library Arrays {
using StorageSlot for bytes32;
/**
* @dev Searches a sorted `array` and returns the first index that contains
* a value greater or equal to `element`. If no such index exists (i.e. all
* values in the array are strictly less than `element`), the array length is
* returned. Time complexity O(log n).
*
* `array` is expected to be sorted in ascending order, and to contain no
* repeated elements.
*/
function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {
uint256 low = 0;
uint256 high = array.length;
if (high == 0) {
return 0;
}
while (low < high) {
uint256 mid = Math.average(low, high);
// Note that mid will always be strictly less than high (i.e. it will be a valid array index)
// because Math.average rounds towards zero (it does integer division with truncation).
if (unsafeAccess(array, mid).value > element) {
high = mid;
} else {
low = mid + 1;
}
}
// At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.
if (low > 0 && unsafeAccess(array, low - 1).value == element) {
return low - 1;
} else {
return low;
}
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) {
bytes32 slot;
// We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
// following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.
/// @solidity memory-safe-assembly
assembly {
mstore(0, arr.slot)
slot := add(keccak256(0, 0x20), pos)
}
return slot.getAddressSlot();
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) {
bytes32 slot;
// We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
// following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.
/// @solidity memory-safe-assembly
assembly {
mstore(0, arr.slot)
slot := add(keccak256(0, 0x20), pos)
}
return slot.getBytes32Slot();
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) {
bytes32 slot;
// We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
// following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.
/// @solidity memory-safe-assembly
assembly {
mstore(0, arr.slot)
slot := add(keccak256(0, 0x20), pos)
}
return slot.getUint256Slot();
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) {
assembly {
res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
}
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) {
assembly {
res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "./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);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol)
pragma solidity ^0.8.20;
import {IERC1155} from "../IERC1155.sol";
/**
* @dev Interface of the optional ERC1155MetadataExtension interface, as defined
* in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
*/
interface IERC1155MetadataURI is IERC1155 {
/**
* @dev Returns the URI for token type `id`.
*
* If the `\{id\}` substring is present in the URI, it must be replaced by
* clients with the actual token type ID.
*/
function uri(uint256 id) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../../utils/introspection/IERC165.sol";
/**
* @dev Interface that must be implemented by smart contracts in order to receive
* ERC-1155 token transfers.
*/
interface IERC1155Receiver is IERC165 {
/**
* @dev Handles the receipt of a single ERC1155 token type. This function is
* called at the end of a `safeTransferFrom` after the balance has been updated.
*
* NOTE: To accept the transfer, this must return
* `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
* (i.e. 0xf23a6e61, or its own function selector).
*
* @param operator The address which initiated the transfer (i.e. msg.sender)
* @param from The address which previously owned the token
* @param id The ID of the token being transferred
* @param value The amount of tokens being transferred
* @param data Additional data with no specified format
* @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
*/
function onERC1155Received(
address operator,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external returns (bytes4);
/**
* @dev Handles the receipt of a multiple ERC1155 token types. This function
* is called at the end of a `safeBatchTransferFrom` after the balances have
* been updated.
*
* NOTE: To accept the transfer(s), this must return
* `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
* (i.e. 0xbc197c81, or its own function selector).
*
* @param operator The address which initiated the batch transfer (i.e. msg.sender)
* @param from The address which previously owned the token
* @param ids An array containing ids of each token being transferred (order and length must match values array)
* @param values An array containing amounts of each token being transferred (order and length must match ids array)
* @param data Additional data with no specified format
* @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
*/
function onERC1155BatchReceived(
address operator,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC1155 compliant contract, as defined in the
* https://eips.ethereum.org/EIPS/eip-1155[EIP].
*/
interface IERC1155 is IERC165 {
/**
* @dev Emitted when `value` amount of tokens of type `id` are transferred from `from` to `to` by `operator`.
*/
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
/**
* @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
* transfers.
*/
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
/**
* @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
* `approved`.
*/
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
/**
* @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
*
* If an {URI} event was emitted for `id`, the standard
* https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
* returned by {IERC1155MetadataURI-uri}.
*/
event URI(string value, uint256 indexed id);
/**
* @dev Returns the value of tokens of token type `id` owned by `account`.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function balanceOf(address account, uint256 id) external view returns (uint256);
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(
address[] calldata accounts,
uint256[] calldata ids
) external view returns (uint256[] memory);
/**
* @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - `operator` cannot be the caller.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address account, address operator) external view returns (bool);
/**
* @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`.
*
* WARNING: This function can potentially allow a reentrancy attack when transferring tokens
* to an untrusted contract, when invoking {onERC1155Received} on the receiver.
* Ensure to follow the checks-effects-interactions pattern and consider employing
* reentrancy guards when interacting with untrusted contracts.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
* - `from` must have a balance of tokens of type `id` of at least `value` amount.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external;
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
*
* WARNING: This function can potentially allow a reentrancy attack when transferring tokens
* to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver.
* Ensure to follow the checks-effects-interactions pattern and consider employing
* reentrancy guards when interacting with untrusted contracts.
*
* Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments.
*
* Requirements:
*
* - `ids` and `values` must have the same length.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)
pragma solidity ^0.8.20;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev The `account` is missing a role.
*/
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);
/**
* @dev The caller of a function is not the expected one.
*
* NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
*/
error AccessControlBadConfirmation();
/**
* @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.
*/
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 `callerConfirmation`.
*/
function renounceRole(bytes32 role, address callerConfirmation) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @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 v5.0.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Muldiv operation overflow.
*/
error MathOverflowedMulDiv();
enum Rounding {
Floor, // Toward negative infinity
Ceil, // Toward positive infinity
Trunc, // Toward zero
Expand // Away from zero
}
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds towards infinity instead
* of rounding towards zero.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
// Guarantee the same behavior as in a regular Solidity division.
return a / b;
}
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
* Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0 = x * y; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
if (denominator <= prod1) {
revert MathOverflowedMulDiv();
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator.
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363.
uint256 twos = denominator & (0 - denominator);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
// works in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"adminAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC1155InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC1155InvalidApprover","type":"error"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"name":"ERC1155InvalidArrayLength","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC1155InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC1155InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC1155InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC1155MissingApprovalForAll","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","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":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setPricePublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"setPublicMintId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"tokenURI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
608060405260405180602001604052805f81525060039081620000239190620004cb565b50666a94d74f43000060075560016008555f60095f6101000a81548160ff02191690831515021790555034801562000059575f80fd5b50604051620039673803806200396783398181016040528101906200007f919062000614565b6040518060400160405280601481526020017f426f74746f204163636573732050617373657373000000000000000000000000815250620000c681620000eb60201b60201c565b506001600681905550620000e35f801b826200010060201b60201c565b505062000644565b8060029081620000fc9190620004cb565b5050565b5f620001138383620001fc60201b60201c565b620001f257600160055f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055506200018e6200026060201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050620001f6565b5f90505b92915050565b5f60055f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f33905090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620002e357607f821691505b602082108103620002f957620002f86200029e565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200035d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000320565b62000369868362000320565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620003b3620003ad620003a78462000381565b6200038a565b62000381565b9050919050565b5f819050919050565b620003ce8362000393565b620003e6620003dd82620003ba565b8484546200032c565b825550505050565b5f90565b620003fc620003ee565b62000409818484620003c3565b505050565b5b818110156200043057620004245f82620003f2565b6001810190506200040f565b5050565b601f8211156200047f576200044981620002ff565b620004548462000311565b8101602085101562000464578190505b6200047c620004738562000311565b8301826200040e565b50505b505050565b5f82821c905092915050565b5f620004a15f198460080262000484565b1980831691505092915050565b5f620004bb838362000490565b9150826002028217905092915050565b620004d68262000267565b67ffffffffffffffff811115620004f257620004f162000271565b5b620004fe8254620002cb565b6200050b82828562000434565b5f60209050601f83116001811462000541575f84156200052c578287015190505b620005388582620004ae565b865550620005a7565b601f1984166200055186620002ff565b5f5b828110156200057a5784890151825560018201915060208501945060208101905062000553565b868310156200059a578489015162000596601f89168262000490565b8355505b6001600288020188555050505b505050505050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620005de82620005b3565b9050919050565b620005f081620005d2565b8114620005fb575f80fd5b50565b5f815190506200060e81620005e5565b92915050565b5f602082840312156200062c576200062b620005af565b5b5f6200063b84828501620005fe565b91505092915050565b61331580620006525f395ff3fe608060405260043610610168575f3560e01c80634e1273f4116100d0578063a217fddf11610089578063d547741f11610063578063d547741f14610509578063d5c0e21514610531578063e985e9c514610559578063f242432a146105955761016f565b8063a217fddf1461048d578063a22cb465146104b7578063d5391393146104df5761016f565b80634e1273f41461038157806355f804b3146103bd578063731133e9146103e5578063862440e21461040d57806391d14854146104355780639f93f779146104715761016f565b80632eb2c2d6116101225780632eb2c2d6146102b55780632f2ff15d146102dd578063333171bb1461030557806336568abe1461031b5780633ccfd60b146103435780634530a832146103595761016f565b8062fdd58e1461017357806301ffc9a7146101af5780630bb12bb8146101eb5780630e89341c146102155780631f7fdffa14610251578063248a9ca3146102795761016f565b3661016f57005b5f80fd5b34801561017e575f80fd5b506101996004803603810190610194919061200d565b6105bd565b6040516101a6919061205a565b60405180910390f35b3480156101ba575f80fd5b506101d560048036038101906101d091906120c8565b610612565b6040516101e2919061210d565b60405180910390f35b3480156101f6575f80fd5b506101ff610623565b60405161020c919061210d565b60405180910390f35b348015610220575f80fd5b5061023b60048036038101906102369190612126565b610635565b60405161024891906121db565b60405180910390f35b34801561025c575f80fd5b50610277600480360381019061027291906123eb565b610714565b005b348015610284575f80fd5b5061029f600480360381019061029a91906124d6565b610751565b6040516102ac9190612510565b60405180910390f35b3480156102c0575f80fd5b506102db60048036038101906102d69190612529565b61076e565b005b3480156102e8575f80fd5b5061030360048036038101906102fe91906125f4565b610815565b005b348015610310575f80fd5b50610319610837565b005b348015610326575f80fd5b50610341600480360381019061033c91906125f4565b61086e565b005b34801561034e575f80fd5b506103576108e9565b005b348015610364575f80fd5b5061037f600480360381019061037a9190612126565b610939565b005b34801561038c575f80fd5b506103a760048036038101906103a291906126f2565b610950565b6040516103b4919061281f565b60405180910390f35b3480156103c8575f80fd5b506103e360048036038101906103de91906128dd565b610a57565b005b3480156103f0575f80fd5b5061040b60048036038101906104069190612924565b610a70565b005b348015610418575f80fd5b50610433600480360381019061042e91906129a4565b610aad565b005b348015610440575f80fd5b5061045b600480360381019061045691906125f4565b610ac8565b604051610468919061210d565b60405180910390f35b61048b6004803603810190610486919061200d565b610b2c565b005b348015610498575f80fd5b506104a1610bfb565b6040516104ae9190612510565b60405180910390f35b3480156104c2575f80fd5b506104dd60048036038101906104d89190612a28565b610c01565b005b3480156104ea575f80fd5b506104f3610c17565b6040516105009190612510565b60405180910390f35b348015610514575f80fd5b5061052f600480360381019061052a91906125f4565b610c3b565b005b34801561053c575f80fd5b5061055760048036038101906105529190612126565b610c5d565b005b348015610564575f80fd5b5061057f600480360381019061057a9190612a66565b610c74565b60405161058c919061210d565b60405180910390f35b3480156105a0575f80fd5b506105bb60048036038101906105b69190612aa4565b610d02565b005b5f805f8381526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b5f61061c82610da9565b9050919050565b60095f9054906101000a900460ff1681565b60605f60045f8481526020019081526020015f20805461065490612b64565b80601f016020809104026020016040519081016040528092919081815260200182805461068090612b64565b80156106cb5780601f106106a2576101008083540402835291602001916106cb565b820191905f5260205f20905b8154815290600101906020018083116106ae57829003601f168201915b505050505090505f8151116106e8576106e383610e22565b61070c565b6003816040516020016106fc929190612c60565b6040516020818303038152906040525b915050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661073e81610eb4565b61074a85858585610ec8565b5050505050565b5f60055f8381526020019081526020015f20600101549050919050565b5f610777610f4b565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156107bc57506107ba8682610c74565b155b156108005780866040517fe237d9220000000000000000000000000000000000000000000000000000000081526004016107f7929190612c92565b60405180910390fd5b61080d8686868686610f52565b505050505050565b61081e82610751565b61082781610eb4565b6108318383611046565b50505050565b5f801b61084381610eb4565b60095f9054906101000a900460ff161560095f6101000a81548160ff02191690831515021790555050565b610876610f4b565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108da576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108e48282611130565b505050565b5f801b6108f581610eb4565b5f4790503373ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050610935575f80fd5b5050565b5f801b61094581610eb4565b816007819055505050565b6060815183511461099c57815183516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401610993929190612cb9565b60405180910390fd5b5f835167ffffffffffffffff8111156109b8576109b76121ff565b5b6040519080825280602002602001820160405280156109e65781602001602082028036833780820191505090505b5090505f5b8451811015610a4c57610a22610a0a828761121a90919063ffffffff16565b610a1d838761122d90919063ffffffff16565b6105bd565b828281518110610a3557610a34612ce0565b5b6020026020010181815250508060010190506109eb565b508091505092915050565b5f801b610a6381610eb4565b610a6c82611240565b5050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610a9a81610eb4565b610aa685858585611253565b5050505050565b5f801b610ab981610eb4565b610ac383836112e8565b505050565b5f60055f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b610b3461134b565b60095f9054906101000a900460ff1615610b83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7a90612d57565b60405180910390fd5b80600754610b919190612da2565b341015610bd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bca90612e2d565b60405180910390fd5b610bef826008548360405180602001604052805f815250611253565b610bf7611391565b5050565b5f801b81565b610c13610c0c610f4b565b838361139b565b5050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b610c4482610751565b610c4d81610eb4565b610c578383611130565b50505050565b5f801b610c6981610eb4565b816008819055505050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f610d0b610f4b565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614158015610d505750610d4e8682610c74565b155b15610d945780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610d8b929190612c92565b60405180910390fd5b610da18686868686611504565b505050505050565b5f7f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610e1b5750610e1a8261160a565b5b9050919050565b606060028054610e3190612b64565b80601f0160208091040260200160405190810160405280929190818152602001828054610e5d90612b64565b8015610ea85780601f10610e7f57610100808354040283529160200191610ea8565b820191905f5260205f20905b815481529060010190602001808311610e8b57829003601f168201915b50505050509050919050565b610ec581610ec0610f4b565b6116eb565b50565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610f38575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610f2f9190612e4b565b60405180910390fd5b610f455f8585858561173c565b50505050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610fc2575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610fb99190612e4b565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603611032575f6040517f01a835140000000000000000000000000000000000000000000000000000000081526004016110299190612e4b565b60405180910390fd5b61103f858585858561173c565b5050505050565b5f6110518383610ac8565b61112657600160055f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055506110c3610f4b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001905061112a565b5f90505b92915050565b5f61113b8383610ac8565b15611210575f60055f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055506111ad610f4b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050611214565b5f90505b92915050565b5f60208202602084010151905092915050565b5f60208202602084010151905092915050565b806003908161124f9190612fef565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036112c3575f6040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016112ba9190612e4b565b60405180910390fd5b5f806112cf85856117e8565b915091506112e05f8784848761173c565b505050505050565b8060045f8481526020019081526020015f2090816113069190612fef565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b61133284610635565b60405161133f91906121db565b60405180910390a25050565b600260065403611387576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600681905550565b6001600681905550565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361140b575f6040517fced3e1000000000000000000000000000000000000000000000000000000000081526004016114029190612e4b565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516114f7919061210d565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611574575f6040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161156b9190612e4b565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036115e4575f6040517f01a835140000000000000000000000000000000000000000000000000000000081526004016115db9190612e4b565b60405180910390fd5b5f806115f085856117e8565b91509150611601878784848761173c565b50505050505050565b5f7fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806116d457507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806116e457506116e382611818565b5b9050919050565b6116f58282610ac8565b6117385780826040517fe2517d3f00000000000000000000000000000000000000000000000000000000815260040161172f9291906130be565b60405180910390fd5b5050565b61174885858585611881565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146117e1575f611784610f4b565b905060018451036117d0575f6117a35f8661122d90919063ffffffff16565b90505f6117b95f8661122d90919063ffffffff16565b90506117c9838989858589611c11565b50506117df565b6117de818787878787611dc0565b5b505b5050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b80518251146118cb57815181516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016118c2929190612cb9565b60405180910390fd5b5f6118d4610f4b565b90505f5b8351811015611ad0575f6118f5828661122d90919063ffffffff16565b90505f61190b838661122d90919063ffffffff16565b90505f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614611a2e575f805f8481526020019081526020015f205f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156119da57888183856040517f03dee4c50000000000000000000000000000000000000000000000000000000081526004016119d194939291906130e5565b60405180910390fd5b8181035f808581526020019081526020015f205f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614611ac357805f808481526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254611abb9190613128565b925050819055505b50508060010190506118d8565b506001835103611b8b575f611aee5f8561122d90919063ffffffff16565b90505f611b045f8561122d90919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051611b7c929190612cb9565b60405180910390a45050611c0a565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611c0192919061315b565b60405180910390a45b5050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b1115611db8578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611c719594939291906131e2565b6020604051808303815f875af1925050508015611cac57506040513d601f19601f82011682018060405250810190611ca9919061324e565b60015b611d2d573d805f8114611cda576040519150601f19603f3d011682016040523d82523d5f602084013e611cdf565b606091505b505f815103611d2557846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611d1c9190612e4b565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611db657846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611dad9190612e4b565b60405180910390fd5b505b505050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b1115611f67578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401611e20959493929190613279565b6020604051808303815f875af1925050508015611e5b57506040513d601f19601f82011682018060405250810190611e58919061324e565b60015b611edc573d805f8114611e89576040519150601f19603f3d011682016040523d82523d5f602084013e611e8e565b606091505b505f815103611ed457846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611ecb9190612e4b565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611f6557846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611f5c9190612e4b565b60405180910390fd5b505b505050505050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611fa982611f80565b9050919050565b611fb981611f9f565b8114611fc3575f80fd5b50565b5f81359050611fd481611fb0565b92915050565b5f819050919050565b611fec81611fda565b8114611ff6575f80fd5b50565b5f8135905061200781611fe3565b92915050565b5f806040838503121561202357612022611f78565b5b5f61203085828601611fc6565b925050602061204185828601611ff9565b9150509250929050565b61205481611fda565b82525050565b5f60208201905061206d5f83018461204b565b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6120a781612073565b81146120b1575f80fd5b50565b5f813590506120c28161209e565b92915050565b5f602082840312156120dd576120dc611f78565b5b5f6120ea848285016120b4565b91505092915050565b5f8115159050919050565b612107816120f3565b82525050565b5f6020820190506121205f8301846120fe565b92915050565b5f6020828403121561213b5761213a611f78565b5b5f61214884828501611ff9565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561218857808201518184015260208101905061216d565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6121ad82612151565b6121b7818561215b565b93506121c781856020860161216b565b6121d081612193565b840191505092915050565b5f6020820190508181035f8301526121f381846121a3565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61223582612193565b810181811067ffffffffffffffff82111715612254576122536121ff565b5b80604052505050565b5f612266611f6f565b9050612272828261222c565b919050565b5f67ffffffffffffffff821115612291576122906121ff565b5b602082029050602081019050919050565b5f80fd5b5f6122b86122b384612277565b61225d565b905080838252602082019050602084028301858111156122db576122da6122a2565b5b835b8181101561230457806122f08882611ff9565b8452602084019350506020810190506122dd565b5050509392505050565b5f82601f830112612322576123216121fb565b5b81356123328482602086016122a6565b91505092915050565b5f80fd5b5f67ffffffffffffffff821115612359576123586121ff565b5b61236282612193565b9050602081019050919050565b828183375f83830152505050565b5f61238f61238a8461233f565b61225d565b9050828152602081018484840111156123ab576123aa61233b565b5b6123b684828561236f565b509392505050565b5f82601f8301126123d2576123d16121fb565b5b81356123e284826020860161237d565b91505092915050565b5f805f806080858703121561240357612402611f78565b5b5f61241087828801611fc6565b945050602085013567ffffffffffffffff81111561243157612430611f7c565b5b61243d8782880161230e565b935050604085013567ffffffffffffffff81111561245e5761245d611f7c565b5b61246a8782880161230e565b925050606085013567ffffffffffffffff81111561248b5761248a611f7c565b5b612497878288016123be565b91505092959194509250565b5f819050919050565b6124b5816124a3565b81146124bf575f80fd5b50565b5f813590506124d0816124ac565b92915050565b5f602082840312156124eb576124ea611f78565b5b5f6124f8848285016124c2565b91505092915050565b61250a816124a3565b82525050565b5f6020820190506125235f830184612501565b92915050565b5f805f805f60a0868803121561254257612541611f78565b5b5f61254f88828901611fc6565b955050602061256088828901611fc6565b945050604086013567ffffffffffffffff81111561258157612580611f7c565b5b61258d8882890161230e565b935050606086013567ffffffffffffffff8111156125ae576125ad611f7c565b5b6125ba8882890161230e565b925050608086013567ffffffffffffffff8111156125db576125da611f7c565b5b6125e7888289016123be565b9150509295509295909350565b5f806040838503121561260a57612609611f78565b5b5f612617858286016124c2565b925050602061262885828601611fc6565b9150509250929050565b5f67ffffffffffffffff82111561264c5761264b6121ff565b5b602082029050602081019050919050565b5f61266f61266a84612632565b61225d565b90508083825260208201905060208402830185811115612692576126916122a2565b5b835b818110156126bb57806126a78882611fc6565b845260208401935050602081019050612694565b5050509392505050565b5f82601f8301126126d9576126d86121fb565b5b81356126e984826020860161265d565b91505092915050565b5f806040838503121561270857612707611f78565b5b5f83013567ffffffffffffffff81111561272557612724611f7c565b5b612731858286016126c5565b925050602083013567ffffffffffffffff81111561275257612751611f7c565b5b61275e8582860161230e565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61279a81611fda565b82525050565b5f6127ab8383612791565b60208301905092915050565b5f602082019050919050565b5f6127cd82612768565b6127d78185612772565b93506127e283612782565b805f5b838110156128125781516127f988826127a0565b9750612804836127b7565b9250506001810190506127e5565b5085935050505092915050565b5f6020820190508181035f83015261283781846127c3565b905092915050565b5f67ffffffffffffffff821115612859576128586121ff565b5b61286282612193565b9050602081019050919050565b5f61288161287c8461283f565b61225d565b90508281526020810184848401111561289d5761289c61233b565b5b6128a884828561236f565b509392505050565b5f82601f8301126128c4576128c36121fb565b5b81356128d484826020860161286f565b91505092915050565b5f602082840312156128f2576128f1611f78565b5b5f82013567ffffffffffffffff81111561290f5761290e611f7c565b5b61291b848285016128b0565b91505092915050565b5f805f806080858703121561293c5761293b611f78565b5b5f61294987828801611fc6565b945050602061295a87828801611ff9565b935050604061296b87828801611ff9565b925050606085013567ffffffffffffffff81111561298c5761298b611f7c565b5b612998878288016123be565b91505092959194509250565b5f80604083850312156129ba576129b9611f78565b5b5f6129c785828601611ff9565b925050602083013567ffffffffffffffff8111156129e8576129e7611f7c565b5b6129f4858286016128b0565b9150509250929050565b612a07816120f3565b8114612a11575f80fd5b50565b5f81359050612a22816129fe565b92915050565b5f8060408385031215612a3e57612a3d611f78565b5b5f612a4b85828601611fc6565b9250506020612a5c85828601612a14565b9150509250929050565b5f8060408385031215612a7c57612a7b611f78565b5b5f612a8985828601611fc6565b9250506020612a9a85828601611fc6565b9150509250929050565b5f805f805f60a08688031215612abd57612abc611f78565b5b5f612aca88828901611fc6565b9550506020612adb88828901611fc6565b9450506040612aec88828901611ff9565b9350506060612afd88828901611ff9565b925050608086013567ffffffffffffffff811115612b1e57612b1d611f7c565b5b612b2a888289016123be565b9150509295509295909350565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680612b7b57607f821691505b602082108103612b8e57612b8d612b37565b5b50919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154612bbc81612b64565b612bc68186612b94565b9450600182165f8114612be05760018114612bf557612c27565b60ff1983168652811515820286019350612c27565b612bfe85612b9e565b5f5b83811015612c1f57815481890152600182019150602081019050612c00565b838801955050505b50505092915050565b5f612c3a82612151565b612c448185612b94565b9350612c5481856020860161216b565b80840191505092915050565b5f612c6b8285612bb0565b9150612c778284612c30565b91508190509392505050565b612c8c81611f9f565b82525050565b5f604082019050612ca55f830185612c83565b612cb26020830184612c83565b9392505050565b5f604082019050612ccc5f83018561204b565b612cd9602083018461204b565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4d696e74696e67206973207061757365640000000000000000000000000000005f82015250565b5f612d4160118361215b565b9150612d4c82612d0d565b602082019050919050565b5f6020820190508181035f830152612d6e81612d35565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612dac82611fda565b9150612db783611fda565b9250828202612dc581611fda565b91508282048414831517612ddc57612ddb612d75565b5b5092915050565b7f536f7272792c206e6f7420656e6f75676820616d6f756e742073656e742100005f82015250565b5f612e17601e8361215b565b9150612e2282612de3565b602082019050919050565b5f6020820190508181035f830152612e4481612e0b565b9050919050565b5f602082019050612e5e5f830184612c83565b92915050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302612eae7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612e73565b612eb88683612e73565b95508019841693508086168417925050509392505050565b5f819050919050565b5f612ef3612eee612ee984611fda565b612ed0565b611fda565b9050919050565b5f819050919050565b612f0c83612ed9565b612f20612f1882612efa565b848454612e7f565b825550505050565b5f90565b612f34612f28565b612f3f818484612f03565b505050565b5b81811015612f6257612f575f82612f2c565b600181019050612f45565b5050565b601f821115612fa757612f7881612b9e565b612f8184612e64565b81016020851015612f90578190505b612fa4612f9c85612e64565b830182612f44565b50505b505050565b5f82821c905092915050565b5f612fc75f1984600802612fac565b1980831691505092915050565b5f612fdf8383612fb8565b9150826002028217905092915050565b612ff882612151565b67ffffffffffffffff811115613011576130106121ff565b5b61301b8254612b64565b613026828285612f66565b5f60209050601f831160018114613057575f8415613045578287015190505b61304f8582612fd4565b8655506130b6565b601f19841661306586612b9e565b5f5b8281101561308c57848901518255600182019150602085019450602081019050613067565b868310156130a957848901516130a5601f891682612fb8565b8355505b6001600288020188555050505b505050505050565b5f6040820190506130d15f830185612c83565b6130de6020830184612501565b9392505050565b5f6080820190506130f85f830187612c83565b613105602083018661204b565b613112604083018561204b565b61311f606083018461204b565b95945050505050565b5f61313282611fda565b915061313d83611fda565b925082820190508082111561315557613154612d75565b5b92915050565b5f6040820190508181035f83015261317381856127c3565b9050818103602083015261318781846127c3565b90509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f6131b482613190565b6131be818561319a565b93506131ce81856020860161216b565b6131d781612193565b840191505092915050565b5f60a0820190506131f55f830188612c83565b6132026020830187612c83565b61320f604083018661204b565b61321c606083018561204b565b818103608083015261322e81846131aa565b90509695505050505050565b5f815190506132488161209e565b92915050565b5f6020828403121561326357613262611f78565b5b5f6132708482850161323a565b91505092915050565b5f60a08201905061328c5f830188612c83565b6132996020830187612c83565b81810360408301526132ab81866127c3565b905081810360608301526132bf81856127c3565b905081810360808301526132d381846131aa565b9050969550505050505056fea26469706673582212205677f647cf7cc9ae854fe5bf2507ae2aaf84467d95bf9cf636a57f9bea866b1664736f6c63430008180033000000000000000000000000fd25808ffffbef621c4dbf0171fa647c916cb33b
Deployed Bytecode
0x608060405260043610610168575f3560e01c80634e1273f4116100d0578063a217fddf11610089578063d547741f11610063578063d547741f14610509578063d5c0e21514610531578063e985e9c514610559578063f242432a146105955761016f565b8063a217fddf1461048d578063a22cb465146104b7578063d5391393146104df5761016f565b80634e1273f41461038157806355f804b3146103bd578063731133e9146103e5578063862440e21461040d57806391d14854146104355780639f93f779146104715761016f565b80632eb2c2d6116101225780632eb2c2d6146102b55780632f2ff15d146102dd578063333171bb1461030557806336568abe1461031b5780633ccfd60b146103435780634530a832146103595761016f565b8062fdd58e1461017357806301ffc9a7146101af5780630bb12bb8146101eb5780630e89341c146102155780631f7fdffa14610251578063248a9ca3146102795761016f565b3661016f57005b5f80fd5b34801561017e575f80fd5b506101996004803603810190610194919061200d565b6105bd565b6040516101a6919061205a565b60405180910390f35b3480156101ba575f80fd5b506101d560048036038101906101d091906120c8565b610612565b6040516101e2919061210d565b60405180910390f35b3480156101f6575f80fd5b506101ff610623565b60405161020c919061210d565b60405180910390f35b348015610220575f80fd5b5061023b60048036038101906102369190612126565b610635565b60405161024891906121db565b60405180910390f35b34801561025c575f80fd5b50610277600480360381019061027291906123eb565b610714565b005b348015610284575f80fd5b5061029f600480360381019061029a91906124d6565b610751565b6040516102ac9190612510565b60405180910390f35b3480156102c0575f80fd5b506102db60048036038101906102d69190612529565b61076e565b005b3480156102e8575f80fd5b5061030360048036038101906102fe91906125f4565b610815565b005b348015610310575f80fd5b50610319610837565b005b348015610326575f80fd5b50610341600480360381019061033c91906125f4565b61086e565b005b34801561034e575f80fd5b506103576108e9565b005b348015610364575f80fd5b5061037f600480360381019061037a9190612126565b610939565b005b34801561038c575f80fd5b506103a760048036038101906103a291906126f2565b610950565b6040516103b4919061281f565b60405180910390f35b3480156103c8575f80fd5b506103e360048036038101906103de91906128dd565b610a57565b005b3480156103f0575f80fd5b5061040b60048036038101906104069190612924565b610a70565b005b348015610418575f80fd5b50610433600480360381019061042e91906129a4565b610aad565b005b348015610440575f80fd5b5061045b600480360381019061045691906125f4565b610ac8565b604051610468919061210d565b60405180910390f35b61048b6004803603810190610486919061200d565b610b2c565b005b348015610498575f80fd5b506104a1610bfb565b6040516104ae9190612510565b60405180910390f35b3480156104c2575f80fd5b506104dd60048036038101906104d89190612a28565b610c01565b005b3480156104ea575f80fd5b506104f3610c17565b6040516105009190612510565b60405180910390f35b348015610514575f80fd5b5061052f600480360381019061052a91906125f4565b610c3b565b005b34801561053c575f80fd5b5061055760048036038101906105529190612126565b610c5d565b005b348015610564575f80fd5b5061057f600480360381019061057a9190612a66565b610c74565b60405161058c919061210d565b60405180910390f35b3480156105a0575f80fd5b506105bb60048036038101906105b69190612aa4565b610d02565b005b5f805f8381526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b5f61061c82610da9565b9050919050565b60095f9054906101000a900460ff1681565b60605f60045f8481526020019081526020015f20805461065490612b64565b80601f016020809104026020016040519081016040528092919081815260200182805461068090612b64565b80156106cb5780601f106106a2576101008083540402835291602001916106cb565b820191905f5260205f20905b8154815290600101906020018083116106ae57829003601f168201915b505050505090505f8151116106e8576106e383610e22565b61070c565b6003816040516020016106fc929190612c60565b6040516020818303038152906040525b915050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661073e81610eb4565b61074a85858585610ec8565b5050505050565b5f60055f8381526020019081526020015f20600101549050919050565b5f610777610f4b565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156107bc57506107ba8682610c74565b155b156108005780866040517fe237d9220000000000000000000000000000000000000000000000000000000081526004016107f7929190612c92565b60405180910390fd5b61080d8686868686610f52565b505050505050565b61081e82610751565b61082781610eb4565b6108318383611046565b50505050565b5f801b61084381610eb4565b60095f9054906101000a900460ff161560095f6101000a81548160ff02191690831515021790555050565b610876610f4b565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108da576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108e48282611130565b505050565b5f801b6108f581610eb4565b5f4790503373ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050610935575f80fd5b5050565b5f801b61094581610eb4565b816007819055505050565b6060815183511461099c57815183516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401610993929190612cb9565b60405180910390fd5b5f835167ffffffffffffffff8111156109b8576109b76121ff565b5b6040519080825280602002602001820160405280156109e65781602001602082028036833780820191505090505b5090505f5b8451811015610a4c57610a22610a0a828761121a90919063ffffffff16565b610a1d838761122d90919063ffffffff16565b6105bd565b828281518110610a3557610a34612ce0565b5b6020026020010181815250508060010190506109eb565b508091505092915050565b5f801b610a6381610eb4565b610a6c82611240565b5050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610a9a81610eb4565b610aa685858585611253565b5050505050565b5f801b610ab981610eb4565b610ac383836112e8565b505050565b5f60055f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b610b3461134b565b60095f9054906101000a900460ff1615610b83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7a90612d57565b60405180910390fd5b80600754610b919190612da2565b341015610bd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bca90612e2d565b60405180910390fd5b610bef826008548360405180602001604052805f815250611253565b610bf7611391565b5050565b5f801b81565b610c13610c0c610f4b565b838361139b565b5050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b610c4482610751565b610c4d81610eb4565b610c578383611130565b50505050565b5f801b610c6981610eb4565b816008819055505050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f610d0b610f4b565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614158015610d505750610d4e8682610c74565b155b15610d945780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610d8b929190612c92565b60405180910390fd5b610da18686868686611504565b505050505050565b5f7f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610e1b5750610e1a8261160a565b5b9050919050565b606060028054610e3190612b64565b80601f0160208091040260200160405190810160405280929190818152602001828054610e5d90612b64565b8015610ea85780601f10610e7f57610100808354040283529160200191610ea8565b820191905f5260205f20905b815481529060010190602001808311610e8b57829003601f168201915b50505050509050919050565b610ec581610ec0610f4b565b6116eb565b50565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610f38575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610f2f9190612e4b565b60405180910390fd5b610f455f8585858561173c565b50505050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610fc2575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610fb99190612e4b565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603611032575f6040517f01a835140000000000000000000000000000000000000000000000000000000081526004016110299190612e4b565b60405180910390fd5b61103f858585858561173c565b5050505050565b5f6110518383610ac8565b61112657600160055f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055506110c3610f4b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001905061112a565b5f90505b92915050565b5f61113b8383610ac8565b15611210575f60055f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055506111ad610f4b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050611214565b5f90505b92915050565b5f60208202602084010151905092915050565b5f60208202602084010151905092915050565b806003908161124f9190612fef565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036112c3575f6040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016112ba9190612e4b565b60405180910390fd5b5f806112cf85856117e8565b915091506112e05f8784848761173c565b505050505050565b8060045f8481526020019081526020015f2090816113069190612fef565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b61133284610635565b60405161133f91906121db565b60405180910390a25050565b600260065403611387576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600681905550565b6001600681905550565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361140b575f6040517fced3e1000000000000000000000000000000000000000000000000000000000081526004016114029190612e4b565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516114f7919061210d565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611574575f6040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161156b9190612e4b565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036115e4575f6040517f01a835140000000000000000000000000000000000000000000000000000000081526004016115db9190612e4b565b60405180910390fd5b5f806115f085856117e8565b91509150611601878784848761173c565b50505050505050565b5f7fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806116d457507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806116e457506116e382611818565b5b9050919050565b6116f58282610ac8565b6117385780826040517fe2517d3f00000000000000000000000000000000000000000000000000000000815260040161172f9291906130be565b60405180910390fd5b5050565b61174885858585611881565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146117e1575f611784610f4b565b905060018451036117d0575f6117a35f8661122d90919063ffffffff16565b90505f6117b95f8661122d90919063ffffffff16565b90506117c9838989858589611c11565b50506117df565b6117de818787878787611dc0565b5b505b5050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b80518251146118cb57815181516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016118c2929190612cb9565b60405180910390fd5b5f6118d4610f4b565b90505f5b8351811015611ad0575f6118f5828661122d90919063ffffffff16565b90505f61190b838661122d90919063ffffffff16565b90505f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614611a2e575f805f8481526020019081526020015f205f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156119da57888183856040517f03dee4c50000000000000000000000000000000000000000000000000000000081526004016119d194939291906130e5565b60405180910390fd5b8181035f808581526020019081526020015f205f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614611ac357805f808481526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254611abb9190613128565b925050819055505b50508060010190506118d8565b506001835103611b8b575f611aee5f8561122d90919063ffffffff16565b90505f611b045f8561122d90919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051611b7c929190612cb9565b60405180910390a45050611c0a565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611c0192919061315b565b60405180910390a45b5050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b1115611db8578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611c719594939291906131e2565b6020604051808303815f875af1925050508015611cac57506040513d601f19601f82011682018060405250810190611ca9919061324e565b60015b611d2d573d805f8114611cda576040519150601f19603f3d011682016040523d82523d5f602084013e611cdf565b606091505b505f815103611d2557846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611d1c9190612e4b565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611db657846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611dad9190612e4b565b60405180910390fd5b505b505050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b1115611f67578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401611e20959493929190613279565b6020604051808303815f875af1925050508015611e5b57506040513d601f19601f82011682018060405250810190611e58919061324e565b60015b611edc573d805f8114611e89576040519150601f19603f3d011682016040523d82523d5f602084013e611e8e565b606091505b505f815103611ed457846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611ecb9190612e4b565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611f6557846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611f5c9190612e4b565b60405180910390fd5b505b505050505050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611fa982611f80565b9050919050565b611fb981611f9f565b8114611fc3575f80fd5b50565b5f81359050611fd481611fb0565b92915050565b5f819050919050565b611fec81611fda565b8114611ff6575f80fd5b50565b5f8135905061200781611fe3565b92915050565b5f806040838503121561202357612022611f78565b5b5f61203085828601611fc6565b925050602061204185828601611ff9565b9150509250929050565b61205481611fda565b82525050565b5f60208201905061206d5f83018461204b565b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6120a781612073565b81146120b1575f80fd5b50565b5f813590506120c28161209e565b92915050565b5f602082840312156120dd576120dc611f78565b5b5f6120ea848285016120b4565b91505092915050565b5f8115159050919050565b612107816120f3565b82525050565b5f6020820190506121205f8301846120fe565b92915050565b5f6020828403121561213b5761213a611f78565b5b5f61214884828501611ff9565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561218857808201518184015260208101905061216d565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6121ad82612151565b6121b7818561215b565b93506121c781856020860161216b565b6121d081612193565b840191505092915050565b5f6020820190508181035f8301526121f381846121a3565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61223582612193565b810181811067ffffffffffffffff82111715612254576122536121ff565b5b80604052505050565b5f612266611f6f565b9050612272828261222c565b919050565b5f67ffffffffffffffff821115612291576122906121ff565b5b602082029050602081019050919050565b5f80fd5b5f6122b86122b384612277565b61225d565b905080838252602082019050602084028301858111156122db576122da6122a2565b5b835b8181101561230457806122f08882611ff9565b8452602084019350506020810190506122dd565b5050509392505050565b5f82601f830112612322576123216121fb565b5b81356123328482602086016122a6565b91505092915050565b5f80fd5b5f67ffffffffffffffff821115612359576123586121ff565b5b61236282612193565b9050602081019050919050565b828183375f83830152505050565b5f61238f61238a8461233f565b61225d565b9050828152602081018484840111156123ab576123aa61233b565b5b6123b684828561236f565b509392505050565b5f82601f8301126123d2576123d16121fb565b5b81356123e284826020860161237d565b91505092915050565b5f805f806080858703121561240357612402611f78565b5b5f61241087828801611fc6565b945050602085013567ffffffffffffffff81111561243157612430611f7c565b5b61243d8782880161230e565b935050604085013567ffffffffffffffff81111561245e5761245d611f7c565b5b61246a8782880161230e565b925050606085013567ffffffffffffffff81111561248b5761248a611f7c565b5b612497878288016123be565b91505092959194509250565b5f819050919050565b6124b5816124a3565b81146124bf575f80fd5b50565b5f813590506124d0816124ac565b92915050565b5f602082840312156124eb576124ea611f78565b5b5f6124f8848285016124c2565b91505092915050565b61250a816124a3565b82525050565b5f6020820190506125235f830184612501565b92915050565b5f805f805f60a0868803121561254257612541611f78565b5b5f61254f88828901611fc6565b955050602061256088828901611fc6565b945050604086013567ffffffffffffffff81111561258157612580611f7c565b5b61258d8882890161230e565b935050606086013567ffffffffffffffff8111156125ae576125ad611f7c565b5b6125ba8882890161230e565b925050608086013567ffffffffffffffff8111156125db576125da611f7c565b5b6125e7888289016123be565b9150509295509295909350565b5f806040838503121561260a57612609611f78565b5b5f612617858286016124c2565b925050602061262885828601611fc6565b9150509250929050565b5f67ffffffffffffffff82111561264c5761264b6121ff565b5b602082029050602081019050919050565b5f61266f61266a84612632565b61225d565b90508083825260208201905060208402830185811115612692576126916122a2565b5b835b818110156126bb57806126a78882611fc6565b845260208401935050602081019050612694565b5050509392505050565b5f82601f8301126126d9576126d86121fb565b5b81356126e984826020860161265d565b91505092915050565b5f806040838503121561270857612707611f78565b5b5f83013567ffffffffffffffff81111561272557612724611f7c565b5b612731858286016126c5565b925050602083013567ffffffffffffffff81111561275257612751611f7c565b5b61275e8582860161230e565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61279a81611fda565b82525050565b5f6127ab8383612791565b60208301905092915050565b5f602082019050919050565b5f6127cd82612768565b6127d78185612772565b93506127e283612782565b805f5b838110156128125781516127f988826127a0565b9750612804836127b7565b9250506001810190506127e5565b5085935050505092915050565b5f6020820190508181035f83015261283781846127c3565b905092915050565b5f67ffffffffffffffff821115612859576128586121ff565b5b61286282612193565b9050602081019050919050565b5f61288161287c8461283f565b61225d565b90508281526020810184848401111561289d5761289c61233b565b5b6128a884828561236f565b509392505050565b5f82601f8301126128c4576128c36121fb565b5b81356128d484826020860161286f565b91505092915050565b5f602082840312156128f2576128f1611f78565b5b5f82013567ffffffffffffffff81111561290f5761290e611f7c565b5b61291b848285016128b0565b91505092915050565b5f805f806080858703121561293c5761293b611f78565b5b5f61294987828801611fc6565b945050602061295a87828801611ff9565b935050604061296b87828801611ff9565b925050606085013567ffffffffffffffff81111561298c5761298b611f7c565b5b612998878288016123be565b91505092959194509250565b5f80604083850312156129ba576129b9611f78565b5b5f6129c785828601611ff9565b925050602083013567ffffffffffffffff8111156129e8576129e7611f7c565b5b6129f4858286016128b0565b9150509250929050565b612a07816120f3565b8114612a11575f80fd5b50565b5f81359050612a22816129fe565b92915050565b5f8060408385031215612a3e57612a3d611f78565b5b5f612a4b85828601611fc6565b9250506020612a5c85828601612a14565b9150509250929050565b5f8060408385031215612a7c57612a7b611f78565b5b5f612a8985828601611fc6565b9250506020612a9a85828601611fc6565b9150509250929050565b5f805f805f60a08688031215612abd57612abc611f78565b5b5f612aca88828901611fc6565b9550506020612adb88828901611fc6565b9450506040612aec88828901611ff9565b9350506060612afd88828901611ff9565b925050608086013567ffffffffffffffff811115612b1e57612b1d611f7c565b5b612b2a888289016123be565b9150509295509295909350565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680612b7b57607f821691505b602082108103612b8e57612b8d612b37565b5b50919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154612bbc81612b64565b612bc68186612b94565b9450600182165f8114612be05760018114612bf557612c27565b60ff1983168652811515820286019350612c27565b612bfe85612b9e565b5f5b83811015612c1f57815481890152600182019150602081019050612c00565b838801955050505b50505092915050565b5f612c3a82612151565b612c448185612b94565b9350612c5481856020860161216b565b80840191505092915050565b5f612c6b8285612bb0565b9150612c778284612c30565b91508190509392505050565b612c8c81611f9f565b82525050565b5f604082019050612ca55f830185612c83565b612cb26020830184612c83565b9392505050565b5f604082019050612ccc5f83018561204b565b612cd9602083018461204b565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4d696e74696e67206973207061757365640000000000000000000000000000005f82015250565b5f612d4160118361215b565b9150612d4c82612d0d565b602082019050919050565b5f6020820190508181035f830152612d6e81612d35565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612dac82611fda565b9150612db783611fda565b9250828202612dc581611fda565b91508282048414831517612ddc57612ddb612d75565b5b5092915050565b7f536f7272792c206e6f7420656e6f75676820616d6f756e742073656e742100005f82015250565b5f612e17601e8361215b565b9150612e2282612de3565b602082019050919050565b5f6020820190508181035f830152612e4481612e0b565b9050919050565b5f602082019050612e5e5f830184612c83565b92915050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302612eae7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612e73565b612eb88683612e73565b95508019841693508086168417925050509392505050565b5f819050919050565b5f612ef3612eee612ee984611fda565b612ed0565b611fda565b9050919050565b5f819050919050565b612f0c83612ed9565b612f20612f1882612efa565b848454612e7f565b825550505050565b5f90565b612f34612f28565b612f3f818484612f03565b505050565b5b81811015612f6257612f575f82612f2c565b600181019050612f45565b5050565b601f821115612fa757612f7881612b9e565b612f8184612e64565b81016020851015612f90578190505b612fa4612f9c85612e64565b830182612f44565b50505b505050565b5f82821c905092915050565b5f612fc75f1984600802612fac565b1980831691505092915050565b5f612fdf8383612fb8565b9150826002028217905092915050565b612ff882612151565b67ffffffffffffffff811115613011576130106121ff565b5b61301b8254612b64565b613026828285612f66565b5f60209050601f831160018114613057575f8415613045578287015190505b61304f8582612fd4565b8655506130b6565b601f19841661306586612b9e565b5f5b8281101561308c57848901518255600182019150602085019450602081019050613067565b868310156130a957848901516130a5601f891682612fb8565b8355505b6001600288020188555050505b505050505050565b5f6040820190506130d15f830185612c83565b6130de6020830184612501565b9392505050565b5f6080820190506130f85f830187612c83565b613105602083018661204b565b613112604083018561204b565b61311f606083018461204b565b95945050505050565b5f61313282611fda565b915061313d83611fda565b925082820190508082111561315557613154612d75565b5b92915050565b5f6040820190508181035f83015261317381856127c3565b9050818103602083015261318781846127c3565b90509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f6131b482613190565b6131be818561319a565b93506131ce81856020860161216b565b6131d781612193565b840191505092915050565b5f60a0820190506131f55f830188612c83565b6132026020830187612c83565b61320f604083018661204b565b61321c606083018561204b565b818103608083015261322e81846131aa565b90509695505050505050565b5f815190506132488161209e565b92915050565b5f6020828403121561326357613262611f78565b5b5f6132708482850161323a565b91505092915050565b5f60a08201905061328c5f830188612c83565b6132996020830187612c83565b81810360408301526132ab81866127c3565b905081810360608301526132bf81856127c3565b905081810360808301526132d381846131aa565b9050969550505050505056fea26469706673582212205677f647cf7cc9ae854fe5bf2507ae2aaf84467d95bf9cf636a57f9bea866b1664736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000fd25808ffffbef621c4dbf0171fa647c916cb33b
-----Decoded View---------------
Arg [0] : adminAddress (address): 0xfd25808FFffbEf621C4DBf0171Fa647c916CB33b
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000fd25808ffffbef621c4dbf0171fa647c916cb33b
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.