Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 4 from a total of 4 transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Truculenter
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract Truculenter is ERC1155, Ownable {
string private _baseURI; // Declare this in Truculenter contract.
uint256 public constant Dragopavogle = 1355;
uint256 public constant Wharkphoxpus = 9970;
uint256 public constant Raphorbatankylos = 5088;
uint256 public constant Scortigionlture = 2260;
constructor() ERC1155("https://ipfs.io/ipfs/QmYxj74QCaexmskMUGeGUnJuYdAznBfQmmM15QgRNAaeob/{id}.json") Ownable(msg.sender) {
_baseURI = "https://ipfs.io/ipfs/QmYxj74QCaexmskMUGeGUnJuYdAznBfQmmM15QgRNAaeob/{id}.json"; // Initialize _baseURI here.
_mint(msg.sender, Dragopavogle, 98200, "");
_mint(msg.sender, Wharkphoxpus, 92400, "");
_mint(msg.sender, Raphorbatankylos, 87100, "");
_mint(msg.sender, Scortigionlture, 81600, "");
}
function uri(uint256 tokenId) public view override returns (string memory) {
return string(abi.encodePacked(_baseURI, Strings.toString(tokenId)));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)
pragma solidity ^0.8.20;
import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant HEX_DIGITS = "0123456789abcdef";
uint8 private constant ADDRESS_LENGTH = 20;
/**
* @dev The `value` string doesn't fit in the specified `length`.
*/
error StringsInsufficientHexLength(uint256 value, uint256 length);
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toStringSigned(int256 value) internal pure returns (string memory) {
return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
uint256 localValue = value;
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = HEX_DIGITS[localValue & 0xf];
localValue >>= 4;
}
if (localValue != 0) {
revert StringsInsufficientHexLength(value, length);
}
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
* representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol)
pragma solidity ^0.8.20;
import {IERC1155} from "./IERC1155.sol";
import {IERC1155Receiver} from "./IERC1155Receiver.sol";
import {IERC1155MetadataURI} from "./extensions/IERC1155MetadataURI.sol";
import {Context} from "../../utils/Context.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";
import {Arrays} from "../../utils/Arrays.sol";
import {IERC1155Errors} from "../../interfaces/draft-IERC6093.sol";
/**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*/
abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors {
using Arrays for uint256[];
using Arrays for address[];
mapping(uint256 id => mapping(address account => uint256)) private _balances;
mapping(address account => mapping(address operator => bool)) private _operatorApprovals;
// Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
string private _uri;
/**
* @dev See {_setURI}.
*/
constructor(string memory uri_) {
_setURI(uri_);
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC1155).interfaceId ||
interfaceId == type(IERC1155MetadataURI).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC1155MetadataURI-uri}.
*
* This implementation returns the same URI for *all* token types. It relies
* on the token type ID substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* Clients calling this function must replace the `\{id\}` substring with the
* actual token type ID.
*/
function uri(uint256 /* id */) public view virtual returns (string memory) {
return _uri;
}
/**
* @dev See {IERC1155-balanceOf}.
*/
function balanceOf(address account, uint256 id) public view virtual returns (uint256) {
return _balances[id][account];
}
/**
* @dev See {IERC1155-balanceOfBatch}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(
address[] memory accounts,
uint256[] memory ids
) public view virtual returns (uint256[] memory) {
if (accounts.length != ids.length) {
revert ERC1155InvalidArrayLength(ids.length, accounts.length);
}
uint256[] memory batchBalances = new uint256[](accounts.length);
for (uint256 i = 0; i < accounts.length; ++i) {
batchBalances[i] = balanceOf(accounts.unsafeMemoryAccess(i), ids.unsafeMemoryAccess(i));
}
return batchBalances;
}
/**
* @dev See {IERC1155-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC1155-isApprovedForAll}.
*/
function isApprovedForAll(address account, address operator) public view virtual returns (bool) {
return _operatorApprovals[account][operator];
}
/**
* @dev See {IERC1155-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual {
address sender = _msgSender();
if (from != sender && !isApprovedForAll(from, sender)) {
revert ERC1155MissingApprovalForAll(sender, from);
}
_safeTransferFrom(from, to, id, value, data);
}
/**
* @dev See {IERC1155-safeBatchTransferFrom}.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) public virtual {
address sender = _msgSender();
if (from != sender && !isApprovedForAll(from, sender)) {
revert ERC1155MissingApprovalForAll(sender, from);
}
_safeBatchTransferFrom(from, to, ids, values, data);
}
/**
* @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from`
* (or `to`) is the zero address.
*
* Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received}
* or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value.
* - `ids` and `values` must have the same length.
*
* NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead.
*/
function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual {
if (ids.length != values.length) {
revert ERC1155InvalidArrayLength(ids.length, values.length);
}
address operator = _msgSender();
for (uint256 i = 0; i < ids.length; ++i) {
uint256 id = ids.unsafeMemoryAccess(i);
uint256 value = values.unsafeMemoryAccess(i);
if (from != address(0)) {
uint256 fromBalance = _balances[id][from];
if (fromBalance < value) {
revert ERC1155InsufficientBalance(from, fromBalance, value, id);
}
unchecked {
// Overflow not possible: value <= fromBalance
_balances[id][from] = fromBalance - value;
}
}
if (to != address(0)) {
_balances[id][to] += value;
}
}
if (ids.length == 1) {
uint256 id = ids.unsafeMemoryAccess(0);
uint256 value = values.unsafeMemoryAccess(0);
emit TransferSingle(operator, from, to, id, value);
} else {
emit TransferBatch(operator, from, to, ids, values);
}
}
/**
* @dev Version of {_update} that performs the token acceptance check by calling
* {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it
* contains code (eg. is a smart contract at the moment of execution).
*
* IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any
* update to the contract state after this function would break the check-effect-interaction pattern. Consider
* overriding {_update} instead.
*/
function _updateWithAcceptanceCheck(
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) internal virtual {
_update(from, to, ids, values);
if (to != address(0)) {
address operator = _msgSender();
if (ids.length == 1) {
uint256 id = ids.unsafeMemoryAccess(0);
uint256 value = values.unsafeMemoryAccess(0);
_doSafeTransferAcceptanceCheck(operator, from, to, id, value, data);
} else {
_doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, values, data);
}
}
}
/**
* @dev Transfers a `value` tokens of token type `id` from `from` to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `from` must have a balance of tokens of type `id` of at least `value` amount.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function _safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) internal {
if (to == address(0)) {
revert ERC1155InvalidReceiver(address(0));
}
if (from == address(0)) {
revert ERC1155InvalidSender(address(0));
}
(uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
_updateWithAcceptanceCheck(from, to, ids, values, data);
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
* - `ids` and `values` must have the same length.
*/
function _safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) internal {
if (to == address(0)) {
revert ERC1155InvalidReceiver(address(0));
}
if (from == address(0)) {
revert ERC1155InvalidSender(address(0));
}
_updateWithAcceptanceCheck(from, to, ids, values, data);
}
/**
* @dev Sets a new URI for all token types, by relying on the token type ID
* substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* By this mechanism, any occurrence of the `\{id\}` substring in either the
* URI or any of the values in the JSON file at said URI will be replaced by
* clients with the token type ID.
*
* For example, the `https://token-cdn-domain/\{id\}.json` URI would be
* interpreted by clients as
* `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
* for token type ID 0x4cce0.
*
* See {uri}.
*
* Because these URIs cannot be meaningfully represented by the {URI} event,
* this function emits no events.
*/
function _setURI(string memory newuri) internal virtual {
_uri = newuri;
}
/**
* @dev Creates a `value` amount of tokens of type `id`, and assigns them to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function _mint(address to, uint256 id, uint256 value, bytes memory data) internal {
if (to == address(0)) {
revert ERC1155InvalidReceiver(address(0));
}
(uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
_updateWithAcceptanceCheck(address(0), to, ids, values, data);
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - `ids` and `values` must have the same length.
* - `to` cannot be the zero address.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function _mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) internal {
if (to == address(0)) {
revert ERC1155InvalidReceiver(address(0));
}
_updateWithAcceptanceCheck(address(0), to, ids, values, data);
}
/**
* @dev Destroys a `value` amount of tokens of type `id` from `from`
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `from` must have at least `value` amount of tokens of type `id`.
*/
function _burn(address from, uint256 id, uint256 value) internal {
if (from == address(0)) {
revert ERC1155InvalidSender(address(0));
}
(uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
_updateWithAcceptanceCheck(from, address(0), ids, values, "");
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `from` must have at least `value` amount of tokens of type `id`.
* - `ids` and `values` must have the same length.
*/
function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal {
if (from == address(0)) {
revert ERC1155InvalidSender(address(0));
}
_updateWithAcceptanceCheck(from, address(0), ids, values, "");
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - `operator` cannot be the zero address.
*/
function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
if (operator == address(0)) {
revert ERC1155InvalidOperator(address(0));
}
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Performs an acceptance check by calling {IERC1155-onERC1155Received} on the `to` address
* if it contains code at the moment of execution.
*/
function _doSafeTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256 id,
uint256 value,
bytes memory data
) private {
if (to.code.length > 0) {
try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) {
if (response != IERC1155Receiver.onERC1155Received.selector) {
// Tokens rejected
revert ERC1155InvalidReceiver(to);
}
} catch (bytes memory reason) {
if (reason.length == 0) {
// non-ERC1155Receiver implementer
revert ERC1155InvalidReceiver(to);
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
}
/**
* @dev Performs a batch acceptance check by calling {IERC1155-onERC1155BatchReceived} on the `to` address
* if it contains code at the moment of execution.
*/
function _doSafeBatchTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) private {
if (to.code.length > 0) {
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns (
bytes4 response
) {
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
// Tokens rejected
revert ERC1155InvalidReceiver(to);
}
} catch (bytes memory reason) {
if (reason.length == 0) {
// non-ERC1155Receiver implementer
revert ERC1155InvalidReceiver(to);
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
}
/**
* @dev Creates an array in memory with only one value for each of the elements provided.
*/
function _asSingletonArrays(
uint256 element1,
uint256 element2
) private pure returns (uint256[] memory array1, uint256[] memory array2) {
/// @solidity memory-safe-assembly
assembly {
// Load the free memory pointer
array1 := mload(0x40)
// Set array length to 1
mstore(array1, 1)
// Store the single element at the next word after the length (where content starts)
mstore(add(array1, 0x20), element1)
// Repeat for next array locating it right after the first array
array2 := add(array1, 0x40)
mstore(array2, 1)
mstore(add(array2, 0x20), element2)
// Update the free memory pointer by pointing after the second array
mstore(0x40, add(array2, 0x40))
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Muldiv operation overflow.
*/
error MathOverflowedMulDiv();
enum Rounding {
Floor, // Toward negative infinity
Ceil, // Toward positive infinity
Trunc, // Toward zero
Expand // Away from zero
}
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds towards infinity instead
* of rounding towards zero.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
// Guarantee the same behavior as in a regular Solidity division.
return a / b;
}
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
* Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0 = x * y; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
if (denominator <= prod1) {
revert MathOverflowedMulDiv();
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator.
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363.
uint256 twos = denominator & (0 - denominator);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
// works in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard ERC20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Arrays.sol)
pragma solidity ^0.8.20;
import {StorageSlot} from "./StorageSlot.sol";
import {Math} from "./math/Math.sol";
/**
* @dev Collection of functions related to array types.
*/
library Arrays {
using StorageSlot for bytes32;
/**
* @dev Searches a sorted `array` and returns the first index that contains
* a value greater or equal to `element`. If no such index exists (i.e. all
* values in the array are strictly less than `element`), the array length is
* returned. Time complexity O(log n).
*
* `array` is expected to be sorted in ascending order, and to contain no
* repeated elements.
*/
function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {
uint256 low = 0;
uint256 high = array.length;
if (high == 0) {
return 0;
}
while (low < high) {
uint256 mid = Math.average(low, high);
// Note that mid will always be strictly less than high (i.e. it will be a valid array index)
// because Math.average rounds towards zero (it does integer division with truncation).
if (unsafeAccess(array, mid).value > element) {
high = mid;
} else {
low = mid + 1;
}
}
// At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.
if (low > 0 && unsafeAccess(array, low - 1).value == element) {
return low - 1;
} else {
return low;
}
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) {
bytes32 slot;
// We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
// following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.
/// @solidity memory-safe-assembly
assembly {
mstore(0, arr.slot)
slot := add(keccak256(0, 0x20), pos)
}
return slot.getAddressSlot();
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) {
bytes32 slot;
// We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
// following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.
/// @solidity memory-safe-assembly
assembly {
mstore(0, arr.slot)
slot := add(keccak256(0, 0x20), pos)
}
return slot.getBytes32Slot();
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) {
bytes32 slot;
// We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
// following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.
/// @solidity memory-safe-assembly
assembly {
mstore(0, arr.slot)
slot := add(keccak256(0, 0x20), pos)
}
return slot.getUint256Slot();
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) {
assembly {
res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
}
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) {
assembly {
res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol)
pragma solidity ^0.8.20;
import {IERC1155} from "../IERC1155.sol";
/**
* @dev Interface of the optional ERC1155MetadataExtension interface, as defined
* in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
*/
interface IERC1155MetadataURI is IERC1155 {
/**
* @dev Returns the URI for token type `id`.
*
* If the `\{id\}` substring is present in the URI, it must be replaced by
* clients with the actual token type ID.
*/
function uri(uint256 id) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../../utils/introspection/IERC165.sol";
/**
* @dev Interface that must be implemented by smart contracts in order to receive
* ERC-1155 token transfers.
*/
interface IERC1155Receiver is IERC165 {
/**
* @dev Handles the receipt of a single ERC1155 token type. This function is
* called at the end of a `safeTransferFrom` after the balance has been updated.
*
* NOTE: To accept the transfer, this must return
* `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
* (i.e. 0xf23a6e61, or its own function selector).
*
* @param operator The address which initiated the transfer (i.e. msg.sender)
* @param from The address which previously owned the token
* @param id The ID of the token being transferred
* @param value The amount of tokens being transferred
* @param data Additional data with no specified format
* @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
*/
function onERC1155Received(
address operator,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external returns (bytes4);
/**
* @dev Handles the receipt of a multiple ERC1155 token types. This function
* is called at the end of a `safeBatchTransferFrom` after the balances have
* been updated.
*
* NOTE: To accept the transfer(s), this must return
* `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
* (i.e. 0xbc197c81, or its own function selector).
*
* @param operator The address which initiated the batch transfer (i.e. msg.sender)
* @param from The address which previously owned the token
* @param ids An array containing ids of each token being transferred (order and length must match values array)
* @param values An array containing amounts of each token being transferred (order and length must match ids array)
* @param data Additional data with no specified format
* @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
*/
function onERC1155BatchReceived(
address operator,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC1155 compliant contract, as defined in the
* https://eips.ethereum.org/EIPS/eip-1155[EIP].
*/
interface IERC1155 is IERC165 {
/**
* @dev Emitted when `value` amount of tokens of type `id` are transferred from `from` to `to` by `operator`.
*/
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
/**
* @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
* transfers.
*/
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
/**
* @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
* `approved`.
*/
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
/**
* @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
*
* If an {URI} event was emitted for `id`, the standard
* https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
* returned by {IERC1155MetadataURI-uri}.
*/
event URI(string value, uint256 indexed id);
/**
* @dev Returns the value of tokens of token type `id` owned by `account`.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function balanceOf(address account, uint256 id) external view returns (uint256);
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(
address[] calldata accounts,
uint256[] calldata ids
) external view returns (uint256[] memory);
/**
* @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - `operator` cannot be the caller.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address account, address operator) external view returns (bool);
/**
* @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`.
*
* WARNING: This function can potentially allow a reentrancy attack when transferring tokens
* to an untrusted contract, when invoking {onERC1155Received} on the receiver.
* Ensure to follow the checks-effects-interactions pattern and consider employing
* reentrancy guards when interacting with untrusted contracts.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
* - `from` must have a balance of tokens of type `id` of at least `value` amount.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external;
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
*
* WARNING: This function can potentially allow a reentrancy attack when transferring tokens
* to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver.
* Ensure to follow the checks-effects-interactions pattern and consider employing
* reentrancy guards when interacting with untrusted contracts.
*
* Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments.
*
* Requirements:
*
* - `ids` and `values` must have the same length.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (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/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"Dragopavogle","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Raphorbatankylos","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Scortigionlture","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Wharkphoxpus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801562000010575f80fd5b50336040518060800160405280604d815260200162003821604d91396200003d816200019060201b60201c565b505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000b1575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000a8919062000ba6565b60405180910390fd5b620000c281620001a560201b60201c565b506040518060800160405280604d815260200162003821604d913960049081620000ed919062000e25565b50620001153361054b62017f9860405180602001604052805f8152506200026860201b60201c565b6200013c336126f2620168f060405180602001604052805f8152506200026860201b60201c565b62000163336113e06201543c60405180602001604052805f8152506200026860201b60201c565b6200018a336108d462013ec060405180602001604052805f8152506200026860201b60201c565b62001337565b8060029081620001a1919062000e25565b5050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603620002db575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401620002d2919062000ba6565b60405180910390fd5b5f80620002ef85856200031060201b60201c565b91509150620003085f878484876200034060201b60201c565b505050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b62000354858585856200041360201b60201c565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146200040c575f62000399620007cd60201b60201c565b90506001845103620003f3575f620003bb5f86620007d460201b90919060201c565b90505f620003d35f86620007d460201b90919060201c565b9050620003eb838989858589620007e760201b60201c565b50506200040a565b62000409818787878787620009a560201b60201c565b5b505b5050505050565b80518251146200046057815181516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016200045792919062000f1a565b60405180910390fd5b5f62000471620007cd60201b60201c565b90505f5b835181101562000682575f620004958286620007d460201b90919060201c565b90505f620004ad8386620007d460201b90919060201c565b90505f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614620005d4575f805f8481526020019081526020015f205f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156200058057888183856040517f03dee4c500000000000000000000000000000000000000000000000000000000815260040162000577949392919062000f45565b60405180910390fd5b8181035f808581526020019081526020015f205f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16146200066c57805f808481526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825462000664919062000fbd565b925050819055505b5050806200067a9062000ff7565b905062000475565b50600183510362000745575f620006a35f85620007d460201b90919060201c565b90505f620006bb5f85620007d460201b90919060201c565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6285856040516200073592919062000f1a565b60405180910390a45050620007c6565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051620007bd9291906200110a565b60405180910390a45b5050505050565b5f33905090565b5f60208202602084010151905092915050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b11156200099d578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b81526004016200084a959493929190620011d7565b6020604051808303815f875af19250505080156200088857506040513d601f19601f8201168201806040525081019062000885919062001297565b60015b6200090f573d805f8114620008b9576040519150601f19603f3d011682016040523d82523d5f602084013e620008be565b606091505b505f8151036200090757846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401620008fe919062000ba6565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146200099b57846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040162000992919062000ba6565b60405180910390fd5b505b505050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b111562000b5b578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b815260040162000a08959493929190620012c7565b6020604051808303815f875af192505050801562000a4657506040513d601f19601f8201168201806040525081019062000a43919062001297565b60015b62000acd573d805f811462000a77576040519150601f19603f3d011682016040523d82523d5f602084013e62000a7c565b606091505b505f81510362000ac557846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040162000abc919062000ba6565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161462000b5957846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040162000b50919062000ba6565b60405180910390fd5b505b505050505050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000b8e8262000b63565b9050919050565b62000ba08162000b82565b82525050565b5f60208201905062000bbb5f83018462000b95565b92915050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168062000c3d57607f821691505b60208210810362000c535762000c5262000bf8565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830262000cb77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000c7a565b62000cc3868362000c7a565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f62000d0d62000d0762000d018462000cdb565b62000ce4565b62000cdb565b9050919050565b5f819050919050565b62000d288362000ced565b62000d4062000d378262000d14565b84845462000c86565b825550505050565b5f90565b62000d5662000d48565b62000d6381848462000d1d565b505050565b5b8181101562000d8a5762000d7e5f8262000d4c565b60018101905062000d69565b5050565b601f82111562000dd95762000da38162000c59565b62000dae8462000c6b565b8101602085101562000dbe578190505b62000dd662000dcd8562000c6b565b83018262000d68565b50505b505050565b5f82821c905092915050565b5f62000dfb5f198460080262000dde565b1980831691505092915050565b5f62000e15838362000dea565b9150826002028217905092915050565b62000e308262000bc1565b67ffffffffffffffff81111562000e4c5762000e4b62000bcb565b5b62000e58825462000c25565b62000e6582828562000d8e565b5f60209050601f83116001811462000e9b575f841562000e86578287015190505b62000e92858262000e08565b86555062000f01565b601f19841662000eab8662000c59565b5f5b8281101562000ed45784890151825560018201915060208501945060208101905062000ead565b8683101562000ef4578489015162000ef0601f89168262000dea565b8355505b6001600288020188555050505b505050505050565b62000f148162000cdb565b82525050565b5f60408201905062000f2f5f83018562000f09565b62000f3e602083018462000f09565b9392505050565b5f60808201905062000f5a5f83018762000b95565b62000f69602083018662000f09565b62000f78604083018562000f09565b62000f87606083018462000f09565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f62000fc98262000cdb565b915062000fd68362000cdb565b925082820190508082111562000ff15762000ff062000f90565b5b92915050565b5f620010038262000cdb565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362001038576200103762000f90565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b620010778162000cdb565b82525050565b5f6200108a83836200106c565b60208301905092915050565b5f602082019050919050565b5f620010ae8262001043565b620010ba81856200104d565b9350620010c7836200105d565b805f5b83811015620010fd578151620010e188826200107d565b9750620010ee8362001096565b925050600181019050620010ca565b5085935050505092915050565b5f6040820190508181035f830152620011248185620010a2565b905081810360208301526200113a8184620010a2565b90509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156200117c5780820151818401526020810190506200115f565b5f8484015250505050565b5f601f19601f8301169050919050565b5f620011a38262001143565b620011af81856200114d565b9350620011c18185602086016200115d565b620011cc8162001187565b840191505092915050565b5f60a082019050620011ec5f83018862000b95565b620011fb602083018762000b95565b6200120a604083018662000f09565b62001219606083018562000f09565b81810360808301526200122d818462001197565b90509695505050505050565b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b62001273816200123d565b81146200127e575f80fd5b50565b5f81519050620012918162001268565b92915050565b5f60208284031215620012af57620012ae62001239565b5b5f620012be8482850162001281565b91505092915050565b5f60a082019050620012dc5f83018862000b95565b620012eb602083018762000b95565b8181036040830152620012ff8186620010a2565b90508181036060830152620013158185620010a2565b905081810360808301526200132b818462001197565b90509695505050505050565b6124dc80620013455f395ff3fe608060405234801561000f575f80fd5b50600436106100f2575f3560e01c80635546649b11610095578063a22cb46511610064578063a22cb46514610272578063e985e9c51461028e578063f242432a146102be578063f2fde38b146102da576100f2565b80635546649b1461020e57806358bf5e9c1461022c578063715018a61461024a5780638da5cb5b14610254576100f2565b80630e89341c116100d15780630e89341c1461017457806326c2fed4146101a45780632eb2c2d6146101c25780634e1273f4146101de576100f2565b8062fdd58e146100f657806301ffc9a714610126578063093ec34814610156575b5f80fd5b610110600480360381019061010b9190611802565b6102f6565b60405161011d919061184f565b60405180910390f35b610140600480360381019061013b91906118bd565b61034b565b60405161014d9190611902565b60405180910390f35b61015e61042c565b60405161016b919061184f565b60405180910390f35b61018e6004803603810190610189919061191b565b610432565b60405161019b91906119d0565b60405180910390f35b6101ac610466565b6040516101b9919061184f565b60405180910390f35b6101dc60048036038101906101d79190611be0565b61046c565b005b6101f860048036038101906101f39190611d6b565b610513565b6040516102059190611e98565b60405180910390f35b610216610620565b604051610223919061184f565b60405180910390f35b610234610626565b604051610241919061184f565b60405180910390f35b61025261062c565b005b61025c61063f565b6040516102699190611ec7565b60405180910390f35b61028c60048036038101906102879190611f0a565b610667565b005b6102a860048036038101906102a39190611f48565b61067d565b6040516102b59190611902565b60405180910390f35b6102d860048036038101906102d39190611f86565b61070b565b005b6102f460048036038101906102ef9190612019565b6107b2565b005b5f805f8381526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b5f7fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061041557507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610425575061042482610836565b5b9050919050565b6126f281565b6060600461043f8361089f565b60405160200161045092919061216d565b6040516020818303038152906040529050919050565b61054b81565b5f610475610969565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156104ba57506104b8868261067d565b155b156104fe5780866040517fe237d9220000000000000000000000000000000000000000000000000000000081526004016104f5929190612190565b60405180910390fd5b61050b8686868686610970565b505050505050565b6060815183511461055f57815183516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016105569291906121b7565b60405180910390fd5b5f835167ffffffffffffffff81111561057b5761057a6119f4565b5b6040519080825280602002602001820160405280156105a95781602001602082028036833780820191505090505b5090505f5b8451811015610615576105e56105cd8287610a6490919063ffffffff16565b6105e08387610a7790919063ffffffff16565b6102f6565b8282815181106105f8576105f76121de565b5b6020026020010181815250508061060e90612238565b90506105ae565b508091505092915050565b6108d481565b6113e081565b610634610a8a565b61063d5f610b11565b565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610679610672610969565b8383610bd4565b5050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f610714610969565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156107595750610757868261067d565b155b1561079d5780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610794929190612190565b60405180910390fd5b6107aa8686868686610d3d565b505050505050565b6107ba610a8a565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361082a575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016108219190611ec7565b60405180910390fd5b61083381610b11565b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60605f60016108ad84610e43565b0190505f8167ffffffffffffffff8111156108cb576108ca6119f4565b5b6040519080825280601f01601f1916602001820160405280156108fd5781602001600182028036833780820191505090505b5090505f82602001820190505b60011561095e578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816109535761095261227f565b5b0494505f850361090a575b819350505050919050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036109e0575f6040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016109d79190611ec7565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603610a50575f6040517f01a83514000000000000000000000000000000000000000000000000000000008152600401610a479190611ec7565b60405180910390fd5b610a5d8585858585610f94565b5050505050565b5f60208202602084010151905092915050565b5f60208202602084010151905092915050565b610a92610969565b73ffffffffffffffffffffffffffffffffffffffff16610ab061063f565b73ffffffffffffffffffffffffffffffffffffffff1614610b0f57610ad3610969565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610b069190611ec7565b60405180910390fd5b565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610c44575f6040517fced3e100000000000000000000000000000000000000000000000000000000008152600401610c3b9190611ec7565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610d309190611902565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610dad575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610da49190611ec7565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603610e1d575f6040517f01a83514000000000000000000000000000000000000000000000000000000008152600401610e149190611ec7565b60405180910390fd5b5f80610e298585611040565b91509150610e3a8787848487610f94565b50505050505050565b5f805f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610e9f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381610e9557610e9461227f565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610edc576d04ee2d6d415b85acef81000000008381610ed257610ed161227f565b5b0492506020810190505b662386f26fc100008310610f0b57662386f26fc100008381610f0157610f0061227f565b5b0492506010810190505b6305f5e1008310610f34576305f5e1008381610f2a57610f2961227f565b5b0492506008810190505b6127108310610f59576127108381610f4f57610f4e61227f565b5b0492506004810190505b60648310610f7c5760648381610f7257610f7161227f565b5b0492506002810190505b600a8310610f8b576001810190505b80915050919050565b610fa085858585611070565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614611039575f610fdc610969565b90506001845103611028575f610ffb5f86610a7790919063ffffffff16565b90505f6110115f86610a7790919063ffffffff16565b9050611021838989858589611406565b5050611037565b6110368187878787876115b5565b5b505b5050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b80518251146110ba57815181516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016110b19291906121b7565b60405180910390fd5b5f6110c3610969565b90505f5b83518110156112c5575f6110e48286610a7790919063ffffffff16565b90505f6110fa8386610a7790919063ffffffff16565b90505f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461121d575f805f8481526020019081526020015f205f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156111c957888183856040517f03dee4c50000000000000000000000000000000000000000000000000000000081526004016111c094939291906122ac565b60405180910390fd5b8181035f808581526020019081526020015f205f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16146112b257805f808481526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112aa91906122ef565b925050819055505b5050806112be90612238565b90506110c7565b506001835103611380575f6112e35f85610a7790919063ffffffff16565b90505f6112f95f85610a7790919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6285856040516113719291906121b7565b60405180910390a450506113ff565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516113f6929190612322565b60405180910390a45b5050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b11156115ad578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b81526004016114669594939291906123a9565b6020604051808303815f875af19250505080156114a157506040513d601f19601f8201168201806040525081019061149e9190612415565b60015b611522573d805f81146114cf576040519150601f19603f3d011682016040523d82523d5f602084013e6114d4565b606091505b505f81510361151a57846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016115119190611ec7565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146115ab57846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016115a29190611ec7565b60405180910390fd5b505b505050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b111561175c578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401611615959493929190612440565b6020604051808303815f875af192505050801561165057506040513d601f19601f8201168201806040525081019061164d9190612415565b60015b6116d1573d805f811461167e576040519150601f19603f3d011682016040523d82523d5f602084013e611683565b606091505b505f8151036116c957846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016116c09190611ec7565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461175a57846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016117519190611ec7565b60405180910390fd5b505b505050505050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61179e82611775565b9050919050565b6117ae81611794565b81146117b8575f80fd5b50565b5f813590506117c9816117a5565b92915050565b5f819050919050565b6117e1816117cf565b81146117eb575f80fd5b50565b5f813590506117fc816117d8565b92915050565b5f80604083850312156118185761181761176d565b5b5f611825858286016117bb565b9250506020611836858286016117ee565b9150509250929050565b611849816117cf565b82525050565b5f6020820190506118625f830184611840565b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61189c81611868565b81146118a6575f80fd5b50565b5f813590506118b781611893565b92915050565b5f602082840312156118d2576118d161176d565b5b5f6118df848285016118a9565b91505092915050565b5f8115159050919050565b6118fc816118e8565b82525050565b5f6020820190506119155f8301846118f3565b92915050565b5f602082840312156119305761192f61176d565b5b5f61193d848285016117ee565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561197d578082015181840152602081019050611962565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6119a282611946565b6119ac8185611950565b93506119bc818560208601611960565b6119c581611988565b840191505092915050565b5f6020820190508181035f8301526119e88184611998565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611a2a82611988565b810181811067ffffffffffffffff82111715611a4957611a486119f4565b5b80604052505050565b5f611a5b611764565b9050611a678282611a21565b919050565b5f67ffffffffffffffff821115611a8657611a856119f4565b5b602082029050602081019050919050565b5f80fd5b5f611aad611aa884611a6c565b611a52565b90508083825260208201905060208402830185811115611ad057611acf611a97565b5b835b81811015611af95780611ae588826117ee565b845260208401935050602081019050611ad2565b5050509392505050565b5f82601f830112611b1757611b166119f0565b5b8135611b27848260208601611a9b565b91505092915050565b5f80fd5b5f67ffffffffffffffff821115611b4e57611b4d6119f4565b5b611b5782611988565b9050602081019050919050565b828183375f83830152505050565b5f611b84611b7f84611b34565b611a52565b905082815260208101848484011115611ba057611b9f611b30565b5b611bab848285611b64565b509392505050565b5f82601f830112611bc757611bc66119f0565b5b8135611bd7848260208601611b72565b91505092915050565b5f805f805f60a08688031215611bf957611bf861176d565b5b5f611c06888289016117bb565b9550506020611c17888289016117bb565b945050604086013567ffffffffffffffff811115611c3857611c37611771565b5b611c4488828901611b03565b935050606086013567ffffffffffffffff811115611c6557611c64611771565b5b611c7188828901611b03565b925050608086013567ffffffffffffffff811115611c9257611c91611771565b5b611c9e88828901611bb3565b9150509295509295909350565b5f67ffffffffffffffff821115611cc557611cc46119f4565b5b602082029050602081019050919050565b5f611ce8611ce384611cab565b611a52565b90508083825260208201905060208402830185811115611d0b57611d0a611a97565b5b835b81811015611d345780611d2088826117bb565b845260208401935050602081019050611d0d565b5050509392505050565b5f82601f830112611d5257611d516119f0565b5b8135611d62848260208601611cd6565b91505092915050565b5f8060408385031215611d8157611d8061176d565b5b5f83013567ffffffffffffffff811115611d9e57611d9d611771565b5b611daa85828601611d3e565b925050602083013567ffffffffffffffff811115611dcb57611dca611771565b5b611dd785828601611b03565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b611e13816117cf565b82525050565b5f611e248383611e0a565b60208301905092915050565b5f602082019050919050565b5f611e4682611de1565b611e508185611deb565b9350611e5b83611dfb565b805f5b83811015611e8b578151611e728882611e19565b9750611e7d83611e30565b925050600181019050611e5e565b5085935050505092915050565b5f6020820190508181035f830152611eb08184611e3c565b905092915050565b611ec181611794565b82525050565b5f602082019050611eda5f830184611eb8565b92915050565b611ee9816118e8565b8114611ef3575f80fd5b50565b5f81359050611f0481611ee0565b92915050565b5f8060408385031215611f2057611f1f61176d565b5b5f611f2d858286016117bb565b9250506020611f3e85828601611ef6565b9150509250929050565b5f8060408385031215611f5e57611f5d61176d565b5b5f611f6b858286016117bb565b9250506020611f7c858286016117bb565b9150509250929050565b5f805f805f60a08688031215611f9f57611f9e61176d565b5b5f611fac888289016117bb565b9550506020611fbd888289016117bb565b9450506040611fce888289016117ee565b9350506060611fdf888289016117ee565b925050608086013567ffffffffffffffff81111561200057611fff611771565b5b61200c88828901611bb3565b9150509295509295909350565b5f6020828403121561202e5761202d61176d565b5b5f61203b848285016117bb565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061208857607f821691505b60208210810361209b5761209a612044565b5b50919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f81546120c981612071565b6120d381866120a1565b9450600182165f81146120ed576001811461210257612134565b60ff1983168652811515820286019350612134565b61210b856120ab565b5f5b8381101561212c5781548189015260018201915060208101905061210d565b838801955050505b50505092915050565b5f61214782611946565b61215181856120a1565b9350612161818560208601611960565b80840191505092915050565b5f61217882856120bd565b9150612184828461213d565b91508190509392505050565b5f6040820190506121a35f830185611eb8565b6121b06020830184611eb8565b9392505050565b5f6040820190506121ca5f830185611840565b6121d76020830184611840565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612242826117cf565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036122745761227361220b565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6080820190506122bf5f830187611eb8565b6122cc6020830186611840565b6122d96040830185611840565b6122e66060830184611840565b95945050505050565b5f6122f9826117cf565b9150612304836117cf565b925082820190508082111561231c5761231b61220b565b5b92915050565b5f6040820190508181035f83015261233a8185611e3c565b9050818103602083015261234e8184611e3c565b90509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f61237b82612357565b6123858185612361565b9350612395818560208601611960565b61239e81611988565b840191505092915050565b5f60a0820190506123bc5f830188611eb8565b6123c96020830187611eb8565b6123d66040830186611840565b6123e36060830185611840565b81810360808301526123f58184612371565b90509695505050505050565b5f8151905061240f81611893565b92915050565b5f6020828403121561242a5761242961176d565b5b5f61243784828501612401565b91505092915050565b5f60a0820190506124535f830188611eb8565b6124606020830187611eb8565b81810360408301526124728186611e3c565b905081810360608301526124868185611e3c565b9050818103608083015261249a8184612371565b9050969550505050505056fea2646970667358221220bc2f98bc3cca5494c3b4a9a2bc7b23abcbce55624abb54c0cc4eb5041601f4ff64736f6c6343000815003368747470733a2f2f697066732e696f2f697066732f516d59786a373451436165786d736b4d55476547556e4a755964417a6e4266516d6d4d31355167524e4161656f622f7b69647d2e6a736f6e
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106100f2575f3560e01c80635546649b11610095578063a22cb46511610064578063a22cb46514610272578063e985e9c51461028e578063f242432a146102be578063f2fde38b146102da576100f2565b80635546649b1461020e57806358bf5e9c1461022c578063715018a61461024a5780638da5cb5b14610254576100f2565b80630e89341c116100d15780630e89341c1461017457806326c2fed4146101a45780632eb2c2d6146101c25780634e1273f4146101de576100f2565b8062fdd58e146100f657806301ffc9a714610126578063093ec34814610156575b5f80fd5b610110600480360381019061010b9190611802565b6102f6565b60405161011d919061184f565b60405180910390f35b610140600480360381019061013b91906118bd565b61034b565b60405161014d9190611902565b60405180910390f35b61015e61042c565b60405161016b919061184f565b60405180910390f35b61018e6004803603810190610189919061191b565b610432565b60405161019b91906119d0565b60405180910390f35b6101ac610466565b6040516101b9919061184f565b60405180910390f35b6101dc60048036038101906101d79190611be0565b61046c565b005b6101f860048036038101906101f39190611d6b565b610513565b6040516102059190611e98565b60405180910390f35b610216610620565b604051610223919061184f565b60405180910390f35b610234610626565b604051610241919061184f565b60405180910390f35b61025261062c565b005b61025c61063f565b6040516102699190611ec7565b60405180910390f35b61028c60048036038101906102879190611f0a565b610667565b005b6102a860048036038101906102a39190611f48565b61067d565b6040516102b59190611902565b60405180910390f35b6102d860048036038101906102d39190611f86565b61070b565b005b6102f460048036038101906102ef9190612019565b6107b2565b005b5f805f8381526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b5f7fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061041557507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610425575061042482610836565b5b9050919050565b6126f281565b6060600461043f8361089f565b60405160200161045092919061216d565b6040516020818303038152906040529050919050565b61054b81565b5f610475610969565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156104ba57506104b8868261067d565b155b156104fe5780866040517fe237d9220000000000000000000000000000000000000000000000000000000081526004016104f5929190612190565b60405180910390fd5b61050b8686868686610970565b505050505050565b6060815183511461055f57815183516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016105569291906121b7565b60405180910390fd5b5f835167ffffffffffffffff81111561057b5761057a6119f4565b5b6040519080825280602002602001820160405280156105a95781602001602082028036833780820191505090505b5090505f5b8451811015610615576105e56105cd8287610a6490919063ffffffff16565b6105e08387610a7790919063ffffffff16565b6102f6565b8282815181106105f8576105f76121de565b5b6020026020010181815250508061060e90612238565b90506105ae565b508091505092915050565b6108d481565b6113e081565b610634610a8a565b61063d5f610b11565b565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610679610672610969565b8383610bd4565b5050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f610714610969565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156107595750610757868261067d565b155b1561079d5780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610794929190612190565b60405180910390fd5b6107aa8686868686610d3d565b505050505050565b6107ba610a8a565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361082a575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016108219190611ec7565b60405180910390fd5b61083381610b11565b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60605f60016108ad84610e43565b0190505f8167ffffffffffffffff8111156108cb576108ca6119f4565b5b6040519080825280601f01601f1916602001820160405280156108fd5781602001600182028036833780820191505090505b5090505f82602001820190505b60011561095e578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816109535761095261227f565b5b0494505f850361090a575b819350505050919050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036109e0575f6040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016109d79190611ec7565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603610a50575f6040517f01a83514000000000000000000000000000000000000000000000000000000008152600401610a479190611ec7565b60405180910390fd5b610a5d8585858585610f94565b5050505050565b5f60208202602084010151905092915050565b5f60208202602084010151905092915050565b610a92610969565b73ffffffffffffffffffffffffffffffffffffffff16610ab061063f565b73ffffffffffffffffffffffffffffffffffffffff1614610b0f57610ad3610969565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610b069190611ec7565b60405180910390fd5b565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610c44575f6040517fced3e100000000000000000000000000000000000000000000000000000000008152600401610c3b9190611ec7565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610d309190611902565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610dad575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610da49190611ec7565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603610e1d575f6040517f01a83514000000000000000000000000000000000000000000000000000000008152600401610e149190611ec7565b60405180910390fd5b5f80610e298585611040565b91509150610e3a8787848487610f94565b50505050505050565b5f805f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610e9f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381610e9557610e9461227f565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610edc576d04ee2d6d415b85acef81000000008381610ed257610ed161227f565b5b0492506020810190505b662386f26fc100008310610f0b57662386f26fc100008381610f0157610f0061227f565b5b0492506010810190505b6305f5e1008310610f34576305f5e1008381610f2a57610f2961227f565b5b0492506008810190505b6127108310610f59576127108381610f4f57610f4e61227f565b5b0492506004810190505b60648310610f7c5760648381610f7257610f7161227f565b5b0492506002810190505b600a8310610f8b576001810190505b80915050919050565b610fa085858585611070565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614611039575f610fdc610969565b90506001845103611028575f610ffb5f86610a7790919063ffffffff16565b90505f6110115f86610a7790919063ffffffff16565b9050611021838989858589611406565b5050611037565b6110368187878787876115b5565b5b505b5050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b80518251146110ba57815181516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016110b19291906121b7565b60405180910390fd5b5f6110c3610969565b90505f5b83518110156112c5575f6110e48286610a7790919063ffffffff16565b90505f6110fa8386610a7790919063ffffffff16565b90505f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461121d575f805f8481526020019081526020015f205f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156111c957888183856040517f03dee4c50000000000000000000000000000000000000000000000000000000081526004016111c094939291906122ac565b60405180910390fd5b8181035f808581526020019081526020015f205f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16146112b257805f808481526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112aa91906122ef565b925050819055505b5050806112be90612238565b90506110c7565b506001835103611380575f6112e35f85610a7790919063ffffffff16565b90505f6112f95f85610a7790919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6285856040516113719291906121b7565b60405180910390a450506113ff565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516113f6929190612322565b60405180910390a45b5050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b11156115ad578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b81526004016114669594939291906123a9565b6020604051808303815f875af19250505080156114a157506040513d601f19601f8201168201806040525081019061149e9190612415565b60015b611522573d805f81146114cf576040519150601f19603f3d011682016040523d82523d5f602084013e6114d4565b606091505b505f81510361151a57846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016115119190611ec7565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146115ab57846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016115a29190611ec7565b60405180910390fd5b505b505050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b111561175c578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401611615959493929190612440565b6020604051808303815f875af192505050801561165057506040513d601f19601f8201168201806040525081019061164d9190612415565b60015b6116d1573d805f811461167e576040519150601f19603f3d011682016040523d82523d5f602084013e611683565b606091505b505f8151036116c957846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016116c09190611ec7565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461175a57846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016117519190611ec7565b60405180910390fd5b505b505050505050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61179e82611775565b9050919050565b6117ae81611794565b81146117b8575f80fd5b50565b5f813590506117c9816117a5565b92915050565b5f819050919050565b6117e1816117cf565b81146117eb575f80fd5b50565b5f813590506117fc816117d8565b92915050565b5f80604083850312156118185761181761176d565b5b5f611825858286016117bb565b9250506020611836858286016117ee565b9150509250929050565b611849816117cf565b82525050565b5f6020820190506118625f830184611840565b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61189c81611868565b81146118a6575f80fd5b50565b5f813590506118b781611893565b92915050565b5f602082840312156118d2576118d161176d565b5b5f6118df848285016118a9565b91505092915050565b5f8115159050919050565b6118fc816118e8565b82525050565b5f6020820190506119155f8301846118f3565b92915050565b5f602082840312156119305761192f61176d565b5b5f61193d848285016117ee565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561197d578082015181840152602081019050611962565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6119a282611946565b6119ac8185611950565b93506119bc818560208601611960565b6119c581611988565b840191505092915050565b5f6020820190508181035f8301526119e88184611998565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611a2a82611988565b810181811067ffffffffffffffff82111715611a4957611a486119f4565b5b80604052505050565b5f611a5b611764565b9050611a678282611a21565b919050565b5f67ffffffffffffffff821115611a8657611a856119f4565b5b602082029050602081019050919050565b5f80fd5b5f611aad611aa884611a6c565b611a52565b90508083825260208201905060208402830185811115611ad057611acf611a97565b5b835b81811015611af95780611ae588826117ee565b845260208401935050602081019050611ad2565b5050509392505050565b5f82601f830112611b1757611b166119f0565b5b8135611b27848260208601611a9b565b91505092915050565b5f80fd5b5f67ffffffffffffffff821115611b4e57611b4d6119f4565b5b611b5782611988565b9050602081019050919050565b828183375f83830152505050565b5f611b84611b7f84611b34565b611a52565b905082815260208101848484011115611ba057611b9f611b30565b5b611bab848285611b64565b509392505050565b5f82601f830112611bc757611bc66119f0565b5b8135611bd7848260208601611b72565b91505092915050565b5f805f805f60a08688031215611bf957611bf861176d565b5b5f611c06888289016117bb565b9550506020611c17888289016117bb565b945050604086013567ffffffffffffffff811115611c3857611c37611771565b5b611c4488828901611b03565b935050606086013567ffffffffffffffff811115611c6557611c64611771565b5b611c7188828901611b03565b925050608086013567ffffffffffffffff811115611c9257611c91611771565b5b611c9e88828901611bb3565b9150509295509295909350565b5f67ffffffffffffffff821115611cc557611cc46119f4565b5b602082029050602081019050919050565b5f611ce8611ce384611cab565b611a52565b90508083825260208201905060208402830185811115611d0b57611d0a611a97565b5b835b81811015611d345780611d2088826117bb565b845260208401935050602081019050611d0d565b5050509392505050565b5f82601f830112611d5257611d516119f0565b5b8135611d62848260208601611cd6565b91505092915050565b5f8060408385031215611d8157611d8061176d565b5b5f83013567ffffffffffffffff811115611d9e57611d9d611771565b5b611daa85828601611d3e565b925050602083013567ffffffffffffffff811115611dcb57611dca611771565b5b611dd785828601611b03565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b611e13816117cf565b82525050565b5f611e248383611e0a565b60208301905092915050565b5f602082019050919050565b5f611e4682611de1565b611e508185611deb565b9350611e5b83611dfb565b805f5b83811015611e8b578151611e728882611e19565b9750611e7d83611e30565b925050600181019050611e5e565b5085935050505092915050565b5f6020820190508181035f830152611eb08184611e3c565b905092915050565b611ec181611794565b82525050565b5f602082019050611eda5f830184611eb8565b92915050565b611ee9816118e8565b8114611ef3575f80fd5b50565b5f81359050611f0481611ee0565b92915050565b5f8060408385031215611f2057611f1f61176d565b5b5f611f2d858286016117bb565b9250506020611f3e85828601611ef6565b9150509250929050565b5f8060408385031215611f5e57611f5d61176d565b5b5f611f6b858286016117bb565b9250506020611f7c858286016117bb565b9150509250929050565b5f805f805f60a08688031215611f9f57611f9e61176d565b5b5f611fac888289016117bb565b9550506020611fbd888289016117bb565b9450506040611fce888289016117ee565b9350506060611fdf888289016117ee565b925050608086013567ffffffffffffffff81111561200057611fff611771565b5b61200c88828901611bb3565b9150509295509295909350565b5f6020828403121561202e5761202d61176d565b5b5f61203b848285016117bb565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061208857607f821691505b60208210810361209b5761209a612044565b5b50919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f81546120c981612071565b6120d381866120a1565b9450600182165f81146120ed576001811461210257612134565b60ff1983168652811515820286019350612134565b61210b856120ab565b5f5b8381101561212c5781548189015260018201915060208101905061210d565b838801955050505b50505092915050565b5f61214782611946565b61215181856120a1565b9350612161818560208601611960565b80840191505092915050565b5f61217882856120bd565b9150612184828461213d565b91508190509392505050565b5f6040820190506121a35f830185611eb8565b6121b06020830184611eb8565b9392505050565b5f6040820190506121ca5f830185611840565b6121d76020830184611840565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612242826117cf565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036122745761227361220b565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6080820190506122bf5f830187611eb8565b6122cc6020830186611840565b6122d96040830185611840565b6122e66060830184611840565b95945050505050565b5f6122f9826117cf565b9150612304836117cf565b925082820190508082111561231c5761231b61220b565b5b92915050565b5f6040820190508181035f83015261233a8185611e3c565b9050818103602083015261234e8184611e3c565b90509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f61237b82612357565b6123858185612361565b9350612395818560208601611960565b61239e81611988565b840191505092915050565b5f60a0820190506123bc5f830188611eb8565b6123c96020830187611eb8565b6123d66040830186611840565b6123e36060830185611840565b81810360808301526123f58184612371565b90509695505050505050565b5f8151905061240f81611893565b92915050565b5f6020828403121561242a5761242961176d565b5b5f61243784828501612401565b91505092915050565b5f60a0820190506124535f830188611eb8565b6124606020830187611eb8565b81810360408301526124728186611e3c565b905081810360608301526124868185611e3c565b9050818103608083015261249a8184612371565b9050969550505050505056fea2646970667358221220bc2f98bc3cca5494c3b4a9a2bc7b23abcbce55624abb54c0cc4eb5041601f4ff64736f6c63430008150033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.