Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 21,614 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Redeem To Closet... | 36376261 | 8 hrs ago | IN | 0 ETH | 0.0000099 | ||||
| Redeem To Closet... | 36374465 | 8 hrs ago | IN | 0 ETH | 0.00000616 | ||||
| Redeem To Closet... | 36272922 | 22 hrs ago | IN | 0 ETH | 0.00000726 | ||||
| Redeem To Closet... | 36258863 | 24 hrs ago | IN | 0 ETH | 0.00000757 | ||||
| Redeem To Closet... | 36236644 | 27 hrs ago | IN | 0 ETH | 0.00000756 | ||||
| Set Approval For... | 36234893 | 28 hrs ago | IN | 0 ETH | 0.00000444 | ||||
| Redeem To Closet... | 36162469 | 40 hrs ago | IN | 0 ETH | 0.00000556 | ||||
| Redeem To Closet... | 36161913 | 40 hrs ago | IN | 0 ETH | 0.00000882 | ||||
| Redeem To Closet... | 36146957 | 43 hrs ago | IN | 0 ETH | 0.00000883 | ||||
| Redeem To Closet... | 36130656 | 47 hrs ago | IN | 0 ETH | 0.00000524 | ||||
| Redeem To Closet... | 36130602 | 47 hrs ago | IN | 0 ETH | 0.00000757 | ||||
| Safe Transfer Fr... | 35989609 | 2 days ago | IN | 0 ETH | 0.00001138 | ||||
| Safe Transfer Fr... | 35989593 | 2 days ago | IN | 0 ETH | 0.00001685 | ||||
| Redeem To Closet... | 35953152 | 3 days ago | IN | 0 ETH | 0.00000941 | ||||
| Redeem To Closet... | 35848827 | 3 days ago | IN | 0 ETH | 0.00000883 | ||||
| Redeem To Closet... | 35745978 | 4 days ago | IN | 0 ETH | 0.00000882 | ||||
| Redeem To Closet... | 35733577 | 4 days ago | IN | 0 ETH | 0.00000556 | ||||
| Redeem To Closet... | 35733370 | 4 days ago | IN | 0 ETH | 0.00000755 | ||||
| Redeem To Closet... | 35733113 | 4 days ago | IN | 0 ETH | 0.00000523 | ||||
| Redeem To Closet... | 35733004 | 4 days ago | IN | 0 ETH | 0.00000523 | ||||
| Redeem To Closet... | 35732898 | 4 days ago | IN | 0 ETH | 0.00000523 | ||||
| Redeem To Closet... | 35732779 | 4 days ago | IN | 0 ETH | 0.00000556 | ||||
| Redeem To Closet... | 35732626 | 4 days ago | IN | 0 ETH | 0.00000523 | ||||
| Redeem To Closet... | 35732518 | 4 days ago | IN | 0 ETH | 0.00000755 | ||||
| Redeem To Closet... | 35693460 | 4 days ago | IN | 0 ETH | 0.0000101 |
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 20991770 | 105 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Web3PlayboysTraits
Compiler Version
v0.8.20+commit.a1b79de6
ZkSolc Version
v1.5.15
Optimization Enabled:
Yes with Mode 3
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { ERC1155ConduitPreapproved } from "../lib/ERC1155ConduitPreapproved.sol";
import { TwoStepOwnable } from "lib/utility-contracts/src/TwoStepOwnable.sol";
import { ERC2981 } from "@openzeppelin/contracts/token/common/ERC2981.sol";
import { ERC1155 } from "solady/src/tokens/ext/zksync/ERC1155.sol";
import { ICreatorToken, ILegacyCreatorToken } from "../lib/ICreatorToken.sol";
import { ITransferValidator1155 } from "../lib/ITransferValidator.sol";
import { TokenTransferValidator } from "../lib/TokenTransferValidator.sol";
import { LibString } from "solady/src/utils/LibString.sol";
interface IWeb3Playboys {
function ownerOf(uint256 tokenId) external view returns (address owner);
function isApprovedForAll(address owner, address operator) external view returns (bool);
function getApproved(uint256 tokenId) external view returns (address);
}
contract Web3PlayboysTraits is ERC1155ConduitPreapproved, TwoStepOwnable, ERC2981, TokenTransferValidator {
error NoZeroAddress();
error NotMinter(address caller);
error DuplicateClosetEntry(uint256 playboyId, uint256 traitId);
error NotPlayboyOwnerNorApproved(address owner, address caller);
event ContractURIUpdated(string newContractURI);
event MinterAdded(address indexed address_);
event MinterRemoved(address indexed address_);
event ClosetUpdated(uint256 indexed playboyId, uint256 indexed traitId);
event MetadataUpdate(uint256 _tokenId);
event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);
struct TokenSupply {
uint64 totalRedeemed;
uint64 totalCreated;
}
mapping(uint256 => TokenSupply) _tokenSupply;
string public name;
string public symbol;
string public contractURI;
string private _uri;
IWeb3Playboys private _playboysContract;
mapping(address => bool) private _isMinter;
mapping(uint256 => uint256[]) private _closet;
mapping(uint256 => mapping(uint256 => uint256)) private _closetIndex; // playboyId => traitId => index+1
modifier onlyMinter() {
if (!_isMinter[msg.sender] && msg.sender != owner()) {
revert NotMinter(msg.sender);
}
_;
}
constructor(string memory name_, string memory symbol_, address playboysContract) {
name = name_;
symbol = symbol_;
_playboysContract = IWeb3Playboys(playboysContract);
}
function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyOwner {
_setDefaultRoyalty(receiver, feeNumerator);
}
/// @notice Metadata event is NOT emitted, you need to call that separately
function setURI(string memory uri_) external onlyOwner {
_uri = uri_;
}
function uri(uint256 tokenId) public view virtual override returns (string memory) {
return string(abi.encodePacked(_uri, LibString.toString(tokenId)));
}
function baseURI() external view returns (string memory) {
return _uri;
}
function setContractURI(string memory contractURI_) external onlyOwner {
contractURI = contractURI_;
emit ContractURIUpdated(contractURI_);
}
function addMinter(address address_) external onlyOwner {
if (address_ == address(0)) revert NoZeroAddress();
_isMinter[address_] = true;
emit MinterAdded(address_);
}
function removeMinter(address address_) external onlyOwner {
_isMinter[address_] = false;
emit MinterRemoved(address_);
}
function isMinter(address address_) external view returns (bool) {
return _isMinter[address_];
}
function updateMetadataRange(uint256 fromTokenId, uint256 toTokenId) external onlyMinter {
emit BatchMetadataUpdate(fromTokenId, toTokenId);
}
function updateMetadata(uint256 tokenId) external onlyMinter {
emit MetadataUpdate(tokenId);
}
function updateMetadataMany(uint256[] calldata tokenIds) external onlyMinter {
for (uint256 i = 0; i < tokenIds.length; ) {
emit MetadataUpdate(tokenIds[i]);
unchecked {
++i;
}
}
}
function mint(address to, uint256 tokenId, uint256 amount, bytes memory data) public onlyMinter {
_mint(to, tokenId, amount, data);
_tokenSupply[tokenId].totalCreated += uint64(amount);
}
function mint(address to, uint256 tokenId, uint256 amount) external onlyMinter {
mint(to, tokenId, amount, "");
}
function totalCreated(uint256 tokenId) external view returns (uint256) {
return _tokenSupply[tokenId].totalCreated;
}
function totalRedeemed(uint256 tokenId) external view returns (uint256) {
return _tokenSupply[tokenId].totalRedeemed;
}
function getTransferValidationFunction() external pure returns (bytes4 functionSignature, bool isViewFunction) {
functionSignature = ITransferValidator1155.validateTransfer.selector;
isViewFunction = true;
}
function setTransferValidator(address newValidator) external onlyOwner {
_setTransferValidator(newValidator);
}
function _addToCloset(uint256 playboyId, uint256 traitId) private {
if (_closetIndex[playboyId][traitId] != 0) {
revert DuplicateClosetEntry(playboyId, traitId);
}
_tokenSupply[traitId].totalRedeemed += 1;
_closet[playboyId].push(traitId);
_closetIndex[playboyId][traitId] = _closet[playboyId].length; // store index + 1
emit ClosetUpdated(playboyId, traitId);
}
function _playboyOwnerOrApproved(uint256 playboyId) private view returns (address owner) {
owner = _playboysContract.ownerOf(playboyId);
if (msg.sender != owner) {
if (
!_playboysContract.isApprovedForAll(owner, msg.sender) &&
_playboysContract.getApproved(playboyId) != msg.sender
) {
revert NotPlayboyOwnerNorApproved(owner, msg.sender);
}
}
}
function redeemToCloset(address from, uint256 playboyId, uint256 traitId) external {
_playboyOwnerOrApproved(playboyId);
_burn(msg.sender, from, traitId, 1);
_addToCloset(playboyId, traitId);
}
function redeemToClosetBatch(address from, uint256 playboyId, uint256[] calldata traitIds) external {
_playboyOwnerOrApproved(playboyId);
uint256 len = traitIds.length;
for (uint256 i = 0; i < len; i++) {
uint256 traitId = traitIds[i];
_burn(msg.sender, from, traitId, 1);
_addToCloset(playboyId, traitId);
}
}
function getCloset(uint256 playboyId) external view returns (uint256[] memory) {
return _closet[playboyId];
}
function hasClosetTrait(uint256 playboyId, uint256 traitId) external view returns (bool) {
return _closetIndex[playboyId][traitId] != 0;
}
function manualAddToCloset(uint256 playboyId, uint256 traitId) external onlyMinter {
_addToCloset(playboyId, traitId);
_tokenSupply[traitId].totalCreated += 1;
}
function manualAddToClosetBatch(uint256 playboyId, uint256[] calldata traitIds) external onlyMinter {
uint256 len = traitIds.length;
for (uint256 i = 0; i < len; i++) {
uint256 traitId = traitIds[i];
_addToCloset(playboyId, traitId);
_tokenSupply[traitId].totalCreated += 1;
}
}
function burnWithoutRedeem(address from, uint256 id, uint256 amount) external {
_burn(msg.sender, from, id, amount);
}
function burnWithoutRedeemBatch(address from, uint256[] calldata ids, uint256[] calldata amounts) external {
_batchBurn(msg.sender, from, ids, amounts);
}
/// @dev Override this function to return true if `_beforeTokenTransfer` is used.
function _useBeforeTokenTransfer() internal view virtual override returns (bool) {
return true;
}
function _beforeTokenTransfer(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory /* data */
) internal virtual override {
if (from != address(0) && to != address(0)) {
// Call the transfer validator if one is set.
address transferValidator = _transferValidator;
if (transferValidator != address(0)) {
for (uint256 i = 0; i < ids.length; i++) {
ITransferValidator1155(transferValidator).validateTransfer(
msg.sender,
from,
to,
ids[i],
amounts[i]
);
}
}
}
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) {
return
interfaceId == 0x49064906 ||
interfaceId == type(ICreatorToken).interfaceId ||
interfaceId == type(ILegacyCreatorToken).interfaceId ||
ERC2981.supportsInterface(interfaceId) ||
ERC1155.supportsInterface(interfaceId);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
interface ICreatorToken {
event TransferValidatorUpdated(address oldValidator, address newValidator);
function getTransferValidator() external view returns (address validator);
function getTransferValidationFunction() external view returns (bytes4 functionSignature, bool isViewFunction);
function setTransferValidator(address validator) external;
}
interface ILegacyCreatorToken {
event TransferValidatorUpdated(address oldValidator, address newValidator);
function getTransferValidator() external view returns (address validator);
function setTransferValidator(address validator) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import { ERC1155 } from "solady/src/tokens/ext/zksync/ERC1155.sol";
/**
* @title ERC1155ConduitPreapproved
* @notice Solady's ERC1155 with the OpenSea conduit preapproved.
*/
abstract contract ERC1155ConduitPreapproved is ERC1155 {
/// @dev The canonical OpenSea conduit.
address internal constant _CONDUIT = 0x963F00d3ff000064fFCbA824b800c0000000C300;
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) public virtual override {
_safeTransfer(_by(), from, to, id, amount, data);
}
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) public virtual override {
_safeBatchTransfer(_by(), from, to, ids, amounts, data);
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
if (operator == _CONDUIT) return true;
return ERC1155.isApprovedForAll(owner, operator);
}
function _by() internal view virtual returns (address result) {
assembly {
// `msg.sender == _CONDUIT ? address(0) : msg.sender`.
result := mul(iszero(eq(caller(), _CONDUIT)), caller())
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
interface ITransferValidator721 {
/// @notice Ensure that a transfer has been authorized for a specific tokenId
function validateTransfer(address caller, address from, address to, uint256 tokenId) external view;
}
interface ITransferValidator1155 {
/// @notice Ensure that a transfer has been authorized for a specific amount of a specific tokenId, and reduce the transferable amount remaining
function validateTransfer(address caller, address from, address to, uint256 tokenId, uint256 amount) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import { ICreatorToken } from "./ICreatorToken.sol";
/**
* @title TokenTransferValidator
* @notice Functionality to use a transfer validator.
*/
abstract contract TokenTransferValidator is ICreatorToken {
/// @dev Store the transfer validator. The null address means no transfer validator is set.
address internal _transferValidator;
/// @notice Revert with an error if the transfer validator is being set to the same address.
error SameTransferValidator();
/// @notice Returns the currently active transfer validator.
/// The null address means no transfer validator is set.
function getTransferValidator() external view returns (address) {
return _transferValidator;
}
/// @notice Set the transfer validator.
/// The external method that uses this must include access control.
function _setTransferValidator(address newValidator) internal {
address oldValidator = _transferValidator;
if (oldValidator == newValidator) {
revert SameTransferValidator();
}
_transferValidator = newValidator;
emit TransferValidatorUpdated(oldValidator, newValidator);
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import {ConstructorInitializable} from "./ConstructorInitializable.sol";
/**
@notice A two-step extension of Ownable, where the new owner must claim ownership of the contract after owner initiates transfer
Owner can cancel the transfer at any point before the new owner claims ownership.
Helpful in guarding against transferring ownership to an address that is unable to act as the Owner.
*/
abstract contract TwoStepOwnable is ConstructorInitializable {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
address internal potentialOwner;
event PotentialOwnerUpdated(address newPotentialAdministrator);
error NewOwnerIsZeroAddress();
error NotNextOwner();
error OnlyOwner();
modifier onlyOwner() {
_checkOwner();
_;
}
constructor() {
_initialize();
}
function _initialize() private onlyConstructor {
_transferOwnership(msg.sender);
}
///@notice Initiate ownership transfer to newPotentialOwner. Note: new owner will have to manually acceptOwnership
///@param newPotentialOwner address of potential new owner
function transferOwnership(address newPotentialOwner)
public
virtual
onlyOwner
{
if (newPotentialOwner == address(0)) {
revert NewOwnerIsZeroAddress();
}
potentialOwner = newPotentialOwner;
emit PotentialOwnerUpdated(newPotentialOwner);
}
///@notice Claim ownership of smart contract, after the current owner has initiated the process with transferOwnership
function acceptOwnership() public virtual {
address _potentialOwner = potentialOwner;
if (msg.sender != _potentialOwner) {
revert NotNextOwner();
}
delete potentialOwner;
emit PotentialOwnerUpdated(address(0));
_transferOwnership(_potentialOwner);
}
///@notice cancel ownership transfer
function cancelOwnershipTransfer() public virtual onlyOwner {
delete potentialOwner;
emit PotentialOwnerUpdated(address(0));
}
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 != msg.sender) {
revert OnlyOwner();
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/// @notice Simple ERC1155 implementation.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/tokens/ext/zksync/ERC1155.sol)
/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC1155.sol)
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/token/ERC1155/ERC1155.sol)
///
/// @dev Note:
/// - The ERC1155 standard allows for self-approvals.
/// For performance, this implementation WILL NOT revert for such actions.
/// Please add any checks with overrides if desired.
///
/// If you are overriding:
/// - Make sure all variables written to storage are properly cleaned
// (e.g. the bool value for `isApprovedForAll` MUST be either 1 or 0 under the hood).
/// - Check that the overridden function is actually used in the function you want to
/// change the behavior of. Much of the code has been manually inlined for performance.
abstract contract ERC1155 {
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* CUSTOM ERRORS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev The lengths of the input arrays are not the same.
error ArrayLengthsMismatch();
/// @dev Cannot mint or transfer to the zero address.
error TransferToZeroAddress();
/// @dev The recipient's balance has overflowed.
error AccountBalanceOverflow();
/// @dev Insufficient balance.
error InsufficientBalance();
/// @dev Only the token owner or an approved account can manage the tokens.
error NotOwnerNorApproved();
/// @dev Cannot safely transfer to a contract that does not implement
/// the ERC1155Receiver interface.
error TransferToNonERC1155ReceiverImplementer();
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* EVENTS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Emitted when `amount` of token `id` is transferred
/// from `from` to `to` by `operator`.
event TransferSingle(
address indexed operator,
address indexed from,
address indexed to,
uint256 id,
uint256 amount
);
/// @dev Emitted when `amounts` of token `ids` are transferred
/// from `from` to `to` by `operator`.
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] amounts
);
/// @dev Emitted when `owner` enables or disables `operator` to manage all of their tokens.
event ApprovalForAll(address indexed owner, address indexed operator, bool isApproved);
/// @dev Emitted when the Uniform Resource Identifier (URI) for token `id`
/// is updated to `value`. This event is not used in the base contract.
/// You may need to emit this event depending on your URI logic.
///
/// See: https://eips.ethereum.org/EIPS/eip-1155#metadata
event URI(string value, uint256 indexed id);
/// @dev `keccak256(bytes("TransferSingle(address,address,address,uint256,uint256)"))`.
uint256 private constant _TRANSFER_SINGLE_EVENT_SIGNATURE =
0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62;
/// @dev `keccak256(bytes("TransferBatch(address,address,address,uint256[],uint256[])"))`.
uint256 private constant _TRANSFER_BATCH_EVENT_SIGNATURE =
0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb;
/// @dev `keccak256(bytes("ApprovalForAll(address,address,bool)"))`.
uint256 private constant _APPROVAL_FOR_ALL_EVENT_SIGNATURE =
0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31;
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* STORAGE */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev The `ownerSlotSeed` of a given owner is given by.
/// ```
/// let ownerSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, owner))
/// ```
///
/// The balance slot of `owner` is given by.
/// ```
/// mstore(0x20, ownerSlotSeed)
/// mstore(0x00, id)
/// let balanceSlot := keccak256(0x00, 0x40)
/// ```
///
/// The operator approval slot of `owner` is given by.
/// ```
/// mstore(0x20, ownerSlotSeed)
/// mstore(0x00, operator)
/// let operatorApprovalSlot := keccak256(0x0c, 0x34)
/// ```
uint256 private constant _ERC1155_MASTER_SLOT_SEED = 0x9a31110384e0b0c9;
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* ERC1155 METADATA */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Returns the URI for token `id`.
///
/// You can either return the same templated URI for all token IDs,
/// (e.g. "https://example.com/api/{id}.json"),
/// or return a unique URI for each `id`.
///
/// See: https://eips.ethereum.org/EIPS/eip-1155#metadata
function uri(uint256 id) public view virtual returns (string memory);
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* ERC1155 */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Returns the amount of `id` owned by `owner`.
function balanceOf(address owner, uint256 id) public view virtual returns (uint256 result) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x20, _ERC1155_MASTER_SLOT_SEED)
mstore(0x14, owner)
mstore(0x00, id)
result := sload(keccak256(0x00, 0x40))
}
}
/// @dev Returns whether `operator` is approved to manage the tokens of `owner`.
function isApprovedForAll(address owner, address operator)
public
view
virtual
returns (bool result)
{
/// @solidity memory-safe-assembly
assembly {
mstore(0x20, _ERC1155_MASTER_SLOT_SEED)
mstore(0x14, owner)
mstore(0x00, operator)
result := sload(keccak256(0x0c, 0x34))
}
}
/// @dev Sets whether `operator` is approved to manage the tokens of the caller.
///
/// Emits a {ApprovalForAll} event.
function setApprovalForAll(address operator, bool isApproved) public virtual {
/// @solidity memory-safe-assembly
assembly {
// Convert to 0 or 1.
isApproved := iszero(iszero(isApproved))
// Update the `isApproved` for (`msg.sender`, `operator`).
mstore(0x20, _ERC1155_MASTER_SLOT_SEED)
mstore(0x14, caller())
mstore(0x00, operator)
sstore(keccak256(0x0c, 0x34), isApproved)
// Emit the {ApprovalForAll} event.
mstore(0x00, isApproved)
// forgefmt: disable-next-line
log3(0x00, 0x20, _APPROVAL_FOR_ALL_EVENT_SIGNATURE, caller(), shr(96, shl(96, operator)))
}
}
/// @dev Transfers `amount` of `id` from `from` to `to`.
///
/// Requirements:
/// - `to` cannot be the zero address.
/// - `from` must have at least `amount` of `id`.
/// - If the caller is not `from`,
/// it must be approved to manage the tokens of `from`.
/// - If `to` refers to a smart contract, it must implement
/// {ERC1155-onERC1155Received}, which is called upon a batch transfer.
///
/// Emits a {TransferSingle} event.
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) public virtual {
if (_useBeforeTokenTransfer()) {
_beforeTokenTransfer(from, to, _single(id), _single(amount), data);
}
/// @solidity memory-safe-assembly
assembly {
let fromSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, from))
let toSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, to))
mstore(0x20, fromSlotSeed)
// Clear the upper 96 bits.
from := shr(96, fromSlotSeed)
to := shr(96, toSlotSeed)
// Revert if `to` is the zero address.
if iszero(to) {
mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`.
revert(0x1c, 0x04)
}
// If the caller is not `from`, do the authorization check.
if iszero(eq(caller(), from)) {
mstore(0x00, caller())
if iszero(sload(keccak256(0x0c, 0x34))) {
mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`.
revert(0x1c, 0x04)
}
}
// Subtract and store the updated balance of `from`.
{
mstore(0x00, id)
let fromBalanceSlot := keccak256(0x00, 0x40)
let fromBalance := sload(fromBalanceSlot)
if gt(amount, fromBalance) {
mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`.
revert(0x1c, 0x04)
}
sstore(fromBalanceSlot, sub(fromBalance, amount))
}
// Increase and store the updated balance of `to`.
{
mstore(0x20, toSlotSeed)
let toBalanceSlot := keccak256(0x00, 0x40)
let toBalanceBefore := sload(toBalanceSlot)
let toBalanceAfter := add(toBalanceBefore, amount)
if lt(toBalanceAfter, toBalanceBefore) {
mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`.
revert(0x1c, 0x04)
}
sstore(toBalanceSlot, toBalanceAfter)
}
// Emit a {TransferSingle} event.
mstore(0x20, amount)
log4(0x00, 0x40, _TRANSFER_SINGLE_EVENT_SIGNATURE, caller(), from, to)
}
if (_useAfterTokenTransfer()) {
_afterTokenTransfer(from, to, _single(id), _single(amount), data);
}
/// @solidity memory-safe-assembly
assembly {
// Do the {onERC1155Received} check if `to` is a smart contract.
if extcodesize(to) {
// Prepare the calldata.
let m := mload(0x40)
// `onERC1155Received(address,address,uint256,uint256,bytes)`.
mstore(m, 0xf23a6e61)
mstore(add(m, 0x20), caller())
mstore(add(m, 0x40), from)
mstore(add(m, 0x60), id)
mstore(add(m, 0x80), amount)
mstore(add(m, 0xa0), 0xa0)
mstore(add(m, 0xc0), data.length)
calldatacopy(add(m, 0xe0), data.offset, data.length)
// Revert if the call reverts.
if iszero(call(gas(), to, 0, add(m, 0x1c), add(0xc4, data.length), m, 0x20)) {
if returndatasize() {
// Bubble up the revert if the call reverts.
returndatacopy(m, 0x00, returndatasize())
revert(m, returndatasize())
}
}
// Load the returndata and compare it with the function selector.
if iszero(eq(mload(m), shl(224, 0xf23a6e61))) {
mstore(0x00, 0x9c05499b) // `TransferToNonERC1155ReceiverImplementer()`.
revert(0x1c, 0x04)
}
}
}
}
/// @dev Transfers `amounts` of `ids` from `from` to `to`.
///
/// Requirements:
/// - `to` cannot be the zero address.
/// - `from` must have at least `amount` of `id`.
/// - `ids` and `amounts` must have the same length.
/// - If the caller is not `from`,
/// it must be approved to manage the tokens of `from`.
/// - If `to` refers to a smart contract, it must implement
/// {ERC1155-onERC1155BatchReceived}, which is called upon a batch transfer.
///
/// Emits a {TransferBatch} event.
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) public virtual {
if (_useBeforeTokenTransfer()) {
_beforeTokenTransfer(from, to, ids, amounts, data);
}
/// @solidity memory-safe-assembly
assembly {
if iszero(eq(ids.length, amounts.length)) {
mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`.
revert(0x1c, 0x04)
}
let fromSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, from))
let toSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, to))
mstore(0x20, fromSlotSeed)
// Clear the upper 96 bits.
from := shr(96, fromSlotSeed)
to := shr(96, toSlotSeed)
// Revert if `to` is the zero address.
if iszero(to) {
mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`.
revert(0x1c, 0x04)
}
// If the caller is not `from`, do the authorization check.
if iszero(eq(caller(), from)) {
mstore(0x00, caller())
if iszero(sload(keccak256(0x0c, 0x34))) {
mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`.
revert(0x1c, 0x04)
}
}
// Loop through all the `ids` and update the balances.
{
for { let i := shl(5, ids.length) } i {} {
i := sub(i, 0x20)
let amount := calldataload(add(amounts.offset, i))
// Subtract and store the updated balance of `from`.
{
mstore(0x20, fromSlotSeed)
mstore(0x00, calldataload(add(ids.offset, i)))
let fromBalanceSlot := keccak256(0x00, 0x40)
let fromBalance := sload(fromBalanceSlot)
if gt(amount, fromBalance) {
mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`.
revert(0x1c, 0x04)
}
sstore(fromBalanceSlot, sub(fromBalance, amount))
}
// Increase and store the updated balance of `to`.
{
mstore(0x20, toSlotSeed)
let toBalanceSlot := keccak256(0x00, 0x40)
let toBalanceBefore := sload(toBalanceSlot)
let toBalanceAfter := add(toBalanceBefore, amount)
if lt(toBalanceAfter, toBalanceBefore) {
mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`.
revert(0x1c, 0x04)
}
sstore(toBalanceSlot, toBalanceAfter)
}
}
}
// Emit a {TransferBatch} event.
{
let m := mload(0x40)
// Copy the `ids`.
mstore(m, 0x40)
let n := shl(5, ids.length)
mstore(add(m, 0x40), ids.length)
calldatacopy(add(m, 0x60), ids.offset, n)
// Copy the `amounts`.
mstore(add(m, 0x20), add(0x60, n))
let o := add(add(m, n), 0x60)
mstore(o, ids.length)
calldatacopy(add(o, 0x20), amounts.offset, n)
// Do the emit.
log4(m, add(add(n, n), 0x80), _TRANSFER_BATCH_EVENT_SIGNATURE, caller(), from, to)
}
}
if (_useAfterTokenTransfer()) {
_afterTokenTransferCalldata(from, to, ids, amounts, data);
}
/// @solidity memory-safe-assembly
assembly {
// Do the {onERC1155BatchReceived} check if `to` is a smart contract.
if extcodesize(to) {
mstore(0x00, to) // Cache `to` to prevent stack too deep.
let m := mload(0x40)
// Prepare the calldata.
// `onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)`.
mstore(m, 0xbc197c81)
mstore(add(m, 0x20), caller())
mstore(add(m, 0x40), from)
// Copy the `ids`.
mstore(add(m, 0x60), 0xa0)
let n := shl(5, ids.length)
mstore(add(m, 0xc0), ids.length)
calldatacopy(add(m, 0xe0), ids.offset, n)
// Copy the `amounts`.
mstore(add(m, 0x80), add(0xc0, n))
let o := add(add(m, n), 0xe0)
mstore(o, ids.length)
calldatacopy(add(o, 0x20), amounts.offset, n)
// Copy the `data`.
mstore(add(m, 0xa0), add(add(0xe0, n), n))
o := add(add(o, n), 0x20)
mstore(o, data.length)
calldatacopy(add(o, 0x20), data.offset, data.length)
let nAll := add(0x104, add(data.length, add(n, n)))
// Revert if the call reverts.
if iszero(call(gas(), mload(0x00), 0, add(mload(0x40), 0x1c), nAll, m, 0x20)) {
if returndatasize() {
// Bubble up the revert if the call reverts.
returndatacopy(m, 0x00, returndatasize())
revert(m, returndatasize())
}
}
// Load the returndata and compare it with the function selector.
if iszero(eq(mload(m), shl(224, 0xbc197c81))) {
mstore(0x00, 0x9c05499b) // `TransferToNonERC1155ReceiverImplementer()`.
revert(0x1c, 0x04)
}
}
}
}
/// @dev Returns the amounts of `ids` for `owners.
///
/// Requirements:
/// - `owners` and `ids` must have the same length.
function balanceOfBatch(address[] calldata owners, uint256[] calldata ids)
public
view
virtual
returns (uint256[] memory balances)
{
/// @solidity memory-safe-assembly
assembly {
if iszero(eq(ids.length, owners.length)) {
mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`.
revert(0x1c, 0x04)
}
balances := mload(0x40)
mstore(balances, ids.length)
let o := add(balances, 0x20)
let i := shl(5, ids.length)
mstore(0x40, add(i, o))
// Loop through all the `ids` and load the balances.
for {} i {} {
i := sub(i, 0x20)
let owner := calldataload(add(owners.offset, i))
mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, shl(96, owner)))
mstore(0x00, calldataload(add(ids.offset, i)))
mstore(add(o, i), sload(keccak256(0x00, 0x40)))
}
}
}
/// @dev Returns true if this contract implements the interface defined by `interfaceId`.
/// See: https://eips.ethereum.org/EIPS/eip-165
/// This function call must use less than 30000 gas.
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool result) {
/// @solidity memory-safe-assembly
assembly {
let s := shr(224, interfaceId)
// ERC165: 0x01ffc9a7, ERC1155: 0xd9b67a26, ERC1155MetadataURI: 0x0e89341c.
result := or(or(eq(s, 0x01ffc9a7), eq(s, 0xd9b67a26)), eq(s, 0x0e89341c))
}
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* INTERNAL MINT FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Mints `amount` of `id` to `to`.
///
/// Requirements:
/// - `to` cannot be the zero address.
/// - If `to` refers to a smart contract, it must implement
/// {ERC1155-onERC1155Received}, which is called upon a batch transfer.
///
/// Emits a {TransferSingle} event.
function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {
if (_useBeforeTokenTransfer()) {
_beforeTokenTransfer(address(0), to, _single(id), _single(amount), data);
}
/// @solidity memory-safe-assembly
assembly {
let to_ := shl(96, to)
// Revert if `to` is the zero address.
if iszero(to_) {
mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`.
revert(0x1c, 0x04)
}
// Increase and store the updated balance of `to`.
{
mstore(0x20, _ERC1155_MASTER_SLOT_SEED)
mstore(0x14, to)
mstore(0x00, id)
let toBalanceSlot := keccak256(0x00, 0x40)
let toBalanceBefore := sload(toBalanceSlot)
let toBalanceAfter := add(toBalanceBefore, amount)
if lt(toBalanceAfter, toBalanceBefore) {
mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`.
revert(0x1c, 0x04)
}
sstore(toBalanceSlot, toBalanceAfter)
}
// Emit a {TransferSingle} event.
mstore(0x20, amount)
log4(0x00, 0x40, _TRANSFER_SINGLE_EVENT_SIGNATURE, caller(), 0, shr(96, to_))
}
if (_useAfterTokenTransfer()) {
_afterTokenTransfer(address(0), to, _single(id), _single(amount), data);
}
if (_hasCode(to)) _checkOnERC1155Received(address(0), to, id, amount, data);
}
/// @dev Mints `amounts` of `ids` to `to`.
///
/// Requirements:
/// - `to` cannot be the zero address.
/// - `ids` and `amounts` must have the same length.
/// - If `to` refers to a smart contract, it must implement
/// {ERC1155-onERC1155BatchReceived}, which is called upon a batch transfer.
///
/// Emits a {TransferBatch} event.
function _batchMint(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
if (_useBeforeTokenTransfer()) {
_beforeTokenTransfer(address(0), to, ids, amounts, data);
}
/// @solidity memory-safe-assembly
assembly {
function copy(dst_, src_, n_) {
for { let i_ := 0 } lt(i_, n_) { i_ := add(0x20, i_) } {
mstore(add(dst_, i_), mload(add(src_, i_)))
}
}
if iszero(eq(mload(ids), mload(amounts))) {
mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`.
revert(0x1c, 0x04)
}
let to_ := shl(96, to)
// Revert if `to` is the zero address.
if iszero(to_) {
mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`.
revert(0x1c, 0x04)
}
// Loop through all the `ids` and update the balances.
{
mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, to_))
for { let i := shl(5, mload(ids)) } i { i := sub(i, 0x20) } {
let amount := mload(add(amounts, i))
// Increase and store the updated balance of `to`.
{
mstore(0x00, mload(add(ids, i)))
let toBalanceSlot := keccak256(0x00, 0x40)
let toBalanceBefore := sload(toBalanceSlot)
let toBalanceAfter := add(toBalanceBefore, amount)
if lt(toBalanceAfter, toBalanceBefore) {
mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`.
revert(0x1c, 0x04)
}
sstore(toBalanceSlot, toBalanceAfter)
}
}
}
// Emit a {TransferBatch} event.
{
let m := mload(0x40)
// Copy the `ids`.
mstore(m, 0x40)
let n := add(0x20, shl(5, mload(ids)))
let o := add(m, 0x40)
copy(o, ids, n)
// Copy the `amounts`.
mstore(add(m, 0x20), add(0x40, n))
o := add(o, n)
n := add(0x20, shl(5, mload(amounts)))
copy(o, amounts, n)
n := sub(add(o, n), m)
// Do the emit.
log4(m, n, _TRANSFER_BATCH_EVENT_SIGNATURE, caller(), 0, shr(96, to_))
}
}
if (_useAfterTokenTransfer()) {
_afterTokenTransfer(address(0), to, ids, amounts, data);
}
if (_hasCode(to)) _checkOnERC1155BatchReceived(address(0), to, ids, amounts, data);
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* INTERNAL BURN FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Equivalent to `_burn(address(0), from, id, amount)`.
function _burn(address from, uint256 id, uint256 amount) internal virtual {
_burn(address(0), from, id, amount);
}
/// @dev Destroys `amount` of `id` from `from`.
///
/// Requirements:
/// - `from` must have at least `amount` of `id`.
/// - If `by` is not the zero address, it must be either `from`,
/// or approved to manage the tokens of `from`.
///
/// Emits a {TransferSingle} event.
function _burn(address by, address from, uint256 id, uint256 amount) internal virtual {
if (_useBeforeTokenTransfer()) {
_beforeTokenTransfer(from, address(0), _single(id), _single(amount), "");
}
/// @solidity memory-safe-assembly
assembly {
let from_ := shl(96, from)
mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, from_))
// If `by` is not the zero address, and not equal to `from`,
// check if it is approved to manage all the tokens of `from`.
if iszero(or(iszero(shl(96, by)), eq(shl(96, by), from_))) {
mstore(0x00, by)
if iszero(sload(keccak256(0x0c, 0x34))) {
mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`.
revert(0x1c, 0x04)
}
}
// Decrease and store the updated balance of `from`.
{
mstore(0x00, id)
let fromBalanceSlot := keccak256(0x00, 0x40)
let fromBalance := sload(fromBalanceSlot)
if gt(amount, fromBalance) {
mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`.
revert(0x1c, 0x04)
}
sstore(fromBalanceSlot, sub(fromBalance, amount))
}
// Emit a {TransferSingle} event.
mstore(0x20, amount)
log4(0x00, 0x40, _TRANSFER_SINGLE_EVENT_SIGNATURE, caller(), shr(96, from_), 0)
}
if (_useAfterTokenTransfer()) {
_afterTokenTransfer(from, address(0), _single(id), _single(amount), "");
}
}
/// @dev Equivalent to `_batchBurn(address(0), from, ids, amounts)`.
function _batchBurn(address from, uint256[] memory ids, uint256[] memory amounts)
internal
virtual
{
_batchBurn(address(0), from, ids, amounts);
}
/// @dev Destroys `amounts` of `ids` from `from`.
///
/// Requirements:
/// - `ids` and `amounts` must have the same length.
/// - `from` must have at least `amounts` of `ids`.
/// - If `by` is not the zero address, it must be either `from`,
/// or approved to manage the tokens of `from`.
///
/// Emits a {TransferBatch} event.
function _batchBurn(address by, address from, uint256[] memory ids, uint256[] memory amounts)
internal
virtual
{
if (_useBeforeTokenTransfer()) {
_beforeTokenTransfer(from, address(0), ids, amounts, "");
}
/// @solidity memory-safe-assembly
assembly {
function copy(dst_, src_, n_) {
for { let i_ := 0 } lt(i_, n_) { i_ := add(0x20, i_) } {
mstore(add(dst_, i_), mload(add(src_, i_)))
}
}
if iszero(eq(mload(ids), mload(amounts))) {
mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`.
revert(0x1c, 0x04)
}
let from_ := shl(96, from)
mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, from_))
// If `by` is not the zero address, and not equal to `from`,
// check if it is approved to manage all the tokens of `from`.
let by_ := shl(96, by)
if iszero(or(iszero(by_), eq(by_, from_))) {
mstore(0x00, by)
if iszero(sload(keccak256(0x0c, 0x34))) {
mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`.
revert(0x1c, 0x04)
}
}
// Loop through all the `ids` and update the balances.
{
for { let i := shl(5, mload(ids)) } i { i := sub(i, 0x20) } {
let amount := mload(add(amounts, i))
// Decrease and store the updated balance of `from`.
{
mstore(0x00, mload(add(ids, i)))
let fromBalanceSlot := keccak256(0x00, 0x40)
let fromBalance := sload(fromBalanceSlot)
if gt(amount, fromBalance) {
mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`.
revert(0x1c, 0x04)
}
sstore(fromBalanceSlot, sub(fromBalance, amount))
}
}
}
// Emit a {TransferBatch} event.
{
let m := mload(0x40)
// Copy the `ids`.
mstore(m, 0x40)
let n := add(0x20, shl(5, mload(ids)))
let o := add(m, 0x40)
copy(o, ids, n)
// Copy the `amounts`.
mstore(add(m, 0x20), add(0x40, n))
o := add(o, n)
n := add(0x20, shl(5, mload(amounts)))
copy(o, amounts, n)
n := sub(add(o, n), m)
// Do the emit.
log4(m, n, _TRANSFER_BATCH_EVENT_SIGNATURE, caller(), shr(96, from_), 0)
}
}
if (_useAfterTokenTransfer()) {
_afterTokenTransfer(from, address(0), ids, amounts, "");
}
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* INTERNAL APPROVAL FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Approve or remove the `operator` as an operator for `by`,
/// without authorization checks.
///
/// Emits a {ApprovalForAll} event.
function _setApprovalForAll(address by, address operator, bool isApproved) internal virtual {
/// @solidity memory-safe-assembly
assembly {
// Convert to 0 or 1.
isApproved := iszero(iszero(isApproved))
// Update the `isApproved` for (`by`, `operator`).
mstore(0x20, _ERC1155_MASTER_SLOT_SEED)
mstore(0x14, by)
mstore(0x00, operator)
sstore(keccak256(0x0c, 0x34), isApproved)
// Emit the {ApprovalForAll} event.
mstore(0x00, isApproved)
let m := shr(96, not(0))
log3(0x00, 0x20, _APPROVAL_FOR_ALL_EVENT_SIGNATURE, and(m, by), and(m, operator))
}
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* INTERNAL TRANSFER FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Equivalent to `_safeTransfer(address(0), from, to, id, amount, data)`.
function _safeTransfer(address from, address to, uint256 id, uint256 amount, bytes memory data)
internal
virtual
{
_safeTransfer(address(0), from, to, id, amount, data);
}
/// @dev Transfers `amount` of `id` from `from` to `to`.
///
/// Requirements:
/// - `to` cannot be the zero address.
/// - `from` must have at least `amount` of `id`.
/// - If `by` is not the zero address, it must be either `from`,
/// or approved to manage the tokens of `from`.
/// - If `to` refers to a smart contract, it must implement
/// {ERC1155-onERC1155Received}, which is called upon a batch transfer.
///
/// Emits a {TransferSingle} event.
function _safeTransfer(
address by,
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) internal virtual {
if (_useBeforeTokenTransfer()) {
_beforeTokenTransfer(from, to, _single(id), _single(amount), data);
}
/// @solidity memory-safe-assembly
assembly {
let from_ := shl(96, from)
let to_ := shl(96, to)
// Revert if `to` is the zero address.
if iszero(to_) {
mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`.
revert(0x1c, 0x04)
}
mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, from_))
// If `by` is not the zero address, and not equal to `from`,
// check if it is approved to manage all the tokens of `from`.
let by_ := shl(96, by)
if iszero(or(iszero(by_), eq(by_, from_))) {
mstore(0x00, by)
if iszero(sload(keccak256(0x0c, 0x34))) {
mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`.
revert(0x1c, 0x04)
}
}
// Subtract and store the updated balance of `from`.
{
mstore(0x00, id)
let fromBalanceSlot := keccak256(0x00, 0x40)
let fromBalance := sload(fromBalanceSlot)
if gt(amount, fromBalance) {
mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`.
revert(0x1c, 0x04)
}
sstore(fromBalanceSlot, sub(fromBalance, amount))
}
// Increase and store the updated balance of `to`.
{
mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, to_))
let toBalanceSlot := keccak256(0x00, 0x40)
let toBalanceBefore := sload(toBalanceSlot)
let toBalanceAfter := add(toBalanceBefore, amount)
if lt(toBalanceAfter, toBalanceBefore) {
mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`.
revert(0x1c, 0x04)
}
sstore(toBalanceSlot, toBalanceAfter)
}
// Emit a {TransferSingle} event.
mstore(0x20, amount)
// forgefmt: disable-next-line
log4(0x00, 0x40, _TRANSFER_SINGLE_EVENT_SIGNATURE, caller(), shr(96, from_), shr(96, to_))
}
if (_useAfterTokenTransfer()) {
_afterTokenTransfer(from, to, _single(id), _single(amount), data);
}
if (_hasCode(to)) _checkOnERC1155Received(from, to, id, amount, data);
}
/// @dev Equivalent to `_safeBatchTransfer(address(0), from, to, ids, amounts, data)`.
function _safeBatchTransfer(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
_safeBatchTransfer(address(0), from, to, ids, amounts, data);
}
/// @dev Transfers `amounts` of `ids` from `from` to `to`.
///
/// Requirements:
/// - `to` cannot be the zero address.
/// - `ids` and `amounts` must have the same length.
/// - `from` must have at least `amounts` of `ids`.
/// - If `by` is not the zero address, it must be either `from`,
/// or approved to manage the tokens of `from`.
/// - If `to` refers to a smart contract, it must implement
/// {ERC1155-onERC1155BatchReceived}, which is called upon a batch transfer.
///
/// Emits a {TransferBatch} event.
function _safeBatchTransfer(
address by,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
if (_useBeforeTokenTransfer()) {
_beforeTokenTransfer(from, to, ids, amounts, data);
}
/// @solidity memory-safe-assembly
assembly {
function copy(dst_, src_, n_) {
for { let i_ := 0 } lt(i_, n_) { i_ := add(0x20, i_) } {
mstore(add(dst_, i_), mload(add(src_, i_)))
}
}
if iszero(eq(mload(ids), mload(amounts))) {
mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`.
revert(0x1c, 0x04)
}
let from_ := shl(96, from)
let to_ := shl(96, to)
// Revert if `to` is the zero address.
if iszero(to_) {
mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`.
revert(0x1c, 0x04)
}
let fromSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, from_)
let toSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, to_)
mstore(0x20, fromSlotSeed)
// If `by` is not the zero address, and not equal to `from`,
// check if it is approved to manage all the tokens of `from`.
let by_ := shl(96, by)
if iszero(or(iszero(by_), eq(by_, from_))) {
mstore(0x00, by)
if iszero(sload(keccak256(0x0c, 0x34))) {
mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`.
revert(0x1c, 0x04)
}
}
// Loop through all the `ids` and update the balances.
{
for { let i := shl(5, mload(ids)) } i { i := sub(i, 0x20) } {
let amount := mload(add(amounts, i))
// Subtract and store the updated balance of `from`.
{
mstore(0x20, fromSlotSeed)
mstore(0x00, mload(add(ids, i)))
let fromBalanceSlot := keccak256(0x00, 0x40)
let fromBalance := sload(fromBalanceSlot)
if gt(amount, fromBalance) {
mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`.
revert(0x1c, 0x04)
}
sstore(fromBalanceSlot, sub(fromBalance, amount))
}
// Increase and store the updated balance of `to`.
{
mstore(0x20, toSlotSeed)
let toBalanceSlot := keccak256(0x00, 0x40)
let toBalanceBefore := sload(toBalanceSlot)
let toBalanceAfter := add(toBalanceBefore, amount)
if lt(toBalanceAfter, toBalanceBefore) {
mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`.
revert(0x1c, 0x04)
}
sstore(toBalanceSlot, toBalanceAfter)
}
}
}
// Emit a {TransferBatch} event.
{
let m := mload(0x40)
// Copy the `ids`.
mstore(m, 0x40)
let n := add(0x20, shl(5, mload(ids)))
let o := add(m, 0x40)
copy(o, ids, n)
// Copy the `amounts`.
mstore(add(m, 0x20), add(0x40, n))
o := add(o, n)
n := add(0x20, shl(5, mload(amounts)))
copy(o, amounts, n)
n := sub(add(o, n), m)
// Do the emit.
log4(m, n, _TRANSFER_BATCH_EVENT_SIGNATURE, caller(), shr(96, from_), shr(96, to_))
}
}
if (_useAfterTokenTransfer()) {
_afterTokenTransfer(from, to, ids, amounts, data);
}
if (_hasCode(to)) _checkOnERC1155BatchReceived(from, to, ids, amounts, data);
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* HOOKS FOR OVERRIDING */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Override this function to return true if `_beforeTokenTransfer` is used.
/// This is to help the compiler avoid producing dead bytecode.
function _useBeforeTokenTransfer() internal view virtual returns (bool) {
return false;
}
/// @dev Hook that is called before any token transfer.
/// This includes minting and burning, as well as batched variants.
///
/// The same hook is called on both single and batched variants.
/// For single transfers, the length of the `id` and `amount` arrays are 1.
function _beforeTokenTransfer(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {}
/// @dev Override this function to return true if `_afterTokenTransfer` is used.
/// This is to help the compiler avoid producing dead bytecode.
function _useAfterTokenTransfer() internal view virtual returns (bool) {
return false;
}
/// @dev Hook that is called after any token transfer.
/// This includes minting and burning, as well as batched variants.
///
/// The same hook is called on both single and batched variants.
/// For single transfers, the length of the `id` and `amount` arrays are 1.
function _afterTokenTransfer(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* PRIVATE HELPERS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Helper for calling the `_afterTokenTransfer` hook.
/// This is to help the compiler avoid producing dead bytecode.
function _afterTokenTransferCalldata(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) private {
if (_useAfterTokenTransfer()) {
_afterTokenTransfer(from, to, ids, amounts, data);
}
}
/// @dev Returns if `a` has bytecode of non-zero length.
function _hasCode(address a) private view returns (bool result) {
/// @solidity memory-safe-assembly
assembly {
result := extcodesize(a) // Can handle dirty upper bits.
}
}
/// @dev Perform a call to invoke {IERC1155Receiver-onERC1155Received} on `to`.
/// Reverts if the target does not support the function correctly.
function _checkOnERC1155Received(
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) private {
/// @solidity memory-safe-assembly
assembly {
function copy(dst_, src_, n_) {
for { let i_ := 0 } lt(i_, n_) { i_ := add(0x20, i_) } {
mstore(add(dst_, i_), mload(add(src_, i_)))
}
}
// Prepare the calldata.
let m := mload(0x40)
// `onERC1155Received(address,address,uint256,uint256,bytes)`.
mstore(m, 0xf23a6e61)
mstore(add(m, 0x20), caller())
mstore(add(m, 0x40), shr(96, shl(96, from)))
mstore(add(m, 0x60), id)
mstore(add(m, 0x80), amount)
mstore(add(m, 0xa0), 0xa0)
let n := mload(data)
mstore(add(m, 0xc0), n)
copy(add(m, 0xe0), add(data, 0x20), n)
// Revert if the call reverts.
if iszero(call(gas(), to, 0, add(m, 0x1c), add(0xc4, n), m, 0x20)) {
if returndatasize() {
// Bubble up the revert if the call reverts.
returndatacopy(m, 0x00, returndatasize())
revert(m, returndatasize())
}
}
// Load the returndata and compare it with the function selector.
if iszero(eq(mload(m), shl(224, 0xf23a6e61))) {
mstore(0x00, 0x9c05499b) // `TransferToNonERC1155ReceiverImplementer()`.
revert(0x1c, 0x04)
}
}
}
/// @dev Perform a call to invoke {IERC1155Receiver-onERC1155BatchReceived} on `to`.
/// Reverts if the target does not support the function correctly.
function _checkOnERC1155BatchReceived(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) private {
/// @solidity memory-safe-assembly
assembly {
function copy(dst_, src_, n_) {
for { let i_ := 0 } lt(i_, n_) { i_ := add(0x20, i_) } {
mstore(add(dst_, i_), mload(add(src_, i_)))
}
}
// Prepare the calldata.
let m := mload(0x40)
// `onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)`.
mstore(m, 0xbc197c81)
mstore(add(m, 0x20), caller())
mstore(add(m, 0x40), shr(96, shl(96, from)))
// Copy the `ids`.
mstore(add(m, 0x60), 0xa0)
let n := add(0x20, shl(5, mload(ids)))
let o := add(m, 0xc0)
copy(o, ids, n)
// Copy the `amounts`.
let s := add(0xa0, n)
mstore(add(m, 0x80), s)
o := add(o, n)
n := add(0x20, shl(5, mload(amounts)))
copy(o, amounts, n)
// Copy the `data`.
mstore(add(m, 0xa0), add(s, n))
o := add(o, n)
n := add(0x20, mload(data))
copy(o, data, n)
n := sub(add(o, n), add(m, 0x1c))
// Revert if the call reverts.
if iszero(call(gas(), to, 0, add(m, 0x1c), n, m, 0x20)) {
if returndatasize() {
// Bubble up the revert if the call reverts.
returndatacopy(m, 0x00, returndatasize())
revert(m, returndatasize())
}
}
// Load the returndata and compare it with the function selector.
if iszero(eq(mload(m), shl(224, 0xbc197c81))) {
mstore(0x00, 0x9c05499b) // `TransferToNonERC1155ReceiverImplementer()`.
revert(0x1c, 0x04)
}
}
}
/// @dev Returns `x` in an array with a single element.
function _single(uint256 x) private pure returns (uint256[] memory result) {
/// @solidity memory-safe-assembly
assembly {
result := mload(0x40)
mstore(0x40, add(result, 0x40))
mstore(result, 1)
mstore(add(result, 0x20), x)
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import {LibBytes} from "./LibBytes.sol";
/// @notice Library for converting numbers into strings and other string operations.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibString.sol)
/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/LibString.sol)
///
/// @dev Note:
/// For performance and bytecode compactness, most of the string operations are restricted to
/// byte strings (7-bit ASCII), except where otherwise specified.
/// Usage of byte string operations on charsets with runes spanning two or more bytes
/// can lead to undefined behavior.
library LibString {
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* STRUCTS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Goated string storage struct that totally MOGs, no cap, fr.
/// Uses less gas and bytecode than Solidity's native string storage. It's meta af.
/// Packs length with the first 31 bytes if <255 bytes, so it’s mad tight.
struct StringStorage {
bytes32 _spacer;
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* CUSTOM ERRORS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev The length of the output is too small to contain all the hex digits.
error HexLengthInsufficient();
/// @dev The length of the string is more than 32 bytes.
error TooBigForSmallString();
/// @dev The input string must be a 7-bit ASCII.
error StringNot7BitASCII();
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* CONSTANTS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev The constant returned when the `search` is not found in the string.
uint256 internal constant NOT_FOUND = type(uint256).max;
/// @dev Lookup for '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.
uint128 internal constant ALPHANUMERIC_7_BIT_ASCII = 0x7fffffe07fffffe03ff000000000000;
/// @dev Lookup for 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.
uint128 internal constant LETTERS_7_BIT_ASCII = 0x7fffffe07fffffe0000000000000000;
/// @dev Lookup for 'abcdefghijklmnopqrstuvwxyz'.
uint128 internal constant LOWERCASE_7_BIT_ASCII = 0x7fffffe000000000000000000000000;
/// @dev Lookup for 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
uint128 internal constant UPPERCASE_7_BIT_ASCII = 0x7fffffe0000000000000000;
/// @dev Lookup for '0123456789'.
uint128 internal constant DIGITS_7_BIT_ASCII = 0x3ff000000000000;
/// @dev Lookup for '0123456789abcdefABCDEF'.
uint128 internal constant HEXDIGITS_7_BIT_ASCII = 0x7e0000007e03ff000000000000;
/// @dev Lookup for '01234567'.
uint128 internal constant OCTDIGITS_7_BIT_ASCII = 0xff000000000000;
/// @dev Lookup for '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c'.
uint128 internal constant PRINTABLE_7_BIT_ASCII = 0x7fffffffffffffffffffffff00003e00;
/// @dev Lookup for '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'.
uint128 internal constant PUNCTUATION_7_BIT_ASCII = 0x78000001f8000001fc00fffe00000000;
/// @dev Lookup for ' \t\n\r\x0b\x0c'.
uint128 internal constant WHITESPACE_7_BIT_ASCII = 0x100003e00;
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* STRING STORAGE OPERATIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Sets the value of the string storage `$` to `s`.
function set(StringStorage storage $, string memory s) internal {
LibBytes.set(bytesStorage($), bytes(s));
}
/// @dev Sets the value of the string storage `$` to `s`.
function setCalldata(StringStorage storage $, string calldata s) internal {
LibBytes.setCalldata(bytesStorage($), bytes(s));
}
/// @dev Sets the value of the string storage `$` to the empty string.
function clear(StringStorage storage $) internal {
delete $._spacer;
}
/// @dev Returns whether the value stored is `$` is the empty string "".
function isEmpty(StringStorage storage $) internal view returns (bool) {
return uint256($._spacer) & 0xff == uint256(0);
}
/// @dev Returns the length of the value stored in `$`.
function length(StringStorage storage $) internal view returns (uint256) {
return LibBytes.length(bytesStorage($));
}
/// @dev Returns the value stored in `$`.
function get(StringStorage storage $) internal view returns (string memory) {
return string(LibBytes.get(bytesStorage($)));
}
/// @dev Returns the uint8 at index `i`. If out-of-bounds, returns 0.
function uint8At(StringStorage storage $, uint256 i) internal view returns (uint8) {
return LibBytes.uint8At(bytesStorage($), i);
}
/// @dev Helper to cast `$` to a `BytesStorage`.
function bytesStorage(StringStorage storage $)
internal
pure
returns (LibBytes.BytesStorage storage casted)
{
/// @solidity memory-safe-assembly
assembly {
casted.slot := $.slot
}
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* DECIMAL OPERATIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Returns the base 10 decimal representation of `value`.
function toString(uint256 value) internal pure returns (string memory result) {
/// @solidity memory-safe-assembly
assembly {
// The maximum value of a uint256 contains 78 digits (1 byte per digit), but
// we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
// We will need 1 word for the trailing zeros padding, 1 word for the length,
// and 3 words for a maximum of 78 digits.
result := add(mload(0x40), 0x80)
mstore(0x40, add(result, 0x20)) // Allocate memory.
mstore(result, 0) // Zeroize the slot after the string.
let end := result // Cache the end of the memory to calculate the length later.
let w := not(0) // Tsk.
// We write the string from rightmost digit to leftmost digit.
// The following is essentially a do-while loop that also handles the zero case.
for { let temp := value } 1 {} {
result := add(result, w) // `sub(result, 1)`.
// Store the character to the pointer.
// The ASCII index of the '0' character is 48.
mstore8(result, add(48, mod(temp, 10)))
temp := div(temp, 10) // Keep dividing `temp` until zero.
if iszero(temp) { break }
}
let n := sub(end, result)
result := sub(result, 0x20) // Move the pointer 32 bytes back to make room for the length.
mstore(result, n) // Store the length.
}
}
/// @dev Returns the base 10 decimal representation of `value`.
function toString(int256 value) internal pure returns (string memory result) {
if (value >= 0) return toString(uint256(value));
unchecked {
result = toString(~uint256(value) + 1);
}
/// @solidity memory-safe-assembly
assembly {
// We still have some spare memory space on the left,
// as we have allocated 3 words (96 bytes) for up to 78 digits.
let n := mload(result) // Load the string length.
mstore(result, 0x2d) // Store the '-' character.
result := sub(result, 1) // Move back the string pointer by a byte.
mstore(result, add(n, 1)) // Update the string length.
}
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* HEXADECIMAL OPERATIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Returns the hexadecimal representation of `value`,
/// left-padded to an input length of `byteCount` bytes.
/// The output is prefixed with "0x" encoded using 2 hexadecimal digits per byte,
/// giving a total length of `byteCount * 2 + 2` bytes.
/// Reverts if `byteCount` is too small for the output to contain all the digits.
function toHexString(uint256 value, uint256 byteCount)
internal
pure
returns (string memory result)
{
result = toHexStringNoPrefix(value, byteCount);
/// @solidity memory-safe-assembly
assembly {
let n := add(mload(result), 2) // Compute the length.
mstore(result, 0x3078) // Store the "0x" prefix.
result := sub(result, 2) // Move the pointer.
mstore(result, n) // Store the length.
}
}
/// @dev Returns the hexadecimal representation of `value`,
/// left-padded to an input length of `byteCount` bytes.
/// The output is not prefixed with "0x" and is encoded using 2 hexadecimal digits per byte,
/// giving a total length of `byteCount * 2` bytes.
/// Reverts if `byteCount` is too small for the output to contain all the digits.
function toHexStringNoPrefix(uint256 value, uint256 byteCount)
internal
pure
returns (string memory result)
{
/// @solidity memory-safe-assembly
assembly {
// We need 0x20 bytes for the trailing zeros padding, `byteCount * 2` bytes
// for the digits, 0x02 bytes for the prefix, and 0x20 bytes for the length.
// We add 0x20 to the total and round down to a multiple of 0x20.
// (0x20 + 0x20 + 0x02 + 0x20) = 0x62.
result := add(mload(0x40), and(add(shl(1, byteCount), 0x42), not(0x1f)))
mstore(0x40, add(result, 0x20)) // Allocate memory.
mstore(result, 0) // Zeroize the slot after the string.
let end := result // Cache the end to calculate the length later.
// Store "0123456789abcdef" in scratch space.
mstore(0x0f, 0x30313233343536373839616263646566)
let start := sub(result, add(byteCount, byteCount))
let w := not(1) // Tsk.
let temp := value
// We write the string from rightmost digit to leftmost digit.
// The following is essentially a do-while loop that also handles the zero case.
for {} 1 {} {
result := add(result, w) // `sub(result, 2)`.
mstore8(add(result, 1), mload(and(temp, 15)))
mstore8(result, mload(and(shr(4, temp), 15)))
temp := shr(8, temp)
if iszero(xor(result, start)) { break }
}
if temp {
mstore(0x00, 0x2194895a) // `HexLengthInsufficient()`.
revert(0x1c, 0x04)
}
let n := sub(end, result)
result := sub(result, 0x20)
mstore(result, n) // Store the length.
}
}
/// @dev Returns the hexadecimal representation of `value`.
/// The output is prefixed with "0x" and encoded using 2 hexadecimal digits per byte.
/// As address are 20 bytes long, the output will left-padded to have
/// a length of `20 * 2 + 2` bytes.
function toHexString(uint256 value) internal pure returns (string memory result) {
result = toHexStringNoPrefix(value);
/// @solidity memory-safe-assembly
assembly {
let n := add(mload(result), 2) // Compute the length.
mstore(result, 0x3078) // Store the "0x" prefix.
result := sub(result, 2) // Move the pointer.
mstore(result, n) // Store the length.
}
}
/// @dev Returns the hexadecimal representation of `value`.
/// The output is prefixed with "0x".
/// The output excludes leading "0" from the `toHexString` output.
/// `0x00: "0x0", 0x01: "0x1", 0x12: "0x12", 0x123: "0x123"`.
function toMinimalHexString(uint256 value) internal pure returns (string memory result) {
result = toHexStringNoPrefix(value);
/// @solidity memory-safe-assembly
assembly {
let o := eq(byte(0, mload(add(result, 0x20))), 0x30) // Whether leading zero is present.
let n := add(mload(result), 2) // Compute the length.
mstore(add(result, o), 0x3078) // Store the "0x" prefix, accounting for leading zero.
result := sub(add(result, o), 2) // Move the pointer, accounting for leading zero.
mstore(result, sub(n, o)) // Store the length, accounting for leading zero.
}
}
/// @dev Returns the hexadecimal representation of `value`.
/// The output excludes leading "0" from the `toHexStringNoPrefix` output.
/// `0x00: "0", 0x01: "1", 0x12: "12", 0x123: "123"`.
function toMinimalHexStringNoPrefix(uint256 value)
internal
pure
returns (string memory result)
{
result = toHexStringNoPrefix(value);
/// @solidity memory-safe-assembly
assembly {
let o := eq(byte(0, mload(add(result, 0x20))), 0x30) // Whether leading zero is present.
let n := mload(result) // Get the length.
result := add(result, o) // Move the pointer, accounting for leading zero.
mstore(result, sub(n, o)) // Store the length, accounting for leading zero.
}
}
/// @dev Returns the hexadecimal representation of `value`.
/// The output is encoded using 2 hexadecimal digits per byte.
/// As address are 20 bytes long, the output will left-padded to have
/// a length of `20 * 2` bytes.
function toHexStringNoPrefix(uint256 value) internal pure returns (string memory result) {
/// @solidity memory-safe-assembly
assembly {
// We need 0x20 bytes for the trailing zeros padding, 0x20 bytes for the length,
// 0x02 bytes for the prefix, and 0x40 bytes for the digits.
// The next multiple of 0x20 above (0x20 + 0x20 + 0x02 + 0x40) is 0xa0.
result := add(mload(0x40), 0x80)
mstore(0x40, add(result, 0x20)) // Allocate memory.
mstore(result, 0) // Zeroize the slot after the string.
let end := result // Cache the end to calculate the length later.
mstore(0x0f, 0x30313233343536373839616263646566) // Store the "0123456789abcdef" lookup.
let w := not(1) // Tsk.
// We write the string from rightmost digit to leftmost digit.
// The following is essentially a do-while loop that also handles the zero case.
for { let temp := value } 1 {} {
result := add(result, w) // `sub(result, 2)`.
mstore8(add(result, 1), mload(and(temp, 15)))
mstore8(result, mload(and(shr(4, temp), 15)))
temp := shr(8, temp)
if iszero(temp) { break }
}
let n := sub(end, result)
result := sub(result, 0x20)
mstore(result, n) // Store the length.
}
}
/// @dev Returns the hexadecimal representation of `value`.
/// The output is prefixed with "0x", encoded using 2 hexadecimal digits per byte,
/// and the alphabets are capitalized conditionally according to
/// https://eips.ethereum.org/EIPS/eip-55
function toHexStringChecksummed(address value) internal pure returns (string memory result) {
result = toHexString(value);
/// @solidity memory-safe-assembly
assembly {
let mask := shl(6, div(not(0), 255)) // `0b010000000100000000 ...`
let o := add(result, 0x22)
let hashed := and(keccak256(o, 40), mul(34, mask)) // `0b10001000 ... `
let t := shl(240, 136) // `0b10001000 << 240`
for { let i := 0 } 1 {} {
mstore(add(i, i), mul(t, byte(i, hashed)))
i := add(i, 1)
if eq(i, 20) { break }
}
mstore(o, xor(mload(o), shr(1, and(mload(0x00), and(mload(o), mask)))))
o := add(o, 0x20)
mstore(o, xor(mload(o), shr(1, and(mload(0x20), and(mload(o), mask)))))
}
}
/// @dev Returns the hexadecimal representation of `value`.
/// The output is prefixed with "0x" and encoded using 2 hexadecimal digits per byte.
function toHexString(address value) internal pure returns (string memory result) {
result = toHexStringNoPrefix(value);
/// @solidity memory-safe-assembly
assembly {
let n := add(mload(result), 2) // Compute the length.
mstore(result, 0x3078) // Store the "0x" prefix.
result := sub(result, 2) // Move the pointer.
mstore(result, n) // Store the length.
}
}
/// @dev Returns the hexadecimal representation of `value`.
/// The output is encoded using 2 hexadecimal digits per byte.
function toHexStringNoPrefix(address value) internal pure returns (string memory result) {
/// @solidity memory-safe-assembly
assembly {
result := mload(0x40)
// Allocate memory.
// We need 0x20 bytes for the trailing zeros padding, 0x20 bytes for the length,
// 0x02 bytes for the prefix, and 0x28 bytes for the digits.
// The next multiple of 0x20 above (0x20 + 0x20 + 0x02 + 0x28) is 0x80.
mstore(0x40, add(result, 0x80))
mstore(0x0f, 0x30313233343536373839616263646566) // Store the "0123456789abcdef" lookup.
result := add(result, 2)
mstore(result, 40) // Store the length.
let o := add(result, 0x20)
mstore(add(o, 40), 0) // Zeroize the slot after the string.
value := shl(96, value)
// We write the string from rightmost digit to leftmost digit.
// The following is essentially a do-while loop that also handles the zero case.
for { let i := 0 } 1 {} {
let p := add(o, add(i, i))
let temp := byte(i, value)
mstore8(add(p, 1), mload(and(temp, 15)))
mstore8(p, mload(shr(4, temp)))
i := add(i, 1)
if eq(i, 20) { break }
}
}
}
/// @dev Returns the hex encoded string from the raw bytes.
/// The output is encoded using 2 hexadecimal digits per byte.
function toHexString(bytes memory raw) internal pure returns (string memory result) {
result = toHexStringNoPrefix(raw);
/// @solidity memory-safe-assembly
assembly {
let n := add(mload(result), 2) // Compute the length.
mstore(result, 0x3078) // Store the "0x" prefix.
result := sub(result, 2) // Move the pointer.
mstore(result, n) // Store the length.
}
}
/// @dev Returns the hex encoded string from the raw bytes.
/// The output is encoded using 2 hexadecimal digits per byte.
function toHexStringNoPrefix(bytes memory raw) internal pure returns (string memory result) {
/// @solidity memory-safe-assembly
assembly {
let n := mload(raw)
result := add(mload(0x40), 2) // Skip 2 bytes for the optional prefix.
mstore(result, add(n, n)) // Store the length of the output.
mstore(0x0f, 0x30313233343536373839616263646566) // Store the "0123456789abcdef" lookup.
let o := add(result, 0x20)
let end := add(raw, n)
for {} iszero(eq(raw, end)) {} {
raw := add(raw, 1)
mstore8(add(o, 1), mload(and(mload(raw), 15)))
mstore8(o, mload(and(shr(4, mload(raw)), 15)))
o := add(o, 2)
}
mstore(o, 0) // Zeroize the slot after the string.
mstore(0x40, add(o, 0x20)) // Allocate memory.
}
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* RUNE STRING OPERATIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Returns the number of UTF characters in the string.
function runeCount(string memory s) internal pure returns (uint256 result) {
/// @solidity memory-safe-assembly
assembly {
if mload(s) {
mstore(0x00, div(not(0), 255))
mstore(0x20, 0x0202020202020202020202020202020202020202020202020303030304040506)
let o := add(s, 0x20)
let end := add(o, mload(s))
for { result := 1 } 1 { result := add(result, 1) } {
o := add(o, byte(0, mload(shr(250, mload(o)))))
if iszero(lt(o, end)) { break }
}
}
}
}
/// @dev Returns if this string is a 7-bit ASCII string.
/// (i.e. all characters codes are in [0..127])
function is7BitASCII(string memory s) internal pure returns (bool result) {
/// @solidity memory-safe-assembly
assembly {
result := 1
let mask := shl(7, div(not(0), 255))
let n := mload(s)
if n {
let o := add(s, 0x20)
let end := add(o, n)
let last := mload(end)
mstore(end, 0)
for {} 1 {} {
if and(mask, mload(o)) {
result := 0
break
}
o := add(o, 0x20)
if iszero(lt(o, end)) { break }
}
mstore(end, last)
}
}
}
/// @dev Returns if this string is a 7-bit ASCII string,
/// AND all characters are in the `allowed` lookup.
/// Note: If `s` is empty, returns true regardless of `allowed`.
function is7BitASCII(string memory s, uint128 allowed) internal pure returns (bool result) {
/// @solidity memory-safe-assembly
assembly {
result := 1
if mload(s) {
let allowed_ := shr(128, shl(128, allowed))
let o := add(s, 0x20)
for { let end := add(o, mload(s)) } 1 {} {
result := and(result, shr(byte(0, mload(o)), allowed_))
o := add(o, 1)
if iszero(and(result, lt(o, end))) { break }
}
}
}
}
/// @dev Converts the bytes in the 7-bit ASCII string `s` to
/// an allowed lookup for use in `is7BitASCII(s, allowed)`.
/// To save runtime gas, you can cache the result in an immutable variable.
function to7BitASCIIAllowedLookup(string memory s) internal pure returns (uint128 result) {
/// @solidity memory-safe-assembly
assembly {
if mload(s) {
let o := add(s, 0x20)
for { let end := add(o, mload(s)) } 1 {} {
result := or(result, shl(byte(0, mload(o)), 1))
o := add(o, 1)
if iszero(lt(o, end)) { break }
}
if shr(128, result) {
mstore(0x00, 0xc9807e0d) // `StringNot7BitASCII()`.
revert(0x1c, 0x04)
}
}
}
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* BYTE STRING OPERATIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
// For performance and bytecode compactness, byte string operations are restricted
// to 7-bit ASCII strings. All offsets are byte offsets, not UTF character offsets.
// Usage of byte string operations on charsets with runes spanning two or more bytes
// can lead to undefined behavior.
/// @dev Returns `subject` all occurrences of `needle` replaced with `replacement`.
function replace(string memory subject, string memory needle, string memory replacement)
internal
pure
returns (string memory)
{
return string(LibBytes.replace(bytes(subject), bytes(needle), bytes(replacement)));
}
/// @dev Returns the byte index of the first location of `needle` in `subject`,
/// needleing from left to right, starting from `from`.
/// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found.
function indexOf(string memory subject, string memory needle, uint256 from)
internal
pure
returns (uint256)
{
return LibBytes.indexOf(bytes(subject), bytes(needle), from);
}
/// @dev Returns the byte index of the first location of `needle` in `subject`,
/// needleing from left to right.
/// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found.
function indexOf(string memory subject, string memory needle) internal pure returns (uint256) {
return LibBytes.indexOf(bytes(subject), bytes(needle), 0);
}
/// @dev Returns the byte index of the first location of `needle` in `subject`,
/// needleing from right to left, starting from `from`.
/// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found.
function lastIndexOf(string memory subject, string memory needle, uint256 from)
internal
pure
returns (uint256)
{
return LibBytes.lastIndexOf(bytes(subject), bytes(needle), from);
}
/// @dev Returns the byte index of the first location of `needle` in `subject`,
/// needleing from right to left.
/// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found.
function lastIndexOf(string memory subject, string memory needle)
internal
pure
returns (uint256)
{
return LibBytes.lastIndexOf(bytes(subject), bytes(needle), type(uint256).max);
}
/// @dev Returns true if `needle` is found in `subject`, false otherwise.
function contains(string memory subject, string memory needle) internal pure returns (bool) {
return LibBytes.contains(bytes(subject), bytes(needle));
}
/// @dev Returns whether `subject` starts with `needle`.
function startsWith(string memory subject, string memory needle) internal pure returns (bool) {
return LibBytes.startsWith(bytes(subject), bytes(needle));
}
/// @dev Returns whether `subject` ends with `needle`.
function endsWith(string memory subject, string memory needle) internal pure returns (bool) {
return LibBytes.endsWith(bytes(subject), bytes(needle));
}
/// @dev Returns `subject` repeated `times`.
function repeat(string memory subject, uint256 times) internal pure returns (string memory) {
return string(LibBytes.repeat(bytes(subject), times));
}
/// @dev Returns a copy of `subject` sliced from `start` to `end` (exclusive).
/// `start` and `end` are byte offsets.
function slice(string memory subject, uint256 start, uint256 end)
internal
pure
returns (string memory)
{
return string(LibBytes.slice(bytes(subject), start, end));
}
/// @dev Returns a copy of `subject` sliced from `start` to the end of the string.
/// `start` is a byte offset.
function slice(string memory subject, uint256 start) internal pure returns (string memory) {
return string(LibBytes.slice(bytes(subject), start, type(uint256).max));
}
/// @dev Returns all the indices of `needle` in `subject`.
/// The indices are byte offsets.
function indicesOf(string memory subject, string memory needle)
internal
pure
returns (uint256[] memory)
{
return LibBytes.indicesOf(bytes(subject), bytes(needle));
}
/// @dev Returns an arrays of strings based on the `delimiter` inside of the `subject` string.
function split(string memory subject, string memory delimiter)
internal
pure
returns (string[] memory result)
{
bytes[] memory a = LibBytes.split(bytes(subject), bytes(delimiter));
/// @solidity memory-safe-assembly
assembly {
result := a
}
}
/// @dev Returns a concatenated string of `a` and `b`.
/// Cheaper than `string.concat()` and does not de-align the free memory pointer.
function concat(string memory a, string memory b) internal pure returns (string memory) {
return string(LibBytes.concat(bytes(a), bytes(b)));
}
/// @dev Returns a copy of the string in either lowercase or UPPERCASE.
/// WARNING! This function is only compatible with 7-bit ASCII strings.
function toCase(string memory subject, bool toUpper)
internal
pure
returns (string memory result)
{
/// @solidity memory-safe-assembly
assembly {
let n := mload(subject)
if n {
result := mload(0x40)
let o := add(result, 0x20)
let d := sub(subject, result)
let flags := shl(add(70, shl(5, toUpper)), 0x3ffffff)
for { let end := add(o, n) } 1 {} {
let b := byte(0, mload(add(d, o)))
mstore8(o, xor(and(shr(b, flags), 0x20), b))
o := add(o, 1)
if eq(o, end) { break }
}
mstore(result, n) // Store the length.
mstore(o, 0) // Zeroize the slot after the string.
mstore(0x40, add(o, 0x20)) // Allocate memory.
}
}
}
/// @dev Returns a string from a small bytes32 string.
/// `s` must be null-terminated, or behavior will be undefined.
function fromSmallString(bytes32 s) internal pure returns (string memory result) {
/// @solidity memory-safe-assembly
assembly {
result := mload(0x40)
let n := 0
for {} byte(n, s) { n := add(n, 1) } {} // Scan for '\0'.
mstore(result, n) // Store the length.
let o := add(result, 0x20)
mstore(o, s) // Store the bytes of the string.
mstore(add(o, n), 0) // Zeroize the slot after the string.
mstore(0x40, add(result, 0x40)) // Allocate memory.
}
}
/// @dev Returns the small string, with all bytes after the first null byte zeroized.
function normalizeSmallString(bytes32 s) internal pure returns (bytes32 result) {
/// @solidity memory-safe-assembly
assembly {
for {} byte(result, s) { result := add(result, 1) } {} // Scan for '\0'.
mstore(0x00, s)
mstore(result, 0x00)
result := mload(0x00)
}
}
/// @dev Returns the string as a normalized null-terminated small string.
function toSmallString(string memory s) internal pure returns (bytes32 result) {
/// @solidity memory-safe-assembly
assembly {
result := mload(s)
if iszero(lt(result, 33)) {
mstore(0x00, 0xec92f9a3) // `TooBigForSmallString()`.
revert(0x1c, 0x04)
}
result := shl(shl(3, sub(32, result)), mload(add(s, result)))
}
}
/// @dev Returns a lowercased copy of the string.
/// WARNING! This function is only compatible with 7-bit ASCII strings.
function lower(string memory subject) internal pure returns (string memory result) {
result = toCase(subject, false);
}
/// @dev Returns an UPPERCASED copy of the string.
/// WARNING! This function is only compatible with 7-bit ASCII strings.
function upper(string memory subject) internal pure returns (string memory result) {
result = toCase(subject, true);
}
/// @dev Escapes the string to be used within HTML tags.
function escapeHTML(string memory s) internal pure returns (string memory result) {
/// @solidity memory-safe-assembly
assembly {
result := mload(0x40)
let end := add(s, mload(s))
let o := add(result, 0x20)
// Store the bytes of the packed offsets and strides into the scratch space.
// `packed = (stride << 5) | offset`. Max offset is 20. Max stride is 6.
mstore(0x1f, 0x900094)
mstore(0x08, 0xc0000000a6ab)
// Store ""&'<>" into the scratch space.
mstore(0x00, shl(64, 0x2671756f743b26616d703b262333393b266c743b2667743b))
for {} iszero(eq(s, end)) {} {
s := add(s, 1)
let c := and(mload(s), 0xff)
// Not in `["\"","'","&","<",">"]`.
if iszero(and(shl(c, 1), 0x500000c400000000)) {
mstore8(o, c)
o := add(o, 1)
continue
}
let t := shr(248, mload(c))
mstore(o, mload(and(t, 0x1f)))
o := add(o, shr(5, t))
}
mstore(o, 0) // Zeroize the slot after the string.
mstore(result, sub(o, add(result, 0x20))) // Store the length.
mstore(0x40, add(o, 0x20)) // Allocate memory.
}
}
/// @dev Escapes the string to be used within double-quotes in a JSON.
/// If `addDoubleQuotes` is true, the result will be enclosed in double-quotes.
function escapeJSON(string memory s, bool addDoubleQuotes)
internal
pure
returns (string memory result)
{
/// @solidity memory-safe-assembly
assembly {
result := mload(0x40)
let o := add(result, 0x20)
if addDoubleQuotes {
mstore8(o, 34)
o := add(1, o)
}
// Store "\\u0000" in scratch space.
// Store "0123456789abcdef" in scratch space.
// Also, store `{0x08:"b", 0x09:"t", 0x0a:"n", 0x0c:"f", 0x0d:"r"}`.
// into the scratch space.
mstore(0x15, 0x5c75303030303031323334353637383961626364656662746e006672)
// Bitmask for detecting `["\"","\\"]`.
let e := or(shl(0x22, 1), shl(0x5c, 1))
for { let end := add(s, mload(s)) } iszero(eq(s, end)) {} {
s := add(s, 1)
let c := and(mload(s), 0xff)
if iszero(lt(c, 0x20)) {
if iszero(and(shl(c, 1), e)) {
// Not in `["\"","\\"]`.
mstore8(o, c)
o := add(o, 1)
continue
}
mstore8(o, 0x5c) // "\\".
mstore8(add(o, 1), c)
o := add(o, 2)
continue
}
if iszero(and(shl(c, 1), 0x3700)) {
// Not in `["\b","\t","\n","\f","\d"]`.
mstore8(0x1d, mload(shr(4, c))) // Hex value.
mstore8(0x1e, mload(and(c, 15))) // Hex value.
mstore(o, mload(0x19)) // "\\u00XX".
o := add(o, 6)
continue
}
mstore8(o, 0x5c) // "\\".
mstore8(add(o, 1), mload(add(c, 8)))
o := add(o, 2)
}
if addDoubleQuotes {
mstore8(o, 34)
o := add(1, o)
}
mstore(o, 0) // Zeroize the slot after the string.
mstore(result, sub(o, add(result, 0x20))) // Store the length.
mstore(0x40, add(o, 0x20)) // Allocate memory.
}
}
/// @dev Escapes the string to be used within double-quotes in a JSON.
function escapeJSON(string memory s) internal pure returns (string memory result) {
result = escapeJSON(s, false);
}
/// @dev Encodes `s` so that it can be safely used in a URI,
/// just like `encodeURIComponent` in JavaScript.
/// See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
/// See: https://datatracker.ietf.org/doc/html/rfc2396
/// See: https://datatracker.ietf.org/doc/html/rfc3986
function encodeURIComponent(string memory s) internal pure returns (string memory result) {
/// @solidity memory-safe-assembly
assembly {
result := mload(0x40)
// Store "0123456789ABCDEF" in scratch space.
// Uppercased to be consistent with JavaScript's implementation.
mstore(0x0f, 0x30313233343536373839414243444546)
let o := add(result, 0x20)
for { let end := add(s, mload(s)) } iszero(eq(s, end)) {} {
s := add(s, 1)
let c := and(mload(s), 0xff)
// If not in `[0-9A-Z-a-z-_.!~*'()]`.
if iszero(and(1, shr(c, 0x47fffffe87fffffe03ff678200000000))) {
mstore8(o, 0x25) // '%'.
mstore8(add(o, 1), mload(and(shr(4, c), 15)))
mstore8(add(o, 2), mload(and(c, 15)))
o := add(o, 3)
continue
}
mstore8(o, c)
o := add(o, 1)
}
mstore(result, sub(o, add(result, 0x20))) // Store the length.
mstore(o, 0) // Zeroize the slot after the string.
mstore(0x40, add(o, 0x20)) // Allocate memory.
}
}
/// @dev Returns whether `a` equals `b`.
function eq(string memory a, string memory b) internal pure returns (bool result) {
/// @solidity memory-safe-assembly
assembly {
result := eq(keccak256(add(a, 0x20), mload(a)), keccak256(add(b, 0x20), mload(b)))
}
}
/// @dev Returns whether `a` equals `b`, where `b` is a null-terminated small string.
function eqs(string memory a, bytes32 b) internal pure returns (bool result) {
/// @solidity memory-safe-assembly
assembly {
// These should be evaluated on compile time, as far as possible.
let m := not(shl(7, div(not(iszero(b)), 255))) // `0x7f7f ...`.
let x := not(or(m, or(b, add(m, and(b, m)))))
let r := shl(7, iszero(iszero(shr(128, x))))
r := or(r, shl(6, iszero(iszero(shr(64, shr(r, x))))))
r := or(r, shl(5, lt(0xffffffff, shr(r, x))))
r := or(r, shl(4, lt(0xffff, shr(r, x))))
r := or(r, shl(3, lt(0xff, shr(r, x))))
// forgefmt: disable-next-item
result := gt(eq(mload(a), add(iszero(x), xor(31, shr(3, r)))),
xor(shr(add(8, r), b), shr(add(8, r), mload(add(a, 0x20)))))
}
}
/// @dev Returns 0 if `a == b`, -1 if `a < b`, +1 if `a > b`.
/// If `a` == b[:a.length]`, and `a.length < b.length`, returns -1.
function cmp(string memory a, string memory b) internal pure returns (int256) {
return LibBytes.cmp(bytes(a), bytes(b));
}
/// @dev Packs a single string with its length into a single word.
/// Returns `bytes32(0)` if the length is zero or greater than 31.
function packOne(string memory a) internal pure returns (bytes32 result) {
/// @solidity memory-safe-assembly
assembly {
// We don't need to zero right pad the string,
// since this is our own custom non-standard packing scheme.
result :=
mul(
// Load the length and the bytes.
mload(add(a, 0x1f)),
// `length != 0 && length < 32`. Abuses underflow.
// Assumes that the length is valid and within the block gas limit.
lt(sub(mload(a), 1), 0x1f)
)
}
}
/// @dev Unpacks a string packed using {packOne}.
/// Returns the empty string if `packed` is `bytes32(0)`.
/// If `packed` is not an output of {packOne}, the output behavior is undefined.
function unpackOne(bytes32 packed) internal pure returns (string memory result) {
/// @solidity memory-safe-assembly
assembly {
result := mload(0x40) // Grab the free memory pointer.
mstore(0x40, add(result, 0x40)) // Allocate 2 words (1 for the length, 1 for the bytes).
mstore(result, 0) // Zeroize the length slot.
mstore(add(result, 0x1f), packed) // Store the length and bytes.
mstore(add(add(result, 0x20), mload(result)), 0) // Right pad with zeroes.
}
}
/// @dev Packs two strings with their lengths into a single word.
/// Returns `bytes32(0)` if combined length is zero or greater than 30.
function packTwo(string memory a, string memory b) internal pure returns (bytes32 result) {
/// @solidity memory-safe-assembly
assembly {
let aLen := mload(a)
// We don't need to zero right pad the strings,
// since this is our own custom non-standard packing scheme.
result :=
mul(
or( // Load the length and the bytes of `a` and `b`.
shl(shl(3, sub(0x1f, aLen)), mload(add(a, aLen))), mload(sub(add(b, 0x1e), aLen))),
// `totalLen != 0 && totalLen < 31`. Abuses underflow.
// Assumes that the lengths are valid and within the block gas limit.
lt(sub(add(aLen, mload(b)), 1), 0x1e)
)
}
}
/// @dev Unpacks strings packed using {packTwo}.
/// Returns the empty strings if `packed` is `bytes32(0)`.
/// If `packed` is not an output of {packTwo}, the output behavior is undefined.
function unpackTwo(bytes32 packed)
internal
pure
returns (string memory resultA, string memory resultB)
{
/// @solidity memory-safe-assembly
assembly {
resultA := mload(0x40) // Grab the free memory pointer.
resultB := add(resultA, 0x40)
// Allocate 2 words for each string (1 for the length, 1 for the byte). Total 4 words.
mstore(0x40, add(resultB, 0x40))
// Zeroize the length slots.
mstore(resultA, 0)
mstore(resultB, 0)
// Store the lengths and bytes.
mstore(add(resultA, 0x1f), packed)
mstore(add(resultB, 0x1f), mload(add(add(resultA, 0x20), mload(resultA))))
// Right pad with zeroes.
mstore(add(add(resultA, 0x20), mload(resultA)), 0)
mstore(add(add(resultB, 0x20), mload(resultB)), 0)
}
}
/// @dev Directly returns `a` without copying.
function directReturn(string memory a) internal pure {
/// @solidity memory-safe-assembly
assembly {
// Assumes that the string does not start from the scratch space.
let retStart := sub(a, 0x20)
let retUnpaddedSize := add(mload(a), 0x40)
// Right pad with zeroes. Just in case the string is produced
// by a method that doesn't zero right pad.
mstore(add(retStart, retUnpaddedSize), 0)
mstore(retStart, 0x20) // Store the return offset.
// End the transaction, returning the string.
return(retStart, and(not(0x1f), add(0x1f, retUnpaddedSize)))
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/common/ERC2981.sol)
pragma solidity ^0.8.20;
import {IERC2981} from "../../interfaces/IERC2981.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
*
* Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
* specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
*
* Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
* fee is specified in basis points by default.
*
* IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
* https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the ERC. Marketplaces are expected to
* voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
*/
abstract contract ERC2981 is IERC2981, ERC165 {
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
RoyaltyInfo private _defaultRoyaltyInfo;
mapping(uint256 tokenId => RoyaltyInfo) private _tokenRoyaltyInfo;
/**
* @dev The default royalty set is invalid (eg. (numerator / denominator) >= 1).
*/
error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator);
/**
* @dev The default royalty receiver is invalid.
*/
error ERC2981InvalidDefaultRoyaltyReceiver(address receiver);
/**
* @dev The royalty set for a specific `tokenId` is invalid (eg. (numerator / denominator) >= 1).
*/
error ERC2981InvalidTokenRoyalty(uint256 tokenId, uint256 numerator, uint256 denominator);
/**
* @dev The royalty receiver for `tokenId` is invalid.
*/
error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver);
/// @inheritdoc IERC165
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {
return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
}
/// @inheritdoc IERC2981
function royaltyInfo(
uint256 tokenId,
uint256 salePrice
) public view virtual returns (address receiver, uint256 amount) {
RoyaltyInfo storage _royaltyInfo = _tokenRoyaltyInfo[tokenId];
address royaltyReceiver = _royaltyInfo.receiver;
uint96 royaltyFraction = _royaltyInfo.royaltyFraction;
if (royaltyReceiver == address(0)) {
royaltyReceiver = _defaultRoyaltyInfo.receiver;
royaltyFraction = _defaultRoyaltyInfo.royaltyFraction;
}
uint256 royaltyAmount = (salePrice * royaltyFraction) / _feeDenominator();
return (royaltyReceiver, royaltyAmount);
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
return 10000;
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
uint256 denominator = _feeDenominator();
if (feeNumerator > denominator) {
// Royalty fee will exceed the sale price
revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator);
}
if (receiver == address(0)) {
revert ERC2981InvalidDefaultRoyaltyReceiver(address(0));
}
_defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
}
/**
* @dev Removes default royalty information.
*/
function _deleteDefaultRoyalty() internal virtual {
delete _defaultRoyaltyInfo;
}
/**
* @dev Sets the royalty information for a specific token id, overriding the global default.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual {
uint256 denominator = _feeDenominator();
if (feeNumerator > denominator) {
// Royalty fee will exceed the sale price
revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator);
}
if (receiver == address(0)) {
revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0));
}
_tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
}
/**
* @dev Resets royalty information for the token id back to the global default.
*/
function _resetTokenRoyalty(uint256 tokenId) internal virtual {
delete _tokenRoyaltyInfo[tokenId];
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
/**
* @author emo.eth
* @notice Abstract smart contract that provides an onlyUninitialized modifier which only allows calling when
* from within a constructor of some sort, whether directly instantiating an inherting contract,
* or when delegatecalling from a proxy
*/
abstract contract ConstructorInitializable {
error AlreadyInitialized();
modifier onlyConstructor() {
if (address(this).code.length != 0) {
revert AlreadyInitialized();
}
_;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC2981.sol)
pragma solidity >=0.6.2;
import {IERC165} from "../utils/introspection/IERC165.sol";
/**
* @dev Interface for the NFT Royalty Standard.
*
* A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
* support for royalty payments across all NFT marketplaces and ecosystem participants.
*/
interface IERC2981 is IERC165 {
/**
* @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
* exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
*
* NOTE: ERC-2981 allows setting the royalty to 100% of the price. In that case all the price would be sent to the
* royalty receiver and 0 tokens to the seller. Contracts dealing with royalty should consider empty transfers.
*/
function royaltyInfo(
uint256 tokenId,
uint256 salePrice
) external view returns (address receiver, uint256 royaltyAmount);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.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 ERC-165 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 {
/// @inheritdoc IERC165
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/// @notice Library for byte related operations.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibBytes.sol)
library LibBytes {
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* STRUCTS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Goated bytes storage struct that totally MOGs, no cap, fr.
/// Uses less gas and bytecode than Solidity's native bytes storage. It's meta af.
/// Packs length with the first 31 bytes if <255 bytes, so it’s mad tight.
struct BytesStorage {
bytes32 _spacer;
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* CONSTANTS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev The constant returned when the `search` is not found in the bytes.
uint256 internal constant NOT_FOUND = type(uint256).max;
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* BYTE STORAGE OPERATIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Sets the value of the bytes storage `$` to `s`.
function set(BytesStorage storage $, bytes memory s) internal {
/// @solidity memory-safe-assembly
assembly {
let n := mload(s)
let packed := or(0xff, shl(8, n))
for { let i := 0 } 1 {} {
if iszero(gt(n, 0xfe)) {
i := 0x1f
packed := or(n, shl(8, mload(add(s, i))))
if iszero(gt(n, i)) { break }
}
let o := add(s, 0x20)
mstore(0x00, $.slot)
for { let p := keccak256(0x00, 0x20) } 1 {} {
sstore(add(p, shr(5, i)), mload(add(o, i)))
i := add(i, 0x20)
if iszero(lt(i, n)) { break }
}
break
}
sstore($.slot, packed)
}
}
/// @dev Sets the value of the bytes storage `$` to `s`.
function setCalldata(BytesStorage storage $, bytes calldata s) internal {
/// @solidity memory-safe-assembly
assembly {
let packed := or(0xff, shl(8, s.length))
for { let i := 0 } 1 {} {
if iszero(gt(s.length, 0xfe)) {
i := 0x1f
packed := or(s.length, shl(8, shr(8, calldataload(s.offset))))
if iszero(gt(s.length, i)) { break }
}
mstore(0x00, $.slot)
for { let p := keccak256(0x00, 0x20) } 1 {} {
sstore(add(p, shr(5, i)), calldataload(add(s.offset, i)))
i := add(i, 0x20)
if iszero(lt(i, s.length)) { break }
}
break
}
sstore($.slot, packed)
}
}
/// @dev Sets the value of the bytes storage `$` to the empty bytes.
function clear(BytesStorage storage $) internal {
delete $._spacer;
}
/// @dev Returns whether the value stored is `$` is the empty bytes "".
function isEmpty(BytesStorage storage $) internal view returns (bool) {
return uint256($._spacer) & 0xff == uint256(0);
}
/// @dev Returns the length of the value stored in `$`.
function length(BytesStorage storage $) internal view returns (uint256 result) {
result = uint256($._spacer);
/// @solidity memory-safe-assembly
assembly {
let n := and(0xff, result)
result := or(mul(shr(8, result), eq(0xff, n)), mul(n, iszero(eq(0xff, n))))
}
}
/// @dev Returns the value stored in `$`.
function get(BytesStorage storage $) internal view returns (bytes memory result) {
/// @solidity memory-safe-assembly
assembly {
result := mload(0x40)
let o := add(result, 0x20)
let packed := sload($.slot)
let n := shr(8, packed)
for { let i := 0 } 1 {} {
if iszero(eq(or(packed, 0xff), packed)) {
mstore(o, packed)
n := and(0xff, packed)
i := 0x1f
if iszero(gt(n, i)) { break }
}
mstore(0x00, $.slot)
for { let p := keccak256(0x00, 0x20) } 1 {} {
mstore(add(o, i), sload(add(p, shr(5, i))))
i := add(i, 0x20)
if iszero(lt(i, n)) { break }
}
break
}
mstore(result, n) // Store the length of the memory.
mstore(add(o, n), 0) // Zeroize the slot after the bytes.
mstore(0x40, add(add(o, n), 0x20)) // Allocate memory.
}
}
/// @dev Returns the uint8 at index `i`. If out-of-bounds, returns 0.
function uint8At(BytesStorage storage $, uint256 i) internal view returns (uint8 result) {
/// @solidity memory-safe-assembly
assembly {
for { let packed := sload($.slot) } 1 {} {
if iszero(eq(or(packed, 0xff), packed)) {
if iszero(gt(i, 0x1e)) {
result := byte(i, packed)
break
}
if iszero(gt(i, and(0xff, packed))) {
mstore(0x00, $.slot)
let j := sub(i, 0x1f)
result := byte(and(j, 0x1f), sload(add(keccak256(0x00, 0x20), shr(5, j))))
}
break
}
if iszero(gt(i, shr(8, packed))) {
mstore(0x00, $.slot)
result := byte(and(i, 0x1f), sload(add(keccak256(0x00, 0x20), shr(5, i))))
}
break
}
}
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* BYTES OPERATIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Returns `subject` all occurrences of `needle` replaced with `replacement`.
function replace(bytes memory subject, bytes memory needle, bytes memory replacement)
internal
pure
returns (bytes memory result)
{
/// @solidity memory-safe-assembly
assembly {
result := mload(0x40)
let needleLen := mload(needle)
let replacementLen := mload(replacement)
let d := sub(result, subject) // Memory difference.
let i := add(subject, 0x20) // Subject bytes pointer.
mstore(0x00, add(i, mload(subject))) // End of subject.
if iszero(gt(needleLen, mload(subject))) {
let subjectSearchEnd := add(sub(mload(0x00), needleLen), 1)
let h := 0 // The hash of `needle`.
if iszero(lt(needleLen, 0x20)) { h := keccak256(add(needle, 0x20), needleLen) }
let s := mload(add(needle, 0x20))
for { let m := shl(3, sub(0x20, and(needleLen, 0x1f))) } 1 {} {
let t := mload(i)
// Whether the first `needleLen % 32` bytes of `subject` and `needle` matches.
if iszero(shr(m, xor(t, s))) {
if h {
if iszero(eq(keccak256(i, needleLen), h)) {
mstore(add(i, d), t)
i := add(i, 1)
if iszero(lt(i, subjectSearchEnd)) { break }
continue
}
}
// Copy the `replacement` one word at a time.
for { let j := 0 } 1 {} {
mstore(add(add(i, d), j), mload(add(add(replacement, 0x20), j)))
j := add(j, 0x20)
if iszero(lt(j, replacementLen)) { break }
}
d := sub(add(d, replacementLen), needleLen)
if needleLen {
i := add(i, needleLen)
if iszero(lt(i, subjectSearchEnd)) { break }
continue
}
}
mstore(add(i, d), t)
i := add(i, 1)
if iszero(lt(i, subjectSearchEnd)) { break }
}
}
let end := mload(0x00)
let n := add(sub(d, add(result, 0x20)), end)
// Copy the rest of the bytes one word at a time.
for {} lt(i, end) { i := add(i, 0x20) } { mstore(add(i, d), mload(i)) }
let o := add(i, d)
mstore(o, 0) // Zeroize the slot after the bytes.
mstore(0x40, add(o, 0x20)) // Allocate memory.
mstore(result, n) // Store the length.
}
}
/// @dev Returns the byte index of the first location of `needle` in `subject`,
/// needleing from left to right, starting from `from`.
/// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found.
function indexOf(bytes memory subject, bytes memory needle, uint256 from)
internal
pure
returns (uint256 result)
{
/// @solidity memory-safe-assembly
assembly {
result := not(0) // Initialize to `NOT_FOUND`.
for { let subjectLen := mload(subject) } 1 {} {
if iszero(mload(needle)) {
result := from
if iszero(gt(from, subjectLen)) { break }
result := subjectLen
break
}
let needleLen := mload(needle)
let subjectStart := add(subject, 0x20)
subject := add(subjectStart, from)
let end := add(sub(add(subjectStart, subjectLen), needleLen), 1)
let m := shl(3, sub(0x20, and(needleLen, 0x1f)))
let s := mload(add(needle, 0x20))
if iszero(and(lt(subject, end), lt(from, subjectLen))) { break }
if iszero(lt(needleLen, 0x20)) {
for { let h := keccak256(add(needle, 0x20), needleLen) } 1 {} {
if iszero(shr(m, xor(mload(subject), s))) {
if eq(keccak256(subject, needleLen), h) {
result := sub(subject, subjectStart)
break
}
}
subject := add(subject, 1)
if iszero(lt(subject, end)) { break }
}
break
}
for {} 1 {} {
if iszero(shr(m, xor(mload(subject), s))) {
result := sub(subject, subjectStart)
break
}
subject := add(subject, 1)
if iszero(lt(subject, end)) { break }
}
break
}
}
}
/// @dev Returns the byte index of the first location of `needle` in `subject`,
/// needleing from left to right, starting from `from`. Optimized for byte needles.
/// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found.
function indexOfByte(bytes memory subject, bytes1 needle, uint256 from)
internal
pure
returns (uint256 result)
{
/// @solidity memory-safe-assembly
assembly {
result := not(0) // Initialize to `NOT_FOUND`.
if gt(mload(subject), from) {
let start := add(subject, 0x20)
let end := add(start, mload(subject))
let m := div(not(0), 255) // `0x0101 ... `.
let h := mul(byte(0, needle), m) // Replicating needle mask.
m := not(shl(7, m)) // `0x7f7f ... `.
for { let i := add(start, from) } 1 {} {
let c := xor(mload(i), h) // Load 32-byte chunk and xor with mask.
c := not(or(or(add(and(c, m), m), c), m)) // Each needle byte will be `0x80`.
if c {
c := and(not(shr(shl(3, sub(end, i)), not(0))), c) // Truncate bytes past the end.
if c {
let r := shl(7, lt(0x8421084210842108cc6318c6db6d54be, c)) // Save bytecode.
r := or(shl(6, lt(0xffffffffffffffff, shr(r, c))), r)
// forgefmt: disable-next-item
result := add(sub(i, start), shr(3, xor(byte(and(0x1f, shr(byte(24,
mul(0x02040810204081, shr(r, c))), 0x8421084210842108cc6318c6db6d54be)),
0xc0c8c8d0c8e8d0d8c8e8e0e8d0d8e0f0c8d0e8d0e0e0d8f0d0d0e0d8f8f8f8f8), r)))
break
}
}
i := add(i, 0x20)
if iszero(lt(i, end)) { break }
}
}
}
}
/// @dev Returns the byte index of the first location of `needle` in `subject`,
/// needleing from left to right. Optimized for byte needles.
/// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found.
function indexOfByte(bytes memory subject, bytes1 needle)
internal
pure
returns (uint256 result)
{
return indexOfByte(subject, needle, 0);
}
/// @dev Returns the byte index of the first location of `needle` in `subject`,
/// needleing from left to right.
/// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found.
function indexOf(bytes memory subject, bytes memory needle) internal pure returns (uint256) {
return indexOf(subject, needle, 0);
}
/// @dev Returns the byte index of the first location of `needle` in `subject`,
/// needleing from right to left, starting from `from`.
/// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found.
function lastIndexOf(bytes memory subject, bytes memory needle, uint256 from)
internal
pure
returns (uint256 result)
{
/// @solidity memory-safe-assembly
assembly {
for {} 1 {} {
result := not(0) // Initialize to `NOT_FOUND`.
let needleLen := mload(needle)
if gt(needleLen, mload(subject)) { break }
let w := result
let fromMax := sub(mload(subject), needleLen)
if iszero(gt(fromMax, from)) { from := fromMax }
let end := add(add(subject, 0x20), w)
subject := add(add(subject, 0x20), from)
if iszero(gt(subject, end)) { break }
// As this function is not too often used,
// we shall simply use keccak256 for smaller bytecode size.
for { let h := keccak256(add(needle, 0x20), needleLen) } 1 {} {
if eq(keccak256(subject, needleLen), h) {
result := sub(subject, add(end, 1))
break
}
subject := add(subject, w) // `sub(subject, 1)`.
if iszero(gt(subject, end)) { break }
}
break
}
}
}
/// @dev Returns the byte index of the first location of `needle` in `subject`,
/// needleing from right to left.
/// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found.
function lastIndexOf(bytes memory subject, bytes memory needle)
internal
pure
returns (uint256)
{
return lastIndexOf(subject, needle, type(uint256).max);
}
/// @dev Returns true if `needle` is found in `subject`, false otherwise.
function contains(bytes memory subject, bytes memory needle) internal pure returns (bool) {
return indexOf(subject, needle) != NOT_FOUND;
}
/// @dev Returns whether `subject` starts with `needle`.
function startsWith(bytes memory subject, bytes memory needle)
internal
pure
returns (bool result)
{
/// @solidity memory-safe-assembly
assembly {
let n := mload(needle)
// Just using keccak256 directly is actually cheaper.
let t := eq(keccak256(add(subject, 0x20), n), keccak256(add(needle, 0x20), n))
result := lt(gt(n, mload(subject)), t)
}
}
/// @dev Returns whether `subject` ends with `needle`.
function endsWith(bytes memory subject, bytes memory needle)
internal
pure
returns (bool result)
{
/// @solidity memory-safe-assembly
assembly {
let n := mload(needle)
let notInRange := gt(n, mload(subject))
// `subject + 0x20 + max(subject.length - needle.length, 0)`.
let t := add(add(subject, 0x20), mul(iszero(notInRange), sub(mload(subject), n)))
// Just using keccak256 directly is actually cheaper.
result := gt(eq(keccak256(t, n), keccak256(add(needle, 0x20), n)), notInRange)
}
}
/// @dev Returns `subject` repeated `times`.
function repeat(bytes memory subject, uint256 times)
internal
pure
returns (bytes memory result)
{
/// @solidity memory-safe-assembly
assembly {
let l := mload(subject) // Subject length.
if iszero(or(iszero(times), iszero(l))) {
result := mload(0x40)
subject := add(subject, 0x20)
let o := add(result, 0x20)
for {} 1 {} {
// Copy the `subject` one word at a time.
for { let j := 0 } 1 {} {
mstore(add(o, j), mload(add(subject, j)))
j := add(j, 0x20)
if iszero(lt(j, l)) { break }
}
o := add(o, l)
times := sub(times, 1)
if iszero(times) { break }
}
mstore(o, 0) // Zeroize the slot after the bytes.
mstore(0x40, add(o, 0x20)) // Allocate memory.
mstore(result, sub(o, add(result, 0x20))) // Store the length.
}
}
}
/// @dev Returns a copy of `subject` sliced from `start` to `end` (exclusive).
/// `start` and `end` are byte offsets.
function slice(bytes memory subject, uint256 start, uint256 end)
internal
pure
returns (bytes memory result)
{
/// @solidity memory-safe-assembly
assembly {
let l := mload(subject) // Subject length.
if iszero(gt(l, end)) { end := l }
if iszero(gt(l, start)) { start := l }
if lt(start, end) {
result := mload(0x40)
let n := sub(end, start)
let i := add(subject, start)
let w := not(0x1f)
// Copy the `subject` one word at a time, backwards.
for { let j := and(add(n, 0x1f), w) } 1 {} {
mstore(add(result, j), mload(add(i, j)))
j := add(j, w) // `sub(j, 0x20)`.
if iszero(j) { break }
}
let o := add(add(result, 0x20), n)
mstore(o, 0) // Zeroize the slot after the bytes.
mstore(0x40, add(o, 0x20)) // Allocate memory.
mstore(result, n) // Store the length.
}
}
}
/// @dev Returns a copy of `subject` sliced from `start` to the end of the bytes.
/// `start` is a byte offset.
function slice(bytes memory subject, uint256 start)
internal
pure
returns (bytes memory result)
{
result = slice(subject, start, type(uint256).max);
}
/// @dev Returns a copy of `subject` sliced from `start` to `end` (exclusive).
/// `start` and `end` are byte offsets. Faster than Solidity's native slicing.
function sliceCalldata(bytes calldata subject, uint256 start, uint256 end)
internal
pure
returns (bytes calldata result)
{
/// @solidity memory-safe-assembly
assembly {
end := xor(end, mul(xor(end, subject.length), lt(subject.length, end)))
start := xor(start, mul(xor(start, subject.length), lt(subject.length, start)))
result.offset := add(subject.offset, start)
result.length := mul(lt(start, end), sub(end, start))
}
}
/// @dev Returns a copy of `subject` sliced from `start` to the end of the bytes.
/// `start` is a byte offset. Faster than Solidity's native slicing.
function sliceCalldata(bytes calldata subject, uint256 start)
internal
pure
returns (bytes calldata result)
{
/// @solidity memory-safe-assembly
assembly {
start := xor(start, mul(xor(start, subject.length), lt(subject.length, start)))
result.offset := add(subject.offset, start)
result.length := mul(lt(start, subject.length), sub(subject.length, start))
}
}
/// @dev Reduces the size of `subject` to `n`.
/// If `n` is greater than the size of `subject`, this will be a no-op.
function truncate(bytes memory subject, uint256 n)
internal
pure
returns (bytes memory result)
{
/// @solidity memory-safe-assembly
assembly {
result := subject
mstore(mul(lt(n, mload(result)), result), n)
}
}
/// @dev Returns a copy of `subject`, with the length reduced to `n`.
/// If `n` is greater than the size of `subject`, this will be a no-op.
function truncatedCalldata(bytes calldata subject, uint256 n)
internal
pure
returns (bytes calldata result)
{
/// @solidity memory-safe-assembly
assembly {
result.offset := subject.offset
result.length := xor(n, mul(xor(n, subject.length), lt(subject.length, n)))
}
}
/// @dev Returns all the indices of `needle` in `subject`.
/// The indices are byte offsets.
function indicesOf(bytes memory subject, bytes memory needle)
internal
pure
returns (uint256[] memory result)
{
/// @solidity memory-safe-assembly
assembly {
let searchLen := mload(needle)
if iszero(gt(searchLen, mload(subject))) {
result := mload(0x40)
let i := add(subject, 0x20)
let o := add(result, 0x20)
let subjectSearchEnd := add(sub(add(i, mload(subject)), searchLen), 1)
let h := 0 // The hash of `needle`.
if iszero(lt(searchLen, 0x20)) { h := keccak256(add(needle, 0x20), searchLen) }
let s := mload(add(needle, 0x20))
for { let m := shl(3, sub(0x20, and(searchLen, 0x1f))) } 1 {} {
let t := mload(i)
// Whether the first `searchLen % 32` bytes of `subject` and `needle` matches.
if iszero(shr(m, xor(t, s))) {
if h {
if iszero(eq(keccak256(i, searchLen), h)) {
i := add(i, 1)
if iszero(lt(i, subjectSearchEnd)) { break }
continue
}
}
mstore(o, sub(i, add(subject, 0x20))) // Append to `result`.
o := add(o, 0x20)
i := add(i, searchLen) // Advance `i` by `searchLen`.
if searchLen {
if iszero(lt(i, subjectSearchEnd)) { break }
continue
}
}
i := add(i, 1)
if iszero(lt(i, subjectSearchEnd)) { break }
}
mstore(result, shr(5, sub(o, add(result, 0x20)))) // Store the length of `result`.
// Allocate memory for result.
// We allocate one more word, so this array can be recycled for {split}.
mstore(0x40, add(o, 0x20))
}
}
}
/// @dev Returns an arrays of bytess based on the `delimiter` inside of the `subject` bytes.
function split(bytes memory subject, bytes memory delimiter)
internal
pure
returns (bytes[] memory result)
{
uint256[] memory indices = indicesOf(subject, delimiter);
/// @solidity memory-safe-assembly
assembly {
let w := not(0x1f)
let indexPtr := add(indices, 0x20)
let indicesEnd := add(indexPtr, shl(5, add(mload(indices), 1)))
mstore(add(indicesEnd, w), mload(subject))
mstore(indices, add(mload(indices), 1))
for { let prevIndex := 0 } 1 {} {
let index := mload(indexPtr)
mstore(indexPtr, 0x60)
if iszero(eq(index, prevIndex)) {
let element := mload(0x40)
let l := sub(index, prevIndex)
mstore(element, l) // Store the length of the element.
// Copy the `subject` one word at a time, backwards.
for { let o := and(add(l, 0x1f), w) } 1 {} {
mstore(add(element, o), mload(add(add(subject, prevIndex), o)))
o := add(o, w) // `sub(o, 0x20)`.
if iszero(o) { break }
}
mstore(add(add(element, 0x20), l), 0) // Zeroize the slot after the bytes.
// Allocate memory for the length and the bytes, rounded up to a multiple of 32.
mstore(0x40, add(element, and(add(l, 0x3f), w)))
mstore(indexPtr, element) // Store the `element` into the array.
}
prevIndex := add(index, mload(delimiter))
indexPtr := add(indexPtr, 0x20)
if iszero(lt(indexPtr, indicesEnd)) { break }
}
result := indices
if iszero(mload(delimiter)) {
result := add(indices, 0x20)
mstore(result, sub(mload(indices), 2))
}
}
}
/// @dev Returns a concatenated bytes of `a` and `b`.
/// Cheaper than `bytes.concat()` and does not de-align the free memory pointer.
function concat(bytes memory a, bytes memory b) internal pure returns (bytes memory result) {
/// @solidity memory-safe-assembly
assembly {
result := mload(0x40)
let w := not(0x1f)
let aLen := mload(a)
// Copy `a` one word at a time, backwards.
for { let o := and(add(aLen, 0x20), w) } 1 {} {
mstore(add(result, o), mload(add(a, o)))
o := add(o, w) // `sub(o, 0x20)`.
if iszero(o) { break }
}
let bLen := mload(b)
let output := add(result, aLen)
// Copy `b` one word at a time, backwards.
for { let o := and(add(bLen, 0x20), w) } 1 {} {
mstore(add(output, o), mload(add(b, o)))
o := add(o, w) // `sub(o, 0x20)`.
if iszero(o) { break }
}
let totalLen := add(aLen, bLen)
let last := add(add(result, 0x20), totalLen)
mstore(last, 0) // Zeroize the slot after the bytes.
mstore(result, totalLen) // Store the length.
mstore(0x40, add(last, 0x20)) // Allocate memory.
}
}
/// @dev Returns whether `a` equals `b`.
function eq(bytes memory a, bytes memory b) internal pure returns (bool result) {
/// @solidity memory-safe-assembly
assembly {
result := eq(keccak256(add(a, 0x20), mload(a)), keccak256(add(b, 0x20), mload(b)))
}
}
/// @dev Returns whether `a` equals `b`, where `b` is a null-terminated small bytes.
function eqs(bytes memory a, bytes32 b) internal pure returns (bool result) {
/// @solidity memory-safe-assembly
assembly {
// These should be evaluated on compile time, as far as possible.
let m := not(shl(7, div(not(iszero(b)), 255))) // `0x7f7f ...`.
let x := not(or(m, or(b, add(m, and(b, m)))))
let r := shl(7, iszero(iszero(shr(128, x))))
r := or(r, shl(6, iszero(iszero(shr(64, shr(r, x))))))
r := or(r, shl(5, lt(0xffffffff, shr(r, x))))
r := or(r, shl(4, lt(0xffff, shr(r, x))))
r := or(r, shl(3, lt(0xff, shr(r, x))))
// forgefmt: disable-next-item
result := gt(eq(mload(a), add(iszero(x), xor(31, shr(3, r)))),
xor(shr(add(8, r), b), shr(add(8, r), mload(add(a, 0x20)))))
}
}
/// @dev Returns 0 if `a == b`, -1 if `a < b`, +1 if `a > b`.
/// If `a` == b[:a.length]`, and `a.length < b.length`, returns -1.
function cmp(bytes memory a, bytes memory b) internal pure returns (int256 result) {
/// @solidity memory-safe-assembly
assembly {
let aLen := mload(a)
let bLen := mload(b)
let n := and(xor(aLen, mul(xor(aLen, bLen), lt(bLen, aLen))), not(0x1f))
if n {
for { let i := 0x20 } 1 {} {
let x := mload(add(a, i))
let y := mload(add(b, i))
if iszero(or(xor(x, y), eq(i, n))) {
i := add(i, 0x20)
continue
}
result := sub(gt(x, y), lt(x, y))
break
}
}
// forgefmt: disable-next-item
if iszero(result) {
let l := 0x201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a090807060504030201
let x := and(mload(add(add(a, 0x20), n)), shl(shl(3, byte(sub(aLen, n), l)), not(0)))
let y := and(mload(add(add(b, 0x20), n)), shl(shl(3, byte(sub(bLen, n), l)), not(0)))
result := sub(gt(x, y), lt(x, y))
if iszero(result) { result := sub(gt(aLen, bLen), lt(aLen, bLen)) }
}
}
}
/// @dev Directly returns `a` without copying.
function directReturn(bytes memory a) internal pure {
/// @solidity memory-safe-assembly
assembly {
// Assumes that the bytes does not start from the scratch space.
let retStart := sub(a, 0x20)
let retUnpaddedSize := add(mload(a), 0x40)
// Right pad with zeroes. Just in case the bytes is produced
// by a method that doesn't zero right pad.
mstore(add(retStart, retUnpaddedSize), 0)
mstore(retStart, 0x20) // Store the return offset.
// End the transaction, returning the bytes.
return(retStart, and(not(0x1f), add(0x1f, retUnpaddedSize)))
}
}
/// @dev Directly returns `a` with minimal copying.
function directReturn(bytes[] memory a) internal pure {
/// @solidity memory-safe-assembly
assembly {
let n := mload(a) // `a.length`.
let o := add(a, 0x20) // Start of elements in `a`.
let u := a // Highest memory slot.
let w := not(0x1f)
for { let i := 0 } iszero(eq(i, n)) { i := add(i, 1) } {
let c := add(o, shl(5, i)) // Location of pointer to `a[i]`.
let s := mload(c) // `a[i]`.
let l := mload(s) // `a[i].length`.
let r := and(l, 0x1f) // `a[i].length % 32`.
let z := add(0x20, and(l, w)) // Offset of last word in `a[i]` from `s`.
// If `s` comes before `o`, or `s` is not zero right padded.
if iszero(lt(lt(s, o), or(iszero(r), iszero(shl(shl(3, r), mload(add(s, z))))))) {
let m := mload(0x40)
mstore(m, l) // Copy `a[i].length`.
for {} 1 {} {
mstore(add(m, z), mload(add(s, z))) // Copy `a[i]`, backwards.
z := add(z, w) // `sub(z, 0x20)`.
if iszero(z) { break }
}
let e := add(add(m, 0x20), l)
mstore(e, 0) // Zeroize the slot after the copied bytes.
mstore(0x40, add(e, 0x20)) // Allocate memory.
s := m
}
mstore(c, sub(s, o)) // Convert to calldata offset.
let t := add(l, add(s, 0x20))
if iszero(lt(t, u)) { u := t }
}
let retStart := add(a, w) // Assumes `a` doesn't start from scratch space.
mstore(retStart, 0x20) // Store the return offset.
return(retStart, add(0x40, sub(u, retStart))) // End the transaction.
}
}
/// @dev Returns the word at `offset`, without any bounds checks.
function load(bytes memory a, uint256 offset) internal pure returns (bytes32 result) {
/// @solidity memory-safe-assembly
assembly {
result := mload(add(add(a, 0x20), offset))
}
}
/// @dev Returns the word at `offset`, without any bounds checks.
function loadCalldata(bytes calldata a, uint256 offset)
internal
pure
returns (bytes32 result)
{
/// @solidity memory-safe-assembly
assembly {
result := calldataload(add(a.offset, offset))
}
}
/// @dev Returns a slice representing a static struct in the calldata. Performs bounds checks.
function staticStructInCalldata(bytes calldata a, uint256 offset)
internal
pure
returns (bytes calldata result)
{
/// @solidity memory-safe-assembly
assembly {
let l := sub(a.length, 0x20)
result.offset := add(a.offset, offset)
result.length := sub(a.length, offset)
if or(shr(64, or(l, a.offset)), gt(offset, l)) { revert(l, 0x00) }
}
}
/// @dev Returns a slice representing a dynamic struct in the calldata. Performs bounds checks.
function dynamicStructInCalldata(bytes calldata a, uint256 offset)
internal
pure
returns (bytes calldata result)
{
/// @solidity memory-safe-assembly
assembly {
let l := sub(a.length, 0x20)
let s := calldataload(add(a.offset, offset)) // Relative offset of `result` from `a.offset`.
result.offset := add(a.offset, s)
result.length := sub(a.length, s)
if or(shr(64, or(s, or(l, a.offset))), gt(offset, l)) { revert(l, 0x00) }
}
}
/// @dev Returns bytes in calldata. Performs bounds checks.
function bytesInCalldata(bytes calldata a, uint256 offset)
internal
pure
returns (bytes calldata result)
{
/// @solidity memory-safe-assembly
assembly {
let l := sub(a.length, 0x20)
let s := calldataload(add(a.offset, offset)) // Relative offset of `result` from `a.offset`.
result.offset := add(add(a.offset, s), 0x20)
result.length := calldataload(add(a.offset, s))
// forgefmt: disable-next-item
if or(shr(64, or(result.length, or(s, or(l, a.offset)))),
or(gt(add(s, result.length), l), gt(offset, l))) { revert(l, 0x00) }
}
}
/// @dev Checks if `x` is in `a`. Assumes `a` has been checked.
function checkInCalldata(bytes calldata x, bytes calldata a) internal pure {
/// @solidity memory-safe-assembly
assembly {
if or(
or(lt(x.offset, a.offset), gt(add(x.offset, x.length), add(a.length, a.offset))),
shr(64, or(x.length, x.offset))
) { revert(0x00, 0x00) }
}
}
/// @dev Checks if `x` is in `a`. Assumes `a` has been checked.
function checkInCalldata(bytes[] calldata x, bytes calldata a) internal pure {
/// @solidity memory-safe-assembly
assembly {
let e := sub(add(a.length, a.offset), 0x20)
if or(lt(x.offset, a.offset), shr(64, x.offset)) { revert(0x00, 0x00) }
for { let i := 0 } iszero(eq(x.length, i)) { i := add(i, 1) } {
let o := calldataload(add(x.offset, shl(5, i)))
let t := add(o, x.offset)
let l := calldataload(t)
if or(shr(64, or(l, o)), gt(add(t, l), e)) { revert(0x00, 0x00) }
}
}
}
/// @dev Returns empty calldata bytes. For silencing the compiler.
function emptyCalldata() internal pure returns (bytes calldata result) {
/// @solidity memory-safe-assembly
assembly {
result.length := 0
}
}
/// @dev Returns the most significant 20 bytes as an address.
function msbToAddress(bytes32 x) internal pure returns (address) {
return address(bytes20(x));
}
/// @dev Returns the least significant 20 bytes as an address.
function lsbToAddress(bytes32 x) internal pure returns (address) {
return address(uint160(uint256(x)));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* 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[ERC 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);
}{
"evmVersion": "paris",
"optimizer": {
"enabled": true,
"mode": "3"
},
"outputSelection": {
"*": {
"*": [
"abi"
]
}
},
"detectMissingLibraries": false,
"forceEVMLA": false,
"enableEraVMExtensions": false,
"codegen": "yul",
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"playboysContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccountBalanceOverflow","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ArrayLengthsMismatch","type":"error"},{"inputs":[{"internalType":"uint256","name":"playboyId","type":"uint256"},{"internalType":"uint256","name":"traitId","type":"uint256"}],"name":"DuplicateClosetEntry","type":"error"},{"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidDefaultRoyalty","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidDefaultRoyaltyReceiver","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidTokenRoyalty","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidTokenRoyaltyReceiver","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoZeroAddress","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"NotMinter","type":"error"},{"inputs":[],"name":"NotNextOwner","type":"error"},{"inputs":[],"name":"NotOwnerNorApproved","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"caller","type":"address"}],"name":"NotPlayboyOwnerNorApproved","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[],"name":"SameTransferValidator","type":"error"},{"inputs":[],"name":"TransferToNonERC1155ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"isApproved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"playboyId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"traitId","type":"uint256"}],"name":"ClosetUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newContractURI","type":"string"}],"name":"ContractURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"address_","type":"address"}],"name":"MinterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"address_","type":"address"}],"name":"MinterRemoved","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":false,"internalType":"address","name":"newPotentialAdministrator","type":"address"}],"name":"PotentialOwnerUpdated","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":"amounts","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":"amount","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldValidator","type":"address"},{"indexed":false,"internalType":"address","name":"newValidator","type":"address"}],"name":"TransferValidatorUpdated","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":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"owners","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"balances","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnWithoutRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"burnWithoutRedeemBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelOwnershipTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"playboyId","type":"uint256"}],"name":"getCloset","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransferValidationFunction","outputs":[{"internalType":"bytes4","name":"functionSignature","type":"bytes4"},{"internalType":"bool","name":"isViewFunction","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getTransferValidator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"playboyId","type":"uint256"},{"internalType":"uint256","name":"traitId","type":"uint256"}],"name":"hasClosetTrait","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"playboyId","type":"uint256"},{"internalType":"uint256","name":"traitId","type":"uint256"}],"name":"manualAddToCloset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"playboyId","type":"uint256"},{"internalType":"uint256[]","name":"traitIds","type":"uint256[]"}],"name":"manualAddToClosetBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"playboyId","type":"uint256"},{"internalType":"uint256","name":"traitId","type":"uint256"}],"name":"redeemToCloset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"playboyId","type":"uint256"},{"internalType":"uint256[]","name":"traitIds","type":"uint256[]"}],"name":"redeemToClosetBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"removeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","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":"amount","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":"isApproved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractURI_","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newValidator","type":"address"}],"name":"setTransferValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri_","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"totalCreated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"totalRedeemed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newPotentialOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"updateMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"updateMetadataMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"internalType":"uint256","name":"toTokenId","type":"uint256"}],"name":"updateMetadataRange","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
9c4d535b0000000000000000000000000000000000000000000000000000000000000000010005ab804e263b543995f92a6ea4f54e48e1fd5546c756ee8699c8dc14f865000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000009bb4c785165915e66f4a645bc978a6c885a031900000000000000000000000000000000000000000000000000000000000000145765623320506c6179626f79732054726169747300000000000000000000000000000000000000000000000000000000000000000000000000000000000000055733504254000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x0001000000000002000a00000000000200000000000103550000008004000039000000400040043f0000006003100270000005050330019700000001002001900000003a0000c13d000000040030008c000000590000413d000000000201043b000000e002200270000005180020009c0000005b0000213d000005350020009c000002440000a13d000005360020009c000004080000a13d000005370020009c0000050e0000213d0000053b0020009c000006d30000613d0000053c0020009c000008ed0000613d0000053d0020009c000000590000c13d0000000001000416000000000001004b000000590000c13d0000000903000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000525013f000000010050019000000be70000c13d000000800010043f000000000004004b00000c2d0000613d000000000030043f000000000001004b00000c2b0000613d0000057e0200004100000000040000190000000003040019000000000402041a000000a005300039000000000045043500000001022000390000002004300039000000000014004b000000310000413d00000ccf0000013d0000000002000416000000000002004b000000590000c13d0000001f0230003900000506022001970000008002200039000000400020043f0000001f0530018f000005070630019800000080026000390000004a0000613d000000000701034f000000007807043c0000000004840436000000000024004b000000460000c13d000000000005004b000000570000613d000000000161034f0000000304500210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600030008c000001780000813d00000000010000190000141000010430000005190020009c0000026d0000a13d0000051a0020009c000004390000a13d0000051b0020009c000005fc0000213d0000051f0020009c000006e30000613d000005200020009c0000093e0000613d000005210020009c000000590000c13d0000000002000416000000000002004b000000590000c13d000000640030008c000000590000413d0000000402100370000000000202043b000600000002001d0000050d0020009c000000590000213d0000002402100370000000000202043b000900000002001d0000004402100370000000000202043b000005080020009c000000590000213d0000002304200039000000000034004b000000590000813d0000000404200039000000000141034f000000000101043b000500000001001d000005080010009c000000590000213d000400240020003d000000050100002900000005011002100000000401100029000000000031004b000000590000213d0000000901000029140e127a0000040f000000050000006b00000c040000613d0000000601000029000000600110021000000000020004110000006002200210000000000012004b0000000003000039000000010300c039000000000002004b0000000002000039000000010200c039000000000232016f00030558001001cb0002000100200193000800000000001d0000000801000029000000050110021000000004011000290000000001100367000000000301043b000000400100043d0000004002100039000000400020043f0000002002100039000a00000003001d000000000032043500000001030000390000000000310435000000400100043d0000004002100039000000400020043f000000200210003900000000003204350000000000310435000000400100043d000005620010009c00000bca0000213d0000002002100039000000400020043f00000000000104350000000301000029000000200010043f000000020000006b000000c50000613d0000000001000411000000000010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055a011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000000001004b000007b30000613d0000000a01000029000000000010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a000000000002004b00000c420000613d000000010220008a000000000021041b0000000101000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000800d0200003900000004030000390000055c04000041000000000500041100000006060000290000000007000019140e14040000040f0000000100200190000000590000613d0000000901000029000000000010043f0000000d01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b0000000a02000029000000000020043f000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000000001004b00000ee20000c13d0000000501000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a0000050803200197000005080030009c00000c670000613d0000056502200197000000000223019f0000000102200039000000000021041b0000000901000029000000000010043f0000000c01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a000005080020009c00000bca0000213d000700000002001d0000000102200039000000000021041b000000000010043f0000000001000414000005050010009c0000050501008041000000c00110021000000515011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b00000007011000290000000a02000029000000000021041b0000000901000029000000000010043f0000000c01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000700000001001d0000000d01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b0000000a02000029000000000020043f000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b0000000702000029000000000021041b0000000001000414000005050010009c0000050501008041000000c00110021000000513011001c70000800d020000390000000303000039000005660400004100000009050000290000000a06000029140e14040000040f0000000100200190000000590000613d00000008020000290000000102200039000800000002001d000000050020006c000000990000413d00000c040000013d000000800400043d000005080040009c000000590000213d0000001f01400039000000000031004b000000590000813d00000080014000390000000002010433000005090020009c00000bca0000813d0000001f012000390000050a011001970000003f011000390000050b01100197000000400600043d0000000005160019000000000065004b00000000010000390000000101004039000005080050009c00000bca0000213d000000010010019000000bca0000c13d0000008001300039000000400050043f000a00000006001d0000000005260436000900000005001d000000a0044000390000000005420019000000000015004b000000590000213d000000000002004b0000000908000029000001a30000613d000000000500001900000000065800190000000007450019000000000707043300000000007604350000002005500039000000000025004b0000019c0000413d0000000a0220002900000020022000390000000000020435000000a00400043d000005080040009c000000590000213d0000001f02400039000000000032004b00000000030000190000050c030080410000050c02200197000000000002004b00000000050000190000050c050040410000050c0020009c000000000503c019000000000005004b000000590000c13d00000080024000390000000002020433000005080020009c00000bca0000213d0000001f032000390000050a033001970000003f033000390000050b03300197000000400600043d0000000003360019000000000063004b00000000050000390000000105004039000005080030009c00000bca0000213d000000010050019000000bca0000c13d000000400030043f000800000006001d0000000003260436000700000003001d000000a0034000390000000004320019000000000014004b000000590000213d000000000002004b0000000706000029000001d90000613d000000000100001900000000041600190000000005310019000000000505043300000000005404350000002001100039000000000021004b000001d20000413d000000080120002900000020011000390000000000010435000000c00100043d000600000001001d0000050d0010009c000000590000213d0000050e010000410000000000100443000000000100041000000004001004430000000001000414000005050010009c0000050501008041000000c0011002100000050f011001c70000800202000039140e14090000040f0000000100200190000010f20000613d000000000101043b000000000001004b00000df20000c13d000000000100041a00000512021001970000000006000411000000000226019f000000000020041b00000000020004140000050d05100197000005050020009c0000050502008041000000c00120021000000513011001c70000800d0200003900000003030000390000051404000041140e14040000040f0000000100200190000000590000613d0000000a010000290000000001010433000500000001001d000005080010009c00000bca0000213d0000000601000039000000000101041a000000010210019000000001011002700000007f0110618f000400000001001d0000001f0010008c00000000010000390000000101002039000000000021004b00000be70000c13d0000000401000029000000200010008c000002300000413d0000000601000039000000000010043f0000000001000414000005050010009c0000050501008041000000c00110021000000515011001c70000801002000039140e14090000040f0000000100200190000000590000613d00000005030000290000001f023000390000000502200270000000200030008c0000000002004019000000000301043b00000004010000290000001f01100039000000050110027000000000013100190000000002230019000000000012004b000002300000813d000000000002041b0000000102200039000000000012004b0000022c0000413d00000005010000290000001f0010008c00000f4d0000a13d0000000601000039000000000010043f0000000001000414000005050010009c0000050501008041000000c00110021000000515011001c70000801002000039140e14090000040f0000000100200190000000590000613d00000005020000290000051602200198000000000101043b00000fbd0000c13d000000200300003900000fca0000013d000005440020009c000002dc0000213d0000054b0020009c000006160000a13d0000054c0020009c000007020000613d0000054d0020009c000007670000613d0000054e0020009c000000590000c13d0000000001000416000000000001004b000000590000c13d0000000603000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000525013f000000010050019000000be70000c13d000000800010043f000000000004004b00000c2d0000613d000000000030043f000000000001004b00000c2b0000613d0000058e0200004100000000040000190000000003040019000000000402041a000000a005300039000000000045043500000001022000390000002004300039000000000014004b000002640000413d00000ccf0000013d000005280020009c000003d00000213d0000052f0020009c0000062d0000a13d000005300020009c000007830000613d000005310020009c000007b70000613d000005320020009c000000590000c13d0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000000402100370000000000502043b000005080050009c000000590000213d0000002302500039000000000032004b000000590000813d0000000404500039000000000241034f000000000202043b000005080020009c00000bca0000213d0000001f062000390000050a06600197000005550060009c00000bca0000213d00000024055000390000003f066000390000050a066001970000008006600039000000400060043f000000800020043f0000000005520019000000000035004b000000590000213d0000002003400039000000000431034f000005a0052001980000001f0620018f000000a003500039000002a10000613d000000a007000039000000000804034f000000008908043c0000000007970436000000000037004b0000029d0000c13d000000000006004b000002ae0000613d000000000454034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000430435000000a0022000390000000000020435000000000200041a0000050d022001970000000003000411000000000032004b00000cf20000c13d000000800300043d000005080030009c00000bca0000213d0000000802000039000000000502041a000000010050019000000001045002700000007f0440618f0000001f0040008c00000000060000390000000106002039000000000556013f000000010050019000000be70000c13d000000200040008c000002d40000413d000000000020043f0000001f053000390000000505500270000005780550009a000000200030008c00000568050040410000001f044000390000000504400270000005780440009a000000000045004b000002d40000813d000000000005041b0000000105500039000000000045004b000002d00000413d0000001f0030008c00000e040000a13d000000000020043f000005160530019800000ef00000c13d000000a006000039000005680400004100000efe0000013d000005450020009c000006560000a13d000005460020009c000007bc0000613d000005470020009c000007f20000613d000005480020009c000000590000c13d0000000002000416000000000002004b000000590000c13d000000640030008c000000590000413d0000000402100370000000000202043b000a00000002001d0000050d0020009c000000590000213d0000004402100370000000000202043b000900000002001d0000002401100370000000000101043b000800000001001d0000000001000411000000000010043f0000000b01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000ff001001900000030a0000c13d000000000100041a0000050d011001970000000002000411000000000012004b00000de10000c13d000000400200043d000005620020009c00000bca0000213d0000002001200039000700000001001d000000400010043f000600000002001d00000000000204350000000001000411000000000010043f0000000b01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000ff00100190000003280000c13d000000000100041a0000050d011001970000000002000411000000000012004b00000de10000c13d000000400100043d0000004002100039000000400020043f00000020021000390000000805000029000000000052043500000001020000390000000000210435000000400100043d0000004003100039000000400030043f00000020031000390000000904000029000000000043043500000000002104350000000a02000029000000000002004b00000e000000613d0000055801000041000000200010043f000000140020043f000000000050043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a000000090020002a000011550000413d00000009030000290000000002320019000000000021041b000000200030043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000800d0200003900000004030000390000055c04000041000000000500041100000000060000190000000a07000029140e14040000040f0000000100200190000000590000613d0000050e0100004100000000001004430000000a0100002900000004001004430000000001000414000005050010009c0000050501008041000000c0011002100000050f011001c70000800202000039140e14090000040f0000000100200190000010f20000613d000000000101043b000000000001004b000003c50000613d000000400300043d000000a001300039000000a00200003900000000002104350000008001300039000000090200002900000000002104350000006001300039000000080200002900000000002104350000002001300039000000000200041100000000002104350000055d0100004100000000001304350000004001300039000000000001043500000006010000290000000001010433000500000003001d000000c0023000390000000000120435000000000001004b0000000706000029000003900000613d0000000502000029000000e002200039000000000300001900000000043200190000000005630019000000000505043300000000005404350000002003300039000000000013004b000003890000413d00000005020000290000001c02200039000005050020009c00000505020080410000004002200210000000c401100039000005050010009c00000505010080410000006001100210000000000121019f0000000002000414000005050020009c0000050502008041000000c002200210000000000112019f0000000a02000029140e14040000040f00000060031002700000050503300197000000200030008c000000200400003900000000040340190000001f0540018f00000020064001900000000504600029000003b00000613d000000000701034f0000000508000029000000007907043c0000000008980436000000000048004b000003ac0000c13d000000000005004b000003bd0000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000000000003004b00000001022061bf000000010020019000000fa30000613d000000050100002900000000010104330000055e0010009c00000ede0000c13d0000000801000029000000000010043f0000000501000039000000200010043f00000040020000390000000001000019140e13ef0000040f000a00000001001d000000000301041a000000090200002900000ddc0000013d000005290020009c000006630000a13d0000052a0020009c000008050000613d0000052b0020009c0000082e0000613d0000052c0020009c000000590000c13d0000000002000416000000000002004b000000590000c13d000000440030008c000000590000413d0000000402100370000000000202043b000a00000002001d0000050d0020009c000000590000213d0000002401100370000000000101043b000000000001004b0000000002000039000000010200c039000900000002001d000000010010008c000000590000213d0000055801000041000000200010043f0000000001000411000000140010043f0000000a01000029000000000010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055a011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b0000000902000029000000000021041b000000000020043f0000000001000414000005050010009c0000050501008041000000c00110021000000515011001c70000800d020000390000000303000039000005740400004100000000050004110000000a0600002900000c010000013d0000053e0020009c0000067d0000a13d0000053f0020009c0000085b0000613d000005400020009c000009500000613d000005410020009c000000590000c13d0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000000401100370000000000101043b000a00000001001d0000050d0010009c000000590000213d000000000100041a0000050d011001970000000002000411000000000021004b00000c1d0000c13d0000000a01000029000000000010043f0000000b01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a000005a102200197000000000021041b0000000001000414000005050010009c0000050501008041000000c00110021000000513011001c70000800d0200003900000002030000390000057f0400004100000c8e0000013d000005220020009c000006b90000a13d000005230020009c0000088a0000613d000005240020009c00000ad70000613d000005250020009c000000590000c13d0000000002000416000000000002004b000000590000c13d000000640030008c000000590000413d0000000402100370000000000202043b000700000002001d0000050d0020009c000000590000213d0000002402100370000000000202043b000005080020009c000000590000213d0000002304200039000000000034004b000000590000813d0000000404200039000000000441034f000000000804043b000005080080009c000000590000213d0000002405200039000000050a80021000000000065a0019000000000036004b000000590000213d0000004402100370000000000202043b000005080020009c000000590000213d0000002304200039000000000034004b000000590000813d0000000404200039000000000441034f000000000704043b000005080070009c000000590000213d000000240220003900000005097002100000000004290019000000000034004b000000590000213d0000003f03a0003900000569033001970000056a0030009c00000bca0000213d0000008003300039000000400030043f000000800080043f000000000008004b0000047e0000613d0000008003000039000000000851034f000000000808043b000000200330003900000000008304350000002005500039000000000065004b000004770000413d0000003f039000390000056903300197000000400500043d0000000003350019000800000005001d000000000053004b00000000050000390000000105004039000005080030009c00000bca0000213d000000010050019000000bca0000c13d000000400030043f00000008030000290000000000730435000000000007004b000004970000613d0000000803000029000000000521034f000000000505043b000000200330003900000000005304350000002002200039000000000042004b000004900000413d000000400100043d000005620010009c00000bca0000213d0000002002100039000000400020043f000000000001043500000008010000290000000001010433000000800200043d000000000012004b00000dfa0000c13d0000000702000029000000600220021000000558032001c7000000200030043f00000000030004110000006003300212000004bb0000613d000000000023004b000004bb0000613d0000000001000411000000000010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055a011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000000001004b000007b30000613d000000800100043d00000005021002120000000801000029000004d70000613d00000000012100190000000001010433000a00000001001d000900000002001d00000080012000390000000001010433000000000010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a0000000a0220006c00000c420000413d000000000021041b0000000902000029000000200220008c0000000801000029000004be0000c13d000000400100043d00000040020000390000000002210436000000800300043d0000000503300210000000200430003a000004e70000613d0000004005100039000000000600001900000000076500190000008008600039000000000808043300000000008704350000002006600039000000000046004b000004e00000413d000000600430003900000000004204350000000002310019000000080900002900000000030904330000000503300210000000200430003a000004f80000613d0000006005200039000000000600001900000000076500190000000008960019000000000808043300000000008704350000002006600039000000000046004b000004f10000413d00000000021200490000000002320019000000800220003900000060032002100000056b0020009c0000056c03008041000005050010009c00000505010080410000004001100210000000000113019f0000000002000414000005050020009c0000050502008041000000c00220021000000000012100190000056d0110009a0000800d0200003900000004030000390000056e040000410000000005000411000000070600002900000ced0000013d000005380020009c000008a70000613d000005390020009c00000b230000613d0000053a0020009c000000590000c13d0000000002000416000000000002004b000000590000c13d000000440030008c000000590000413d0000000402100370000000000202043b000900000002001d0000002402100370000000000202043b000005080020009c000000590000213d0000002304200039000000000034004b000000590000813d0000000404200039000000000141034f000000000101043b000600000001001d000005080010009c000000590000213d000500240020003d000000060100002900000005011002100000000501100029000000000031004b000000590000213d0000000001000411000000000010043f0000000b01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000ff00100190000005450000c13d000000000100041a0000050d011001970000000002000411000000000012004b00000de10000c13d000000060000006b00000c040000613d0000801003000039000800000000001d0000000801000029000000050110021000000005011000290000000001100367000000000101043b000a00000001001d0000000901000029000000000010043f0000000d01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000000002030019140e14090000040f00008010030000390000000100200190000000590000613d000000000101043b0000000a02000029000000000020043f000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000000002030019140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000000001004b00000ee20000c13d0000000501000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a0000050803200197000005080030009c00000c670000613d0000056502200197000000000223019f0000000102200039000000000021041b0000000901000029000000000010043f0000000c01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a000005080020009c00000bca0000213d000700000002001d0000000102200039000000000021041b000000000010043f0000000001000414000005050010009c0000050501008041000000c00110021000000515011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b00000007011000290000000a02000029000000000021041b0000000901000029000000000010043f0000000c01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000700000001001d0000000d01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b0000000a02000029000000000020043f000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b0000000702000029000000000021041b0000000001000414000005050010009c0000050501008041000000c00110021000000513011001c70000800d020000390000000303000039000005660400004100000009050000290000000a06000029140e14040000040f0000000100200190000000590000613d0000000a01000029000000000010043f0000000501000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a00000040032002700000050803300197000005080030009c00000c670000613d0000057c022001970000004003300210000005650330009a0000057d03300197000000000223019f000000000021041b00000008020000290000000102200039000800000002001d000000060020006c0000801003000039000005490000413d00000c040000013d0000051c0020009c000008b90000613d0000051d0020009c00000b370000613d0000051e0020009c000000590000c13d0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000000401100370000000000101043b0000050d0010009c000000590000213d000000000200041a0000050d022001970000000003000411000000000032004b00000c1d0000c13d000000000001004b00000c6d0000c13d0000055301000041000000800010043f000005540100004100001410000104300000054f0020009c00000b940000613d000005500020009c000000590000c13d0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000000401100370000000000201043b0000059700200198000000590000c13d0000000101000039000005980020009c00000c5a0000a13d000005990020009c00000c630000613d0000059a0020009c00000c630000613d0000059b0020009c00000c630000613d00000c5e0000013d000005330020009c00000baa0000613d000005340020009c000000590000c13d0000000001000416000000000001004b000000590000c13d0000000103000039000000000103041a0000050d021001970000000004000411000000000024004b00000c210000c13d0000051201100197000000000013041b000000800000043f0000000001000414000005050010009c0000050501008041000000c00110021000000551011001c70000800d020000390000055204000041140e14040000040f0000000100200190000000590000613d000000000100041a00000512021001970000000006000411000000000262019f000000000020041b00000000020004140000050d05100197000005050020009c0000050502008041000000c00120021000000513011001c70000800d020000390000000303000039000005140400004100000c010000013d000005490020009c00000bd00000613d0000054a0020009c000000590000c13d0000000001000416000000000001004b000000590000c13d0000055601000041000000800010043f0000000101000039000000a00010043f0000058d010000410000140f0001042e0000052d0020009c00000bd90000613d0000052e0020009c000000590000c13d0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000000401100370000000000101043b000a00000001001d0000050d0010009c000000590000213d000000000100041a0000050d011001970000000002000411000000000021004b00000c1d0000c13d0000000a01000029000000000001004b00000c750000c13d0000057601000041000000800010043f00000554010000410000141000010430000005420020009c00000bed0000613d000005430020009c000000590000c13d0000000002000416000000000002004b000000590000c13d000000440030008c000000590000413d0000002402100370000000000202043b000a00000002001d0000000401100370000000000101043b000900000001001d0000000001000411000000000010043f0000000b01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000ff00100190000006a20000c13d000000000100041a0000050d011001970000000002000411000000000012004b00000de10000c13d00000009010000290000000a02000029140e11cf0000040f0000000a01000029000000000010043f0000000501000039000000200010043f00000040020000390000000001000019140e13ef0000040f000a00000001001d000000000201041a00000040012002700000050801100197140e11b80000040f00000040011002100000000a03000029000000000203041a0000057c02200197000000000112019f000000000013041b00000000010000190000140f0001042e000005260020009c00000c060000613d000005270020009c000000590000c13d0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000000401100370000000000101043b0000050d0010009c000000590000213d000000000010043f0000000b01000039000000200010043f00000040020000390000000001000019140e13ef0000040f000000000101041a000000ff001001900000000001000039000000010100c039000000800010043f00000570010000410000140f0001042e0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000000401100370000000000101043b000000000010043f0000000501000039000000200010043f00000040020000390000000001000019140e13ef0000040f000000000101041a0000004001100270000008b50000013d0000000001000416000000000001004b000000590000c13d0000000803000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000525013f000000010050019000000be70000c13d000000800010043f000000000004004b00000c2d0000613d000000000030043f000000000001004b00000c2b0000613d000005680200004100000000040000190000000003040019000000000402041a000000a005300039000000000045043500000001022000390000002004300039000000000014004b000006f90000413d00000ccf0000013d0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000000402100370000000000502043b000005080050009c000000590000213d0000002302500039000000000032004b000000590000813d0000000404500039000000000241034f000000000202043b000005080020009c00000bca0000213d0000001f062000390000050a06600197000005550060009c00000bca0000213d00000024055000390000003f066000390000050a066001970000008006600039000000400060043f000000800020043f0000000005520019000000000035004b000000590000213d0000002003400039000000000331034f000005a0042001980000001f0520018f000000a0014000390000072c0000613d000000a006000039000000000703034f000000007807043c0000000006860436000000000016004b000007280000c13d000000000005004b000007390000613d000000000343034f0000000304500210000000000501043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000310435000000a0012000390000000000010435000000000100041a0000050d011001970000000002000411000000000021004b00000cf20000c13d000000800200043d000005080020009c00000bca0000213d0000000901000039000000000401041a000000010040019000000001034002700000007f0330618f0000001f0030008c00000000050000390000000105002039000000000445013f000000010040019000000be70000c13d000000200030008c0000075f0000413d000000000010043f0000001f042000390000000504400270000005950440009a000000200020008c0000057e040040410000001f033000390000000503300270000005950330009a000000000034004b0000075f0000813d000000000004041b0000000104400039000000000034004b0000075b0000413d0000001f0020008c00000e0f0000a13d000000000010043f000005160420019800000f300000c13d000000a0050000390000057e0300004100000f3e0000013d0000000002000416000000000002004b000000590000c13d000000440030008c000000590000413d0000000402100370000000000202043b0000050d0020009c000000590000213d0000002401100370000000000101043b0000058f0010009c000000590000213d000000000300041a0000050d033001970000000004000411000000000043004b00000c1d0000c13d0000058f03100197000027110030008c00000cf50000413d0000059301000041000000800010043f000000840030043f0000271001000039000000a40010043f000005940100004100001410000104300000000002000416000000000002004b000000590000c13d000000640030008c000000590000413d0000000402100370000000000202043b000a00000002001d0000050d0020009c000000590000213d0000004402100370000000000202043b0000002401100370000000000401043b0000000101000039000000800010043f000000a00040043f000000c00010043f000900000002001d000000e00020043f0000012001000039000000400010043f0000000a010000290000006001100210000001000000043f00000558021001c7000000200020043f0000000003000411000000600230021200000c330000613d000000000012004b00000c330000613d000800000004001d000000000030043f0000000001000414000005050010009c0000050501008041000000c0011002100000055a011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000000001004b000000080400002900000c330000c13d0000058601000041000000000010043f000005820100004100001410000104300000000001000416000000000001004b000000590000c13d000000000100041a00000bd50000013d0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000012002000039000000400020043f0000010009000039000001000000043f0000000401100370000000000101043b0000000002090019000000090010008c0000000a3110011a000000f804300210000000010990008a00000000050904330000058b05500197000000000454019f0000058c044001c70000000000490435000007c70000213d0000010104200089000000210120008a00000000004104350000000905000039000000000405041a000000010640019000000001084002700000007f0880618f0000001f0080008c00000000020000390000000102002039000000000242013f000000010020019000000be70000c13d000000400700043d0000002002700039000000000006004b000a00000007001d00000c460000613d000000000050043f000000000008004b00000c480000613d0000057e0400004100000000050000190000000006520019000000000704041a000000000076043500000001044000390000002005500039000000000085004b000007ea0000413d00000c480000013d0000000001000416000000000001004b000000590000c13d0000000001030019140e118d0000040f000800000001001d0000000001020019000900000002001d000a00000003001d140e127a0000040f000000000100041100000008020000290000000a03000029140e13900000040f00000009010000290000000a02000029140e11cf0000040f00000000010000190000140f0001042e0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000000401100370000000000101043b000000000010043f0000000c01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000301041a000000400200043d000a00000002001d000900000003001d0000000002320436000800000002001d000000000010043f0000000001000414000005050010009c0000050501008041000000c00110021000000515011001c70000801002000039140e14090000040f0000000100200190000000590000613d0000000905000029000000000005004b00000c900000c13d000000080400002900000c990000013d0000000001000416000000000001004b000000590000c13d000000240030008c000000590000413d0000000001000411000000000010043f0000000b01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000ff00100190000008490000c13d000000000100041a0000050d011001970000000002000411000000000012004b00000de10000c13d00000004010000390000000001100367000000000101043b000000400200043d0000000000120435000005050020009c000005050200804100000040012002100000000002000414000005050020009c0000050502008041000000c002200210000000000112019f00000515011001c70000800d0200003900000001030000390000056f0400004100000c010000013d0000000002000416000000000002004b000000590000c13d000000440030008c000000590000413d0000002402100370000000000202043b000a00000002001d0000000401100370000000000101043b000000000010043f0000000301000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a0000050d01200198000008780000c13d0000000201000039000000000201041a0000050d01200197000000a0032002700000000a0400002900000000024300a9000000000004004b000008800000613d00000000044200d9000000000043004b00000c670000c13d000027100220011a000000400300043d000000200430003900000000002404350000000000130435000005050030009c0000050503008041000000400130021000000587011001c70000140f0001042e0000000001000416000000000001004b000000590000c13d0000000001030019140e119d0000040f000a00000002001d000000000010043f0000000d01000039000000200010043f00000040020000390000000001000019140e13ef0000040f0000000a02000029000000000020043f000000200010043f00000000010000190000004002000039140e13ef0000040f000000000101041a000000000001004b0000000001000039000000010100c039000000400200043d0000000000120435000005050020009c0000050502008041000000400120021000000567011001c70000140f0001042e0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000000401100370000000000101043b000000000010043f0000000501000039000000200010043f00000040020000390000000001000019140e13ef0000040f000000000101041a0000050801100197000000800010043f00000570010000410000140f0001042e0000000002000416000000000002004b000000590000c13d000000440030008c000000590000413d0000002402100370000000000202043b000a00000002001d0000000401100370000000000101043b000900000001001d0000000001000411000000000010043f0000000b01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000ff00100190000008da0000c13d000000000100041a0000050d011001970000000002000411000000000012004b00000de10000c13d000000400100043d00000020021000390000000a03000029000000000032043500000009020000290000000000210435000005050010009c000005050100804100000040011002100000000002000414000005050020009c0000050502008041000000c002200210000000000112019f0000055b011001c70000800d020000390000000103000039000005610400004100000c010000013d0000000002000416000000000002004b000000590000c13d000000440030008c000000590000413d0000000402100370000000000402043b000005080040009c000000590000213d0000002302400039000000000032004b000000590000813d000900040040003d0000000902100360000000000202043b000005080020009c000000590000213d000000050520021000000000045400190000002404400039000000000034004b000000590000213d0000002404100370000000000404043b000005080040009c000000590000213d0000002305400039000000000035004b000000590000813d000800040040003d0000000801100360000000000101043b000005080010009c000000590000213d000000050510021000000000045400190000002404400039000000000034004b000000590000213d000000000021004b00000dfa0000c13d0000000003050019000000800010043f000000a0025000390000000004020019000000400020043f000000000001004b000009390000613d000a00000003001d00000009013000290000000001100367000000000101043b000000600110021000000558011001c7000000200010043f00000008013000290000000001100367000000000101043b000000000010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a0000000a0300002900000080023000390000000000120435000000200330008c0000091d0000c13d000000400400043d00000080020000390000000001040019000a00000004001d140e11a90000040f00000cd70000013d0000000002000416000000000002004b000000590000c13d000000440030008c000000590000413d0000000402100370000000000202043b0000050d0020009c000000590000213d0000002401100370000000000101043b0000050d0010009c000000590000213d000005590010009c00000ca20000c13d0000000101000039000000800200003900000cb50000013d0000000002000416000000000002004b000000590000c13d000000a40030008c000000590000413d0000000402100370000000000202043b000500000002001d0000050d0020009c000000590000213d0000002402100370000000000202043b000400000002001d0000050d0020009c000000590000213d0000004402100370000000000202043b000005080020009c000000590000213d0000002304200039000000000034004b000000590000813d0000000404200039000000000441034f000000000a04043b0000050800a0009c000000590000213d0000002408200039000000050ca0021000000000098c0019000000000039004b000000590000213d0000006402100370000000000202043b000005080020009c000000590000213d0000002304200039000000000034004b000000590000813d0000000404200039000000000441034f000000000704043b000005080070009c000000590000213d0000002405200039000000050b70021000000000065b0019000000000036004b000000590000213d0000008402100370000000000d02043b0000050800d0009c000000590000213d0000002302d00039000000000032004b000000590000813d0000000404d00039000000000241034f000000000202043b000005080020009c000000590000213d000000000d2d0019000000240dd0003900000000003d004b000000590000213d0000003f03c0003900000569033001970000056a0030009c00000bca0000213d0000008003300039000600000003001d000000400030043f0000008000a0043f00000000000a004b000009a50000613d0000008003000039000000000a81034f000000000a0a043b00000020033000390000000000a304350000002008800039000000000098004b0000099c0000413d000000400300043d000600000003001d0000003f03b00039000005690330019700000006090000290000000003390019000000000093004b00000000080000390000000108004039000005080030009c00000bca0000213d000000010080019000000bca0000c13d000000400030043f0000000003790436000300000003001d000000000007004b000009bd0000613d0000000603000029000000000751034f000000000707043b000000200330003900000000007304350000002005500039000000000065004b000009b60000413d0000001f032000390000050a033001970000003f033000390000050b03300197000000400500043d0000000003350019000200000005001d000000000053004b00000000050000390000000105004039000005080030009c00000bca0000213d000000010050019000000bca0000c13d000000400030043f0000002003400039000000000431034f00000002010000290000000001210436000005a0052001980000001f0620018f0000000003510019000009da0000613d000000000704034f0000000008010019000000007907043c0000000008980436000000000038004b000009d60000c13d000000000006004b000009e70000613d000000000454034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f000000000043043500000000012100190000000000010435000000800100043d000000050000006b000009f20000613d000000040000006b000009f20000613d0000000402000039000000000202041a000a050d0020019c000010a60000c13d00000006020000290000000002020433000000000021004b00000dfa0000c13d000000040000006b00000e000000613d0000000502000029000000600320021000000558023001c7000800000002001d000000200020043f0000000002000411000005590020009c0000000002006019000000600420021200000a130000613d000000000034004b00000a130000613d000000000020043f0000000001000414000005050010009c0000050501008041000000c0011002100000055a011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000000001004b000007b30000613d000000800100043d00000005031002120000000602000029000010f90000c13d000000400100043d00000040020000390000000003210436000000800200043d0000000502200210000000200420003a00000a260000613d0000004005100039000000000600001900000000076500190000008008600039000000000808043300000000008704350000002006600039000000000046004b00000a1f0000413d00000060052000390000000000530435000000060900002900000000030904330000000503300210000000200430003a00000a360000613d0000000005150019000000000600001900000000076500190000000008960019000000000808043300000000008704350000002006600039000000000046004b00000a2f0000413d0000000002320019000000800220003900000060032002100000056b0020009c0000056c03008041000005050010009c00000505010080410000004001100210000000000113019f0000000002000414000005050020009c0000050502008041000000c00220021000000000012100190000056d0110009a0000800d0200003900000004030000390000056e04000041000000000500041100000005060000290000000407000029140e14040000040f0000000100200190000000590000613d0000050e010000410000000000100443000000040100002900000004001004430000000001000414000005050010009c0000050501008041000000c0011002100000050f011001c70000800202000039140e14090000040f0000000100200190000010f20000613d000000000101043b000000000001004b00000c040000613d000000400300043d0000006001300039000000a00200003900000000002104350000004001300039000000050200002900000000002104350000002001300039000000000200041100000000002104350000058401000041000a00000003001d0000000000130435000000800100043d0000000501100210000000200210003a00000a790000613d0000000a03000029000000c003300039000000000400001900000000054300190000008006400039000000000606043300000000006504350000002004400039000000000024004b00000a720000413d000000c0021000390000000a04000029000000800340003900000000002304350000000002410019000000060900002900000000030904330000000503300210000000200430003a00000a8c0000613d000000e005200039000000000600001900000000076500190000000008960019000000000808043300000000008704350000002006600039000000000046004b00000a850000413d0000000001310019000000e0011000390000000a04000029000000a0044000390000000000140435000000000123001900000002080000290000000002080433000000200320003a00000a9f0000613d0000010004100039000000000500001900000000065400190000000007850019000000000707043300000000007604350000002005500039000000000035004b00000a980000413d0000000a03000029000000000131004900000000012100190000010401100039000005050010009c000005050100804100000060011002100000001c02300039000005050020009c00000505020080410000004002200210000000000121019f0000000002000414000005050020009c0000050502008041000000c002200210000000000112019f0000000402000029140e14040000040f00000060031002700000050503300197000000200030008c000000200400003900000000040340190000001f0540018f00000020064001900000000a0460002900000ac10000613d000000000701034f0000000a08000029000000007907043c0000000008980436000000000048004b00000abd0000c13d000000000005004b00000ace0000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000000000003004b00000001022061bf00000001002001900000114a0000613d0000000a010000290000000001010433000005850010009c00000c040000613d00000ede0000013d0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000000402100370000000000202043b000005080020009c000000590000213d0000002304200039000000000034004b000000590000813d0000000404200039000000000141034f000000000101043b000900000001001d000005080010009c000000590000213d000800240020003d000000090100002900000005011002100000000801100029000000000031004b000000590000213d0000000001000411000000000010043f0000000b01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000ff0010019000000b050000c13d000000000100041a0000050d011001970000000002000411000000000012004b00000de10000c13d000000090000006b00000c040000613d0000000002000019000a00000002001d000000050120021000000008011000290000000001100367000000000101043b000000400200043d0000000000120435000005050020009c000005050200804100000040012002100000000002000414000005050020009c0000050502008041000000c002200210000000000112019f00000515011001c70000800d0200003900000001030000390000056f04000041140e14040000040f00000001002001900000000a02000029000000590000613d0000000102200039000000090020006c00000b080000413d00000c040000013d0000000001000416000000000001004b000000590000c13d000000000100041a0000050d021001970000000005000411000000000052004b00000c1d0000c13d0000051201100197000000000010041b0000000001000414000005050010009c0000050501008041000000c00110021000000513011001c70000800d0200003900000003030000390000051404000041000000000600001900000c010000013d0000000002000416000000000002004b000000590000c13d000000a40030008c000000590000413d0000000402100370000000000202043b000600000002001d0000050d0020009c000000590000213d0000002402100370000000000202043b000500000002001d0000050d0020009c000000590000213d0000008402100370000000000502043b000005080050009c000000590000213d0000002302500039000000000032004b000000590000813d0000000404500039000000000241034f000000000202043b000005080020009c000000590000213d00000000052500190000002405500039000000000035004b000000590000213d0000001f032000390000050a03300197000005550030009c00000bca0000213d0000003f033000390000050a033001970000008003300039000000400030043f0000002003400039000000000431034f000000800020043f000005a0052001980000001f0620018f000000a00350003900000b6b0000613d000000a007000039000000000804034f000000008908043c0000000007970436000000000037004b00000b670000c13d000000000006004b00000b780000613d000000000454034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000430435000000a00220003900000000000204350000004402100370000000000202043b000000400400043d0000004003400039000000400030043f0000002003400039000200000003001d00000000002304350000000102000039000400000004001d00000000002404350000006401100370000000000101043b000000400400043d0000004003400039000000400030043f0000002003400039000100000003001d0000000000130435000300000004001d0000000000240435000000060000006b00000dfe0000c13d000000050000006b00000e000000613d00000e210000013d0000000002000416000000000002004b000000590000c13d000000440030008c000000590000413d0000000402100370000000000202043b0000050d0020009c000000590000213d0000055803000041000000200030043f000000140020043f0000002401100370000000000101043b000000000010043f00000040020000390000000001000019140e13ef0000040f000000000101041a000000800010043f00000570010000410000140f0001042e0000000002000416000000000002004b000000590000c13d000000840030008c000000590000413d0000000402100370000000000202043b000a00000002001d0000050d0020009c000000590000213d0000004402100370000000000202043b000800000002001d0000002402100370000000000202043b000900000002001d0000006402100370000000000502043b000005080050009c000000590000213d0000002302500039000000000032004b000000590000813d0000000404500039000000000241034f000000000202043b000005080020009c00000bca0000213d0000001f062000390000050a06600197000005550060009c00000cfc0000a13d0000058001000041000000000010043f0000004101000039000000040010043f000005600100004100001410000104300000000001000416000000000001004b000000590000c13d0000000401000039000000000101041a0000050d01100197000000800010043f00000570010000410000140f0001042e0000000001000416000000000001004b000000590000c13d0000000703000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000525013f000000010050019000000c250000613d0000058001000041000000000010043f0000002201000039000000040010043f000005600100004100001410000104300000000001000416000000000001004b000000590000c13d000000000100041a0000050d011001970000000002000411000000000021004b00000c1d0000c13d0000000103000039000000000103041a0000051201100197000000000013041b000000800000043f0000000001000414000005050010009c0000050501008041000000c00110021000000551011001c70000800d020000390000055204000041140e14040000040f0000000100200190000000590000613d00000000010000190000140f0001042e0000000002000416000000000002004b000000590000c13d000000240030008c000000590000413d0000000401100370000000000101043b0000050d0010009c000000590000213d000000000200041a0000050d022001970000000003000411000000000032004b00000c1d0000c13d0000000402000039000000000402041a0000050d03400197000000000013004b00000cb70000c13d0000057301000041000000800010043f000005540100004100001410000104300000059001000041000000800010043f000005540100004100001410000104300000057b01000041000000800010043f00000554010000410000141000010430000000800010043f000000000004004b00000c2d0000613d000000000030043f000000000001004b00000cc50000c13d000000a00100003900000cd00000013d000005a102200197000000a00020043f000000000001004b000000c001000039000000a00100603900000cd00000013d000000000040043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a0000000903000029000000000232004b00000ce10000813d0000058301000041000000000010043f00000582010000410000141000010430000005a104400197000000000042043500000000028200190000000003010433000900000003001d0000000001090019000800000008001d140e116b0000040f000000080200002900000009022000290000000a0100002900000000002104350000002002200039140e11590000040f000000400100043d000900000001001d0000000a02000029140e11780000040f000000090200002900000cd80000013d0000059c0020009c00000c630000613d0000059d0020009c00000c630000613d0000059e0020009c000000000100003900000001010060390000059f0020009c00000001011061bf000000010110018f000000800010043f00000570010000410000140f0001042e0000058001000041000000000010043f0000001101000039000000040010043f000005600100004100001410000104300000000103000039000000000203041a0000051202200197000000000212019f000000000023041b000000800010043f000000000100041400000bfb0000013d000000000010043f0000000b01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a000005a10220019700000001022001bf000000000021041b0000000001000414000005050010009c0000050501008041000000c00110021000000513011001c70000800d02000039000000020300003900000575040000410000000a0500002900000c010000013d000000000101043b00000000020000190000000804000029000000000301041a000000000434043600000001011000390000000102200039000000000052004b00000c930000413d0000000a010000290000000002140049140e11590000040f000000400100043d000900000001001d0000000a02000029140e11a90000040f000000090200002900000cd80000013d0000055803000041000000200030043f000000140020043f000000000010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055a011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000400200043d000000000101043b000000000101041a000000000001004b0000000001000039000000010100c039000000010110018f000008a10000013d0000051204400197000000000414019f000000000042041b000000800030043f000000a00010043f0000000001000414000005050010009c0000050501008041000000c00110021000000571011001c70000800d020000390000000103000039000005720400004100000c010000013d000005770200004100000000040000190000000003040019000000000402041a000000a005300039000000000045043500000001022000390000002004300039000000000014004b00000cc70000413d000000c001300039000000800210008a0000008001000039140e11590000040f000000400100043d000a00000001001d0000008002000039140e11780000040f0000000a020000290000000001210049000005050010009c00000505010080410000006001100210000005050020009c00000505020080410000004002200210000000000121019f0000140f0001042e000000000021041b000000200030043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000800d0200003900000004030000390000055c0400004100000000050004110000000a060000290000000007000019140e14040000040f0000000100200190000000590000613d00000c040000013d000000400100043d000005900200004100000df40000013d000000000002004b00000dec0000c13d0000059101000041000000800010043f000000840000043f0000059201000041000014100001043000000024055000390000003f066000390000050a066001970000008006600039000000400060043f000000800020043f0000000005520019000000000035004b000000590000213d0000002003400039000000000331034f000005a0042001980000001f0520018f000000a00140003900000d110000613d000000a006000039000000000703034f000000007807043c0000000006860436000000000016004b00000d0d0000c13d000000000005004b00000d1e0000613d000000000343034f0000000304500210000000000501043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000310435000000a00120003900000000000104350000000001000411000000000010043f0000000b01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000ff0010019000000d360000c13d000000000100041a0000050d011001970000000002000411000000000012004b00000de10000c13d000000400100043d0000004002100039000000400020043f00000020021000390000000903000029000000000032043500000001020000390000000000210435000000400100043d0000004003100039000000400030043f00000020031000390000000804000029000000000043043500000000002104350000000a0000006b00000e000000613d0000055801000041000000200010043f0000000a01000029000000140010043f0000000901000029000000000010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a000000080020002a000011550000413d00000008030000290000000002320019000000000021041b000000200030043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000800d0200003900000004030000390000055c04000041000000000500041100000000060000190000000a07000029140e14040000040f0000000100200190000000590000613d0000050e0100004100000000001004430000000a0100002900000004001004430000000001000414000005050010009c0000050501008041000000c0011002100000050f011001c70000800202000039140e14090000040f0000000100200190000010f20000613d000000000101043b000000000001004b00000dd20000613d000000400300043d000000a001300039000000a00200003900000000002104350000008001300039000000080200002900000000002104350000006001300039000000090200002900000000002104350000002001300039000000000200041100000000002104350000055d01000041000000000013043500000040013000390000000000010435000700000003001d000000c002300039000000800100043d0000000000120435000000000001004b00000d9d0000613d0000000702000029000000e00220003900000000030000190000000004320019000000a005300039000000000505043300000000005404350000002003300039000000000013004b00000d960000413d00000007020000290000001c02200039000005050020009c00000505020080410000004002200210000000c401100039000005050010009c00000505010080410000006001100210000000000121019f0000000002000414000005050020009c0000050502008041000000c002200210000000000112019f0000000a02000029140e14040000040f00000060031002700000050503300197000000200030008c000000200400003900000000040340190000001f0540018f0000002006400190000000070460002900000dbd0000613d000000000701034f0000000708000029000000007907043c0000000008980436000000000048004b00000db90000c13d000000000005004b00000dca0000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000000000003004b00000001022061bf00000001002001900000101e0000613d000000070100002900000000010104330000055e0010009c00000ede0000c13d0000000901000029000000000010043f0000000501000039000000200010043f00000040020000390000000001000019140e13ef0000040f000a00000001001d000000000301041a0000000802000029000005080220019700000040013002700000050801100197140e11c30000040f000006b10000013d000000400100043d0000055f020000410000000000210435000000040210003900000000030004110000000000320435000005050010009c0000050501008041000000400110021000000560011001c70000141000010430000000a001100210000000000121019f0000000202000039000000000012041b00000000010000190000140f0001042e000000400100043d00000510020000410000000000210435000005050010009c0000050501008041000000400110021000000511011001c700001410000104300000058101000041000000000010043f00000582010000410000141000010430000000050000006b00000e190000c13d0000058a01000041000000000010043f00000582010000410000141000010430000000000003004b000000000400001900000e080000613d000000a00400043d0000000305300210000005a20550027f000005a205500167000000000454016f0000000103300210000000000334019f00000f090000013d000000000002004b000000000300001900000e130000613d000000a00300043d0000000304200210000005a20440027f000005a204400167000000000443016f000000010320021000000f490000013d0000000401000039000000000101041a000a050d0010019c00000e210000613d00000004010000290000000001010433000000000001004b00000f5a0000c13d0000000601000029000000600110021000000558021001c7000000200020043f0000000002000411000005590020009c0000000002006019000000600320021200000e3a0000613d000000000013004b00000e3a0000613d000000000020043f0000000001000414000005050010009c0000050501008041000000c0011002100000055a011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000101041a000000000001004b000007b30000613d00000044010000390000000001100367000000000101043b000000000010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d00000064020000390000000002200367000000000202043b000000000101043b000000000301041a000000000223004b00000c420000413d00000005030000290000006003300210000000000021041b00000558013001c7000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000301041a00000064020000390000000002200367000000000202043b000000000032001a000011550000413d0000000003320019000000000031041b000000200020043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000800d0200003900000004030000390000055c04000041000000000500041100000006060000290000000507000029140e14040000040f0000000100200190000000590000613d0000050e010000410000000000100443000000050100002900000004001004430000000001000414000005050010009c0000050501008041000000c0011002100000050f011001c70000800202000039140e14090000040f0000000100200190000010f20000613d000000000101043b000000000001004b00000c040000613d000000400400043d0000004001400039000000060200002900000000002104350000002001400039000000000200041100000000002104350000055d01000041000000000014043500000000010003670000004402100370000000000202043b000000600340003900000000002304350000006401100370000000000101043b000000a002400039000000a003000039000000000032043500000080024000390000000000120435000a00000004001d000000c002400039000000800100043d0000000000120435000000000001004b00000ea90000613d0000000a02000029000000e00220003900000000030000190000000004320019000000a005300039000000000505043300000000005404350000002003300039000000000013004b00000ea20000413d0000000a020000290000001c02200039000005050020009c00000505020080410000004002200210000000c401100039000005050010009c00000505010080410000006001100210000000000121019f0000000002000414000005050020009c0000050502008041000000c002200210000000000121019f0000000502000029140e14040000040f00000060031002700000050503300197000000200030008c000000200400003900000000040340190000001f0540018f00000020064001900000000a0460002900000ec90000613d000000000701034f0000000a08000029000000007907043c0000000008980436000000000048004b00000ec50000c13d000000000005004b00000ed60000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000000000003004b00000001022061bf00000001002001900000108c0000613d0000000a0100002900000000010104330000055e0010009c00000c040000613d0000058801000041000000000010043f00000582010000410000141000010430000000400100043d00000024021000390000000a03000029000000000032043500000563020000410000000000210435000000040210003900000009030000290000000000320435000005050010009c0000050501008041000000400110021000000564011001c7000014100001043000000568040000410000002007000039000000010650008a0000000506600270000005790660009a000000000807001900000080077000390000000007070433000000000074041b00000020078000390000000104400039000000000064004b00000ef50000c13d000000a006800039000000000035004b00000f070000613d0000000305300210000000f80550018f000005a20550027f000005a2055001670000000006060433000000000556016f000000000054041b000000010330021000000001033001bf000000000032041b0000002003000039000000400200043d0000000004320436000000800300043d00000000003404350000004004200039000000000003004b00000f1a0000613d00000000050000190000000006450019000000a007500039000000000707043300000000007604350000002005500039000000000035004b00000f130000413d0000001f05300039000005a001500197000000000343001900000000000304350000004001100039000005050010009c00000505010080410000006001100210000005050020009c00000505020080410000004002200210000000000121019f0000000002000414000005050020009c0000050502008041000000c002200210000000000112019f00000513011001c70000800d0200003900000001030000390000057a0400004100000c010000013d0000057e030000410000002006000039000000010540008a0000000505500270000005960550009a000000000706001900000080066000390000000006060433000000000063041b00000020067000390000000103300039000000000053004b00000f350000c13d000000a005700039000000000024004b00000f470000613d0000000304200210000000f80440018f000005a20440027f000005a2044001670000000005050433000000000445016f000000000043041b00000001030000390000000104200210000000000234019f000000000021041b00000000010000190000140f0001042e000000050000006b000000000100001900000f520000613d0000000901000029000000000101043300000005040000290000000302400210000005a20220027f000005a202200167000000000121016f0000000102400210000000000121019f00000fd80000013d000000000200001900000003010000290000000001010433000000000021004b000010f30000a13d000700000002001d000000050120021000000002021000290000000002020433000900000002001d00000001011000290000000001010433000800000001001d0000050e0100004100000000001004430000000a0100002900000004001004430000000001000414000005050010009c0000050501008041000000c0011002100000050f011001c70000800202000039140e14090000040f0000000100200190000010f20000613d000000000101043b000000000001004b000000590000613d000000400300043d00000084013000390000000802000029000000000021043500000064013000390000000902000029000000000021043500000044013000390000000502000029000000000021043500000024013000390000000602000029000000000021043500000556010000410000000000130435000000040130003900000000020004110000000000210435000005050030009c000900000003001d0000050501000041000000000103401900000040011002100000000002000414000005050020009c0000050502008041000000c002200210000000000112019f00000557011001c70000000a02000029140e14040000040f0000000100200190000010380000613d0000000901000029000005080010009c000000070200002900000bca0000213d000000400010043f000000010220003900000004010000290000000001010433000000000012004b00000f5b0000413d00000b910000013d0000001f0430018f0000050705300198000000050250002900000fad0000613d000000000601034f0000000507000029000000006806043c0000000007870436000000000027004b00000fa90000c13d000000000004004b00000fba0000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000012043500000060013002100000000502000029000010530000013d000000010320008a00000005033002700000000004310019000000200300003900000001044000390000000a0600002900000000053600190000000005050433000000000051041b00000020033000390000000101100039000000000041004b00000fc30000c13d000000050020006c00000fd50000613d00000005020000290000000302200210000000f80220018f000005a20220027f000005a2022001670000000a033000290000000003030433000000000223016f000000000021041b0000000501000029000000010110021000000001011001bf0000000602000039000000000012041b00000008010000290000000001010433000a00000001001d000005080010009c00000bca0000213d0000000701000039000000000101041a000000010010019000000001021002700000007f0220618f000900000002001d0000001f0020008c00000000020000390000000102002039000000000112013f000000010010019000000be70000c13d0000000901000029000000200010008c0000100a0000413d0000000701000039000000000010043f0000000001000414000005050010009c0000050501008041000000c00110021000000515011001c70000801002000039140e14090000040f0000000100200190000000590000613d0000000a030000290000001f023000390000000502200270000000200030008c0000000002004019000000000301043b00000009010000290000001f01100039000000050110027000000000013100190000000002230019000000000012004b0000100a0000813d000000000002041b0000000102200039000000000012004b000010060000413d0000000a010000290000001f0010008c000010580000a13d0000000701000039000000000010043f0000000001000414000005050010009c0000050501008041000000c00110021000000515011001c70000801002000039140e14090000040f0000000100200190000000590000613d0000000a020000290000051602200198000000000101043b000010640000c13d0000002003000039000010710000013d0000001f0430018f00000507053001980000000702500029000010280000613d000000000601034f0000000707000029000000006806043c0000000007870436000000000027004b000010240000c13d000000000004004b000010350000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000012043500000060013002100000000702000029000010530000013d00000060061002700000001f0460018f0000050705600198000000400200043d0000000003520019000010440000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000038004b000010400000c13d0000050506600197000000000004004b000010520000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000006001600210000005050020009c00000505020080410000004002200210000000000121019f00001410000104300000000a0000006b00000000010000190000105d0000613d000000070100002900000000010104330000000a040000290000000302400210000005a20220027f000005a202200167000000000221016f00000001014002100000107f0000013d000000010320008a0000000503300270000000000431001900000020030000390000000104400039000000080600002900000000053600190000000005050433000000000051041b00000020033000390000000101100039000000000041004b0000106a0000c13d0000000a0020006c0000107c0000613d0000000a020000290000000302200210000000f80220018f000005a20220027f000005a20220016700000008033000290000000003030433000000000223016f000000000021041b00000001010000390000000a020000290000000102200210000000000112019f0000000702000039000000000012041b0000000a01000039000000000201041a000005120220019700000006022001af000000000021041b00000020010000390000010000100443000001200000044300000517010000410000140f0001042e0000001f0430018f00000507053001980000000a02500029000010960000613d000000000601034f0000000a07000029000000006806043c0000000007870436000000000027004b000010920000c13d000000000004004b000010a30000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000012043500000060013002100000000a02000029000010530000013d000000000001004b00000000010000190000000602000029000009f30000613d00000000030000190000000001020433000000000031004b000010f30000a13d000700000003001d0000000501300210000000a0021000390000000002020433000900000002001d00000003011000290000000001010433000800000001001d0000050e0100004100000000001004430000000a0100002900000004001004430000000001000414000005050010009c0000050501008041000000c0011002100000050f011001c70000800202000039140e14090000040f0000000100200190000010f20000613d000000000101043b000000000001004b000000590000613d000000400300043d00000084013000390000000802000029000000000021043500000064013000390000000902000029000000000021043500000044013000390000000402000029000000000021043500000024013000390000000502000029000000000021043500000556010000410000000000130435000000040130003900000000020004110000000000210435000005050030009c000900000003001d0000050501000041000000000103401900000040011002100000000002000414000005050020009c0000050502008041000000c002200210000000000112019f00000557011001c70000000a02000029140e14040000040f00000001002001900000112a0000613d0000000901000029000005080010009c0000000602000029000000070300002900000bca0000213d000000400010043f0000000103300039000000800100043d000000000013004b000010ab0000413d000009f30000013d000000000001042f0000058001000041000000000010043f0000003201000039000000040010043f000005600100004100001410000104300000000401000029000000600110021000070558001001cb00000000012300190000000001010433000a00000001001d0000000801000029000000200010043f000900000003001d00000080013000390000000001010433000000000010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a0000000a0220006c00000c420000413d000000000021041b0000000701000029000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000000590000613d000000000101043b000000000201041a0000000a03000029000000000032001a000011550000413d0000000002320019000000000021041b0000000903000029000000200330008c0000000602000029000010fc0000c13d00000a160000013d00000060061002700000001f0460018f0000050705600198000000400200043d0000000003520019000011360000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000038004b000011320000c13d0000050506600197000000000004004b000011440000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000006001600210000005050020009c00000505020080410000004002200210000000000112019f00001410000104300000001f0430018f00000507053001980000000a02500029000010960000613d000000000601034f0000000a07000029000000006806043c0000000007870436000000000027004b000011500000c13d000010960000013d0000058901000041000000000010043f000005820100004100001410000104300000001f02200039000005a0022001970000000001120019000000000021004b00000000020000390000000102004039000005080010009c000011650000213d0000000100200190000011650000c13d000000400010043f000000000001042d0000058001000041000000000010043f0000004101000039000000040010043f00000560010000410000141000010430000000000003004b000011750000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000034004b0000116e0000413d00000000012300190000000000010435000000000001042d00000020030000390000000004310436000000003202043400000000002404350000004001100039000000000002004b000011870000613d000000000400001900000000051400190000000006430019000000000606043300000000006504350000002004400039000000000024004b000011800000413d000000000312001900000000000304350000001f02200039000005a0022001970000000001210019000000000001042d000005a30010009c0000119b0000213d000000630010008c0000119b0000a13d00000000030003670000000401300370000000000101043b0000050d0010009c0000119b0000213d0000002402300370000000000202043b0000004403300370000000000303043b000000000001042d00000000010000190000141000010430000005a30010009c000011a70000213d000000430010008c000011a70000a13d00000000020003670000000401200370000000000101043b0000002402200370000000000202043b000000000001042d0000000001000019000014100001043000000020030000390000000004310436000000000302043300000000003404350000004001100039000000000003004b000011b70000613d00000000040000190000002002200039000000000502043300000000015104360000000104400039000000000034004b000011b10000413d000000000001042d0000050801100197000005080010009c000011bd0000613d0000000101100039000000000001042d0000058001000041000000000010043f0000001101000039000000040010043f00000560010000410000141000010430000005080110019700000508022001970000000001120019000005090010009c000011c90000813d000000000001042d0000058001000041000000000010043f0000001101000039000000040010043f000005600100004100001410000104300003000000000002000300000002001d000200000001001d000000000010043f0000000d01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f00000001002001900000125e0000613d000000000101043b0000000302000029000000000020043f000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f00000001002001900000125e0000613d000000000101043b000000000101041a000000000001004b000012600000c13d0000000501000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f00000001002001900000125e0000613d000000000101043b000000000201041a0000050803200197000005080030009c0000126e0000613d0000056502200197000000000223019f0000000102200039000000000021041b0000000201000029000000000010043f0000000c01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f00000001002001900000125e0000613d000000000101043b000000000201041a000005090020009c000012740000813d000100000002001d0000000102200039000000000021041b000000000010043f0000000001000414000005050010009c0000050501008041000000c00110021000000515011001c70000801002000039140e14090000040f00000001002001900000125e0000613d000000000101043b00000001011000290000000302000029000000000021041b0000000201000029000000000010043f0000000c01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f00000001002001900000125e0000613d000000000101043b000000000101041a000100000001001d0000000d01000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f00000001002001900000125e0000613d000000000101043b0000000302000029000000000020043f000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f00000001002001900000125e0000613d000000000101043b0000000102000029000000000021041b0000000001000414000005050010009c0000050501008041000000c00110021000000513011001c70000800d020000390000000303000039000005660400004100000002050000290000000306000029140e14040000040f00000001002001900000125e0000613d000000000001042d00000000010000190000141000010430000000400100043d00000024021000390000000303000029000000000032043500000563020000410000000000210435000000040210003900000002030000290000000000320435000005050010009c0000050501008041000000400110021000000564011001c700001410000104300000058001000041000000000010043f0000001101000039000000040010043f000005600100004100001410000104300000058001000041000000000010043f0000004101000039000000040010043f0000056001000041000014100001043000050000000000020000000a02000039000000000202041a000000400400043d000500000004001d000005a40300004100000000003404350000000403400039000300000001001d0000000000130435000005050040009c0000050501000041000000000104401900000040011002100000000003000414000005050030009c0000050503008041000000c003300210000000000113019f00000560011001c70000050d02200197000400000002001d140e14090000040f000000050b00002900000060031002700000050503300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057b0019000012a10000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b0000129d0000c13d000000000006004b000012ae0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f000000000065043500000001002001900000134e0000613d0000001f01400039000000600110018f0000000004b10019000000000014004b00000000010000390000000101004039000005080040009c000013480000213d0000000100100190000013480000c13d000000400040043f0000001f0030008c000013460000a13d00000000020b04330000050d0020009c000013460000213d0000000003000411000000000023004b000013450000613d000005a50100004100000000001404350000000401400039000200000002001d00000000002104350000050d023001970000002401400039000100000002001d0000000000210435000005050040009c0000050501000041000000000104401900000040011002100000000002000414000005050020009c0000050502008041000000c002200210000000000112019f00000564011001c70000000402000029000500000004001d140e14090000040f000000050b00002900000060031002700000050503300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057b0019000012e90000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000012e50000c13d000000000006004b000012f60000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f000000000065043500000001002001900000135a0000613d0000001f01400039000000600110018f0000000004b10019000005080040009c000013480000213d000000400040043f000000200030008c000013460000413d00000000010b0433000000010010008c000013460000213d000000000001004b000013450000c13d000005a6010000410000000000140435000000040140003900000003020000290000000000210435000005050040009c0000050501000041000000000104401900000040011002100000000002000414000005050020009c0000050502008041000000c002200210000000000112019f00000560011001c70000000402000029000500000004001d140e14090000040f000000050b00002900000060031002700000050503300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057b0019000013270000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000013230000c13d000000000006004b000013340000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000013660000613d0000001f01400039000000600110018f0000000001b10019000005080010009c000013480000213d000000400010043f000000200030008c0000000203000029000013460000413d00000000020b04330000050d0020009c000013460000213d0000000004000411000000000042004b000013840000c13d000000000001042d000000000100001900001410000104300000058001000041000000000010043f0000004101000039000000040010043f000005600100004100001410000104300000001f0530018f0000050706300198000000400200043d0000000004620019000013710000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000013550000c13d000013710000013d0000001f0530018f0000050706300198000000400200043d0000000004620019000013710000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000013610000c13d000013710000013d0000001f0530018f0000050706300198000000400200043d0000000004620019000013710000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000136d0000c13d000000000005004b0000137e0000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001300210000005050020009c00000505020080410000004002200210000000000112019f0000141000010430000000240210003900000001040000290000000000420435000005a702000041000000000021043500000004021000390000000000320435000005050010009c0000050501008041000000400110021000000564011001c700001410000104300002000000000002000000400400043d0000004005400039000000400050043f0000002005400039000000000035043500000001050000390000000000540435000000400400043d0000004006400039000000400060043f000000200640003900000000005604350000000000540435000000400400043d000005160040009c000013e00000813d0000002005400039000000400050043f0000000000040435000200000002001d000000600220021000000558042001c7000000200040043f0000006004100212000013bc0000613d000000000024004b000013bc0000613d000100000003001d000000000010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055a011001c70000801002000039140e14090000040f0000000100200190000013de0000613d000000000101043b000000000101041a000000000001004b0000000103000029000013ea0000613d000000000030043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000801002000039140e14090000040f0000000100200190000013de0000613d000000000101043b000000000201041a000000000002004b0000000203000029000013e60000613d0000050d06300197000000010220008a000000000021041b0000000101000039000000200010043f0000000001000414000005050010009c0000050501008041000000c0011002100000055b011001c70000800d02000039000000040300003900000000050004110000055c040000410000000007000019140e14040000040f0000000100200190000013de0000613d000000000001042d000000000100001900001410000104300000058001000041000000000010043f0000004101000039000000040010043f000005600100004100001410000104300000058301000041000000000010043f000005820100004100001410000104300000058601000041000000000010043f00000582010000410000141000010430000000000001042f000005050010009c00000505010080410000004001100210000005050020009c00000505020080410000006002200210000000000112019f0000000002000414000005050020009c0000050502008041000000c002200210000000000112019f00000513011001c70000801002000039140e14090000040f0000000100200190000014020000613d000000000101043b000000000001042d0000000001000019000014100001043000001407002104210000000102000039000000000001042d0000000002000019000000000001042d0000140c002104230000000102000039000000000001042d0000000002000019000000000001042d0000140e000004320000140f0001042e000014100001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000000ffffffe0000000000000000000000000000000000000000000000000ffffffffffffffff0000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001ffffffffffffffe0000000000000000000000000000000000000000000000003ffffffffffffffe08000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff1806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000000dc149f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e00200000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffe0000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000731133e800000000000000000000000000000000000000000000000000000000a9fc664d00000000000000000000000000000000000000000000000000000000e8a3d48400000000000000000000000000000000000000000000000000000000f09b7b0200000000000000000000000000000000000000000000000000000000f09b7b0300000000000000000000000000000000000000000000000000000000f242432a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000e8a3d48500000000000000000000000000000000000000000000000000000000e985e9c500000000000000000000000000000000000000000000000000000000ed5960f100000000000000000000000000000000000000000000000000000000bc13961000000000000000000000000000000000000000000000000000000000bc13961100000000000000000000000000000000000000000000000000000000c8aeae7e00000000000000000000000000000000000000000000000000000000cece288800000000000000000000000000000000000000000000000000000000a9fc664e00000000000000000000000000000000000000000000000000000000aa271e1a0000000000000000000000000000000000000000000000000000000095d89b400000000000000000000000000000000000000000000000000000000099c4be6b0000000000000000000000000000000000000000000000000000000099c4be6c000000000000000000000000000000000000000000000000000000009c09628d00000000000000000000000000000000000000000000000000000000a22cb4650000000000000000000000000000000000000000000000000000000095d89b4100000000000000000000000000000000000000000000000000000000983b2d560000000000000000000000000000000000000000000000000000000081ff06ce0000000000000000000000000000000000000000000000000000000081ff06cf000000000000000000000000000000000000000000000000000000008da5cb5b00000000000000000000000000000000000000000000000000000000938e3d7b00000000000000000000000000000000000000000000000000000000731133e90000000000000000000000000000000000000000000000000000000079ba50970000000000000000000000000000000000000000000000000000000023452b9b0000000000000000000000000000000000000000000000000000000042cc6e63000000000000000000000000000000000000000000000000000000006e85a0d8000000000000000000000000000000000000000000000000000000006e85a0d900000000000000000000000000000000000000000000000000000000715018a600000000000000000000000000000000000000000000000000000000719dfe700000000000000000000000000000000000000000000000000000000042cc6e64000000000000000000000000000000000000000000000000000000004e1273f4000000000000000000000000000000000000000000000000000000006c0360eb000000000000000000000000000000000000000000000000000000002a552059000000000000000000000000000000000000000000000000000000002a55205a000000000000000000000000000000000000000000000000000000002eb2c2d6000000000000000000000000000000000000000000000000000000003092afd50000000000000000000000000000000000000000000000000000000023452b9c000000000000000000000000000000000000000000000000000000002504a9b600000000000000000000000000000000000000000000000000000000098144d3000000000000000000000000000000000000000000000000000000000e89341b000000000000000000000000000000000000000000000000000000000e89341c00000000000000000000000000000000000000000000000000000000107bcea800000000000000000000000000000000000000000000000000000000156e29f600000000000000000000000000000000000000000000000000000000098144d4000000000000000000000000000000000000000000000000000000000d705df60000000000000000000000000000000000000000000000000000000002fe53040000000000000000000000000000000000000000000000000000000002fe53050000000000000000000000000000000000000000000000000000000004634d8d0000000000000000000000000000000000000000000000000000000006fdde030000000000000000000000000000000000000000000000000000000000fdd58e0000000000000000000000000000000000000000000000000000000001ffc9a7020000000000000000000000000000000000002000000080000000000000000011a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da7448fbae000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000800000000000000000000000000000000000000000000000000000000000000000ffffffffffffff401854b2410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40000000000000000000000000000000000000000000000000000000000000000000000009a31110384e0b0c9000000000000000000000000963f00d3ff000064ffcba824b800c0000000c30002000000000000000000000000000000000000340000000c00000000000000000200000000000000000000000000000000000040000000000000000000000000c3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6200000000000000000000000000000000000000000000000000000000f23a6e61f23a6e6100000000000000000000000000000000000000000000000000000000361c31f20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c000000000000000000000000000000000000000000000000ffffffffffffffdf533b2017000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000f83b80cf5dbf228e8c8a61091982c0a4cb6c8a685d9a29fd9d2c7493778e95490000000000000000000000000000000000000020000000000000000000000000f3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee300000000000000000000000000000000000000000000003fffffffffffffffe0000000000000000000000000000000000000000000000000ffffffffffffff7f000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000ffffffff000000000000000000000000fe000000000000000000000000000000000000000000000000000000000000004a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fbf8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce700000000000000000000000000000000000000200000008000000000000000000200000000000000000000000000000000000040000000800000000000000000cc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac4a3bb19e0000000000000000000000000000000000000000000000000000000017307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c316ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6ddbadd5f00000000000000000000000000000000000000000000000000000000a66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880c085601c9b05546c4de925af5cdebeab0dd5f5d4bea4dc57b37e961749c911d0c085601c9b05546c4de925af5cdebeab0dd5f5d4bea4dc57b37e961749c911c905d981207a7d0b6c62cc46ab0be2a076d0298e4a86d0ab79882dbd01ac37378d6eb09ce00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff00000000000000000000000000000000ffffffffffffffff00000000000000006e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7afe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb666924e487b7100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b800a4600000000000000000000000000000000000000040000001c000000000000000000000000000000000000000000000000000000000000000000000000f4d678b800000000000000000000000000000000000000000000000000000000bc197c81bc197c8100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004b6e7f180000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000009c05499b0000000000000000000000000000000000000000000000000000000001336cea00000000000000000000000000000000000000000000000000000000ea553b3400ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000800000000000000000f652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0000000000000000000000000000000000000000ffffffffffffffffffffffff5fc483c500000000000000000000000000000000000000000000000000000000b6d9900a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000008000000000000000006f483d0900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004400000080000000000000000091eabfe8e493f369f48e58fdf2609ff8809506ce57440a6f25fddc25308a385191eabfe8e493f369f48e58fdf2609ff8809506ce57440a6f25fddc25308a385000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff49064905ffffffffffffffffffffffffffffffffffffffffffffffffffffffff4906490600000000000000000000000000000000000000000000000000000000a07d229a00000000000000000000000000000000000000000000000000000000ad0d7f6c0000000000000000000000000000000000000000000000000000000001ffc9a7000000000000000000000000000000000000000000000000000000002a55205a00000000000000000000000000000000000000000000000000000000d9b67a26000000000000000000000000000000000000000000000000000000000e89341c00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6352211e00000000000000000000000000000000000000000000000000000000e985e9c500000000000000000000000000000000000000000000000000000000081812fc00000000000000000000000000000000000000000000000000000000c9946b1f00000000000000000000000000000000000000000000000000000000000000000000000000a2646970667358221220175f056459cd2d15d545e1990056cb0afd44acccde610f98c6179d86e9c8be4664736f6c6378247a6b736f6c633a312e352e31353b736f6c633a302e382e32303b6c6c766d3a312e302e320055
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000009bb4c785165915e66f4a645bc978a6c885a031900000000000000000000000000000000000000000000000000000000000000145765623320506c6179626f79732054726169747300000000000000000000000000000000000000000000000000000000000000000000000000000000000000055733504254000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): Web3 Playboys Traits
Arg [1] : symbol_ (string): W3PBT
Arg [2] : playboysContract (address): 0x09BB4C785165915e66f4A645Bc978a6c885A0319
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000009bb4c785165915e66f4a645bc978a6c885a0319
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [4] : 5765623320506c6179626f797320547261697473000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [6] : 5733504254000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.