Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 460 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Burn Fractions | 21238968 | 25 hrs ago | IN | 0 ETH | 0.00174554 | ||||
Set Approval For... | 21237388 | 30 hrs ago | IN | 0 ETH | 0.00105569 | ||||
Set Approval For... | 21231789 | 2 days ago | IN | 0 ETH | 0.00084242 | ||||
Set Approval For... | 21224740 | 3 days ago | IN | 0 ETH | 0.00063682 | ||||
Set Approval For... | 21222442 | 3 days ago | IN | 0 ETH | 0.00142245 | ||||
Burn Fractions | 21211066 | 4 days ago | IN | 0 ETH | 0.00124611 | ||||
Set Approval For... | 21196555 | 6 days ago | IN | 0 ETH | 0.00098999 | ||||
Set Approval For... | 21195549 | 7 days ago | IN | 0 ETH | 0.00126808 | ||||
Set Approval For... | 21153565 | 12 days ago | IN | 0 ETH | 0.00093147 | ||||
Set Approval For... | 21146406 | 13 days ago | IN | 0 ETH | 0.0006351 | ||||
Set Approval For... | 21143660 | 14 days ago | IN | 0 ETH | 0.00135044 | ||||
Set Approval For... | 21137229 | 15 days ago | IN | 0 ETH | 0.0010737 | ||||
Burn Fractions | 21100362 | 20 days ago | IN | 0 ETH | 0.00088977 | ||||
Set Approval For... | 21077519 | 23 days ago | IN | 0 ETH | 0.00049616 | ||||
Burn Fractions | 21069361 | 24 days ago | IN | 0 ETH | 0.00178782 | ||||
Set Approval For... | 21069159 | 24 days ago | IN | 0 ETH | 0.0005858 | ||||
Burn Fractions | 21036212 | 29 days ago | IN | 0 ETH | 0.00141123 | ||||
Set Approval For... | 21035426 | 29 days ago | IN | 0 ETH | 0.00053199 | ||||
Set Approval For... | 21033101 | 29 days ago | IN | 0 ETH | 0.00030237 | ||||
Set Approval For... | 21031463 | 30 days ago | IN | 0 ETH | 0.00029482 | ||||
Set Approval For... | 21027658 | 30 days ago | IN | 0 ETH | 0.00028138 | ||||
Set Approval For... | 21022640 | 31 days ago | IN | 0 ETH | 0.00114012 | ||||
Burn Fractions | 21018713 | 31 days ago | IN | 0 ETH | 0.00068328 | ||||
Set Approval For... | 21017263 | 32 days ago | IN | 0 ETH | 0.00033368 | ||||
Set Approval For... | 20986367 | 36 days ago | IN | 0 ETH | 0.00128743 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Jirasan
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.21; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; import "erc721a/contracts/IERC721A.sol"; /** * @title Jirasan * @dev ERC1155 token contract with supply and pausing functionality. */ contract Jirasan is Ownable, ERC1155Supply, Pausable { string public name = "Jirakun"; /// The name of the NFT collection uint256 public totalFractionsMinted; /// Total number of fractions minted uint256 public currentTokenId; /// Current token ID being used for minting address public nftAddress; /// Contract address of the ERC721A NFT uint256 public endTokenId; /// last token Id of ERC721A NFT uint256 private currentERC721ATokenId; /// last transferred token Id of ERC721A NFT uint256 public tradeLockedUntil; /// Timelock variable for restricting token trade in seconds /** * @dev Emitted when the current token ID is updated. * @param newId The new current token ID * @param timestamp The time when the update was made */ event UpdatedCurrentTokenId(uint256 newId, uint256 timestamp); /** * @dev Emitted when the ERC721A NFT details are updated. * @param nftAddress The smart contract address * @param startTokenId The start tokenId * @param endTokenId The last tokenId * @param timestamp The time when the update was made */ event UpdatedNFTDetails( address nftAddress, uint256 startTokenId, uint256 endTokenId, uint256 timestamp ); /** * @notice Emitted when fractions are airdropped to a user address * @param user The address of the user where fractions are airdropped * @param amount The amount of fractions minted * @param timestamp The timestamp when the fractions were minted */ event FractionsAirdropped(address user, uint256 amount, uint256 timestamp); /** * @notice Emitted when fractions are burnt by a user address to claim ERC721A NFT * @param user The address of the user who burnt the fractions * @param burnAmount The amount of fractions burnt * @param nftReceiveAmount The number of ERC721A NFT received * @param timestamp The timestamp when the fractions were minted */ event FractionsBurnt( address user, uint256 burnAmount, uint256 nftReceiveAmount, uint256 timestamp ); /** * @notice Emitted when trade unlock until is updated * @param newTimelock The new timstamp * @param timestamp The timestamp when the fractions were minted */ event TradeLockedUntilUpdated(uint256 newTimelock, uint256 timestamp); /** * @notice Emitted when ERC721A token is withdrawn by the owner * @param tokenId The token Id of the NFT * @param timestamp The timestamp when the fractions were minted */ event ERC721ANFTWithdrawn(uint256 tokenId, uint256 timestamp); /** * @dev Initializes the contract by setting a URI, and owner. * @param _uri The URI for all token types */ constructor( string memory _uri ) ERC1155(_uri) Ownable(msg.sender) { currentTokenId = 1; _pause(); } /** * @dev Burns the fractions of a user and mints ERC721A tokens in the multiple of 4. * @param _tokenId The current tokenId to burn */ function burnFractions(uint256 _tokenId, uint256 _fractions) external whenNotPaused { require(_fractions > 0, "Fraction amount not valid"); uint256 userBalance = balanceOf(msg.sender, _tokenId); require(userBalance >= _fractions, "Not enough fraction balance"); require(_fractions % 4 == 0, "Fractions should be a multiple of 4"); uint256 claimAmount = _fractions / 4; require( currentERC721ATokenId + claimAmount <= endTokenId + 1, "ERC721A not enough tokens exist" ); _burn(msg.sender, _tokenId, _fractions); for (uint256 i = 0; i < claimAmount; i++) { IERC721A(nftAddress).transferFrom( address(this), msg.sender, currentERC721ATokenId + i ); } currentERC721ATokenId += claimAmount; emit FractionsBurnt( msg.sender, _fractions, claimAmount, block.timestamp ); } /** * @dev Airdrops a specific amount of fractions to the user. * @param _users list of all the users * @param _fractionAmounts list of their respective fraction amounts */ function airdropFractions( address[] calldata _users, uint256[] calldata _fractionAmounts ) external onlyOwner { require( _users.length == _fractionAmounts.length, "Both arrays should have same length" ); uint256 totalFractions = 0; for (uint256 i = 0; i < _users.length; i++) { _mint(_users[i], currentTokenId, _fractionAmounts[i], ""); totalFractions += _fractionAmounts[i]; emit FractionsAirdropped( _users[i], _fractionAmounts[i], block.timestamp ); } totalFractionsMinted += totalFractions; } /** * @dev Sets the current token ID. Can only be called by the owner. * @param _currentTokenId The new current token ID */ function setCurrentTokenId(uint256 _currentTokenId) external onlyOwner { currentTokenId = _currentTokenId; emit UpdatedCurrentTokenId(_currentTokenId, block.timestamp); } /** * @dev Sets the ERC721A NFT token details. Can only be called by the owner. * @param _nftAddress The smart contract address * @param _startTokenId The start tokenId * @param _endTokenId The last tokenId */ function setNFTDetails( address _nftAddress, uint256 _startTokenId, uint256 _endTokenId ) external onlyOwner { require(_nftAddress != address(0), "Invalid nft address"); require( _endTokenId > _startTokenId, "startTokenId cannot be greater that endTokenId" ); nftAddress = _nftAddress; endTokenId = _endTokenId; currentERC721ATokenId = _startTokenId; emit UpdatedNFTDetails( _nftAddress, _startTokenId, _endTokenId, block.timestamp ); } /** * @dev Withdraws the leftover ERC721A NFT tokens from the contract. Only called by the owner * @param _tokenId The tokenId to withdraw from the contract */ function withdrawNFT(uint256 _tokenId) external onlyOwner { require( IERC721A(nftAddress).ownerOf(_tokenId) == address(this), "Invalid nft tokenId" ); IERC721A(nftAddress).transferFrom(address(this), owner(), _tokenId); emit ERC721ANFTWithdrawn(_tokenId, block.timestamp); } /** * @dev Pauses the contract */ function pause() external onlyOwner { _pause(); } /** * @dev Unpauses the contract */ function unpause() external onlyOwner { _unpause(); } /** * @dev Sets a new uri of the contract */ function setURI(string memory _uri) external onlyOwner { _setURI(_uri); } /** * @dev Function to update the tradeLockedUntil variable. * @param _tradeLockedUntil The new value for the trade timelock. */ function updateTradeLockedUntil( uint256 _tradeLockedUntil ) external onlyOwner { tradeLockedUntil = _tradeLockedUntil; emit TradeLockedUntilUpdated(_tradeLockedUntil, block.timestamp); } /** * @dev Internal function to handle updates to the contract state. * @param from The address tokens are being transferred from * @param to The address tokens are being transferred to * @param ids The token IDs being transferred * @param values The amounts of tokens being transferred */ function _update( address from, address to, uint256[] memory ids, uint256[] memory values ) internal override(ERC1155Supply) { return super._update(from, to, ids, values); } /** * @dev Modifier to check if token transfer is allowed using timelock. */ modifier tokenTransferAllowed() { require(block.timestamp >= tradeLockedUntil, "Trade is locked"); _; } /** * @dev Override setApprovalForAll function to add custom logic * @param operator The address to approve as an operator. * @param approved The approval status to set. */ function setApprovalForAll( address operator, bool approved ) public virtual override tokenTransferAllowed whenNotPaused { super.setApprovalForAll(operator, approved); } /** * @dev Override safeTransferFrom function to add custom logic * @param from The address of the sender. * @param to The address of the receiver. * @param id The Id of the token to send. * @param value The amount of token to send. * @param data data. */ function safeTransferFrom( address from, address to, uint256 id, uint256 value, bytes memory data ) public virtual override tokenTransferAllowed whenNotPaused { super.safeTransferFrom(from, to, id, value, data); } /** * @dev Override safeTransferFrom function to add custom logic * @param from The address of the sender. * @param to The address of the receiver. * @param ids The Ids of the token to send. * @param values The amounts of token to send. * @param data data. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) public virtual override tokenTransferAllowed whenNotPaused { super.safeBatchTransferFrom(from, to, ids, values, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.20; import {IERC1155} from "./IERC1155.sol"; import {IERC1155Receiver} from "./IERC1155Receiver.sol"; import {IERC1155MetadataURI} from "./extensions/IERC1155MetadataURI.sol"; import {Context} from "../../utils/Context.sol"; import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; import {Arrays} from "../../utils/Arrays.sol"; import {IERC1155Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 */ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors { using Arrays for uint256[]; using Arrays for address[]; mapping(uint256 id => mapping(address account => uint256)) private _balances; mapping(address account => mapping(address operator => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 /* id */) public view virtual returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. */ function balanceOf(address account, uint256 id) public view virtual returns (uint256) { return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] memory accounts, uint256[] memory ids ) public view virtual returns (uint256[] memory) { if (accounts.length != ids.length) { revert ERC1155InvalidArrayLength(ids.length, accounts.length); } uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts.unsafeMemoryAccess(i), ids.unsafeMemoryAccess(i)); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual { address sender = _msgSender(); if (from != sender && !isApprovedForAll(from, sender)) { revert ERC1155MissingApprovalForAll(sender, from); } _safeTransferFrom(from, to, id, value, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) public virtual { address sender = _msgSender(); if (from != sender && !isApprovedForAll(from, sender)) { revert ERC1155MissingApprovalForAll(sender, from); } _safeBatchTransferFrom(from, to, ids, values, data); } /** * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from` * (or `to`) is the zero address. * * Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise. * * Requirements: * * - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received} * or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value. * - `ids` and `values` must have the same length. * * NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead. */ function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual { if (ids.length != values.length) { revert ERC1155InvalidArrayLength(ids.length, values.length); } address operator = _msgSender(); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids.unsafeMemoryAccess(i); uint256 value = values.unsafeMemoryAccess(i); if (from != address(0)) { uint256 fromBalance = _balances[id][from]; if (fromBalance < value) { revert ERC1155InsufficientBalance(from, fromBalance, value, id); } unchecked { // Overflow not possible: value <= fromBalance _balances[id][from] = fromBalance - value; } } if (to != address(0)) { _balances[id][to] += value; } } if (ids.length == 1) { uint256 id = ids.unsafeMemoryAccess(0); uint256 value = values.unsafeMemoryAccess(0); emit TransferSingle(operator, from, to, id, value); } else { emit TransferBatch(operator, from, to, ids, values); } } /** * @dev Version of {_update} that performs the token acceptance check by calling * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it * contains code (eg. is a smart contract at the moment of execution). * * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any * update to the contract state after this function would break the check-effect-interaction pattern. Consider * overriding {_update} instead. */ function _updateWithAcceptanceCheck( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal virtual { _update(from, to, ids, values); if (to != address(0)) { address operator = _msgSender(); if (ids.length == 1) { uint256 id = ids.unsafeMemoryAccess(0); uint256 value = values.unsafeMemoryAccess(0); _doSafeTransferAcceptanceCheck(operator, from, to, id, value, data); } else { _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, values, data); } } } /** * @dev Transfers a `value` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `value` amount. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(from, to, ids, values, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. * - `ids` and `values` must have the same length. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } _updateWithAcceptanceCheck(from, to, ids, values, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the values in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates a `value` amount of tokens of type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address to, uint256 id, uint256 value, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(address(0), to, ids, values, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `values` must have the same length. * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } _updateWithAcceptanceCheck(address(0), to, ids, values, data); } /** * @dev Destroys a `value` amount of tokens of type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `value` amount of tokens of type `id`. */ function _burn(address from, uint256 id, uint256 value) internal { if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(from, address(0), ids, values, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `value` amount of tokens of type `id`. * - `ids` and `values` must have the same length. */ function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal { if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } _updateWithAcceptanceCheck(from, address(0), ids, values, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the zero address. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { if (operator == address(0)) { revert ERC1155InvalidOperator(address(0)); } _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Performs an acceptance check by calling {IERC1155-onERC1155Received} on the `to` address * if it contains code at the moment of execution. */ function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 value, bytes memory data ) private { if (to.code.length > 0) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { // Tokens rejected revert ERC1155InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { // non-ERC1155Receiver implementer revert ERC1155InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } /** * @dev Performs a batch acceptance check by calling {IERC1155-onERC1155BatchReceived} on the `to` address * if it contains code at the moment of execution. */ function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) private { if (to.code.length > 0) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { // Tokens rejected revert ERC1155InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { // non-ERC1155Receiver implementer revert ERC1155InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } /** * @dev Creates an array in memory with only one value for each of the elements provided. */ function _asSingletonArrays( uint256 element1, uint256 element2 ) private pure returns (uint256[] memory array1, uint256[] memory array2) { /// @solidity memory-safe-assembly assembly { // Load the free memory pointer array1 := mload(0x40) // Set array length to 1 mstore(array1, 1) // Store the single element at the next word after the length (where content starts) mstore(add(array1, 0x20), element1) // Repeat for next array locating it right after the first array array2 := add(array1, 0x40) mstore(array2, 1) mstore(add(array2, 0x20), element2) // Update the free memory pointer by pointing after the second array mstore(0x40, add(array2, 0x40)) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.20; import {ERC1155} from "../ERC1155.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. * * NOTE: This contract implies a global limit of 2**256 - 1 to the number of tokens * that can be minted. * * CAUTION: This extension should not be added in an upgrade to an already deployed contract. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 id => uint256) private _totalSupply; uint256 private _totalSupplyAll; /** * @dev Total value of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Total value of tokens. */ function totalSupply() public view virtual returns (uint256) { return _totalSupplyAll; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return totalSupply(id) > 0; } /** * @dev See {ERC1155-_update}. */ function _update( address from, address to, uint256[] memory ids, uint256[] memory values ) internal virtual override { super._update(from, to, ids, values); if (from == address(0)) { uint256 totalMintValue = 0; for (uint256 i = 0; i < ids.length; ++i) { uint256 value = values[i]; // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply[ids[i]] += value; totalMintValue += value; } // Overflow check required: The rest of the code assumes that totalSupplyAll never overflows _totalSupplyAll += totalMintValue; } if (to == address(0)) { uint256 totalBurnValue = 0; for (uint256 i = 0; i < ids.length; ++i) { uint256 value = values[i]; unchecked { // Overflow not possible: values[i] <= balanceOf(from, ids[i]) <= totalSupply(ids[i]) _totalSupply[ids[i]] -= value; // Overflow not possible: sum_i(values[i]) <= sum_i(totalSupply(ids[i])) <= totalSupplyAll totalBurnValue += value; } } unchecked { // Overflow not possible: totalBurnValue = sum_i(values[i]) <= sum_i(totalSupply(ids[i])) <= totalSupplyAll _totalSupplyAll -= totalBurnValue; } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.20; import {IERC1155} from "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` amount of tokens of type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the value of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] calldata accounts, uint256[] calldata ids ) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155Received} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `value` amount. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments. * * Requirements: * * - `ids` and `values` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Interface that must be implemented by smart contracts in order to receive * ERC-1155 token transfers. */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Arrays.sol) pragma solidity ^0.8.20; import {StorageSlot} from "./StorageSlot.sol"; import {Math} from "./math/Math.sol"; /** * @dev Collection of functions related to array types. */ library Arrays { using StorageSlot for bytes32; /** * @dev Searches a sorted `array` and returns the first index that contains * a value greater or equal to `element`. If no such index exists (i.e. all * values in the array are strictly less than `element`), the array length is * returned. Time complexity O(log n). * * `array` is expected to be sorted in ascending order, and to contain no * repeated elements. */ function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { uint256 low = 0; uint256 high = array.length; if (high == 0) { return 0; } while (low < high) { uint256 mid = Math.average(low, high); // Note that mid will always be strictly less than high (i.e. it will be a valid array index) // because Math.average rounds towards zero (it does integer division with truncation). if (unsafeAccess(array, mid).value > element) { high = mid; } else { low = mid + 1; } } // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. if (low > 0 && unsafeAccess(array, low - 1).value == element) { return low - 1; } else { return low; } } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getAddressSlot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getBytes32Slot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getUint256Slot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) { assembly { res := mload(add(add(arr, 0x20), mul(pos, 0x20))) } } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) { assembly { res := mload(add(add(arr, 0x20), mul(pos, 0x20))) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { bool private _paused; /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); /** * `_sequentialUpTo()` must be greater than `_startTokenId()`. */ error SequentialUpToTooSmall(); /** * The `tokenId` of a sequential mint exceeds `_sequentialUpTo()`. */ error SequentialMintExceedsLimit(); /** * Spot minting requires a `tokenId` greater than `_sequentialUpTo()`. */ error SpotMintTokenIdTooSmall(); /** * Cannot mint over a token that already exists. */ error TokenAlreadyExists(); /** * The feature is not compatible with spot mints. */ error NotCompatibleWithSpotMints(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC1155InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC1155InvalidApprover","type":"error"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"name":"ERC1155InvalidArrayLength","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC1155InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC1155InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC1155InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC1155MissingApprovalForAll","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ERC721ANFTWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FractionsAirdropped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"burnAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nftReceiveAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FractionsBurnt","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":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTimelock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TradeLockedUntilUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"UpdatedCurrentTokenId","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"nftAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"startTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"UpdatedNFTDetails","type":"event"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"uint256[]","name":"_fractionAmounts","type":"uint256[]"}],"name":"airdropFractions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_fractions","type":"uint256"}],"name":"burnFractions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_currentTokenId","type":"uint256"}],"name":"setCurrentTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nftAddress","type":"address"},{"internalType":"uint256","name":"_startTokenId","type":"uint256"},{"internalType":"uint256","name":"_endTokenId","type":"uint256"}],"name":"setNFTDetails","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":"totalFractionsMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradeLockedUntil","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tradeLockedUntil","type":"uint256"}],"name":"updateTradeLockedUntil","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"withdrawNFT","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c060405260076080818152662534b930b5bab760c91b60a05262000025908262000241565b503480156200003357600080fd5b506040516200276e3803806200276e83398101604081905262000056916200030d565b8033806200007e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200008981620000b6565b50620000958162000106565b506006805460ff191690556001600955620000af62000118565b50620003e2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600362000114828262000241565b5050565b6200012262000175565b6006805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620001583390565b6040516001600160a01b03909116815260200160405180910390a1565b60065460ff16156200019a5760405163d93c066560e01b815260040160405180910390fd5b565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001c757607f821691505b602082108103620001e857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200023c57600081815260208120601f850160051c81016020861015620002175750805b601f850160051c820191505b81811015620002385782815560010162000223565b5050505b505050565b81516001600160401b038111156200025d576200025d6200019c565b62000275816200026e8454620001b2565b84620001ee565b602080601f831160018114620002ad5760008415620002945750858301515b600019600386901b1c1916600185901b17855562000238565b600085815260208120601f198616915b82811015620002de57888601518255948401946001909101908401620002bd565b5085821015620002fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208083850312156200032157600080fd5b82516001600160401b03808211156200033957600080fd5b818501915085601f8301126200034e57600080fd5b8151818111156200036357620003636200019c565b604051601f8201601f19908116603f011681019083821181831017156200038e576200038e6200019c565b816040528281528886848701011115620003a757600080fd5b600093505b82841015620003cb5784840186015181850187015292850192620003ac565b600086848301015280965050505050505092915050565b61237c80620003f26000396000f3fe608060405234801561001057600080fd5b50600436106101d85760003560e01c80635c975abb11610104578063b8ba025e116100a2578063dc1e41eb11610071578063dc1e41eb146103d5578063e985e9c5146103e8578063f242432a146103fb578063f2fde38b1461040e57600080fd5b8063b8ba025e14610386578063bd85b03914610399578063cdb84599146103b9578063d1a26ed3146103cc57600080fd5b80638329de2f116100de5780638329de2f146103475780638456cb591461035a5780638da5cb5b14610362578063a22cb4651461037357600080fd5b80635c975abb1461032b57806368a2d30214610336578063715018a61461033f57600080fd5b806318160ddd1161017c5780633f4ba83a1161014b5780633f4ba83a146102b65780634e1273f4146102be5780634f558e79146102de5780635bf8633a1461030057600080fd5b806318160ddd1461027f5780632127d42b146102875780632b5c9f66146102905780632eb2c2d6146102a357600080fd5b8063023245d7116101b8578063023245d71461022f57806302fe53051461024457806306fdde03146102575780630e89341c1461026c57600080fd5b80629a9b7b146101dd578062fdd58e146101f957806301ffc9a71461020c575b600080fd5b6101e660095481565b6040519081526020015b60405180910390f35b6101e66102073660046119db565b610421565b61021f61021a366004611a1d565b61044b565b60405190151581526020016101f0565b61024261023d366004611a41565b61049b565b005b610242610252366004611af9565b610629565b61025f61063d565b6040516101f09190611b90565b61025f61027a366004611a41565b6106cb565b6005546101e6565b6101e660085481565b61024261029e366004611ba3565b61075f565b6102426102b1366004611c87565b610881565b6102426108bf565b6102d16102cc366004611d35565b6108d1565b6040516101f09190611e32565b61021f6102ec366004611a41565b600090815260046020526040902054151590565b600a54610313906001600160a01b031681565b6040516001600160a01b0390911681526020016101f0565b60065460ff1661021f565b6101e6600d5481565b6102426109a6565b610242610355366004611a41565b6109b8565b6102426109fa565b6000546001600160a01b0316610313565b610242610381366004611e45565b610a0a565b610242610394366004611e83565b610a42565b6101e66103a7366004611a41565b60009081526004602052604090205490565b6102426103c7366004611ef1565b610ce9565b6101e6600b5481565b6102426103e3366004611a41565b610e94565b61021f6103f6366004611f5d565b610ed6565b610242610409366004611f8b565b610f04565b61024261041c366004611ff4565b610f3b565b60008181526001602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061047c57506001600160e01b031982166303a24d0760e21b145b8061044557506301ffc9a760e01b6001600160e01b0319831614610445565b6104a3610f76565b600a546040516331a9108f60e11b81526004810183905230916001600160a01b031690636352211e90602401602060405180830381865afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105109190612011565b6001600160a01b0316146105615760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081b999d081d1bdad95b9259606a1b60448201526064015b60405180910390fd5b600a546001600160a01b03166323b872dd306105856000546001600160a01b031690565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101849052606401600060405180830381600087803b1580156105d457600080fd5b505af11580156105e8573d6000803e3d6000fd5b5050604080518481524260208201527f4aa6a2c784afb5bc5afd468b7f5130adc87bef5dae9f0901087f492e0022306a93500190505b60405180910390a150565b610631610f76565b61063a81610fa3565b50565b6007805461064a9061202e565b80601f01602080910402602001604051908101604052809291908181526020018280546106769061202e565b80156106c35780601f10610698576101008083540402835291602001916106c3565b820191906000526020600020905b8154815290600101906020018083116106a657829003601f168201915b505050505081565b6060600380546106da9061202e565b80601f01602080910402602001604051908101604052809291908181526020018280546107069061202e565b80156107535780601f1061072857610100808354040283529160200191610753565b820191906000526020600020905b81548152906001019060200180831161073657829003601f168201915b50505050509050919050565b610767610f76565b6001600160a01b0383166107b35760405162461bcd60e51b8152602060048201526013602482015272496e76616c6964206e6674206164647265737360681b6044820152606401610558565b8181116108195760405162461bcd60e51b815260206004820152602e60248201527f7374617274546f6b656e49642063616e6e6f742062652067726561746572207460448201526d1a185d08195b99151bdad95b925960921b6064820152608401610558565b600a80546001600160a01b0319166001600160a01b038516179055600b819055600c8290556040517fb0ab2a5f4b0d7ee7caf29034fb24265d9ebd73e64dd803c58461e18fcdd81b2c90610874908590859085904290612068565b60405180910390a1505050565b600d544210156108a35760405162461bcd60e51b81526004016105589061208e565b6108ab610faf565b6108b88585858585610fd3565b5050505050565b6108c7610f76565b6108cf61103a565b565b606081518351146109025781518351604051635b05999160e01b815260048101929092526024820152604401610558565b6000835167ffffffffffffffff81111561091e5761091e611a5a565b604051908082528060200260200182016040528015610947578160200160208202803683370190505b50905060005b845181101561099e5760208082028601015161097190602080840287010151610421565b828281518110610983576109836120b7565b6020908102919091010152610997816120e3565b905061094d565b509392505050565b6109ae610f76565b6108cf600061108c565b6109c0610f76565b6009819055604080518281524260208201527f2c77c102671853a42e0e4895cb2a964ea377367daa91b28b9734e930257be1f1910161061e565b610a02610f76565b6108cf6110dc565b600d54421015610a2c5760405162461bcd60e51b81526004016105589061208e565b610a34610faf565b610a3e8282611119565b5050565b610a4a610faf565b60008111610a9a5760405162461bcd60e51b815260206004820152601960248201527f4672616374696f6e20616d6f756e74206e6f742076616c6964000000000000006044820152606401610558565b6000610aa63384610421565b905081811015610af85760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420656e6f756768206672616374696f6e2062616c616e636500000000006044820152606401610558565b610b03600483612112565b15610b5c5760405162461bcd60e51b815260206004820152602360248201527f4672616374696f6e732073686f756c642062652061206d756c7469706c65206f60448201526219880d60ea1b6064820152608401610558565b6000610b69600484612126565b9050600b546001610b7a919061213a565b81600c54610b88919061213a565b1115610bd65760405162461bcd60e51b815260206004820152601f60248201527f45524337323141206e6f7420656e6f75676820746f6b656e73206578697374006044820152606401610558565b610be1338585611124565b60005b81811015610c8d57600a54600c546001600160a01b03909116906323b872dd9030903390610c1390869061213a565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610c6257600080fd5b505af1158015610c76573d6000803e3d6000fd5b505050508080610c85906120e3565b915050610be4565b5080600c6000828254610ca0919061213a565b90915550506040517fd63bcf86cb5a699066de8b80904ce6dd32c3196e0108d120f52f2d5f20d314bd90610cdb903390869085904290612068565b60405180910390a150505050565b610cf1610f76565b828114610d4c5760405162461bcd60e51b815260206004820152602360248201527f426f7468206172726179732073686f756c6420686176652073616d65206c656e6044820152620cee8d60eb1b6064820152608401610558565b6000805b84811015610e7557610db3868683818110610d6d57610d6d6120b7565b9050602002016020810190610d829190611ff4565b600954868685818110610d9757610d976120b7565b905060200201356040518060200160405280600081525061118c565b838382818110610dc557610dc56120b7565b9050602002013582610dd7919061213a565b91507f56969db0e5991fdeaea30c5637459ad36e8c6c512e02f2ddfb8aac12fd165974868683818110610e0c57610e0c6120b7565b9050602002016020810190610e219190611ff4565b858584818110610e3357610e336120b7565b604080516001600160a01b039095168552602091820293909301359084015250429082015260600160405180910390a180610e6d816120e3565b915050610d50565b508060086000828254610e88919061213a565b90915550505050505050565b610e9c610f76565b600d819055604080518281524260208201527fb339cab6d7cd68c6b0fb1d8c32bb5f9704622a9524b4dbaea58a83d50e2917ff910161061e565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b600d54421015610f265760405162461bcd60e51b81526004016105589061208e565b610f2e610faf565b6108b885858585856111e9565b610f43610f76565b6001600160a01b038116610f6d57604051631e4fbdf760e01b815260006004820152602401610558565b61063a8161108c565b6000546001600160a01b031633146108cf5760405163118cdaa760e01b8152336004820152602401610558565b6003610a3e8282612198565b60065460ff16156108cf5760405163d93c066560e01b815260040160405180910390fd5b336001600160a01b0386168114801590610ff45750610ff28682610ed6565b155b156110255760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610558565b6110328686868686611248565b505050505050565b6110426112a8565b6006805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6110e4610faf565b6006805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861106f3390565b610a3e3383836112cb565b6001600160a01b03831661114d57604051626a0d4560e21b815260006004820152602401610558565b604080516001808252602082018590528183019081526060820184905260a082019092526000608082018181529192916108b891879185908590611361565b6001600160a01b0384166111b657604051632bfa23e760e11b815260006004820152602401610558565b60408051600180825260208201869052818301908152606082018590526080820190925290611032600087848487611361565b336001600160a01b038616811480159061120a57506112088682610ed6565b155b1561123b5760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610558565b61103286868686866113b4565b6001600160a01b03841661127257604051632bfa23e760e11b815260006004820152602401610558565b6001600160a01b03851661129b57604051626a0d4560e21b815260006004820152602401610558565b6108b88585858585611361565b60065460ff166108cf57604051638dfc202b60e01b815260040160405180910390fd5b6001600160a01b0382166112f45760405162ced3e160e81b815260006004820152602401610558565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61136d85858585611442565b6001600160a01b038416156108b857825133906001036113a6576020848101519084015161139f838989858589611454565b5050611032565b611032818787878787611578565b6001600160a01b0384166113de57604051632bfa23e760e11b815260006004820152602401610558565b6001600160a01b03851661140757604051626a0d4560e21b815260006004820152602401610558565b604080516001808252602082018690528183019081526060820185905260808201909252906114398787848487611361565b50505050505050565b61144e84848484611661565b50505050565b6001600160a01b0384163b156110325760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906114989089908990889088908890600401612258565b6020604051808303816000875af19250505080156114d3575060408051601f3d908101601f191682019092526114d09181019061229d565b60015b61153c573d808015611501576040519150601f19603f3d011682016040523d82523d6000602084013e611506565b606091505b50805160000361153457604051632bfa23e760e11b81526001600160a01b0386166004820152602401610558565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b1461143957604051632bfa23e760e11b81526001600160a01b0386166004820152602401610558565b6001600160a01b0384163b156110325760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906115bc90899089908890889088906004016122ba565b6020604051808303816000875af19250505080156115f7575060408051601f3d908101601f191682019092526115f49181019061229d565b60015b611625573d808015611501576040519150601f19603f3d011682016040523d82523d6000602084013e611506565b6001600160e01b0319811663bc197c8160e01b1461143957604051632bfa23e760e11b81526001600160a01b0386166004820152602401610558565b61166d848484846117bb565b6001600160a01b038416611720576000805b835181101561170657600083828151811061169c5761169c6120b7565b6020026020010151905080600460008785815181106116bd576116bd6120b7565b6020026020010151815260200190815260200160002060008282546116e2919061213a565b909155506116f29050818461213a565b925050806116ff906120e3565b905061167f565b508060056000828254611719919061213a565b9091555050505b6001600160a01b03831661144e576000805b83518110156117aa57600083828151811061174f5761174f6120b7565b602002602001015190508060046000878581518110611770576117706120b7565b6020026020010151815260200190815260200160002060008282540392505081905550808301925050806117a3906120e3565b9050611732565b506005805491909103905550505050565b80518251146117ea5781518151604051635b05999160e01b815260048101929092526024820152604401610558565b3360005b83518110156118e7576020818102858101820151908501909101516001600160a01b0388161561188d5760008281526001602090815260408083206001600160a01b038c1684529091529020548181101561186457888183856040516303dee4c560e01b81526004016105589493929190612068565b60008381526001602090815260408083206001600160a01b038d16845290915290209082900390555b6001600160a01b038716156118d45760008281526001602090815260408083206001600160a01b038b168452909152812080548392906118ce90849061213a565b90915550505b5050806118e0906120e3565b90506117ee565b5082516001036119685760208301516000906020840151909150856001600160a01b0316876001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051611959929190918252602082015260400190565b60405180910390a450506108b8565b836001600160a01b0316856001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516119b7929190612318565b60405180910390a45050505050565b6001600160a01b038116811461063a57600080fd5b600080604083850312156119ee57600080fd5b82356119f9816119c6565b946020939093013593505050565b6001600160e01b03198116811461063a57600080fd5b600060208284031215611a2f57600080fd5b8135611a3a81611a07565b9392505050565b600060208284031215611a5357600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a9957611a99611a5a565b604052919050565b600067ffffffffffffffff831115611abb57611abb611a5a565b611ace601f8401601f1916602001611a70565b9050828152838383011115611ae257600080fd5b828260208301376000602084830101529392505050565b600060208284031215611b0b57600080fd5b813567ffffffffffffffff811115611b2257600080fd5b8201601f81018413611b3357600080fd5b611b4284823560208401611aa1565b949350505050565b6000815180845260005b81811015611b7057602081850181015186830182015201611b54565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000611a3a6020830184611b4a565b600080600060608486031215611bb857600080fd5b8335611bc3816119c6565b95602085013595506040909401359392505050565b600067ffffffffffffffff821115611bf257611bf2611a5a565b5060051b60200190565b600082601f830112611c0d57600080fd5b81356020611c22611c1d83611bd8565b611a70565b82815260059290921b84018101918181019086841115611c4157600080fd5b8286015b84811015611c5c5780358352918301918301611c45565b509695505050505050565b600082601f830112611c7857600080fd5b611a3a83833560208501611aa1565b600080600080600060a08688031215611c9f57600080fd5b8535611caa816119c6565b94506020860135611cba816119c6565b9350604086013567ffffffffffffffff80821115611cd757600080fd5b611ce389838a01611bfc565b94506060880135915080821115611cf957600080fd5b611d0589838a01611bfc565b93506080880135915080821115611d1b57600080fd5b50611d2888828901611c67565b9150509295509295909350565b60008060408385031215611d4857600080fd5b823567ffffffffffffffff80821115611d6057600080fd5b818501915085601f830112611d7457600080fd5b81356020611d84611c1d83611bd8565b82815260059290921b84018101918181019089841115611da357600080fd5b948201945b83861015611dca578535611dbb816119c6565b82529482019490820190611da8565b96505086013592505080821115611de057600080fd5b50611ded85828601611bfc565b9150509250929050565b600081518084526020808501945080840160005b83811015611e2757815187529582019590820190600101611e0b565b509495945050505050565b602081526000611a3a6020830184611df7565b60008060408385031215611e5857600080fd5b8235611e63816119c6565b915060208301358015158114611e7857600080fd5b809150509250929050565b60008060408385031215611e9657600080fd5b50508035926020909101359150565b60008083601f840112611eb757600080fd5b50813567ffffffffffffffff811115611ecf57600080fd5b6020830191508360208260051b8501011115611eea57600080fd5b9250929050565b60008060008060408587031215611f0757600080fd5b843567ffffffffffffffff80821115611f1f57600080fd5b611f2b88838901611ea5565b90965094506020870135915080821115611f4457600080fd5b50611f5187828801611ea5565b95989497509550505050565b60008060408385031215611f7057600080fd5b8235611f7b816119c6565b91506020830135611e78816119c6565b600080600080600060a08688031215611fa357600080fd5b8535611fae816119c6565b94506020860135611fbe816119c6565b93506040860135925060608601359150608086013567ffffffffffffffff811115611fe857600080fd5b611d2888828901611c67565b60006020828403121561200657600080fd5b8135611a3a816119c6565b60006020828403121561202357600080fd5b8151611a3a816119c6565b600181811c9082168061204257607f821691505b60208210810361206257634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b6020808252600f908201526e151c985919481a5cc81b1bd8dad959608a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016120f5576120f56120cd565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082612121576121216120fc565b500690565b600082612135576121356120fc565b500490565b80820180821115610445576104456120cd565b601f82111561219357600081815260208120601f850160051c810160208610156121745750805b601f850160051c820191505b8181101561103257828155600101612180565b505050565b815167ffffffffffffffff8111156121b2576121b2611a5a565b6121c6816121c0845461202e565b8461214d565b602080601f8311600181146121fb57600084156121e35750858301515b600019600386901b1c1916600185901b178555611032565b600085815260208120601f198616915b8281101561222a5788860151825594840194600190910190840161220b565b50858210156122485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061229290830184611b4a565b979650505050505050565b6000602082840312156122af57600080fd5b8151611a3a81611a07565b6001600160a01b0386811682528516602082015260a0604082018190526000906122e690830186611df7565b82810360608401526122f88186611df7565b9050828103608084015261230c8185611b4a565b98975050505050505050565b60408152600061232b6040830185611df7565b828103602084015261233d8185611df7565b9594505050505056fea264697066735822122044b70b322cd677179f8bd12f6d8e23e3079def5c19735ef0bf72ab44ccd8751364736f6c634300081500330000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003368747470733a2f2f6a6972616d6574612e73332e65752d6e6f7274682d312e616d617a6f6e6177732e636f6d2f312e6a736f6e00000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101d85760003560e01c80635c975abb11610104578063b8ba025e116100a2578063dc1e41eb11610071578063dc1e41eb146103d5578063e985e9c5146103e8578063f242432a146103fb578063f2fde38b1461040e57600080fd5b8063b8ba025e14610386578063bd85b03914610399578063cdb84599146103b9578063d1a26ed3146103cc57600080fd5b80638329de2f116100de5780638329de2f146103475780638456cb591461035a5780638da5cb5b14610362578063a22cb4651461037357600080fd5b80635c975abb1461032b57806368a2d30214610336578063715018a61461033f57600080fd5b806318160ddd1161017c5780633f4ba83a1161014b5780633f4ba83a146102b65780634e1273f4146102be5780634f558e79146102de5780635bf8633a1461030057600080fd5b806318160ddd1461027f5780632127d42b146102875780632b5c9f66146102905780632eb2c2d6146102a357600080fd5b8063023245d7116101b8578063023245d71461022f57806302fe53051461024457806306fdde03146102575780630e89341c1461026c57600080fd5b80629a9b7b146101dd578062fdd58e146101f957806301ffc9a71461020c575b600080fd5b6101e660095481565b6040519081526020015b60405180910390f35b6101e66102073660046119db565b610421565b61021f61021a366004611a1d565b61044b565b60405190151581526020016101f0565b61024261023d366004611a41565b61049b565b005b610242610252366004611af9565b610629565b61025f61063d565b6040516101f09190611b90565b61025f61027a366004611a41565b6106cb565b6005546101e6565b6101e660085481565b61024261029e366004611ba3565b61075f565b6102426102b1366004611c87565b610881565b6102426108bf565b6102d16102cc366004611d35565b6108d1565b6040516101f09190611e32565b61021f6102ec366004611a41565b600090815260046020526040902054151590565b600a54610313906001600160a01b031681565b6040516001600160a01b0390911681526020016101f0565b60065460ff1661021f565b6101e6600d5481565b6102426109a6565b610242610355366004611a41565b6109b8565b6102426109fa565b6000546001600160a01b0316610313565b610242610381366004611e45565b610a0a565b610242610394366004611e83565b610a42565b6101e66103a7366004611a41565b60009081526004602052604090205490565b6102426103c7366004611ef1565b610ce9565b6101e6600b5481565b6102426103e3366004611a41565b610e94565b61021f6103f6366004611f5d565b610ed6565b610242610409366004611f8b565b610f04565b61024261041c366004611ff4565b610f3b565b60008181526001602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061047c57506001600160e01b031982166303a24d0760e21b145b8061044557506301ffc9a760e01b6001600160e01b0319831614610445565b6104a3610f76565b600a546040516331a9108f60e11b81526004810183905230916001600160a01b031690636352211e90602401602060405180830381865afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105109190612011565b6001600160a01b0316146105615760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081b999d081d1bdad95b9259606a1b60448201526064015b60405180910390fd5b600a546001600160a01b03166323b872dd306105856000546001600160a01b031690565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101849052606401600060405180830381600087803b1580156105d457600080fd5b505af11580156105e8573d6000803e3d6000fd5b5050604080518481524260208201527f4aa6a2c784afb5bc5afd468b7f5130adc87bef5dae9f0901087f492e0022306a93500190505b60405180910390a150565b610631610f76565b61063a81610fa3565b50565b6007805461064a9061202e565b80601f01602080910402602001604051908101604052809291908181526020018280546106769061202e565b80156106c35780601f10610698576101008083540402835291602001916106c3565b820191906000526020600020905b8154815290600101906020018083116106a657829003601f168201915b505050505081565b6060600380546106da9061202e565b80601f01602080910402602001604051908101604052809291908181526020018280546107069061202e565b80156107535780601f1061072857610100808354040283529160200191610753565b820191906000526020600020905b81548152906001019060200180831161073657829003601f168201915b50505050509050919050565b610767610f76565b6001600160a01b0383166107b35760405162461bcd60e51b8152602060048201526013602482015272496e76616c6964206e6674206164647265737360681b6044820152606401610558565b8181116108195760405162461bcd60e51b815260206004820152602e60248201527f7374617274546f6b656e49642063616e6e6f742062652067726561746572207460448201526d1a185d08195b99151bdad95b925960921b6064820152608401610558565b600a80546001600160a01b0319166001600160a01b038516179055600b819055600c8290556040517fb0ab2a5f4b0d7ee7caf29034fb24265d9ebd73e64dd803c58461e18fcdd81b2c90610874908590859085904290612068565b60405180910390a1505050565b600d544210156108a35760405162461bcd60e51b81526004016105589061208e565b6108ab610faf565b6108b88585858585610fd3565b5050505050565b6108c7610f76565b6108cf61103a565b565b606081518351146109025781518351604051635b05999160e01b815260048101929092526024820152604401610558565b6000835167ffffffffffffffff81111561091e5761091e611a5a565b604051908082528060200260200182016040528015610947578160200160208202803683370190505b50905060005b845181101561099e5760208082028601015161097190602080840287010151610421565b828281518110610983576109836120b7565b6020908102919091010152610997816120e3565b905061094d565b509392505050565b6109ae610f76565b6108cf600061108c565b6109c0610f76565b6009819055604080518281524260208201527f2c77c102671853a42e0e4895cb2a964ea377367daa91b28b9734e930257be1f1910161061e565b610a02610f76565b6108cf6110dc565b600d54421015610a2c5760405162461bcd60e51b81526004016105589061208e565b610a34610faf565b610a3e8282611119565b5050565b610a4a610faf565b60008111610a9a5760405162461bcd60e51b815260206004820152601960248201527f4672616374696f6e20616d6f756e74206e6f742076616c6964000000000000006044820152606401610558565b6000610aa63384610421565b905081811015610af85760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420656e6f756768206672616374696f6e2062616c616e636500000000006044820152606401610558565b610b03600483612112565b15610b5c5760405162461bcd60e51b815260206004820152602360248201527f4672616374696f6e732073686f756c642062652061206d756c7469706c65206f60448201526219880d60ea1b6064820152608401610558565b6000610b69600484612126565b9050600b546001610b7a919061213a565b81600c54610b88919061213a565b1115610bd65760405162461bcd60e51b815260206004820152601f60248201527f45524337323141206e6f7420656e6f75676820746f6b656e73206578697374006044820152606401610558565b610be1338585611124565b60005b81811015610c8d57600a54600c546001600160a01b03909116906323b872dd9030903390610c1390869061213a565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610c6257600080fd5b505af1158015610c76573d6000803e3d6000fd5b505050508080610c85906120e3565b915050610be4565b5080600c6000828254610ca0919061213a565b90915550506040517fd63bcf86cb5a699066de8b80904ce6dd32c3196e0108d120f52f2d5f20d314bd90610cdb903390869085904290612068565b60405180910390a150505050565b610cf1610f76565b828114610d4c5760405162461bcd60e51b815260206004820152602360248201527f426f7468206172726179732073686f756c6420686176652073616d65206c656e6044820152620cee8d60eb1b6064820152608401610558565b6000805b84811015610e7557610db3868683818110610d6d57610d6d6120b7565b9050602002016020810190610d829190611ff4565b600954868685818110610d9757610d976120b7565b905060200201356040518060200160405280600081525061118c565b838382818110610dc557610dc56120b7565b9050602002013582610dd7919061213a565b91507f56969db0e5991fdeaea30c5637459ad36e8c6c512e02f2ddfb8aac12fd165974868683818110610e0c57610e0c6120b7565b9050602002016020810190610e219190611ff4565b858584818110610e3357610e336120b7565b604080516001600160a01b039095168552602091820293909301359084015250429082015260600160405180910390a180610e6d816120e3565b915050610d50565b508060086000828254610e88919061213a565b90915550505050505050565b610e9c610f76565b600d819055604080518281524260208201527fb339cab6d7cd68c6b0fb1d8c32bb5f9704622a9524b4dbaea58a83d50e2917ff910161061e565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b600d54421015610f265760405162461bcd60e51b81526004016105589061208e565b610f2e610faf565b6108b885858585856111e9565b610f43610f76565b6001600160a01b038116610f6d57604051631e4fbdf760e01b815260006004820152602401610558565b61063a8161108c565b6000546001600160a01b031633146108cf5760405163118cdaa760e01b8152336004820152602401610558565b6003610a3e8282612198565b60065460ff16156108cf5760405163d93c066560e01b815260040160405180910390fd5b336001600160a01b0386168114801590610ff45750610ff28682610ed6565b155b156110255760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610558565b6110328686868686611248565b505050505050565b6110426112a8565b6006805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6110e4610faf565b6006805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861106f3390565b610a3e3383836112cb565b6001600160a01b03831661114d57604051626a0d4560e21b815260006004820152602401610558565b604080516001808252602082018590528183019081526060820184905260a082019092526000608082018181529192916108b891879185908590611361565b6001600160a01b0384166111b657604051632bfa23e760e11b815260006004820152602401610558565b60408051600180825260208201869052818301908152606082018590526080820190925290611032600087848487611361565b336001600160a01b038616811480159061120a57506112088682610ed6565b155b1561123b5760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610558565b61103286868686866113b4565b6001600160a01b03841661127257604051632bfa23e760e11b815260006004820152602401610558565b6001600160a01b03851661129b57604051626a0d4560e21b815260006004820152602401610558565b6108b88585858585611361565b60065460ff166108cf57604051638dfc202b60e01b815260040160405180910390fd5b6001600160a01b0382166112f45760405162ced3e160e81b815260006004820152602401610558565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61136d85858585611442565b6001600160a01b038416156108b857825133906001036113a6576020848101519084015161139f838989858589611454565b5050611032565b611032818787878787611578565b6001600160a01b0384166113de57604051632bfa23e760e11b815260006004820152602401610558565b6001600160a01b03851661140757604051626a0d4560e21b815260006004820152602401610558565b604080516001808252602082018690528183019081526060820185905260808201909252906114398787848487611361565b50505050505050565b61144e84848484611661565b50505050565b6001600160a01b0384163b156110325760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906114989089908990889088908890600401612258565b6020604051808303816000875af19250505080156114d3575060408051601f3d908101601f191682019092526114d09181019061229d565b60015b61153c573d808015611501576040519150601f19603f3d011682016040523d82523d6000602084013e611506565b606091505b50805160000361153457604051632bfa23e760e11b81526001600160a01b0386166004820152602401610558565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b1461143957604051632bfa23e760e11b81526001600160a01b0386166004820152602401610558565b6001600160a01b0384163b156110325760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906115bc90899089908890889088906004016122ba565b6020604051808303816000875af19250505080156115f7575060408051601f3d908101601f191682019092526115f49181019061229d565b60015b611625573d808015611501576040519150601f19603f3d011682016040523d82523d6000602084013e611506565b6001600160e01b0319811663bc197c8160e01b1461143957604051632bfa23e760e11b81526001600160a01b0386166004820152602401610558565b61166d848484846117bb565b6001600160a01b038416611720576000805b835181101561170657600083828151811061169c5761169c6120b7565b6020026020010151905080600460008785815181106116bd576116bd6120b7565b6020026020010151815260200190815260200160002060008282546116e2919061213a565b909155506116f29050818461213a565b925050806116ff906120e3565b905061167f565b508060056000828254611719919061213a565b9091555050505b6001600160a01b03831661144e576000805b83518110156117aa57600083828151811061174f5761174f6120b7565b602002602001015190508060046000878581518110611770576117706120b7565b6020026020010151815260200190815260200160002060008282540392505081905550808301925050806117a3906120e3565b9050611732565b506005805491909103905550505050565b80518251146117ea5781518151604051635b05999160e01b815260048101929092526024820152604401610558565b3360005b83518110156118e7576020818102858101820151908501909101516001600160a01b0388161561188d5760008281526001602090815260408083206001600160a01b038c1684529091529020548181101561186457888183856040516303dee4c560e01b81526004016105589493929190612068565b60008381526001602090815260408083206001600160a01b038d16845290915290209082900390555b6001600160a01b038716156118d45760008281526001602090815260408083206001600160a01b038b168452909152812080548392906118ce90849061213a565b90915550505b5050806118e0906120e3565b90506117ee565b5082516001036119685760208301516000906020840151909150856001600160a01b0316876001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051611959929190918252602082015260400190565b60405180910390a450506108b8565b836001600160a01b0316856001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516119b7929190612318565b60405180910390a45050505050565b6001600160a01b038116811461063a57600080fd5b600080604083850312156119ee57600080fd5b82356119f9816119c6565b946020939093013593505050565b6001600160e01b03198116811461063a57600080fd5b600060208284031215611a2f57600080fd5b8135611a3a81611a07565b9392505050565b600060208284031215611a5357600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a9957611a99611a5a565b604052919050565b600067ffffffffffffffff831115611abb57611abb611a5a565b611ace601f8401601f1916602001611a70565b9050828152838383011115611ae257600080fd5b828260208301376000602084830101529392505050565b600060208284031215611b0b57600080fd5b813567ffffffffffffffff811115611b2257600080fd5b8201601f81018413611b3357600080fd5b611b4284823560208401611aa1565b949350505050565b6000815180845260005b81811015611b7057602081850181015186830182015201611b54565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000611a3a6020830184611b4a565b600080600060608486031215611bb857600080fd5b8335611bc3816119c6565b95602085013595506040909401359392505050565b600067ffffffffffffffff821115611bf257611bf2611a5a565b5060051b60200190565b600082601f830112611c0d57600080fd5b81356020611c22611c1d83611bd8565b611a70565b82815260059290921b84018101918181019086841115611c4157600080fd5b8286015b84811015611c5c5780358352918301918301611c45565b509695505050505050565b600082601f830112611c7857600080fd5b611a3a83833560208501611aa1565b600080600080600060a08688031215611c9f57600080fd5b8535611caa816119c6565b94506020860135611cba816119c6565b9350604086013567ffffffffffffffff80821115611cd757600080fd5b611ce389838a01611bfc565b94506060880135915080821115611cf957600080fd5b611d0589838a01611bfc565b93506080880135915080821115611d1b57600080fd5b50611d2888828901611c67565b9150509295509295909350565b60008060408385031215611d4857600080fd5b823567ffffffffffffffff80821115611d6057600080fd5b818501915085601f830112611d7457600080fd5b81356020611d84611c1d83611bd8565b82815260059290921b84018101918181019089841115611da357600080fd5b948201945b83861015611dca578535611dbb816119c6565b82529482019490820190611da8565b96505086013592505080821115611de057600080fd5b50611ded85828601611bfc565b9150509250929050565b600081518084526020808501945080840160005b83811015611e2757815187529582019590820190600101611e0b565b509495945050505050565b602081526000611a3a6020830184611df7565b60008060408385031215611e5857600080fd5b8235611e63816119c6565b915060208301358015158114611e7857600080fd5b809150509250929050565b60008060408385031215611e9657600080fd5b50508035926020909101359150565b60008083601f840112611eb757600080fd5b50813567ffffffffffffffff811115611ecf57600080fd5b6020830191508360208260051b8501011115611eea57600080fd5b9250929050565b60008060008060408587031215611f0757600080fd5b843567ffffffffffffffff80821115611f1f57600080fd5b611f2b88838901611ea5565b90965094506020870135915080821115611f4457600080fd5b50611f5187828801611ea5565b95989497509550505050565b60008060408385031215611f7057600080fd5b8235611f7b816119c6565b91506020830135611e78816119c6565b600080600080600060a08688031215611fa357600080fd5b8535611fae816119c6565b94506020860135611fbe816119c6565b93506040860135925060608601359150608086013567ffffffffffffffff811115611fe857600080fd5b611d2888828901611c67565b60006020828403121561200657600080fd5b8135611a3a816119c6565b60006020828403121561202357600080fd5b8151611a3a816119c6565b600181811c9082168061204257607f821691505b60208210810361206257634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b6020808252600f908201526e151c985919481a5cc81b1bd8dad959608a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016120f5576120f56120cd565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082612121576121216120fc565b500690565b600082612135576121356120fc565b500490565b80820180821115610445576104456120cd565b601f82111561219357600081815260208120601f850160051c810160208610156121745750805b601f850160051c820191505b8181101561103257828155600101612180565b505050565b815167ffffffffffffffff8111156121b2576121b2611a5a565b6121c6816121c0845461202e565b8461214d565b602080601f8311600181146121fb57600084156121e35750858301515b600019600386901b1c1916600185901b178555611032565b600085815260208120601f198616915b8281101561222a5788860151825594840194600190910190840161220b565b50858210156122485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061229290830184611b4a565b979650505050505050565b6000602082840312156122af57600080fd5b8151611a3a81611a07565b6001600160a01b0386811682528516602082015260a0604082018190526000906122e690830186611df7565b82810360608401526122f88186611df7565b9050828103608084015261230c8185611b4a565b98975050505050505050565b60408152600061232b6040830185611df7565b828103602084015261233d8185611df7565b9594505050505056fea264697066735822122044b70b322cd677179f8bd12f6d8e23e3079def5c19735ef0bf72ab44ccd8751364736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003368747470733a2f2f6a6972616d6574612e73332e65752d6e6f7274682d312e616d617a6f6e6177732e636f6d2f312e6a736f6e00000000000000000000000000
-----Decoded View---------------
Arg [0] : _uri (string): https://jirameta.s3.eu-north-1.amazonaws.com/1.json
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000033
Arg [2] : 68747470733a2f2f6a6972616d6574612e73332e65752d6e6f7274682d312e61
Arg [3] : 6d617a6f6e6177732e636f6d2f312e6a736f6e00000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.