ERC-1155
Source Code
Overview
Max Total Supply
0
Holders
5,376
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
ObliqueStrategiesOnFrames
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
// Oblique Strategies
// "Over One Hundred Worthwhile Dilemmas"
// A port of Brian Eno and Peter Schmidt's Oblique Strategies to an NFT format,
// mintable via Farcaster Frames.
// https://warpcast.com/pfeffunit
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
interface IERC20 {
function transfer(
address recipient,
uint256 amount
) external returns (bool);
}
contract ObliqueStrategiesOnFrames is ERC1155 {
mapping(address => uint256) public mintCount;
uint256 limitPerAddress = 10;
address public owner;
error BadTokenId();
error TooManyPerAddress();
error OnlyOwner();
modifier onlyOwner() {
if (msg.sender != owner) {
revert OnlyOwner();
}
_;
}
constructor() ERC1155("ipfs://bafybeiazu4lphlwqsiownqofwiycedh5mymkyazkcodmpd3hwlmip4vlde/{id}") {
owner = msg.sender;
_mint(msg.sender, 1, 1, "");
}
// This is needed so OpenSea gives the contract a nice name and description.
// Interesting to note that a longer description caused it to fail to be displayed at all.
function contractURI() public pure returns (string memory) {
string memory json = '{"name": "Oblique Strategies on Frames","description":"Oblique Strategies is a deck of cards created by Brian Eno and Peter Schmidt in 1975, designed as a tool to inspire creativity and encourage lateral thinking in artistic endeavors and problem-solving situations."}';
return string.concat("data:application/json;utf8,", json);
}
function mint(address recipient, uint256 id) public {
if (id > 101 || id < 1) {
revert BadTokenId();
}
if (mintCount[recipient] + 1 > limitPerAddress) {
revert TooManyPerAddress();
}
mintCount[recipient] += 1;
_mint(recipient, id, 1, "");
}
function updateLimitPerAddress(uint256 newLimit) external onlyOwner {
limitPerAddress = newLimit;
}
function updateUri(string memory newUri) external onlyOwner {
_setURI(newUri);
}
function withdraw() external onlyOwner {
address payable recipient = payable(msg.sender);
uint256 amount = address(this).balance;
require(amount > 0, "No ETH available for withdrawal");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Failed to send ETH");
}
function sendToken(
address tokenAddress,
uint256 amount
) external onlyOwner {
IERC20 token = IERC20(tokenAddress);
bool success = token.transfer(msg.sender, amount);
require(success, "Token transfer failed");
}
receive() external payable {}
fallback() external payable {}
}// 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) (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) (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.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) (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.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.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) (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.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/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
}
}
}{
"evmVersion": "paris",
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BadTokenId","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":"OnlyOwner","type":"error"},{"inputs":[],"name":"TooManyPerAddress","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":"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"},{"stateMutability":"payable","type":"fallback"},{"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":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","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":"recipient","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sendToken","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":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"updateLimitPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newUri","type":"string"}],"name":"updateUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","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
6080604052600a6004553480156200001657600080fd5b506040518060800160405280604781526020016200410d604791396200004281620000ae60201b60201c565b5033600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000a83360018060405180602001604052806000815250620000c360201b60201c565b620011fe565b8060029081620000bf919062000c66565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603620001385760006040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016200012f919062000d92565b60405180910390fd5b6000806200014d85856200016f60201b60201c565b91509150620001676000878484876200019f60201b60201c565b505050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b620001b3858585856200027860201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161462000271576000620001fa6200064a60201b60201c565b90506001845103620002585760006200021e6000866200065260201b90919060201c565b90506000620002386000866200065260201b90919060201c565b9050620002508389898585896200066660201b60201c565b50506200026f565b6200026e8187878787876200082960201b60201c565b5b505b5050505050565b8051825114620002c557815181516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401620002bc92919062000dc0565b60405180910390fd5b6000620002d76200064a60201b60201c565b905060005b8351811015620004fb576000620002fd82866200065260201b90919060201c565b905060006200031683866200065260201b90919060201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146200044757600080600084815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015620003ef57888183856040517f03dee4c5000000000000000000000000000000000000000000000000000000008152600401620003e6949392919062000ded565b60405180910390fd5b81810360008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614620004e5578060008084815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254620004dd919062000e69565b925050819055505b505080620004f39062000ea4565b9050620002dc565b506001835103620005c25760006200051e6000856200065260201b90919060201c565b90506000620005386000856200065260201b90919060201c565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051620005b292919062000dc0565b60405180910390a4505062000643565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516200063a92919062000fbf565b60405180910390a45b5050505050565b600033905090565b600060208202602084010151905092915050565b60008473ffffffffffffffffffffffffffffffffffffffff163b111562000821578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401620006ca95949392919062001094565b6020604051808303816000875af19250505080156200070957506040513d601f19601f820116820180604052508101906200070691906200115a565b60015b62000793573d80600081146200073c576040519150601f19603f3d011682016040523d82523d6000602084013e62000741565b606091505b5060008151036200078b57846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040162000782919062000d92565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146200081f57846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040162000816919062000d92565b60405180910390fd5b505b505050505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b1115620009e4578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016200088d9594939291906200118c565b6020604051808303816000875af1925050508015620008cc57506040513d601f19601f82011682018060405250810190620008c991906200115a565b60015b62000956573d8060008114620008ff576040519150601f19603f3d011682016040523d82523d6000602084013e62000904565b606091505b5060008151036200094e57846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040162000945919062000d92565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614620009e257846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401620009d9919062000d92565b60405180910390fd5b505b505050505050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062000a6e57607f821691505b60208210810362000a845762000a8362000a26565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830262000aee7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000aaf565b62000afa868362000aaf565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000b4762000b4162000b3b8462000b12565b62000b1c565b62000b12565b9050919050565b6000819050919050565b62000b638362000b26565b62000b7b62000b728262000b4e565b84845462000abc565b825550505050565b600090565b62000b9262000b83565b62000b9f81848462000b58565b505050565b5b8181101562000bc75762000bbb60008262000b88565b60018101905062000ba5565b5050565b601f82111562000c165762000be08162000a8a565b62000beb8462000a9f565b8101602085101562000bfb578190505b62000c1362000c0a8562000a9f565b83018262000ba4565b50505b505050565b600082821c905092915050565b600062000c3b6000198460080262000c1b565b1980831691505092915050565b600062000c56838362000c28565b9150826002028217905092915050565b62000c7182620009ec565b67ffffffffffffffff81111562000c8d5762000c8c620009f7565b5b62000c99825462000a55565b62000ca682828562000bcb565b600060209050601f83116001811462000cde576000841562000cc9578287015190505b62000cd5858262000c48565b86555062000d45565b601f19841662000cee8662000a8a565b60005b8281101562000d185784890151825560018201915060208501945060208101905062000cf1565b8683101562000d38578489015162000d34601f89168262000c28565b8355505b6001600288020188555050505b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000d7a8262000d4d565b9050919050565b62000d8c8162000d6d565b82525050565b600060208201905062000da9600083018462000d81565b92915050565b62000dba8162000b12565b82525050565b600060408201905062000dd7600083018562000daf565b62000de6602083018462000daf565b9392505050565b600060808201905062000e04600083018762000d81565b62000e13602083018662000daf565b62000e22604083018562000daf565b62000e31606083018462000daf565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000e768262000b12565b915062000e838362000b12565b925082820190508082111562000e9e5762000e9d62000e3a565b5b92915050565b600062000eb18262000b12565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362000ee65762000ee562000e3a565b5b600182019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b62000f288162000b12565b82525050565b600062000f3c838362000f1d565b60208301905092915050565b6000602082019050919050565b600062000f628262000ef1565b62000f6e818562000efc565b935062000f7b8362000f0d565b8060005b8381101562000fb257815162000f96888262000f2e565b975062000fa38362000f48565b92505060018101905062000f7f565b5085935050505092915050565b6000604082019050818103600083015262000fdb818562000f55565b9050818103602083015262000ff1818462000f55565b90509392505050565b600081519050919050565b600082825260208201905092915050565b60005b838110156200103657808201518184015260208101905062001019565b60008484015250505050565b6000601f19601f8301169050919050565b6000620010608262000ffa565b6200106c818562001005565b93506200107e81856020860162001016565b620010898162001042565b840191505092915050565b600060a082019050620010ab600083018862000d81565b620010ba602083018762000d81565b620010c9604083018662000daf565b620010d8606083018562000daf565b8181036080830152620010ec818462001053565b90509695505050505050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6200113481620010fd565b81146200114057600080fd5b50565b600081519050620011548162001129565b92915050565b600060208284031215620011735762001172620010f8565b5b6000620011838482850162001143565b91505092915050565b600060a082019050620011a3600083018862000d81565b620011b2602083018762000d81565b8181036040830152620011c6818662000f55565b90508181036060830152620011dc818562000f55565b90508181036080830152620011f2818462001053565b90509695505050505050565b612eff806200120e6000396000f3fe6080604052600436106100f65760003560e01c8063570b3c6a1161008a578063e985e9c511610059578063e985e9c51461032d578063ea86f87f1461036a578063ed9ec88814610393578063f242432a146103d0576100fd565b8063570b3c6a146102855780638da5cb5b146102ae578063a22cb465146102d9578063e8a3d48514610302576100fd565b80633ccfd60b116100c65780633ccfd60b146101df57806340c10f19146101f6578063412664ae1461021f5780634e1273f414610248576100fd565b8062fdd58e146100ff57806301ffc9a71461013c5780630e89341c146101795780632eb2c2d6146101b6576100fd565b366100fd57005b005b34801561010b57600080fd5b5061012660048036038101906101219190611bf2565b6103f9565b6040516101339190611c41565b60405180910390f35b34801561014857600080fd5b50610163600480360381019061015e9190611cb4565b610453565b6040516101709190611cfc565b60405180910390f35b34801561018557600080fd5b506101a0600480360381019061019b9190611d17565b610535565b6040516101ad9190611dd4565b60405180910390f35b3480156101c257600080fd5b506101dd60048036038101906101d89190611ff3565b6105c9565b005b3480156101eb57600080fd5b506101f4610671565b005b34801561020257600080fd5b5061021d60048036038101906102189190611bf2565b6107f6565b005b34801561022b57600080fd5b5061024660048036038101906102419190611bf2565b61093a565b005b34801561025457600080fd5b5061026f600480360381019061026a9190612185565b610a8e565b60405161027c91906122bb565b60405180910390f35b34801561029157600080fd5b506102ac60048036038101906102a7919061237e565b610b9d565b005b3480156102ba57600080fd5b506102c3610c30565b6040516102d091906123d6565b60405180910390f35b3480156102e557600080fd5b5061030060048036038101906102fb919061241d565b610c56565b005b34801561030e57600080fd5b50610317610c6c565b6040516103249190611dd4565b60405180910390f35b34801561033957600080fd5b50610354600480360381019061034f919061245d565b610cb4565b6040516103619190611cfc565b60405180910390f35b34801561037657600080fd5b50610391600480360381019061038c9190611d17565b610d48565b005b34801561039f57600080fd5b506103ba60048036038101906103b5919061249d565b610dd9565b6040516103c79190611c41565b60405180910390f35b3480156103dc57600080fd5b506103f760048036038101906103f291906124ca565b610df1565b005b600080600083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061051e57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061052e575061052d82610e99565b5b9050919050565b60606002805461054490612590565b80601f016020809104026020016040519081016040528092919081815260200182805461057090612590565b80156105bd5780601f10610592576101008083540402835291602001916105bd565b820191906000526020600020905b8154815290600101906020018083116105a057829003601f168201915b50505050509050919050565b60006105d3610f03565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415801561061857506106168682610cb4565b155b1561065c5780866040517fe237d9220000000000000000000000000000000000000000000000000000000081526004016106539291906125c1565b60405180910390fd5b6106698686868686610f0b565b505050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106f8576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000339050600047905060008111610745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073c90612636565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161076b90612687565b60006040518083038185875af1925050503d80600081146107a8576040519150601f19603f3d011682016040523d82523d6000602084013e6107ad565b606091505b50509050806107f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e8906126e8565b60405180910390fd5b505050565b60658111806108055750600181105b1561083c576040517f7bece0b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004546001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461088b9190612737565b11156108c3576040517f8523b2b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546109139190612737565b925050819055506109368282600160405180602001604052806000815250611003565b5050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c1576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082905060008173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856040518363ffffffff1660e01b8152600401610a0392919061276b565b6020604051808303816000875af1158015610a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4691906127a9565b905080610a88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7f90612822565b60405180910390fd5b50505050565b60608151835114610ada57815183516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401610ad1929190612842565b60405180910390fd5b6000835167ffffffffffffffff811115610af757610af6611dfb565b5b604051908082528060200260200182016040528015610b255781602001602082028036833780820191505090505b50905060005b8451811015610b9257610b62610b4a828761109c90919063ffffffff16565b610b5d83876110b090919063ffffffff16565b6103f9565b828281518110610b7557610b7461286b565b5b60200260200101818152505080610b8b9061289a565b9050610b2b565b508091505092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c24576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c2d816110c4565b50565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610c68610c61610f03565b83836110d7565b5050565b6060600060405180610140016040528061010c8152602001612dbe61010c9139905080604051602001610c9f9190612944565b60405160208183030381529060405291505090565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610dcf576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060048190555050565b60036020528060005260406000206000915090505481565b6000610dfb610f03565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614158015610e405750610e3e8682610cb4565b155b15610e845780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610e7b9291906125c1565b60405180910390fd5b610e918686868686611247565b505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610f7d5760006040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610f7491906123d6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603610fef5760006040517f01a83514000000000000000000000000000000000000000000000000000000008152600401610fe691906123d6565b60405180910390fd5b610ffc8585858585611352565b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036110755760006040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161106c91906123d6565b60405180910390fd5b6000806110828585611404565b91509150611094600087848487611352565b505050505050565b600060208202602084010151905092915050565b600060208202602084010151905092915050565b80600290816110d39190612b16565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036111495760006040517fced3e10000000000000000000000000000000000000000000000000000000000815260040161114091906123d6565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161123a9190611cfc565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036112b95760006040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016112b091906123d6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361132b5760006040517f01a8351400000000000000000000000000000000000000000000000000000000815260040161132291906123d6565b60405180910390fd5b6000806113388585611404565b915091506113498787848487611352565b50505050505050565b61135e85858585611434565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146113fd57600061139c610f03565b905060018451036113ec5760006113bd6000866110b090919063ffffffff16565b905060006113d56000866110b090919063ffffffff16565b90506113e58389898585896117e2565b50506113fb565b6113fa818787878787611996565b5b505b5050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b805182511461147e57815181516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401611475929190612842565b60405180910390fd5b6000611488610f03565b905060005b835181101561169d5760006114ab82866110b090919063ffffffff16565b905060006114c283866110b090919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146115ef57600080600084815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561159757888183856040517f03dee4c500000000000000000000000000000000000000000000000000000000815260040161158e9493929190612be8565b60405180910390fd5b81810360008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161461168a578060008084815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546116829190612737565b925050819055505b5050806116969061289a565b905061148d565b50600183510361175c5760006116bd6000856110b090919063ffffffff16565b905060006116d56000856110b090919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62858560405161174d929190612842565b60405180910390a450506117db565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516117d2929190612c2d565b60405180910390a45b5050505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b111561198e578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611843959493929190612cb9565b6020604051808303816000875af192505050801561187f57506040513d601f19601f8201168201806040525081019061187c9190612d28565b60015b611903573d80600081146118af576040519150601f19603f3d011682016040523d82523d6000602084013e6118b4565b606091505b5060008151036118fb57846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016118f291906123d6565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461198c57846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161198391906123d6565b60405180910390fd5b505b505050505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b1115611b42578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016119f7959493929190612d55565b6020604051808303816000875af1925050508015611a3357506040513d601f19601f82011682018060405250810190611a309190612d28565b60015b611ab7573d8060008114611a63576040519150601f19603f3d011682016040523d82523d6000602084013e611a68565b606091505b506000815103611aaf57846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611aa691906123d6565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611b4057846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611b3791906123d6565b60405180910390fd5b505b505050505050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611b8982611b5e565b9050919050565b611b9981611b7e565b8114611ba457600080fd5b50565b600081359050611bb681611b90565b92915050565b6000819050919050565b611bcf81611bbc565b8114611bda57600080fd5b50565b600081359050611bec81611bc6565b92915050565b60008060408385031215611c0957611c08611b54565b5b6000611c1785828601611ba7565b9250506020611c2885828601611bdd565b9150509250929050565b611c3b81611bbc565b82525050565b6000602082019050611c566000830184611c32565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611c9181611c5c565b8114611c9c57600080fd5b50565b600081359050611cae81611c88565b92915050565b600060208284031215611cca57611cc9611b54565b5b6000611cd884828501611c9f565b91505092915050565b60008115159050919050565b611cf681611ce1565b82525050565b6000602082019050611d116000830184611ced565b92915050565b600060208284031215611d2d57611d2c611b54565b5b6000611d3b84828501611bdd565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611d7e578082015181840152602081019050611d63565b60008484015250505050565b6000601f19601f8301169050919050565b6000611da682611d44565b611db08185611d4f565b9350611dc0818560208601611d60565b611dc981611d8a565b840191505092915050565b60006020820190508181036000830152611dee8184611d9b565b905092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611e3382611d8a565b810181811067ffffffffffffffff82111715611e5257611e51611dfb565b5b80604052505050565b6000611e65611b4a565b9050611e718282611e2a565b919050565b600067ffffffffffffffff821115611e9157611e90611dfb565b5b602082029050602081019050919050565b600080fd5b6000611eba611eb584611e76565b611e5b565b90508083825260208201905060208402830185811115611edd57611edc611ea2565b5b835b81811015611f065780611ef28882611bdd565b845260208401935050602081019050611edf565b5050509392505050565b600082601f830112611f2557611f24611df6565b5b8135611f35848260208601611ea7565b91505092915050565b600080fd5b600067ffffffffffffffff821115611f5e57611f5d611dfb565b5b611f6782611d8a565b9050602081019050919050565b82818337600083830152505050565b6000611f96611f9184611f43565b611e5b565b905082815260208101848484011115611fb257611fb1611f3e565b5b611fbd848285611f74565b509392505050565b600082601f830112611fda57611fd9611df6565b5b8135611fea848260208601611f83565b91505092915050565b600080600080600060a0868803121561200f5761200e611b54565b5b600061201d88828901611ba7565b955050602061202e88828901611ba7565b945050604086013567ffffffffffffffff81111561204f5761204e611b59565b5b61205b88828901611f10565b935050606086013567ffffffffffffffff81111561207c5761207b611b59565b5b61208888828901611f10565b925050608086013567ffffffffffffffff8111156120a9576120a8611b59565b5b6120b588828901611fc5565b9150509295509295909350565b600067ffffffffffffffff8211156120dd576120dc611dfb565b5b602082029050602081019050919050565b60006121016120fc846120c2565b611e5b565b9050808382526020820190506020840283018581111561212457612123611ea2565b5b835b8181101561214d57806121398882611ba7565b845260208401935050602081019050612126565b5050509392505050565b600082601f83011261216c5761216b611df6565b5b813561217c8482602086016120ee565b91505092915050565b6000806040838503121561219c5761219b611b54565b5b600083013567ffffffffffffffff8111156121ba576121b9611b59565b5b6121c685828601612157565b925050602083013567ffffffffffffffff8111156121e7576121e6611b59565b5b6121f385828601611f10565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61223281611bbc565b82525050565b60006122448383612229565b60208301905092915050565b6000602082019050919050565b6000612268826121fd565b6122728185612208565b935061227d83612219565b8060005b838110156122ae5781516122958882612238565b97506122a083612250565b925050600181019050612281565b5085935050505092915050565b600060208201905081810360008301526122d5818461225d565b905092915050565b600067ffffffffffffffff8211156122f8576122f7611dfb565b5b61230182611d8a565b9050602081019050919050565b600061232161231c846122dd565b611e5b565b90508281526020810184848401111561233d5761233c611f3e565b5b612348848285611f74565b509392505050565b600082601f83011261236557612364611df6565b5b813561237584826020860161230e565b91505092915050565b60006020828403121561239457612393611b54565b5b600082013567ffffffffffffffff8111156123b2576123b1611b59565b5b6123be84828501612350565b91505092915050565b6123d081611b7e565b82525050565b60006020820190506123eb60008301846123c7565b92915050565b6123fa81611ce1565b811461240557600080fd5b50565b600081359050612417816123f1565b92915050565b6000806040838503121561243457612433611b54565b5b600061244285828601611ba7565b925050602061245385828601612408565b9150509250929050565b6000806040838503121561247457612473611b54565b5b600061248285828601611ba7565b925050602061249385828601611ba7565b9150509250929050565b6000602082840312156124b3576124b2611b54565b5b60006124c184828501611ba7565b91505092915050565b600080600080600060a086880312156124e6576124e5611b54565b5b60006124f488828901611ba7565b955050602061250588828901611ba7565b945050604061251688828901611bdd565b935050606061252788828901611bdd565b925050608086013567ffffffffffffffff81111561254857612547611b59565b5b61255488828901611fc5565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806125a857607f821691505b6020821081036125bb576125ba612561565b5b50919050565b60006040820190506125d660008301856123c7565b6125e360208301846123c7565b9392505050565b7f4e6f2045544820617661696c61626c6520666f72207769746864726177616c00600082015250565b6000612620601f83611d4f565b915061262b826125ea565b602082019050919050565b6000602082019050818103600083015261264f81612613565b9050919050565b600081905092915050565b50565b6000612671600083612656565b915061267c82612661565b600082019050919050565b600061269282612664565b9150819050919050565b7f4661696c656420746f2073656e64204554480000000000000000000000000000600082015250565b60006126d2601283611d4f565b91506126dd8261269c565b602082019050919050565b60006020820190508181036000830152612701816126c5565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061274282611bbc565b915061274d83611bbc565b925082820190508082111561276557612764612708565b5b92915050565b600060408201905061278060008301856123c7565b61278d6020830184611c32565b9392505050565b6000815190506127a3816123f1565b92915050565b6000602082840312156127bf576127be611b54565b5b60006127cd84828501612794565b91505092915050565b7f546f6b656e207472616e73666572206661696c65640000000000000000000000600082015250565b600061280c601583611d4f565b9150612817826127d6565b602082019050919050565b6000602082019050818103600083015261283b816127ff565b9050919050565b60006040820190506128576000830185611c32565b6128646020830184611c32565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006128a582611bbc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036128d7576128d6612708565b5b600182019050919050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c0000000000815250565b600081905092915050565b600061291e82611d44565b6129288185612908565b9350612938818560208601611d60565b80840191505092915050565b600061294f826128e2565b601b8201915061295f8284612913565b915081905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026129cc7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261298f565b6129d6868361298f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000612a13612a0e612a0984611bbc565b6129ee565b611bbc565b9050919050565b6000819050919050565b612a2d836129f8565b612a41612a3982612a1a565b84845461299c565b825550505050565b600090565b612a56612a49565b612a61818484612a24565b505050565b5b81811015612a8557612a7a600082612a4e565b600181019050612a67565b5050565b601f821115612aca57612a9b8161296a565b612aa48461297f565b81016020851015612ab3578190505b612ac7612abf8561297f565b830182612a66565b50505b505050565b600082821c905092915050565b6000612aed60001984600802612acf565b1980831691505092915050565b6000612b068383612adc565b9150826002028217905092915050565b612b1f82611d44565b67ffffffffffffffff811115612b3857612b37611dfb565b5b612b428254612590565b612b4d828285612a89565b600060209050601f831160018114612b805760008415612b6e578287015190505b612b788582612afa565b865550612be0565b601f198416612b8e8661296a565b60005b82811015612bb657848901518255600182019150602085019450602081019050612b91565b86831015612bd35784890151612bcf601f891682612adc565b8355505b6001600288020188555050505b505050505050565b6000608082019050612bfd60008301876123c7565b612c0a6020830186611c32565b612c176040830185611c32565b612c246060830184611c32565b95945050505050565b60006040820190508181036000830152612c47818561225d565b90508181036020830152612c5b818461225d565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000612c8b82612c64565b612c958185612c6f565b9350612ca5818560208601611d60565b612cae81611d8a565b840191505092915050565b600060a082019050612cce60008301886123c7565b612cdb60208301876123c7565b612ce86040830186611c32565b612cf56060830185611c32565b8181036080830152612d078184612c80565b90509695505050505050565b600081519050612d2281611c88565b92915050565b600060208284031215612d3e57612d3d611b54565b5b6000612d4c84828501612d13565b91505092915050565b600060a082019050612d6a60008301886123c7565b612d7760208301876123c7565b8181036040830152612d89818661225d565b90508181036060830152612d9d818561225d565b90508181036080830152612db18184612c80565b9050969550505050505056fe7b226e616d65223a20224f626c697175652053747261746567696573206f6e204672616d6573222c226465736372697074696f6e223a224f626c6971756520537472617465676965732069732061206465636b206f66206361726473206372656174656420627920427269616e20456e6f20616e64205065746572205363686d69647420696e20313937352c2064657369676e6564206173206120746f6f6c20746f20696e7370697265206372656174697669747920616e6420656e636f7572616765206c61746572616c207468696e6b696e6720696e20617274697374696320656e646561766f727320616e642070726f626c656d2d736f6c76696e6720736974756174696f6e732e227da2646970667358221220207135b1df99fec7eb982f3ddcec6e1c946a83e0e7ffbadbb444357c0ee44bf264736f6c63430008140033697066733a2f2f62616679626569617a75346c70686c777173696f776e716f6677697963656468356d796d6b79617a6b636f646d70643368776c6d697034766c64652f7b69647d
Deployed Bytecode
0x6080604052600436106100f65760003560e01c8063570b3c6a1161008a578063e985e9c511610059578063e985e9c51461032d578063ea86f87f1461036a578063ed9ec88814610393578063f242432a146103d0576100fd565b8063570b3c6a146102855780638da5cb5b146102ae578063a22cb465146102d9578063e8a3d48514610302576100fd565b80633ccfd60b116100c65780633ccfd60b146101df57806340c10f19146101f6578063412664ae1461021f5780634e1273f414610248576100fd565b8062fdd58e146100ff57806301ffc9a71461013c5780630e89341c146101795780632eb2c2d6146101b6576100fd565b366100fd57005b005b34801561010b57600080fd5b5061012660048036038101906101219190611bf2565b6103f9565b6040516101339190611c41565b60405180910390f35b34801561014857600080fd5b50610163600480360381019061015e9190611cb4565b610453565b6040516101709190611cfc565b60405180910390f35b34801561018557600080fd5b506101a0600480360381019061019b9190611d17565b610535565b6040516101ad9190611dd4565b60405180910390f35b3480156101c257600080fd5b506101dd60048036038101906101d89190611ff3565b6105c9565b005b3480156101eb57600080fd5b506101f4610671565b005b34801561020257600080fd5b5061021d60048036038101906102189190611bf2565b6107f6565b005b34801561022b57600080fd5b5061024660048036038101906102419190611bf2565b61093a565b005b34801561025457600080fd5b5061026f600480360381019061026a9190612185565b610a8e565b60405161027c91906122bb565b60405180910390f35b34801561029157600080fd5b506102ac60048036038101906102a7919061237e565b610b9d565b005b3480156102ba57600080fd5b506102c3610c30565b6040516102d091906123d6565b60405180910390f35b3480156102e557600080fd5b5061030060048036038101906102fb919061241d565b610c56565b005b34801561030e57600080fd5b50610317610c6c565b6040516103249190611dd4565b60405180910390f35b34801561033957600080fd5b50610354600480360381019061034f919061245d565b610cb4565b6040516103619190611cfc565b60405180910390f35b34801561037657600080fd5b50610391600480360381019061038c9190611d17565b610d48565b005b34801561039f57600080fd5b506103ba60048036038101906103b5919061249d565b610dd9565b6040516103c79190611c41565b60405180910390f35b3480156103dc57600080fd5b506103f760048036038101906103f291906124ca565b610df1565b005b600080600083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061051e57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061052e575061052d82610e99565b5b9050919050565b60606002805461054490612590565b80601f016020809104026020016040519081016040528092919081815260200182805461057090612590565b80156105bd5780601f10610592576101008083540402835291602001916105bd565b820191906000526020600020905b8154815290600101906020018083116105a057829003601f168201915b50505050509050919050565b60006105d3610f03565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415801561061857506106168682610cb4565b155b1561065c5780866040517fe237d9220000000000000000000000000000000000000000000000000000000081526004016106539291906125c1565b60405180910390fd5b6106698686868686610f0b565b505050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106f8576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000339050600047905060008111610745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073c90612636565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161076b90612687565b60006040518083038185875af1925050503d80600081146107a8576040519150601f19603f3d011682016040523d82523d6000602084013e6107ad565b606091505b50509050806107f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e8906126e8565b60405180910390fd5b505050565b60658111806108055750600181105b1561083c576040517f7bece0b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004546001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461088b9190612737565b11156108c3576040517f8523b2b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546109139190612737565b925050819055506109368282600160405180602001604052806000815250611003565b5050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c1576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082905060008173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856040518363ffffffff1660e01b8152600401610a0392919061276b565b6020604051808303816000875af1158015610a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4691906127a9565b905080610a88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7f90612822565b60405180910390fd5b50505050565b60608151835114610ada57815183516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401610ad1929190612842565b60405180910390fd5b6000835167ffffffffffffffff811115610af757610af6611dfb565b5b604051908082528060200260200182016040528015610b255781602001602082028036833780820191505090505b50905060005b8451811015610b9257610b62610b4a828761109c90919063ffffffff16565b610b5d83876110b090919063ffffffff16565b6103f9565b828281518110610b7557610b7461286b565b5b60200260200101818152505080610b8b9061289a565b9050610b2b565b508091505092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c24576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c2d816110c4565b50565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610c68610c61610f03565b83836110d7565b5050565b6060600060405180610140016040528061010c8152602001612dbe61010c9139905080604051602001610c9f9190612944565b60405160208183030381529060405291505090565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610dcf576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060048190555050565b60036020528060005260406000206000915090505481565b6000610dfb610f03565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614158015610e405750610e3e8682610cb4565b155b15610e845780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610e7b9291906125c1565b60405180910390fd5b610e918686868686611247565b505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610f7d5760006040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610f7491906123d6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603610fef5760006040517f01a83514000000000000000000000000000000000000000000000000000000008152600401610fe691906123d6565b60405180910390fd5b610ffc8585858585611352565b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036110755760006040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161106c91906123d6565b60405180910390fd5b6000806110828585611404565b91509150611094600087848487611352565b505050505050565b600060208202602084010151905092915050565b600060208202602084010151905092915050565b80600290816110d39190612b16565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036111495760006040517fced3e10000000000000000000000000000000000000000000000000000000000815260040161114091906123d6565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161123a9190611cfc565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036112b95760006040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016112b091906123d6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361132b5760006040517f01a8351400000000000000000000000000000000000000000000000000000000815260040161132291906123d6565b60405180910390fd5b6000806113388585611404565b915091506113498787848487611352565b50505050505050565b61135e85858585611434565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146113fd57600061139c610f03565b905060018451036113ec5760006113bd6000866110b090919063ffffffff16565b905060006113d56000866110b090919063ffffffff16565b90506113e58389898585896117e2565b50506113fb565b6113fa818787878787611996565b5b505b5050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b805182511461147e57815181516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401611475929190612842565b60405180910390fd5b6000611488610f03565b905060005b835181101561169d5760006114ab82866110b090919063ffffffff16565b905060006114c283866110b090919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146115ef57600080600084815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561159757888183856040517f03dee4c500000000000000000000000000000000000000000000000000000000815260040161158e9493929190612be8565b60405180910390fd5b81810360008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161461168a578060008084815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546116829190612737565b925050819055505b5050806116969061289a565b905061148d565b50600183510361175c5760006116bd6000856110b090919063ffffffff16565b905060006116d56000856110b090919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62858560405161174d929190612842565b60405180910390a450506117db565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516117d2929190612c2d565b60405180910390a45b5050505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b111561198e578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611843959493929190612cb9565b6020604051808303816000875af192505050801561187f57506040513d601f19601f8201168201806040525081019061187c9190612d28565b60015b611903573d80600081146118af576040519150601f19603f3d011682016040523d82523d6000602084013e6118b4565b606091505b5060008151036118fb57846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016118f291906123d6565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461198c57846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161198391906123d6565b60405180910390fd5b505b505050505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b1115611b42578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016119f7959493929190612d55565b6020604051808303816000875af1925050508015611a3357506040513d601f19601f82011682018060405250810190611a309190612d28565b60015b611ab7573d8060008114611a63576040519150601f19603f3d011682016040523d82523d6000602084013e611a68565b606091505b506000815103611aaf57846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611aa691906123d6565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611b4057846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611b3791906123d6565b60405180910390fd5b505b505050505050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611b8982611b5e565b9050919050565b611b9981611b7e565b8114611ba457600080fd5b50565b600081359050611bb681611b90565b92915050565b6000819050919050565b611bcf81611bbc565b8114611bda57600080fd5b50565b600081359050611bec81611bc6565b92915050565b60008060408385031215611c0957611c08611b54565b5b6000611c1785828601611ba7565b9250506020611c2885828601611bdd565b9150509250929050565b611c3b81611bbc565b82525050565b6000602082019050611c566000830184611c32565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611c9181611c5c565b8114611c9c57600080fd5b50565b600081359050611cae81611c88565b92915050565b600060208284031215611cca57611cc9611b54565b5b6000611cd884828501611c9f565b91505092915050565b60008115159050919050565b611cf681611ce1565b82525050565b6000602082019050611d116000830184611ced565b92915050565b600060208284031215611d2d57611d2c611b54565b5b6000611d3b84828501611bdd565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611d7e578082015181840152602081019050611d63565b60008484015250505050565b6000601f19601f8301169050919050565b6000611da682611d44565b611db08185611d4f565b9350611dc0818560208601611d60565b611dc981611d8a565b840191505092915050565b60006020820190508181036000830152611dee8184611d9b565b905092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611e3382611d8a565b810181811067ffffffffffffffff82111715611e5257611e51611dfb565b5b80604052505050565b6000611e65611b4a565b9050611e718282611e2a565b919050565b600067ffffffffffffffff821115611e9157611e90611dfb565b5b602082029050602081019050919050565b600080fd5b6000611eba611eb584611e76565b611e5b565b90508083825260208201905060208402830185811115611edd57611edc611ea2565b5b835b81811015611f065780611ef28882611bdd565b845260208401935050602081019050611edf565b5050509392505050565b600082601f830112611f2557611f24611df6565b5b8135611f35848260208601611ea7565b91505092915050565b600080fd5b600067ffffffffffffffff821115611f5e57611f5d611dfb565b5b611f6782611d8a565b9050602081019050919050565b82818337600083830152505050565b6000611f96611f9184611f43565b611e5b565b905082815260208101848484011115611fb257611fb1611f3e565b5b611fbd848285611f74565b509392505050565b600082601f830112611fda57611fd9611df6565b5b8135611fea848260208601611f83565b91505092915050565b600080600080600060a0868803121561200f5761200e611b54565b5b600061201d88828901611ba7565b955050602061202e88828901611ba7565b945050604086013567ffffffffffffffff81111561204f5761204e611b59565b5b61205b88828901611f10565b935050606086013567ffffffffffffffff81111561207c5761207b611b59565b5b61208888828901611f10565b925050608086013567ffffffffffffffff8111156120a9576120a8611b59565b5b6120b588828901611fc5565b9150509295509295909350565b600067ffffffffffffffff8211156120dd576120dc611dfb565b5b602082029050602081019050919050565b60006121016120fc846120c2565b611e5b565b9050808382526020820190506020840283018581111561212457612123611ea2565b5b835b8181101561214d57806121398882611ba7565b845260208401935050602081019050612126565b5050509392505050565b600082601f83011261216c5761216b611df6565b5b813561217c8482602086016120ee565b91505092915050565b6000806040838503121561219c5761219b611b54565b5b600083013567ffffffffffffffff8111156121ba576121b9611b59565b5b6121c685828601612157565b925050602083013567ffffffffffffffff8111156121e7576121e6611b59565b5b6121f385828601611f10565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61223281611bbc565b82525050565b60006122448383612229565b60208301905092915050565b6000602082019050919050565b6000612268826121fd565b6122728185612208565b935061227d83612219565b8060005b838110156122ae5781516122958882612238565b97506122a083612250565b925050600181019050612281565b5085935050505092915050565b600060208201905081810360008301526122d5818461225d565b905092915050565b600067ffffffffffffffff8211156122f8576122f7611dfb565b5b61230182611d8a565b9050602081019050919050565b600061232161231c846122dd565b611e5b565b90508281526020810184848401111561233d5761233c611f3e565b5b612348848285611f74565b509392505050565b600082601f83011261236557612364611df6565b5b813561237584826020860161230e565b91505092915050565b60006020828403121561239457612393611b54565b5b600082013567ffffffffffffffff8111156123b2576123b1611b59565b5b6123be84828501612350565b91505092915050565b6123d081611b7e565b82525050565b60006020820190506123eb60008301846123c7565b92915050565b6123fa81611ce1565b811461240557600080fd5b50565b600081359050612417816123f1565b92915050565b6000806040838503121561243457612433611b54565b5b600061244285828601611ba7565b925050602061245385828601612408565b9150509250929050565b6000806040838503121561247457612473611b54565b5b600061248285828601611ba7565b925050602061249385828601611ba7565b9150509250929050565b6000602082840312156124b3576124b2611b54565b5b60006124c184828501611ba7565b91505092915050565b600080600080600060a086880312156124e6576124e5611b54565b5b60006124f488828901611ba7565b955050602061250588828901611ba7565b945050604061251688828901611bdd565b935050606061252788828901611bdd565b925050608086013567ffffffffffffffff81111561254857612547611b59565b5b61255488828901611fc5565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806125a857607f821691505b6020821081036125bb576125ba612561565b5b50919050565b60006040820190506125d660008301856123c7565b6125e360208301846123c7565b9392505050565b7f4e6f2045544820617661696c61626c6520666f72207769746864726177616c00600082015250565b6000612620601f83611d4f565b915061262b826125ea565b602082019050919050565b6000602082019050818103600083015261264f81612613565b9050919050565b600081905092915050565b50565b6000612671600083612656565b915061267c82612661565b600082019050919050565b600061269282612664565b9150819050919050565b7f4661696c656420746f2073656e64204554480000000000000000000000000000600082015250565b60006126d2601283611d4f565b91506126dd8261269c565b602082019050919050565b60006020820190508181036000830152612701816126c5565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061274282611bbc565b915061274d83611bbc565b925082820190508082111561276557612764612708565b5b92915050565b600060408201905061278060008301856123c7565b61278d6020830184611c32565b9392505050565b6000815190506127a3816123f1565b92915050565b6000602082840312156127bf576127be611b54565b5b60006127cd84828501612794565b91505092915050565b7f546f6b656e207472616e73666572206661696c65640000000000000000000000600082015250565b600061280c601583611d4f565b9150612817826127d6565b602082019050919050565b6000602082019050818103600083015261283b816127ff565b9050919050565b60006040820190506128576000830185611c32565b6128646020830184611c32565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006128a582611bbc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036128d7576128d6612708565b5b600182019050919050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c0000000000815250565b600081905092915050565b600061291e82611d44565b6129288185612908565b9350612938818560208601611d60565b80840191505092915050565b600061294f826128e2565b601b8201915061295f8284612913565b915081905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026129cc7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261298f565b6129d6868361298f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000612a13612a0e612a0984611bbc565b6129ee565b611bbc565b9050919050565b6000819050919050565b612a2d836129f8565b612a41612a3982612a1a565b84845461299c565b825550505050565b600090565b612a56612a49565b612a61818484612a24565b505050565b5b81811015612a8557612a7a600082612a4e565b600181019050612a67565b5050565b601f821115612aca57612a9b8161296a565b612aa48461297f565b81016020851015612ab3578190505b612ac7612abf8561297f565b830182612a66565b50505b505050565b600082821c905092915050565b6000612aed60001984600802612acf565b1980831691505092915050565b6000612b068383612adc565b9150826002028217905092915050565b612b1f82611d44565b67ffffffffffffffff811115612b3857612b37611dfb565b5b612b428254612590565b612b4d828285612a89565b600060209050601f831160018114612b805760008415612b6e578287015190505b612b788582612afa565b865550612be0565b601f198416612b8e8661296a565b60005b82811015612bb657848901518255600182019150602085019450602081019050612b91565b86831015612bd35784890151612bcf601f891682612adc565b8355505b6001600288020188555050505b505050505050565b6000608082019050612bfd60008301876123c7565b612c0a6020830186611c32565b612c176040830185611c32565b612c246060830184611c32565b95945050505050565b60006040820190508181036000830152612c47818561225d565b90508181036020830152612c5b818461225d565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000612c8b82612c64565b612c958185612c6f565b9350612ca5818560208601611d60565b612cae81611d8a565b840191505092915050565b600060a082019050612cce60008301886123c7565b612cdb60208301876123c7565b612ce86040830186611c32565b612cf56060830185611c32565b8181036080830152612d078184612c80565b90509695505050505050565b600081519050612d2281611c88565b92915050565b600060208284031215612d3e57612d3d611b54565b5b6000612d4c84828501612d13565b91505092915050565b600060a082019050612d6a60008301886123c7565b612d7760208301876123c7565b8181036040830152612d89818661225d565b90508181036060830152612d9d818561225d565b90508181036080830152612db18184612c80565b9050969550505050505056fe7b226e616d65223a20224f626c697175652053747261746567696573206f6e204672616d6573222c226465736372697074696f6e223a224f626c6971756520537472617465676965732069732061206465636b206f66206361726473206372656174656420627920427269616e20456e6f20616e64205065746572205363686d69647420696e20313937352c2064657369676e6564206173206120746f6f6c20746f20696e7370697265206372656174697669747920616e6420656e636f7572616765206c61746572616c207468696e6b696e6720696e20617274697374696320656e646561766f727320616e642070726f626c656d2d736f6c76696e6720736974756174696f6e732e227da2646970667358221220207135b1df99fec7eb982f3ddcec6e1c946a83e0e7ffbadbb444357c0ee44bf264736f6c63430008140033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.