Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00
Cross-Chain Transactions
Loading...
Loading
Contract Name:
MicroNFTV5
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {IMicroManager} from "../interfaces/IMicroManager.sol";
import "../erc721/Micro3.sol";
error SaleInactive();
error PurchaseWrongPrice(uint256 correctPrice);
error SoldOut();
error PurchaseTooManyForAddress();
error Canceled();
error IsNotBridge();
error SaleCanNotUpdate();
error InvalidSaleDetail();
error SaleIsNotEnded();
error Unauthorized();
error PresaleMerkleNotApproved();
contract MicroNFTV5 is Micro3 {
using Strings for uint256;
IMicroManager public microManager;
uint256 public constant VERSION = 5;
address public owner;
string private _baseURL;
string private _notRevealedURL;
bool private _initialized;
uint224 private _currentTokenId;
struct SaleConfiguration {
uint64 editionSize;
uint16 profitSharing;
address payable fundsRecipient;
uint256 publicSalePrice;
uint32 maxSalePurchasePerAddress;
uint64 publicSaleStart;
uint64 publicSaleEnd;
bytes32 presaleMerkleRoot;
bool cancelable;
}
mapping(address => uint256) public totalMintsByAddress;
SaleConfiguration public saleConfig;
event CrossMint(
address indexed _to,
uint256 _quantity,
uint256 _srcChainId
);
event BridgeIn(address indexed _to, uint256 _dstChainId, uint256 _tokenId);
event BridgeOut(
address indexed _from,
uint256 _dstChainId,
uint256 _tokenId
);
event Purchase(
address indexed to,
uint256 indexed quantity,
uint256 indexed price,
uint256 firstMintedTokenId
);
event OpenMintFinalized(
address indexed sender,
uint256 editionSize,
uint256 timeEnd
);
event AddMerkleProof(bytes32 indexed merkle);
event CancelSaleEdition(address indexed sender, uint256 lastTimeUpdated);
event PublicSaleCollection(address indexed sender, uint256 lastTimeUpdated);
event FundsWithdrawn(
address indexed sender,
address indexed fundsRecipient,
uint256 fund
);
modifier onlyOwner() {
require(owner == _msgSender());
_;
}
modifier onlyBridge() {
if (!microManager.microBridge(_msgSender())) {
revert IsNotBridge();
}
_;
}
modifier onlyCancelable() {
if (saleConfig.cancelable) {
revert Canceled();
}
_;
}
modifier canMintTokens(uint256 quantity) {
if (
saleConfig.editionSize != 0 &&
quantity + _currentTokenId > saleConfig.editionSize
) {
revert SoldOut();
}
_;
}
modifier onlyPublicSaleActive() {
if (
!(saleConfig.publicSaleStart <= block.timestamp &&
saleConfig.publicSaleEnd > block.timestamp)
) {
revert SaleInactive();
}
_;
}
function init(bytes memory initPayload) external returns (bool) {
if (_initialized) {
revert Unauthorized();
}
(
string memory _url,
string memory _singleUrl,
string memory _name,
string memory _symbol,
address _owner,
address _manager
) = abi.decode(
initPayload,
(string, string, string, string, address, address)
);
owner = _owner;
_setManager(_manager);
_baseURL = _url;
_notRevealedURL = _singleUrl;
_init(_name, _symbol);
_initialized = true;
return true;
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
_requireOwned(tokenId);
if (bytes(_notRevealedURL).length > 0) {
return _notRevealedURL;
}
return
bytes(_baseURL).length > 0
? string(
abi.encodePacked(_baseURL, tokenId.toString(), ".json")
)
: "";
}
function setBaseURI(string memory _newURI) external onlyOwner {
_setBaseURI(_newURI);
}
function setNotRevealedURI(string memory _newURI) external onlyOwner {
_notRevealedURL = _newURI;
}
/**
* Owner, Admin FUNCTIONS
* non state changing
*/
function transferOwnership(address newOwner) external onlyOwner {
if (newOwner == address(0)) {
revert Unauthorized();
}
_setOwner(newOwner);
}
function adminMint(address recipient, uint256 quantity)
external
onlyOwner
canMintTokens(quantity)
returns (uint256)
{
_mintNFTs(recipient, quantity);
return _currentTokenId;
}
function setSaleDetail(bytes memory initPayload)
external
onlyCancelable
onlyOwner
{
if (
saleConfig.publicSaleStart != 0 &&
block.timestamp > saleConfig.publicSaleStart
) {
revert SaleCanNotUpdate();
}
SaleConfiguration memory config = abi.decode(
initPayload,
(SaleConfiguration)
);
if (
config.publicSaleStart <= block.timestamp ||
config.publicSaleEnd <= config.publicSaleStart ||
config.profitSharing > 50 ||
config.fundsRecipient == address(0)
) {
revert InvalidSaleDetail();
}
saleConfig = SaleConfiguration({
editionSize: config.editionSize,
profitSharing: config.profitSharing,
fundsRecipient: config.fundsRecipient,
publicSalePrice: config.publicSalePrice,
maxSalePurchasePerAddress: config.maxSalePurchasePerAddress,
publicSaleStart: config.publicSaleStart,
publicSaleEnd: config.publicSaleEnd,
presaleMerkleRoot: config.presaleMerkleRoot,
cancelable: false
});
emit PublicSaleCollection(_msgSender(), block.timestamp);
}
function setMerkleProof(bytes32 _merkle) external onlyCancelable onlyOwner {
saleConfig.presaleMerkleRoot = _merkle;
emit AddMerkleProof(_merkle);
}
function finalizeOpenEdition() external onlyCancelable onlyOwner {
saleConfig.editionSize = uint64(_currentTokenId);
saleConfig.publicSaleEnd = uint64(block.timestamp);
emit OpenMintFinalized(
_msgSender(),
saleConfig.editionSize,
block.timestamp
);
}
function cancelSaleEdition() external onlyCancelable onlyOwner {
if (block.timestamp > saleConfig.publicSaleEnd) {
revert SaleIsNotEnded();
}
saleConfig.cancelable = true;
emit CancelSaleEdition(_msgSender(), block.timestamp);
}
/**
* EXTERNAL FUNCTIONS
* state changing
*/
function purchase(address minter, uint256 quantity)
external
onlyCancelable
canMintTokens(quantity)
onlyPublicSaleActive
onlyBridge
returns (uint256)
{
if (saleConfig.presaleMerkleRoot != bytes32(0)) {
revert Unauthorized();
}
_isMinting(minter, quantity);
emit Purchase({
to: minter,
quantity: quantity,
price: saleConfig.publicSalePrice,
firstMintedTokenId: _currentTokenId
});
return _currentTokenId;
}
function purchasePresale(
address minter,
uint256 quantity,
bytes32[] calldata merkleProof
)
external
onlyCancelable
canMintTokens(quantity)
onlyPublicSaleActive
onlyBridge
returns (uint256)
{
if (
!MerkleProof.verify(
merkleProof,
saleConfig.presaleMerkleRoot,
keccak256(abi.encodePacked(minter))
)
) {
revert PresaleMerkleNotApproved();
}
_isMinting(minter, quantity);
emit Purchase({
to: minter,
quantity: quantity,
price: saleConfig.publicSalePrice,
firstMintedTokenId: _currentTokenId
});
return _currentTokenId;
}
function bridgeOut(
address _from,
uint64 _dstChainId,
uint256 _tokenId
) external onlyBridge {
_burn(_tokenId);
emit BridgeOut(_from, _dstChainId, _tokenId);
}
function bridgeIn(
address _toAddress,
uint64 _dstChainId,
uint256 _tokenId
) external onlyBridge {
_safeMint(_toAddress, _tokenId);
emit BridgeIn(_toAddress, _dstChainId, _tokenId);
}
function crossMint(
address _toAddress,
address _fundAddress,
uint256 _quantity,
uint256 _priceCheck,
uint64 _srcChainId
)
external
onlyBridge
canMintTokens(_quantity)
onlyCancelable
onlyPublicSaleActive
{
if (saleConfig.fundsRecipient != _fundAddress) {
revert Unauthorized();
}
uint256 totalPurchase = saleConfig.publicSalePrice * _quantity;
if (_priceCheck < totalPurchase) {
revert PurchaseWrongPrice(totalPurchase);
}
_isMinting(_toAddress, _quantity);
emit CrossMint(_toAddress, _quantity, _srcChainId);
}
/**
* INTERNAL FUNCTIONS
* state changing
*/
function _mintNFTs(address recipient, uint256 quantity) internal {
for (uint256 i; i < quantity; ) {
_currentTokenId += 1;
_safeMint(
recipient,
uint256(
bytes32(
abi.encodePacked(
uint32(block.chainid),
uint224(_currentTokenId)
)
)
)
);
unchecked {
++i;
}
}
}
function _isMinting(address toAddress, uint256 quantity) internal {
if (quantity == 0) {
revert Unauthorized();
}
if (
saleConfig.maxSalePurchasePerAddress != 0 &&
totalMintsByAddress[toAddress] + quantity >
saleConfig.maxSalePurchasePerAddress
) {
revert PurchaseTooManyForAddress();
}
_mintNFTs(toAddress, quantity);
totalMintsByAddress[toAddress] += quantity;
}
function _setBaseURI(string memory _newURI) internal {
_baseURL = _newURI;
}
function _setOwner(address newOwner) internal {
owner = newOwner;
}
function _setManager(address _manager) internal {
microManager = IMicroManager(_manager);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
* @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;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
} else {
// Hash(current element of the proof + current computed hash)
computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
}
}
// Check if the computed hash (root) is equal to the provided root
return computedHash == root;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.13;
import {IERC165} from "./utils/IERC165.sol";
/**
* @dev Required interface of an ERC-721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @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`.
*
* 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 approved 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;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC-721 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 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) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* 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;
/**
* @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;
/**
* @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 address zero.
*
* 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);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {MRC721} from "./MRC721.sol";
import {IERC721Enumerable} from "./utils/IERC721Enumerable.sol";
import {IERC165} from "./utils/ERC165.sol";
abstract contract Micro3 is MRC721, IERC721Enumerable {
mapping(address => mapping(uint256 => uint256))
private _ownedTokens;
mapping(uint256 => uint256) private _ownedTokensIndex;
uint256[] private _allTokens;
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev An `owner`'s token query was out of bounds for `index`.
*
* NOTE: The owner being `address(0)` indicates a global out of bounds index.
*/
error ERC721OutOfBoundsIndex(address owner, uint256 index);
/**
* @dev Batch mint is not allowed.
*/
error ERC721EnumerableForbiddenBatchMint();
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(
bytes4 interfaceId
) public view virtual override(IERC165, MRC721) returns (bool) {
return
interfaceId == type(IERC721Enumerable).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(
address owner,
uint256 index
) public view virtual returns (uint256) {
if (index >= balanceOf(owner)) {
revert ERC721OutOfBoundsIndex(owner, index);
}
return _ownedTokens[owner][index];
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
return _allTokens.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual returns (uint256) {
if (index >= totalSupply()) {
revert ERC721OutOfBoundsIndex(address(0), index);
}
return _allTokens[index];
}
/**
* @dev See {ERC721-_update}.
*/
function _update(
address to,
uint256 tokenId,
address auth
) internal virtual override returns (address) {
address previousOwner = super._update(to, tokenId, auth);
if (previousOwner == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (previousOwner != to) {
_removeTokenFromOwnerEnumeration(previousOwner, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (previousOwner != to) {
_addTokenToOwnerEnumeration(to, tokenId);
}
return previousOwner;
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = balanceOf(to) - 1;
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(
address from,
uint256 tokenId
) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = balanceOf(from);
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
/**
* See {ERC721-_increaseBalance}. We need that to account tokens that were minted in batch
*/
function _increaseBalance(
address account,
uint128 amount
) internal virtual override {
if (amount > 0) {
revert ERC721EnumerableForbiddenBatchMint();
}
super._increaseBalance(account, amount);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.13;
import {IERC721} from "./IERC721.sol";
import {IERC721Metadata} from "./utils/IERC721Metadata.sol";
import {ERC721Utils} from "./utils/ERC721Utils.sol";
import {IERC165, ERC165} from "./utils/ERC165.sol";
import {IERC721Errors} from "./utils/IERC721Errors.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Context.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC-721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
abstract contract MRC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors {
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
mapping(uint256 => address) private _owners;
mapping(address => uint256) private _balances;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
function _init(string memory name_, string memory symbol_) internal {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual returns (uint256) {
if (owner == address(0)) {
revert ERC721InvalidOwner(address(0));
}
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual returns (address) {
return _requireOwned(tokenId);
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual returns (string memory) {
_requireOwned(tokenId);
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual {
_approve(to, tokenId, _msgSender());
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual returns (address) {
_requireOwned(tokenId);
return _getApproved(tokenId);
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(address from, address to, uint256 tokenId) public virtual {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
// Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists
// (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
address previousOwner = _update(to, tokenId, _msgSender());
if (previousOwner != from) {
revert ERC721IncorrectOwner(from, tokenId, previousOwner);
}
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual {
transferFrom(from, to, tokenId);
ERC721Utils.checkOnERC721Received(_msgSender(), from, to, tokenId, data);
}
/**
* @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
*
* IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the
* core ERC-721 logic MUST be matched with the use of {_increaseBalance} to keep balances
* consistent with ownership. The invariant to preserve is that for any address `a` the value returned by
* `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`.
*/
function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
return _owners[tokenId];
}
/**
* @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted.
*/
function _getApproved(uint256 tokenId) internal view virtual returns (address) {
return _tokenApprovals[tokenId];
}
/**
* @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in
* particular (ignoring whether it is owned by `owner`).
*
* WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
* assumption.
*/
function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) {
return
spender != address(0) &&
(owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender);
}
/**
* @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.
* Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets
* the `spender` for the specific `tokenId`.
*
* WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
* assumption.
*/
function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual {
if (!_isAuthorized(owner, spender, tokenId)) {
if (owner == address(0)) {
revert ERC721NonexistentToken(tokenId);
} else {
revert ERC721InsufficientApproval(spender, tokenId);
}
}
}
/**
* @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
*
* NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that
* a uint256 would ever overflow from increments when these increments are bounded to uint128 values.
*
* WARNING: Increasing an account's balance using this function tends to be paired with an override of the
* {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership
* remain consistent with one another.
*/
function _increaseBalance(address account, uint128 value) internal virtual {
unchecked {
_balances[account] += value;
}
}
/**
* @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner
* (or `to`) is the zero address. Returns the owner of the `tokenId` before the update.
*
* The `auth` argument is optional. If the value passed is non 0, then this function will check that
* `auth` is either the owner of the token, or approved to operate on the token (by the owner).
*
* Emits a {Transfer} event.
*
* NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}.
*/
function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) {
address from = _ownerOf(tokenId);
// Perform (optional) operator check
if (auth != address(0)) {
_checkAuthorized(from, auth, tokenId);
}
// Execute the update
if (from != address(0)) {
// Clear approval. No need to re-authorize or emit the Approval event
_approve(address(0), tokenId, address(0), false);
unchecked {
_balances[from] -= 1;
}
}
if (to != address(0)) {
unchecked {
_balances[to] += 1;
}
}
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
return from;
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
address previousOwner = _update(to, tokenId, address(0));
if (previousOwner != address(0)) {
revert ERC721InvalidSender(address(0));
}
}
/**
* @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {
_mint(to, tokenId);
ERC721Utils.checkOnERC721Received(_msgSender(), address(0), to, tokenId, data);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
* This is an internal function that does not check if the sender is authorized to operate on the token.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal {
address previousOwner = _update(address(0), tokenId, address(0));
if (previousOwner == address(0)) {
revert ERC721NonexistentToken(tokenId);
}
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(address from, address to, uint256 tokenId) internal {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
address previousOwner = _update(to, tokenId, address(0));
if (previousOwner == address(0)) {
revert ERC721NonexistentToken(tokenId);
} else if (previousOwner != from) {
revert ERC721IncorrectOwner(from, tokenId, previousOwner);
}
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients
* are aware of the ERC-721 standard to prevent tokens from being forever locked.
*
* `data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is like {safeTransferFrom} in the sense that it invokes
* {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `tokenId` token must exist and be owned by `from`.
* - `to` cannot be the zero address.
* - `from` cannot be the zero address.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(address from, address to, uint256 tokenId) internal {
_safeTransfer(from, to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
_transfer(from, to, tokenId);
ERC721Utils.checkOnERC721Received(_msgSender(), from, to, tokenId, data);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is
* either the owner of the token, or approved to operate on all tokens held by this owner.
*
* Emits an {Approval} event.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address to, uint256 tokenId, address auth) internal {
_approve(to, tokenId, auth, true);
}
/**
* @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not
* emitted in the context of transfers.
*/
function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual {
// Avoid reading the owner unless necessary
if (emitEvent || auth != address(0)) {
address owner = _requireOwned(tokenId);
// We do not use _isAuthorized because single-token approvals should not be able to call approve
if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) {
revert ERC721InvalidApprover(auth);
}
if (emitEvent) {
emit Approval(owner, to, tokenId);
}
}
_tokenApprovals[tokenId] = to;
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Requirements:
* - operator can't be the address zero.
*
* Emits an {ApprovalForAll} event.
*/
function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
if (operator == address(0)) {
revert ERC721InvalidOperator(operator);
}
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).
* Returns the owner.
*
* Overrides to ownership logic should be done to {_ownerOf}.
*/
function _requireOwned(uint256 tokenId) internal view returns (address) {
address owner = _ownerOf(tokenId);
if (owner == address(0)) {
revert ERC721NonexistentToken(tokenId);
}
return owner;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.13;
import {IERC165} from "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {IERC721Receiver} from "./IERC721Receiver.sol";
import {IERC721Errors} from "./IERC721Errors.sol";
/**
* @dev Library that provide common ERC-721 utility functions.
*
* See https://eips.ethereum.org/EIPS/eip-721[ERC-721].
*/
library ERC721Utils {
/**
* @dev Performs an acceptance check for the provided `operator` by calling {IERC721-onERC721Received}
* on the `to` address. The `operator` is generally the address that initiated the token transfer (i.e. `msg.sender`).
*
* The acceptance call is not executed and treated as a no-op if the target address is doesn't contain code (i.e. an EOA).
* Otherwise, the recipient must implement {IERC721Receiver-onERC721Received} and return the acceptance magic value to accept
* the transfer.
*/
function checkOnERC721Received(
address operator,
address from,
address to,
uint256 tokenId,
bytes memory data
) internal {
if (to.code.length > 0) {
try IERC721Receiver(to).onERC721Received(operator, from, tokenId, data) returns (bytes4 retval) {
if (retval != IERC721Receiver.onERC721Received.selector) {
// Token rejected
revert IERC721Errors.ERC721InvalidReceiver(to);
}
} catch (bytes memory reason) {
if (reason.length == 0) {
// non-IERC721Receiver implementer
revert IERC721Errors.ERC721InvalidReceiver(to);
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.13;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Enumerable.sol)
pragma solidity ^0.8.13;
import {IERC721} from "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.13;
/**
* @dev Standard ERC-721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-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 ERC-1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 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/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.13;
import {IERC721} from "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.13;
/**
* @title ERC-721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC-721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be
* reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.5.0;
interface IMicroManager {
function microBridge(address _address) external view returns (bool);
function treasuryAddress() external view returns (address);
function microProtocolFee() external view returns (uint256);
function oracleAddress() external view returns (address);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"Canceled","type":"error"},{"inputs":[],"name":"ERC721EnumerableForbiddenBatchMint","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"ERC721OutOfBoundsIndex","type":"error"},{"inputs":[],"name":"InvalidSaleDetail","type":"error"},{"inputs":[],"name":"IsNotBridge","type":"error"},{"inputs":[],"name":"PresaleMerkleNotApproved","type":"error"},{"inputs":[],"name":"PurchaseTooManyForAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"correctPrice","type":"uint256"}],"name":"PurchaseWrongPrice","type":"error"},{"inputs":[],"name":"SaleCanNotUpdate","type":"error"},{"inputs":[],"name":"SaleInactive","type":"error"},{"inputs":[],"name":"SaleIsNotEnded","type":"error"},{"inputs":[],"name":"SoldOut","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"merkle","type":"bytes32"}],"name":"AddMerkleProof","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"BridgeIn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"BridgeOut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"lastTimeUpdated","type":"uint256"}],"name":"CancelSaleEdition","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_quantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_srcChainId","type":"uint256"}],"name":"CrossMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"fundsRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"fund","type":"uint256"}],"name":"FundsWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"editionSize","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timeEnd","type":"uint256"}],"name":"OpenMintFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"lastTimeUpdated","type":"uint256"}],"name":"PublicSaleCollection","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"quantity","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"firstMintedTokenId","type":"uint256"}],"name":"Purchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"adminMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_toAddress","type":"address"},{"internalType":"uint64","name":"_dstChainId","type":"uint64"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"bridgeIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint64","name":"_dstChainId","type":"uint64"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"bridgeOut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelSaleEdition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_toAddress","type":"address"},{"internalType":"address","name":"_fundAddress","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_priceCheck","type":"uint256"},{"internalType":"uint64","name":"_srcChainId","type":"uint64"}],"name":"crossMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finalizeOpenEdition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"initPayload","type":"bytes"}],"name":"init","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"microManager","outputs":[{"internalType":"contract IMicroManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"purchase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"purchasePresale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleConfig","outputs":[{"internalType":"uint64","name":"editionSize","type":"uint64"},{"internalType":"uint16","name":"profitSharing","type":"uint16"},{"internalType":"address payable","name":"fundsRecipient","type":"address"},{"internalType":"uint256","name":"publicSalePrice","type":"uint256"},{"internalType":"uint32","name":"maxSalePurchasePerAddress","type":"uint32"},{"internalType":"uint64","name":"publicSaleStart","type":"uint64"},{"internalType":"uint64","name":"publicSaleEnd","type":"uint64"},{"internalType":"bytes32","name":"presaleMerkleRoot","type":"bytes32"},{"internalType":"bool","name":"cancelable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkle","type":"bytes32"}],"name":"setMerkleProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"setNotRevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"initPayload","type":"bytes"}],"name":"setSaleDetail","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalMintsByAddress","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":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50612f27806100206000396000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c806383bde44611610125578063b88d4fde116100ad578063ed50d8831161007c578063ed50d88314610533578063f2c4ce1e14610546578063f2fde38b14610559578063f5a0384c1461056c578063ffa1ad741461057457600080fd5b8063b88d4fde146104e7578063c87b56dd146104fa578063e58306f91461050d578063e985e9c51461052057600080fd5b806390aa0b0f116100f457806390aa0b0f146103ca5780639123f01e1461049957806394847d62146104b957806395d89b41146104cc578063a22cb465146104d457600080fd5b806383bde4461461037e57806386758912146103915780638da5cb5b146103a45780638de93222146103b757600080fd5b80632cde1215116101a85780634ddf47d4116101775780634ddf47d41461031f5780634f6ccce71461033257806355f804b3146103455780636352211e1461035857806370a082311461036b57600080fd5b80632cde1215146102de5780632f745c59146102f157806341e96eb11461030457806342842e0e1461030c57600080fd5b80630e21ea06116101e45780630e21ea06146102935780630e46c9a6146102a657806318160ddd146102b957806323b872dd146102cb57600080fd5b806301ffc9a71461021657806306fdde031461023e578063081812fc14610253578063095ea7b31461027e575b600080fd5b610229610224366004612569565b61057c565b60405190151581526020015b60405180910390f35b6102466105a7565b60405161023591906125e5565b6102666102613660046125f8565b610639565b6040516001600160a01b039091168152602001610235565b61029161028c366004612626565b610662565b005b600a54610266906001600160a01b031681565b6102916102b4366004612667565b610671565b6008545b604051908152602001610235565b6102916102d93660046126a8565b610764565b6102916102ec366004612667565b6107f4565b6102bd6102ff366004612626565b6108df565b610291610944565b61029161031a3660046126a8565b610a26565b61022961032d3660046127cc565b610a46565b6102bd6103403660046125f8565b610b2a565b610291610353366004612800565b610b83565b6102666103663660046125f8565b610ba6565b6102bd610379366004612848565b610bb1565b6102bd61038c366004612865565b610bf9565b61029161039f3660046125f8565b610e76565b600b54610266906001600160a01b031681565b6102bd6103c5366004612626565b610ee4565b60105460115460125460135460145461042c946001600160401b0380821695600160401b830461ffff1695600160501b9093046001600160a01b031694909363ffffffff841693600160201b8104841693600160601b90910416919060ff1689565b604080516001600160401b039a8b16815261ffff90991660208a01526001600160a01b0390971696880196909652606087019490945263ffffffff9092166080860152851660a08501529390931660c083015260e082019290925290151561010082015261012001610235565b6102bd6104a7366004612848565b600f6020526000908152604090205481565b6102916104c73660046127cc565b6110ec565b610246611381565b6102916104e23660046128fe565b611390565b6102916104f5366004612937565b61139b565b6102466105083660046125f8565b6113b3565b6102bd61051b366004612626565b6114c4565b61022961052e3660046129a2565b611562565b6102916105413660046129d0565b611590565b610291610554366004612800565b6117c8565b610291610567366004612848565b6117f2565b61029161184d565b6102bd600581565b60006001600160e01b0319821663780e9d6360e01b14806105a157506105a182611909565b92915050565b6060600080546105b690612a2f565b80601f01602080910402602001604051908101604052809291908181526020018280546105e290612a2f565b801561062f5780601f106106045761010080835404028352916020019161062f565b820191906000526020600020905b81548152906001019060200180831161061257829003601f168201915b5050505050905090565b600061064482611959565b506000828152600460205260409020546001600160a01b03166105a1565b61066d828233611992565b5050565b600a546001600160a01b0316631222cea6336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156106c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106eb9190612a79565b610708576040516311ebaa2760e11b815260040160405180910390fd5b6107118161199f565b604080516001600160401b0384168152602081018390526001600160a01b038516917f40b70b451dc629fad6a565da866d93b8c178df2cb218fc32f6af8041165309c191015b60405180910390a2505050565b6001600160a01b03821661079357604051633250574960e11b8152600060048201526024015b60405180910390fd5b60006107a08383336119da565b9050836001600160a01b0316816001600160a01b0316146107ee576040516364283d7b60e01b81526001600160a01b038086166004830152602482018490528216604482015260640161078a565b50505050565b600a546001600160a01b0316631222cea6336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561084a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086e9190612a79565b61088b576040516311ebaa2760e11b815260040160405180910390fd5b6108958382611aaf565b604080516001600160401b0384168152602081018390526001600160a01b038516917f780140c12a9c67a3a283c7f237e9577318a108e1dfdeb57542a4655c89be38b79101610757565b60006108ea83610bb1565b821061091b5760405163295f44f760e21b81526001600160a01b03841660048201526024810183905260440161078a565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60145460ff161561096857604051631afb0ae560e01b815260040160405180910390fd5b600b546001600160a01b0316331461097f57600080fd5b600e54601080546001600160401b03610100909304831667ffffffffffffffff199091161790556012805442909216600160601b0267ffffffffffffffff60601b199092169190911790556109d13390565b601054604080516001600160401b0390921682524260208301526001600160a01b0392909216917fc0786675f6128bc0b8e886ad509fa0cc374ec4c3efe21e941920ea683bd1741d91015b60405180910390a2565b610a418383836040518060200160405280600081525061139b565b505050565b600e5460009060ff1615610a6c576040516282b42960e81b815260040160405180910390fd5b60008060008060008087806020019051810190610a899190612ae6565b600b80546001600160a01b0384166001600160a01b0319909116179055949a50929850909650945092509050610adc81600a80546001600160a01b039092166001600160a01b0319909216919091179055565b8551610aef90600c9060208901906124ba565b508451610b0390600d9060208801906124ba565b50610b0e8484611ac9565b5050600e805460ff191660019081179091559695505050505050565b6000610b3560085490565b8210610b5e5760405163295f44f760e21b8152600060048201526024810183905260440161078a565b60088281548110610b7157610b71612bb2565b90600052602060002001549050919050565b600b546001600160a01b03163314610b9a57600080fd5b610ba381611af0565b50565b60006105a182611959565b60006001600160a01b038216610bdd576040516322718ad960e21b81526000600482015260240161078a565b506001600160a01b031660009081526003602052604090205490565b60145460009060ff1615610c2057604051631afb0ae560e01b815260040160405180910390fd5b60105484906001600160401b031615801590610c635750601054600e546001600160401b0390911690610c619061010090046001600160e01b031683612bde565b115b15610c81576040516352df9fe560e01b815260040160405180910390fd5b60125442600160201b9091046001600160401b031611801590610cb6575060125442600160601b9091046001600160401b0316115b610cd357604051630fe219dd60e21b815260040160405180910390fd5b600a546001600160a01b0316631222cea6336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610d29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4d9190612a79565b610d6a576040516311ebaa2760e11b815260040160405180910390fd5b610de0848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506013546040516bffffffffffffffffffffffff1960608d901b166020820152909250603401905060405160208183030381529060405280519060200120611b03565b610dfd576040516346cabb7560e01b815260040160405180910390fd5b610e078686611bb2565b601154600e546040516101009091046001600160e01b0316815286906001600160a01b038916907f5bc97d73357ac0d035d4b9268a69240988a5776b8a4fcced3dbc223960123f409060200160405180910390a45050600e5461010090046001600160e01b0316949350505050565b60145460ff1615610e9a57604051631afb0ae560e01b815260040160405180910390fd5b600b546001600160a01b03163314610eb157600080fd5b601381905560405181907fac0e7be7f0391f6f84d2d6c5c9300942e4d7e7a79629f63f0078050c21300d9e90600090a250565b60145460009060ff1615610f0b57604051631afb0ae560e01b815260040160405180910390fd5b60105482906001600160401b031615801590610f4e5750601054600e546001600160401b0390911690610f4c9061010090046001600160e01b031683612bde565b115b15610f6c576040516352df9fe560e01b815260040160405180910390fd5b60125442600160201b9091046001600160401b031611801590610fa1575060125442600160601b9091046001600160401b0316115b610fbe57604051630fe219dd60e21b815260040160405180910390fd5b600a546001600160a01b0316631222cea6336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611014573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110389190612a79565b611055576040516311ebaa2760e11b815260040160405180910390fd5b60135415611075576040516282b42960e81b815260040160405180910390fd5b61107f8484611bb2565b601154600e546040516101009091046001600160e01b0316815284906001600160a01b038716907f5bc97d73357ac0d035d4b9268a69240988a5776b8a4fcced3dbc223960123f409060200160405180910390a45050600e5461010090046001600160e01b031692915050565b60145460ff161561111057604051631afb0ae560e01b815260040160405180910390fd5b600b546001600160a01b0316331461112757600080fd5b601254600160201b90046001600160401b0316158015906111595750601254600160201b90046001600160401b031642115b1561117757604051630571129f60e51b815260040160405180910390fd5b60008180602001905181019061118d9190612c27565b9050428160a001516001600160401b03161115806111c557508060a001516001600160401b03168160c001516001600160401b031611155b806111d857506032816020015161ffff16115b806111ee575060408101516001600160a01b0316155b1561120c576040516371dff4bd60e11b815260040160405180910390fd5b604080516101208101825282516001600160401b0390811680835260208086015161ffff16908401819052858501516001600160a01b031694840185905260608087015190850181905260808088015163ffffffff1690860181905260a080890151861690870181905260c0808a015190961695870186905260e0808a01519088018190526000610100909801979097526010805469ffffffffffffffffffff1916909517600160401b909402939093177fffff0000000000000000000000000000000000000000ffffffffffffffffffff16600160501b90970296909617909255601191909155601280546bffffffffffffffffffffffff1916909417600160201b9091021767ffffffffffffffff60601b1916600160601b909102179091556013556014805460ff19169055336001600160a01b03167f7f5a7a2bf5c04c7c8759c017a2991abaf03db78e2595e806fe7b6add4dffe4b64260405161137591815260200190565b60405180910390a25050565b6060600180546105b690612a2f565b61066d338383611c6f565b6113a6848484610764565b6107ee3385858585611d0e565b60606113be82611959565b506000600d80546113ce90612a2f565b9050111561146857600d80546113e390612a2f565b80601f016020809104026020016040519081016040528092919081815260200182805461140f90612a2f565b801561145c5780601f106114315761010080835404028352916020019161145c565b820191906000526020600020905b81548152906001019060200180831161143f57829003601f168201915b50505050509050919050565b6000600c805461147790612a2f565b90501161149357604051806020016040528060008152506105a1565b600c61149e83611e39565b6040516020016114af929190612ceb565b60405160208183030381529060405292915050565b600b546000906001600160a01b031633146114de57600080fd5b60105482906001600160401b0316158015906115215750601054600e546001600160401b039091169061151f9061010090046001600160e01b031683612bde565b115b1561153f576040516352df9fe560e01b815260040160405180910390fd5b6115498484611f39565b5050600e5461010090046001600160e01b031692915050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600a546001600160a01b0316631222cea6336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156115e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160a9190612a79565b611627576040516311ebaa2760e11b815260040160405180910390fd5b60105483906001600160401b03161580159061166a5750601054600e546001600160401b03909116906116689061010090046001600160e01b031683612bde565b115b15611688576040516352df9fe560e01b815260040160405180910390fd5b60145460ff16156116ac57604051631afb0ae560e01b815260040160405180910390fd5b60125442600160201b9091046001600160401b0316118015906116e1575060125442600160601b9091046001600160401b0316115b6116fe57604051630fe219dd60e21b815260040160405180910390fd5b6010546001600160a01b03868116600160501b9092041614611732576040516282b42960e81b815260040160405180910390fd5b601154600090611743908690612da5565b9050808410156117695760405163c5a8df2f60e01b81526004810182905260240161078a565b6117738786611bb2565b604080518681526001600160401b03851660208201526001600160a01b038916917f66f7cec2cf267a0c2dec8f68fa7a926f730e7f5be0837f841ea91f9b4c6ced2b910160405180910390a250505050505050565b600b546001600160a01b031633146117df57600080fd5b805161066d90600d9060208401906124ba565b600b546001600160a01b0316331461180957600080fd5b6001600160a01b03811661182f576040516282b42960e81b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b03831617905550565b60145460ff161561187157604051631afb0ae560e01b815260040160405180910390fd5b600b546001600160a01b0316331461188857600080fd5b601254600160601b90046001600160401b03164211156118bb57604051631060d8c160e11b815260040160405180910390fd5b6014805460ff191660011790556118cf3390565b6001600160a01b03167f3cf0fddeb2fbf69861d5f13d66be17516300342ce630d94fb7ea3388c0c27dce42604051610a1c91815260200190565b60006001600160e01b031982166380ac58cd60e01b148061193a57506001600160e01b03198216635b5e139f60e01b145b806105a157506301ffc9a760e01b6001600160e01b03198316146105a1565b6000818152600260205260408120546001600160a01b0316806105a157604051637e27328960e01b81526004810184905260240161078a565b610a418383836001611fe7565b60006119ae60008360006119da565b90506001600160a01b03811661066d57604051637e27328960e01b81526004810183905260240161078a565b6000806119e88585856120ed565b90506001600160a01b038116611a4557611a4084600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611a68565b846001600160a01b0316816001600160a01b031614611a6857611a6881856121e6565b6001600160a01b038516611a8457611a7f84612277565b611aa7565b846001600160a01b0316816001600160a01b031614611aa757611aa78585612326565b949350505050565b61066d828260405180602001604052806000815250612376565b8151611adc9060009060208501906124ba565b508051610a419060019060208401906124ba565b805161066d90600c9060208401906124ba565b600081815b8551811015611ba7576000868281518110611b2557611b25612bb2565b60200260200101519050808311611b67576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250611b94565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080611b9f81612dc4565b915050611b08565b509092149392505050565b80600003611bd2576040516282b42960e81b815260040160405180910390fd5b60125463ffffffff1615801590611c1657506012546001600160a01b0383166000908152600f602052604090205463ffffffff90911690611c14908390612bde565b115b15611c3457604051631722816d60e01b815260040160405180910390fd5b611c3e8282611f39565b6001600160a01b0382166000908152600f602052604081208054839290611c66908490612bde565b90915550505050565b6001600160a01b038216611ca157604051630b61174360e31b81526001600160a01b038316600482015260240161078a565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0383163b15611e3257604051630a85bd0160e11b81526001600160a01b0384169063150b7a0290611d50908890889087908790600401612ddd565b6020604051808303816000875af1925050508015611d8b575060408051601f3d908101601f19168201909252611d8891810190612e1a565b60015b611df4573d808015611db9576040519150601f19603f3d011682016040523d82523d6000602084013e611dbe565b606091505b508051600003611dec57604051633250574960e11b81526001600160a01b038516600482015260240161078a565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b14611e3057604051633250574960e11b81526001600160a01b038516600482015260240161078a565b505b5050505050565b606081600003611e605750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611e8a5780611e7481612dc4565b9150611e839050600a83612e4d565b9150611e64565b6000816001600160401b03811115611ea457611ea46126d8565b6040519080825280601f01601f191660200182016040528015611ece576020820181803683370190505b5090505b8415611aa757611ee3600183612e61565b9150611ef0600a86612e78565b611efb906030612bde565b60f81b818381518110611f1057611f10612bb2565b60200101906001600160f81b031916908160001a905350611f32600a86612e4d565b9450611ed2565b60005b81811015610a41576001600e60018282829054906101000a90046001600160e01b0316611f699190612e8c565b825461010092830a6001600160e01b0381810219909216929091160217909155600e54604080514660e01b6001600160e01b0319166020808301919091529390920490921b63ffffffff19166024820152611fdf9250859101604051602081830303815290604052611fda90612eb7565b611aaf565b600101611f3c565b8080611ffb57506001600160a01b03821615155b156120bd57600061200b84611959565b90506001600160a01b038316158015906120375750826001600160a01b0316816001600160a01b031614155b801561204a57506120488184611562565b155b156120735760405163a9fbf51f60e01b81526001600160a01b038416600482015260240161078a565b81156120bb5783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5050600090815260046020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600260205260408120546001600160a01b039081169083161561211a5761211a81848661238e565b6001600160a01b0381161561215857612137600085600080611fe7565b6001600160a01b038116600090815260036020526040902080546000190190555b6001600160a01b03851615612187576001600160a01b0385166000908152600360205260409020805460010190555b60008481526002602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b60006121f183610bb1565b600083815260076020526040902054909150808214612244576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061228990600190612e61565b600083815260096020526040812054600880549394509092849081106122b1576122b1612bb2565b9060005260206000200154905080600883815481106122d2576122d2612bb2565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061230a5761230a612edb565b6001900381819060005260206000200160009055905550505050565b6000600161233384610bb1565b61233d9190612e61565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b61238083836123f2565b610a41336000858585611d0e565b612399838383612457565b610a41576001600160a01b0383166123c757604051637e27328960e01b81526004810182905260240161078a565b60405163177e802f60e01b81526001600160a01b03831660048201526024810182905260440161078a565b6001600160a01b03821661241c57604051633250574960e11b81526000600482015260240161078a565b600061242a838360006119da565b90506001600160a01b03811615610a41576040516339e3563760e11b81526000600482015260240161078a565b60006001600160a01b03831615801590611aa75750826001600160a01b0316846001600160a01b0316148061249157506124918484611562565b80611aa75750506000908152600460205260409020546001600160a01b03908116911614919050565b8280546124c690612a2f565b90600052602060002090601f0160209004810192826124e8576000855561252e565b82601f1061250157805160ff191683800117855561252e565b8280016001018555821561252e579182015b8281111561252e578251825591602001919060010190612513565b5061253a92915061253e565b5090565b5b8082111561253a576000815560010161253f565b6001600160e01b031981168114610ba357600080fd5b60006020828403121561257b57600080fd5b813561258681612553565b9392505050565b60005b838110156125a8578181015183820152602001612590565b838111156107ee5750506000910152565b600081518084526125d181602086016020860161258d565b601f01601f19169290920160200192915050565b60208152600061258660208301846125b9565b60006020828403121561260a57600080fd5b5035919050565b6001600160a01b0381168114610ba357600080fd5b6000806040838503121561263957600080fd5b823561264481612611565b946020939093013593505050565b6001600160401b0381168114610ba357600080fd5b60008060006060848603121561267c57600080fd5b833561268781612611565b9250602084013561269781612652565b929592945050506040919091013590565b6000806000606084860312156126bd57600080fd5b83356126c881612611565b9250602084013561269781612611565b634e487b7160e01b600052604160045260246000fd5b60405161012081016001600160401b0381118282101715612711576127116126d8565b60405290565b604051601f8201601f191681016001600160401b038111828210171561273f5761273f6126d8565b604052919050565b60006001600160401b03821115612760576127606126d8565b50601f01601f191660200190565b600061278161277c84612747565b612717565b905082815283838301111561279557600080fd5b828260208301376000602084830101529392505050565b600082601f8301126127bd57600080fd5b6125868383356020850161276e565b6000602082840312156127de57600080fd5b81356001600160401b038111156127f457600080fd5b611aa7848285016127ac565b60006020828403121561281257600080fd5b81356001600160401b0381111561282857600080fd5b8201601f8101841361283957600080fd5b611aa78482356020840161276e565b60006020828403121561285a57600080fd5b813561258681612611565b6000806000806060858703121561287b57600080fd5b843561288681612611565b93506020850135925060408501356001600160401b03808211156128a957600080fd5b818701915087601f8301126128bd57600080fd5b8135818111156128cc57600080fd5b8860208260051b85010111156128e157600080fd5b95989497505060200194505050565b8015158114610ba357600080fd5b6000806040838503121561291157600080fd5b823561291c81612611565b9150602083013561292c816128f0565b809150509250929050565b6000806000806080858703121561294d57600080fd5b843561295881612611565b9350602085013561296881612611565b92506040850135915060608501356001600160401b0381111561298a57600080fd5b612996878288016127ac565b91505092959194509250565b600080604083850312156129b557600080fd5b82356129c081612611565b9150602083013561292c81612611565b600080600080600060a086880312156129e857600080fd5b85356129f381612611565b94506020860135612a0381612611565b935060408601359250606086013591506080860135612a2181612652565b809150509295509295909350565b600181811c90821680612a4357607f821691505b602082108103612a6357634e487b7160e01b600052602260045260246000fd5b50919050565b8051612a74816128f0565b919050565b600060208284031215612a8b57600080fd5b8151612586816128f0565b600082601f830112612aa757600080fd5b8151612ab561277c82612747565b818152846020838601011115612aca57600080fd5b611aa782602083016020870161258d565b8051612a7481612611565b60008060008060008060c08789031215612aff57600080fd5b86516001600160401b0380821115612b1657600080fd5b612b228a838b01612a96565b97506020890151915080821115612b3857600080fd5b612b448a838b01612a96565b96506040890151915080821115612b5a57600080fd5b612b668a838b01612a96565b95506060890151915080821115612b7c57600080fd5b50612b8989828a01612a96565b935050612b9860808801612adb565b9150612ba660a08801612adb565b90509295509295509295565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115612bf157612bf1612bc8565b500190565b8051612a7481612652565b805161ffff81168114612a7457600080fd5b805163ffffffff81168114612a7457600080fd5b60006101208284031215612c3a57600080fd5b612c426126ee565b612c4b83612bf6565b8152612c5960208401612c01565b6020820152612c6a60408401612adb565b604082015260608301516060820152612c8560808401612c13565b6080820152612c9660a08401612bf6565b60a0820152612ca760c08401612bf6565b60c082015260e083015160e0820152610100612cc4818501612a69565b908201529392505050565b60008151612ce181856020860161258d565b9290920192915050565b600080845481600182811c915080831680612d0757607f831692505b60208084108203612d2657634e487b7160e01b86526022600452602486fd5b818015612d3a5760018114612d4b57612d78565b60ff19861689528489019650612d78565b60008b81526020902060005b86811015612d705781548b820152908501908301612d57565b505084890196505b505050505050612d9c612d8b8286612ccf565b64173539b7b760d91b815260050190565b95945050505050565b6000816000190483118215151615612dbf57612dbf612bc8565b500290565b600060018201612dd657612dd6612bc8565b5060010190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612e10908301846125b9565b9695505050505050565b600060208284031215612e2c57600080fd5b815161258681612553565b634e487b7160e01b600052601260045260246000fd5b600082612e5c57612e5c612e37565b500490565b600082821015612e7357612e73612bc8565b500390565b600082612e8757612e87612e37565b500690565b60006001600160e01b03828116848216808303821115612eae57612eae612bc8565b01949350505050565b80516020808301519190811015612a635760001960209190910360031b1b16919050565b634e487b7160e01b600052603160045260246000fdfea264697066735822122016e41bd3afc47627ade1bea28828f34d9a6e6fcc4697d8f6e8bc24b3dbb6e4a464736f6c634300080d0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102115760003560e01c806383bde44611610125578063b88d4fde116100ad578063ed50d8831161007c578063ed50d88314610533578063f2c4ce1e14610546578063f2fde38b14610559578063f5a0384c1461056c578063ffa1ad741461057457600080fd5b8063b88d4fde146104e7578063c87b56dd146104fa578063e58306f91461050d578063e985e9c51461052057600080fd5b806390aa0b0f116100f457806390aa0b0f146103ca5780639123f01e1461049957806394847d62146104b957806395d89b41146104cc578063a22cb465146104d457600080fd5b806383bde4461461037e57806386758912146103915780638da5cb5b146103a45780638de93222146103b757600080fd5b80632cde1215116101a85780634ddf47d4116101775780634ddf47d41461031f5780634f6ccce71461033257806355f804b3146103455780636352211e1461035857806370a082311461036b57600080fd5b80632cde1215146102de5780632f745c59146102f157806341e96eb11461030457806342842e0e1461030c57600080fd5b80630e21ea06116101e45780630e21ea06146102935780630e46c9a6146102a657806318160ddd146102b957806323b872dd146102cb57600080fd5b806301ffc9a71461021657806306fdde031461023e578063081812fc14610253578063095ea7b31461027e575b600080fd5b610229610224366004612569565b61057c565b60405190151581526020015b60405180910390f35b6102466105a7565b60405161023591906125e5565b6102666102613660046125f8565b610639565b6040516001600160a01b039091168152602001610235565b61029161028c366004612626565b610662565b005b600a54610266906001600160a01b031681565b6102916102b4366004612667565b610671565b6008545b604051908152602001610235565b6102916102d93660046126a8565b610764565b6102916102ec366004612667565b6107f4565b6102bd6102ff366004612626565b6108df565b610291610944565b61029161031a3660046126a8565b610a26565b61022961032d3660046127cc565b610a46565b6102bd6103403660046125f8565b610b2a565b610291610353366004612800565b610b83565b6102666103663660046125f8565b610ba6565b6102bd610379366004612848565b610bb1565b6102bd61038c366004612865565b610bf9565b61029161039f3660046125f8565b610e76565b600b54610266906001600160a01b031681565b6102bd6103c5366004612626565b610ee4565b60105460115460125460135460145461042c946001600160401b0380821695600160401b830461ffff1695600160501b9093046001600160a01b031694909363ffffffff841693600160201b8104841693600160601b90910416919060ff1689565b604080516001600160401b039a8b16815261ffff90991660208a01526001600160a01b0390971696880196909652606087019490945263ffffffff9092166080860152851660a08501529390931660c083015260e082019290925290151561010082015261012001610235565b6102bd6104a7366004612848565b600f6020526000908152604090205481565b6102916104c73660046127cc565b6110ec565b610246611381565b6102916104e23660046128fe565b611390565b6102916104f5366004612937565b61139b565b6102466105083660046125f8565b6113b3565b6102bd61051b366004612626565b6114c4565b61022961052e3660046129a2565b611562565b6102916105413660046129d0565b611590565b610291610554366004612800565b6117c8565b610291610567366004612848565b6117f2565b61029161184d565b6102bd600581565b60006001600160e01b0319821663780e9d6360e01b14806105a157506105a182611909565b92915050565b6060600080546105b690612a2f565b80601f01602080910402602001604051908101604052809291908181526020018280546105e290612a2f565b801561062f5780601f106106045761010080835404028352916020019161062f565b820191906000526020600020905b81548152906001019060200180831161061257829003601f168201915b5050505050905090565b600061064482611959565b506000828152600460205260409020546001600160a01b03166105a1565b61066d828233611992565b5050565b600a546001600160a01b0316631222cea6336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156106c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106eb9190612a79565b610708576040516311ebaa2760e11b815260040160405180910390fd5b6107118161199f565b604080516001600160401b0384168152602081018390526001600160a01b038516917f40b70b451dc629fad6a565da866d93b8c178df2cb218fc32f6af8041165309c191015b60405180910390a2505050565b6001600160a01b03821661079357604051633250574960e11b8152600060048201526024015b60405180910390fd5b60006107a08383336119da565b9050836001600160a01b0316816001600160a01b0316146107ee576040516364283d7b60e01b81526001600160a01b038086166004830152602482018490528216604482015260640161078a565b50505050565b600a546001600160a01b0316631222cea6336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561084a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086e9190612a79565b61088b576040516311ebaa2760e11b815260040160405180910390fd5b6108958382611aaf565b604080516001600160401b0384168152602081018390526001600160a01b038516917f780140c12a9c67a3a283c7f237e9577318a108e1dfdeb57542a4655c89be38b79101610757565b60006108ea83610bb1565b821061091b5760405163295f44f760e21b81526001600160a01b03841660048201526024810183905260440161078a565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60145460ff161561096857604051631afb0ae560e01b815260040160405180910390fd5b600b546001600160a01b0316331461097f57600080fd5b600e54601080546001600160401b03610100909304831667ffffffffffffffff199091161790556012805442909216600160601b0267ffffffffffffffff60601b199092169190911790556109d13390565b601054604080516001600160401b0390921682524260208301526001600160a01b0392909216917fc0786675f6128bc0b8e886ad509fa0cc374ec4c3efe21e941920ea683bd1741d91015b60405180910390a2565b610a418383836040518060200160405280600081525061139b565b505050565b600e5460009060ff1615610a6c576040516282b42960e81b815260040160405180910390fd5b60008060008060008087806020019051810190610a899190612ae6565b600b80546001600160a01b0384166001600160a01b0319909116179055949a50929850909650945092509050610adc81600a80546001600160a01b039092166001600160a01b0319909216919091179055565b8551610aef90600c9060208901906124ba565b508451610b0390600d9060208801906124ba565b50610b0e8484611ac9565b5050600e805460ff191660019081179091559695505050505050565b6000610b3560085490565b8210610b5e5760405163295f44f760e21b8152600060048201526024810183905260440161078a565b60088281548110610b7157610b71612bb2565b90600052602060002001549050919050565b600b546001600160a01b03163314610b9a57600080fd5b610ba381611af0565b50565b60006105a182611959565b60006001600160a01b038216610bdd576040516322718ad960e21b81526000600482015260240161078a565b506001600160a01b031660009081526003602052604090205490565b60145460009060ff1615610c2057604051631afb0ae560e01b815260040160405180910390fd5b60105484906001600160401b031615801590610c635750601054600e546001600160401b0390911690610c619061010090046001600160e01b031683612bde565b115b15610c81576040516352df9fe560e01b815260040160405180910390fd5b60125442600160201b9091046001600160401b031611801590610cb6575060125442600160601b9091046001600160401b0316115b610cd357604051630fe219dd60e21b815260040160405180910390fd5b600a546001600160a01b0316631222cea6336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610d29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4d9190612a79565b610d6a576040516311ebaa2760e11b815260040160405180910390fd5b610de0848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506013546040516bffffffffffffffffffffffff1960608d901b166020820152909250603401905060405160208183030381529060405280519060200120611b03565b610dfd576040516346cabb7560e01b815260040160405180910390fd5b610e078686611bb2565b601154600e546040516101009091046001600160e01b0316815286906001600160a01b038916907f5bc97d73357ac0d035d4b9268a69240988a5776b8a4fcced3dbc223960123f409060200160405180910390a45050600e5461010090046001600160e01b0316949350505050565b60145460ff1615610e9a57604051631afb0ae560e01b815260040160405180910390fd5b600b546001600160a01b03163314610eb157600080fd5b601381905560405181907fac0e7be7f0391f6f84d2d6c5c9300942e4d7e7a79629f63f0078050c21300d9e90600090a250565b60145460009060ff1615610f0b57604051631afb0ae560e01b815260040160405180910390fd5b60105482906001600160401b031615801590610f4e5750601054600e546001600160401b0390911690610f4c9061010090046001600160e01b031683612bde565b115b15610f6c576040516352df9fe560e01b815260040160405180910390fd5b60125442600160201b9091046001600160401b031611801590610fa1575060125442600160601b9091046001600160401b0316115b610fbe57604051630fe219dd60e21b815260040160405180910390fd5b600a546001600160a01b0316631222cea6336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611014573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110389190612a79565b611055576040516311ebaa2760e11b815260040160405180910390fd5b60135415611075576040516282b42960e81b815260040160405180910390fd5b61107f8484611bb2565b601154600e546040516101009091046001600160e01b0316815284906001600160a01b038716907f5bc97d73357ac0d035d4b9268a69240988a5776b8a4fcced3dbc223960123f409060200160405180910390a45050600e5461010090046001600160e01b031692915050565b60145460ff161561111057604051631afb0ae560e01b815260040160405180910390fd5b600b546001600160a01b0316331461112757600080fd5b601254600160201b90046001600160401b0316158015906111595750601254600160201b90046001600160401b031642115b1561117757604051630571129f60e51b815260040160405180910390fd5b60008180602001905181019061118d9190612c27565b9050428160a001516001600160401b03161115806111c557508060a001516001600160401b03168160c001516001600160401b031611155b806111d857506032816020015161ffff16115b806111ee575060408101516001600160a01b0316155b1561120c576040516371dff4bd60e11b815260040160405180910390fd5b604080516101208101825282516001600160401b0390811680835260208086015161ffff16908401819052858501516001600160a01b031694840185905260608087015190850181905260808088015163ffffffff1690860181905260a080890151861690870181905260c0808a015190961695870186905260e0808a01519088018190526000610100909801979097526010805469ffffffffffffffffffff1916909517600160401b909402939093177fffff0000000000000000000000000000000000000000ffffffffffffffffffff16600160501b90970296909617909255601191909155601280546bffffffffffffffffffffffff1916909417600160201b9091021767ffffffffffffffff60601b1916600160601b909102179091556013556014805460ff19169055336001600160a01b03167f7f5a7a2bf5c04c7c8759c017a2991abaf03db78e2595e806fe7b6add4dffe4b64260405161137591815260200190565b60405180910390a25050565b6060600180546105b690612a2f565b61066d338383611c6f565b6113a6848484610764565b6107ee3385858585611d0e565b60606113be82611959565b506000600d80546113ce90612a2f565b9050111561146857600d80546113e390612a2f565b80601f016020809104026020016040519081016040528092919081815260200182805461140f90612a2f565b801561145c5780601f106114315761010080835404028352916020019161145c565b820191906000526020600020905b81548152906001019060200180831161143f57829003601f168201915b50505050509050919050565b6000600c805461147790612a2f565b90501161149357604051806020016040528060008152506105a1565b600c61149e83611e39565b6040516020016114af929190612ceb565b60405160208183030381529060405292915050565b600b546000906001600160a01b031633146114de57600080fd5b60105482906001600160401b0316158015906115215750601054600e546001600160401b039091169061151f9061010090046001600160e01b031683612bde565b115b1561153f576040516352df9fe560e01b815260040160405180910390fd5b6115498484611f39565b5050600e5461010090046001600160e01b031692915050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600a546001600160a01b0316631222cea6336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156115e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160a9190612a79565b611627576040516311ebaa2760e11b815260040160405180910390fd5b60105483906001600160401b03161580159061166a5750601054600e546001600160401b03909116906116689061010090046001600160e01b031683612bde565b115b15611688576040516352df9fe560e01b815260040160405180910390fd5b60145460ff16156116ac57604051631afb0ae560e01b815260040160405180910390fd5b60125442600160201b9091046001600160401b0316118015906116e1575060125442600160601b9091046001600160401b0316115b6116fe57604051630fe219dd60e21b815260040160405180910390fd5b6010546001600160a01b03868116600160501b9092041614611732576040516282b42960e81b815260040160405180910390fd5b601154600090611743908690612da5565b9050808410156117695760405163c5a8df2f60e01b81526004810182905260240161078a565b6117738786611bb2565b604080518681526001600160401b03851660208201526001600160a01b038916917f66f7cec2cf267a0c2dec8f68fa7a926f730e7f5be0837f841ea91f9b4c6ced2b910160405180910390a250505050505050565b600b546001600160a01b031633146117df57600080fd5b805161066d90600d9060208401906124ba565b600b546001600160a01b0316331461180957600080fd5b6001600160a01b03811661182f576040516282b42960e81b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b03831617905550565b60145460ff161561187157604051631afb0ae560e01b815260040160405180910390fd5b600b546001600160a01b0316331461188857600080fd5b601254600160601b90046001600160401b03164211156118bb57604051631060d8c160e11b815260040160405180910390fd5b6014805460ff191660011790556118cf3390565b6001600160a01b03167f3cf0fddeb2fbf69861d5f13d66be17516300342ce630d94fb7ea3388c0c27dce42604051610a1c91815260200190565b60006001600160e01b031982166380ac58cd60e01b148061193a57506001600160e01b03198216635b5e139f60e01b145b806105a157506301ffc9a760e01b6001600160e01b03198316146105a1565b6000818152600260205260408120546001600160a01b0316806105a157604051637e27328960e01b81526004810184905260240161078a565b610a418383836001611fe7565b60006119ae60008360006119da565b90506001600160a01b03811661066d57604051637e27328960e01b81526004810183905260240161078a565b6000806119e88585856120ed565b90506001600160a01b038116611a4557611a4084600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611a68565b846001600160a01b0316816001600160a01b031614611a6857611a6881856121e6565b6001600160a01b038516611a8457611a7f84612277565b611aa7565b846001600160a01b0316816001600160a01b031614611aa757611aa78585612326565b949350505050565b61066d828260405180602001604052806000815250612376565b8151611adc9060009060208501906124ba565b508051610a419060019060208401906124ba565b805161066d90600c9060208401906124ba565b600081815b8551811015611ba7576000868281518110611b2557611b25612bb2565b60200260200101519050808311611b67576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250611b94565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080611b9f81612dc4565b915050611b08565b509092149392505050565b80600003611bd2576040516282b42960e81b815260040160405180910390fd5b60125463ffffffff1615801590611c1657506012546001600160a01b0383166000908152600f602052604090205463ffffffff90911690611c14908390612bde565b115b15611c3457604051631722816d60e01b815260040160405180910390fd5b611c3e8282611f39565b6001600160a01b0382166000908152600f602052604081208054839290611c66908490612bde565b90915550505050565b6001600160a01b038216611ca157604051630b61174360e31b81526001600160a01b038316600482015260240161078a565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0383163b15611e3257604051630a85bd0160e11b81526001600160a01b0384169063150b7a0290611d50908890889087908790600401612ddd565b6020604051808303816000875af1925050508015611d8b575060408051601f3d908101601f19168201909252611d8891810190612e1a565b60015b611df4573d808015611db9576040519150601f19603f3d011682016040523d82523d6000602084013e611dbe565b606091505b508051600003611dec57604051633250574960e11b81526001600160a01b038516600482015260240161078a565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b14611e3057604051633250574960e11b81526001600160a01b038516600482015260240161078a565b505b5050505050565b606081600003611e605750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611e8a5780611e7481612dc4565b9150611e839050600a83612e4d565b9150611e64565b6000816001600160401b03811115611ea457611ea46126d8565b6040519080825280601f01601f191660200182016040528015611ece576020820181803683370190505b5090505b8415611aa757611ee3600183612e61565b9150611ef0600a86612e78565b611efb906030612bde565b60f81b818381518110611f1057611f10612bb2565b60200101906001600160f81b031916908160001a905350611f32600a86612e4d565b9450611ed2565b60005b81811015610a41576001600e60018282829054906101000a90046001600160e01b0316611f699190612e8c565b825461010092830a6001600160e01b0381810219909216929091160217909155600e54604080514660e01b6001600160e01b0319166020808301919091529390920490921b63ffffffff19166024820152611fdf9250859101604051602081830303815290604052611fda90612eb7565b611aaf565b600101611f3c565b8080611ffb57506001600160a01b03821615155b156120bd57600061200b84611959565b90506001600160a01b038316158015906120375750826001600160a01b0316816001600160a01b031614155b801561204a57506120488184611562565b155b156120735760405163a9fbf51f60e01b81526001600160a01b038416600482015260240161078a565b81156120bb5783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5050600090815260046020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600260205260408120546001600160a01b039081169083161561211a5761211a81848661238e565b6001600160a01b0381161561215857612137600085600080611fe7565b6001600160a01b038116600090815260036020526040902080546000190190555b6001600160a01b03851615612187576001600160a01b0385166000908152600360205260409020805460010190555b60008481526002602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b60006121f183610bb1565b600083815260076020526040902054909150808214612244576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061228990600190612e61565b600083815260096020526040812054600880549394509092849081106122b1576122b1612bb2565b9060005260206000200154905080600883815481106122d2576122d2612bb2565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061230a5761230a612edb565b6001900381819060005260206000200160009055905550505050565b6000600161233384610bb1565b61233d9190612e61565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b61238083836123f2565b610a41336000858585611d0e565b612399838383612457565b610a41576001600160a01b0383166123c757604051637e27328960e01b81526004810182905260240161078a565b60405163177e802f60e01b81526001600160a01b03831660048201526024810182905260440161078a565b6001600160a01b03821661241c57604051633250574960e11b81526000600482015260240161078a565b600061242a838360006119da565b90506001600160a01b03811615610a41576040516339e3563760e11b81526000600482015260240161078a565b60006001600160a01b03831615801590611aa75750826001600160a01b0316846001600160a01b0316148061249157506124918484611562565b80611aa75750506000908152600460205260409020546001600160a01b03908116911614919050565b8280546124c690612a2f565b90600052602060002090601f0160209004810192826124e8576000855561252e565b82601f1061250157805160ff191683800117855561252e565b8280016001018555821561252e579182015b8281111561252e578251825591602001919060010190612513565b5061253a92915061253e565b5090565b5b8082111561253a576000815560010161253f565b6001600160e01b031981168114610ba357600080fd5b60006020828403121561257b57600080fd5b813561258681612553565b9392505050565b60005b838110156125a8578181015183820152602001612590565b838111156107ee5750506000910152565b600081518084526125d181602086016020860161258d565b601f01601f19169290920160200192915050565b60208152600061258660208301846125b9565b60006020828403121561260a57600080fd5b5035919050565b6001600160a01b0381168114610ba357600080fd5b6000806040838503121561263957600080fd5b823561264481612611565b946020939093013593505050565b6001600160401b0381168114610ba357600080fd5b60008060006060848603121561267c57600080fd5b833561268781612611565b9250602084013561269781612652565b929592945050506040919091013590565b6000806000606084860312156126bd57600080fd5b83356126c881612611565b9250602084013561269781612611565b634e487b7160e01b600052604160045260246000fd5b60405161012081016001600160401b0381118282101715612711576127116126d8565b60405290565b604051601f8201601f191681016001600160401b038111828210171561273f5761273f6126d8565b604052919050565b60006001600160401b03821115612760576127606126d8565b50601f01601f191660200190565b600061278161277c84612747565b612717565b905082815283838301111561279557600080fd5b828260208301376000602084830101529392505050565b600082601f8301126127bd57600080fd5b6125868383356020850161276e565b6000602082840312156127de57600080fd5b81356001600160401b038111156127f457600080fd5b611aa7848285016127ac565b60006020828403121561281257600080fd5b81356001600160401b0381111561282857600080fd5b8201601f8101841361283957600080fd5b611aa78482356020840161276e565b60006020828403121561285a57600080fd5b813561258681612611565b6000806000806060858703121561287b57600080fd5b843561288681612611565b93506020850135925060408501356001600160401b03808211156128a957600080fd5b818701915087601f8301126128bd57600080fd5b8135818111156128cc57600080fd5b8860208260051b85010111156128e157600080fd5b95989497505060200194505050565b8015158114610ba357600080fd5b6000806040838503121561291157600080fd5b823561291c81612611565b9150602083013561292c816128f0565b809150509250929050565b6000806000806080858703121561294d57600080fd5b843561295881612611565b9350602085013561296881612611565b92506040850135915060608501356001600160401b0381111561298a57600080fd5b612996878288016127ac565b91505092959194509250565b600080604083850312156129b557600080fd5b82356129c081612611565b9150602083013561292c81612611565b600080600080600060a086880312156129e857600080fd5b85356129f381612611565b94506020860135612a0381612611565b935060408601359250606086013591506080860135612a2181612652565b809150509295509295909350565b600181811c90821680612a4357607f821691505b602082108103612a6357634e487b7160e01b600052602260045260246000fd5b50919050565b8051612a74816128f0565b919050565b600060208284031215612a8b57600080fd5b8151612586816128f0565b600082601f830112612aa757600080fd5b8151612ab561277c82612747565b818152846020838601011115612aca57600080fd5b611aa782602083016020870161258d565b8051612a7481612611565b60008060008060008060c08789031215612aff57600080fd5b86516001600160401b0380821115612b1657600080fd5b612b228a838b01612a96565b97506020890151915080821115612b3857600080fd5b612b448a838b01612a96565b96506040890151915080821115612b5a57600080fd5b612b668a838b01612a96565b95506060890151915080821115612b7c57600080fd5b50612b8989828a01612a96565b935050612b9860808801612adb565b9150612ba660a08801612adb565b90509295509295509295565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115612bf157612bf1612bc8565b500190565b8051612a7481612652565b805161ffff81168114612a7457600080fd5b805163ffffffff81168114612a7457600080fd5b60006101208284031215612c3a57600080fd5b612c426126ee565b612c4b83612bf6565b8152612c5960208401612c01565b6020820152612c6a60408401612adb565b604082015260608301516060820152612c8560808401612c13565b6080820152612c9660a08401612bf6565b60a0820152612ca760c08401612bf6565b60c082015260e083015160e0820152610100612cc4818501612a69565b908201529392505050565b60008151612ce181856020860161258d565b9290920192915050565b600080845481600182811c915080831680612d0757607f831692505b60208084108203612d2657634e487b7160e01b86526022600452602486fd5b818015612d3a5760018114612d4b57612d78565b60ff19861689528489019650612d78565b60008b81526020902060005b86811015612d705781548b820152908501908301612d57565b505084890196505b505050505050612d9c612d8b8286612ccf565b64173539b7b760d91b815260050190565b95945050505050565b6000816000190483118215151615612dbf57612dbf612bc8565b500290565b600060018201612dd657612dd6612bc8565b5060010190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612e10908301846125b9565b9695505050505050565b600060208284031215612e2c57600080fd5b815161258681612553565b634e487b7160e01b600052601260045260246000fd5b600082612e5c57612e5c612e37565b500490565b600082821015612e7357612e73612bc8565b500390565b600082612e8757612e87612e37565b500690565b60006001600160e01b03828116848216808303821115612eae57612eae612bc8565b01949350505050565b80516020808301519190811015612a635760001960209190910360031b1b16919050565b634e487b7160e01b600052603160045260246000fdfea264697066735822122016e41bd3afc47627ade1bea28828f34d9a6e6fcc4697d8f6e8bc24b3dbb6e4a464736f6c634300080d0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.