More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 915 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Unstake | 19385386 | 191 days ago | IN | 0 ETH | 0.00953278 | ||||
Unstake Multiple | 19153358 | 224 days ago | IN | 0 ETH | 0.00289951 | ||||
Unstake | 18897669 | 260 days ago | IN | 0 ETH | 0.00131817 | ||||
Unstake | 18897668 | 260 days ago | IN | 0 ETH | 0.00163197 | ||||
Unstake | 18811327 | 272 days ago | IN | 0 ETH | 0.00284129 | ||||
Unstake | 18538324 | 310 days ago | IN | 0 ETH | 0.00297358 | ||||
Unstake | 18304336 | 343 days ago | IN | 0 ETH | 0.00065366 | ||||
Unstake | 18304329 | 343 days ago | IN | 0 ETH | 0.00058555 | ||||
Unstake | 18304320 | 343 days ago | IN | 0 ETH | 0.00075174 | ||||
Unstake | 18304309 | 343 days ago | IN | 0 ETH | 0.00097353 | ||||
Unstake | 18238503 | 352 days ago | IN | 0 ETH | 0.00085999 | ||||
Unstake | 18208739 | 356 days ago | IN | 0 ETH | 0.00086627 | ||||
Unstake | 18198032 | 358 days ago | IN | 0 ETH | 0.00073214 | ||||
Unstake | 18198003 | 358 days ago | IN | 0 ETH | 0.00087144 | ||||
Unstake | 18155274 | 364 days ago | IN | 0 ETH | 0.00081181 | ||||
Unstake | 18097729 | 372 days ago | IN | 0 ETH | 0.00137773 | ||||
Unstake | 18091174 | 373 days ago | IN | 0 ETH | 0.00125019 | ||||
Unstake | 18091167 | 373 days ago | IN | 0 ETH | 0.00156465 | ||||
Unstake | 18090947 | 373 days ago | IN | 0 ETH | 0.00121323 | ||||
Unstake | 18090944 | 373 days ago | IN | 0 ETH | 0.00128769 | ||||
Unstake | 18090941 | 373 days ago | IN | 0 ETH | 0.0012171 | ||||
Unstake | 18090937 | 373 days ago | IN | 0 ETH | 0.00135416 | ||||
Unstake | 18090935 | 373 days ago | IN | 0 ETH | 0.00135617 | ||||
Unstake | 18090933 | 373 days ago | IN | 0 ETH | 0.00135393 | ||||
Unstake | 18090929 | 373 days ago | IN | 0 ETH | 0.00130889 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
TheShrine
Compiler Version
v0.8.12+commit.f00d7308
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.12; import "./FxBaseRootTunnel.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /// @title TheShrine /// @author rektt (https://twitter.com/rekttdoteth) contract TheShrine is FxBaseRootTunnel, Ownable { /* ========== STORAGE ========== */ mapping(address => mapping(address => uint256[])) private addressToContractStakedIds; mapping(address => mapping(uint256 => uint256)) public contractToTokenIndex; mapping(address => mapping(uint256 => address)) public contractToTokenStaker; mapping(address => bool) public whitelistedContract; //contract > tokenId > lockup period in delta times mapping(address => mapping(uint256 => uint256)) public unlockOn; bool public paused = true; /* ========== CONSTRUCTOR ========== */ constructor( address hakiERC721, address sekiraERC721, address checkpointManager, address fxRoot ) FxBaseRootTunnel(checkpointManager, fxRoot) { whitelistedContract[hakiERC721] = true; whitelistedContract[sekiraERC721] = true; } /* ========== EVENTS ========== */ //@dev Emitted when `tokenId` token is staked/N. event Stake(address user, address collection, uint256 tokenId, bool stake); /* ========== ERRORS ========== */ error CollectionNotWhitelisted(address collection); error NotStaker(address attemptedStaker, address actualStaker); error TokenLocked(uint256 tokenId, uint256 currentTime, uint256 unlockTime); error Paused(); /* ========== MODIFIERS ========== */ modifier notPaused() { if (paused) revert Paused(); _; } /* ========== OWNER FUNCTIONS ========== */ /// @notice Set the contract address for all contract instances. /// @param contracts The contract address to be whitelisted. /// @param state The wl state. function setContract(address[] calldata contracts, bool state) external onlyOwner { for (uint256 i = 0; i < contracts.length; i++) { whitelistedContract[contracts[i]] = state; } } /// @notice Pauses staking and unstaking function togglePause() external onlyOwner { paused = !paused; } /* ========== PUBLIC READ ========== */ /// @notice For collab.land to give a role based on staking status / in wallet NFT function balanceOf(address owner) external view returns (uint256) { address hakiContract = 0x7887f40763aCe5f0e8320181FD5B42776D35B1FF; return addressToContractStakedIds[owner][hakiContract].length + ERC721(hakiContract).balanceOf(owner); } function getStakedIds(address user, address collection) external view returns (uint256[] memory stakedIds) { return (addressToContractStakedIds[user][collection]); } /* ========== PUBLIC MUTATIVE ========== */ function stake( uint256 tokenId, address collection, uint256 lockupDays ) external notPaused { if (!whitelistedContract[collection]) revert CollectionNotWhitelisted({collection: collection}); contractToTokenStaker[collection][tokenId] = msg.sender; contractToTokenIndex[collection][tokenId] = addressToContractStakedIds[ msg.sender ][collection].length; addressToContractStakedIds[msg.sender][collection].push(tokenId); uint256 lockupDelta = lockupDays * 1 days; unlockOn[collection][tokenId] = block.timestamp + lockupDelta; ERC721(collection).transferFrom(msg.sender, address(this), tokenId); _sendMessageToChild( abi.encode(msg.sender, collection, tokenId, lockupDelta, true) ); emit Stake(msg.sender, collection, tokenId, true); } function unstake(uint256 tokenId, address collection) external notPaused { if (contractToTokenStaker[collection][tokenId] != msg.sender) revert NotStaker({ attemptedStaker: msg.sender, actualStaker: contractToTokenStaker[collection][tokenId] }); if (unlockOn[collection][tokenId] > block.timestamp) revert TokenLocked({ tokenId: tokenId, currentTime: block.timestamp, unlockTime: unlockOn[collection][tokenId] }); if (addressToContractStakedIds[msg.sender][collection].length > 1) { uint256 lastTokenId = addressToContractStakedIds[msg.sender][ collection ][addressToContractStakedIds[msg.sender][collection].length - 1]; uint256 lastTokenIndexNew = contractToTokenIndex[collection][ tokenId ]; addressToContractStakedIds[msg.sender][collection][ lastTokenIndexNew ] = lastTokenId; addressToContractStakedIds[msg.sender][collection].pop(); contractToTokenIndex[collection][lastTokenId] = lastTokenIndexNew; } else { addressToContractStakedIds[msg.sender][collection].pop(); } delete contractToTokenStaker[collection][tokenId]; delete contractToTokenIndex[collection][tokenId]; ERC721(collection).transferFrom(address(this), msg.sender, tokenId); _sendMessageToChild( abi.encode(msg.sender, collection, tokenId, 0, false) ); emit Stake(msg.sender, collection, tokenId, false); } function stakeMultiple( uint256[] calldata tokenIds, address collection, uint256[] calldata lockupDays ) external notPaused { if (!whitelistedContract[collection]) revert CollectionNotWhitelisted({collection: collection}); require( tokenIds.length == lockupDays.length, "tokenIds & lockupDays missmatch" ); for (uint256 i = 0; i < tokenIds.length; i++) { contractToTokenIndex[collection][ tokenIds[i] ] = addressToContractStakedIds[msg.sender][collection].length; contractToTokenStaker[collection][tokenIds[i]] = msg.sender; addressToContractStakedIds[msg.sender][collection].push( tokenIds[i] ); uint256 lockupDelta = lockupDays[i] * 1 days; unlockOn[collection][tokenIds[i]] = block.timestamp + lockupDelta; ERC721(collection).transferFrom( msg.sender, address(this), tokenIds[i] ); _sendMessageToChild( abi.encode( msg.sender, collection, tokenIds[i], lockupDelta, true ) ); emit Stake(msg.sender, collection, tokenIds[i], true); } } function unstakeMultiple(uint256[] calldata tokenIds, address collection) external notPaused { for (uint256 i = 0; i < tokenIds.length; i++) { if (contractToTokenStaker[collection][tokenIds[i]] != msg.sender) revert NotStaker({ attemptedStaker: msg.sender, actualStaker: contractToTokenStaker[collection][tokenIds[i]] }); if (unlockOn[collection][tokenIds[i]] > block.timestamp) revert TokenLocked({ tokenId: tokenIds[i], currentTime: block.timestamp, unlockTime: unlockOn[collection][tokenIds[i]] }); if (addressToContractStakedIds[msg.sender][collection].length > 1) { uint256 lastTokenId = addressToContractStakedIds[msg.sender][ collection ][ addressToContractStakedIds[msg.sender][collection].length - 1 ]; uint256 lastTokenIndexNew = contractToTokenIndex[collection][ tokenIds[i] ]; addressToContractStakedIds[msg.sender][collection][ lastTokenIndexNew ] = lastTokenId; addressToContractStakedIds[msg.sender][collection].pop(); contractToTokenIndex[collection][ lastTokenId ] = lastTokenIndexNew; } else { addressToContractStakedIds[msg.sender][collection].pop(); } delete contractToTokenStaker[collection][tokenIds[i]]; delete contractToTokenIndex[collection][tokenIds[i]]; ERC721(collection).transferFrom( address(this), msg.sender, tokenIds[i] ); _sendMessageToChild( abi.encode(msg.sender, collection, tokenIds[i], 0, false) ); emit Stake(msg.sender, collection, tokenIds[i], false); } } /* ========== INTERNAL FUNCTIONS ========== */ function _processMessageFromChild(bytes memory message) internal override { // n/a } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {RLPReader} from "./RLPReader.sol"; import {MerklePatriciaProof} from "./MerklePatriciaProof.sol"; import {Merkle} from "./Merkle.sol"; import "./ExitPayloadReader.sol"; interface IFxStateSender { function sendMessageToChild(address _receiver, bytes calldata _data) external; } contract ICheckpointManager { struct HeaderBlock { bytes32 root; uint256 start; uint256 end; uint256 createdAt; address proposer; } /** * @notice mapping of checkpoint header numbers to block details * @dev These checkpoints are submited by plasma contracts */ mapping(uint256 => HeaderBlock) public headerBlocks; } abstract contract FxBaseRootTunnel { using RLPReader for RLPReader.RLPItem; using Merkle for bytes32; using ExitPayloadReader for bytes; using ExitPayloadReader for ExitPayloadReader.ExitPayload; using ExitPayloadReader for ExitPayloadReader.Log; using ExitPayloadReader for ExitPayloadReader.LogTopics; using ExitPayloadReader for ExitPayloadReader.Receipt; // keccak256(MessageSent(bytes)) bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036; // state sender contract IFxStateSender public fxRoot; // root chain manager ICheckpointManager public checkpointManager; // child tunnel contract which receives and sends messages address public fxChildTunnel; // storage to avoid duplicate exits mapping(bytes32 => bool) public processedExits; constructor(address _checkpointManager, address _fxRoot) { checkpointManager = ICheckpointManager(_checkpointManager); fxRoot = IFxStateSender(_fxRoot); } // set fxChildTunnel if not set already function setFxChildTunnel(address _fxChildTunnel) public virtual { require(fxChildTunnel == address(0x0), "FxBaseRootTunnel: CHILD_TUNNEL_ALREADY_SET"); fxChildTunnel = _fxChildTunnel; } /** * @notice Send bytes message to Child Tunnel * @param message bytes message that will be sent to Child Tunnel * some message examples - * abi.encode(tokenId); * abi.encode(tokenId, tokenMetadata); * abi.encode(messageType, messageData); */ function _sendMessageToChild(bytes memory message) internal { fxRoot.sendMessageToChild(fxChildTunnel, message); } function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) { ExitPayloadReader.ExitPayload memory payload = inputData.toExitPayload(); bytes memory branchMaskBytes = payload.getBranchMaskAsBytes(); uint256 blockNumber = payload.getBlockNumber(); // checking if exit has already been processed // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex) bytes32 exitHash = keccak256( abi.encodePacked( blockNumber, // first 2 nibbles are dropped while generating nibble array // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only) // so converting to nibble array and then hashing it MerklePatriciaProof._getNibbleArray(branchMaskBytes), payload.getReceiptLogIndex() ) ); require(processedExits[exitHash] == false, "FxRootTunnel: EXIT_ALREADY_PROCESSED"); processedExits[exitHash] = true; ExitPayloadReader.Receipt memory receipt = payload.getReceipt(); ExitPayloadReader.Log memory log = receipt.getLog(); // check child tunnel require(fxChildTunnel == log.getEmitter(), "FxRootTunnel: INVALID_FX_CHILD_TUNNEL"); bytes32 receiptRoot = payload.getReceiptRoot(); // verify receipt inclusion require( MerklePatriciaProof.verify(receipt.toBytes(), branchMaskBytes, payload.getReceiptProof(), receiptRoot), "FxRootTunnel: INVALID_RECEIPT_PROOF" ); // verify checkpoint inclusion _checkBlockMembershipInCheckpoint( blockNumber, payload.getBlockTime(), payload.getTxRoot(), receiptRoot, payload.getHeaderNumber(), payload.getBlockProof() ); ExitPayloadReader.LogTopics memory topics = log.getTopics(); require( bytes32(topics.getField(0).toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig "FxRootTunnel: INVALID_SIGNATURE" ); // received message data bytes memory message = abi.decode(log.getData(), (bytes)); // event decodes params again, so decoding bytes to get message return message; } function _checkBlockMembershipInCheckpoint( uint256 blockNumber, uint256 blockTime, bytes32 txRoot, bytes32 receiptRoot, uint256 headerNumber, bytes memory blockProof ) private view returns (uint256) { (bytes32 headerRoot, uint256 startBlock, , uint256 createdAt, ) = checkpointManager.headerBlocks(headerNumber); require( keccak256(abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)).checkMembership( blockNumber - startBlock, headerRoot, blockProof ), "FxRootTunnel: INVALID_HEADER" ); return createdAt; } /** * @notice receive message from L2 to L1, validated by proof * @dev This function verifies if the transaction actually happened on child chain * * @param inputData RLP encoded data of the reference tx containing following list of fields * 0 - headerNumber - Checkpoint header block number containing the reference tx * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root * 2 - blockNumber - Block number containing the reference tx on child chain * 3 - blockTime - Reference tx block time * 4 - txRoot - Transactions root of block * 5 - receiptRoot - Receipts root of block * 6 - receipt - Receipt of the reference transaction * 7 - receiptProof - Merkle proof of the reference receipt * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree * 9 - receiptLogIndex - Log Index to read from the receipt */ function receiveMessage(bytes memory inputData) public virtual { bytes memory message = _validateAndExtractMessage(inputData); _processMessageFromChild(message); } /** * @notice Process message received from Child Tunnel * @dev function needs to be implemented to handle message as per requirement * This is called by onStateReceive function. * Since it is called via a system call, any event will not be emitted during its execution. * @param message bytes message that was sent from Child Tunnel */ function _processMessageFromChild(bytes memory message) internal virtual; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _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 override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(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 override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - 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, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * 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 virtual { _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); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @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 virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), 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 virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
/* * @author Hamdi Allam [email protected] * Please reach out with any questions or concerns */ pragma solidity ^0.8.0; library RLPReader { uint8 constant STRING_SHORT_START = 0x80; uint8 constant STRING_LONG_START = 0xb8; uint8 constant LIST_SHORT_START = 0xc0; uint8 constant LIST_LONG_START = 0xf8; uint8 constant WORD_SIZE = 32; struct RLPItem { uint256 len; uint256 memPtr; } struct Iterator { RLPItem item; // Item that's being iterated over. uint256 nextPtr; // Position of the next item in the list. } /* * @dev Returns the next element in the iteration. Reverts if it has not next element. * @param self The iterator. * @return The next element in the iteration. */ function next(Iterator memory self) internal pure returns (RLPItem memory) { require(hasNext(self)); uint256 ptr = self.nextPtr; uint256 itemLength = _itemLength(ptr); self.nextPtr = ptr + itemLength; return RLPItem(itemLength, ptr); } /* * @dev Returns true if the iteration has more elements. * @param self The iterator. * @return true if the iteration has more elements. */ function hasNext(Iterator memory self) internal pure returns (bool) { RLPItem memory item = self.item; return self.nextPtr < item.memPtr + item.len; } /* * @param item RLP encoded bytes */ function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) { uint256 memPtr; assembly { memPtr := add(item, 0x20) } return RLPItem(item.length, memPtr); } /* * @dev Create an iterator. Reverts if item is not a list. * @param self The RLP item. * @return An 'Iterator' over the item. */ function iterator(RLPItem memory self) internal pure returns (Iterator memory) { require(isList(self)); uint256 ptr = self.memPtr + _payloadOffset(self.memPtr); return Iterator(self, ptr); } /* * @param item RLP encoded bytes */ function rlpLen(RLPItem memory item) internal pure returns (uint256) { return item.len; } /* * @param item RLP encoded bytes */ function payloadLen(RLPItem memory item) internal pure returns (uint256) { return item.len - _payloadOffset(item.memPtr); } /* * @param item RLP encoded list in bytes */ function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) { require(isList(item)); uint256 items = numItems(item); RLPItem[] memory result = new RLPItem[](items); uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr); uint256 dataLen; for (uint256 i = 0; i < items; i++) { dataLen = _itemLength(memPtr); result[i] = RLPItem(dataLen, memPtr); memPtr = memPtr + dataLen; } return result; } // @return indicator whether encoded payload is a list. negate this function call for isData. function isList(RLPItem memory item) internal pure returns (bool) { if (item.len == 0) return false; uint8 byte0; uint256 memPtr = item.memPtr; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < LIST_SHORT_START) return false; return true; } /* * @dev A cheaper version of keccak256(toRlpBytes(item)) that avoids copying memory. * @return keccak256 hash of RLP encoded bytes. */ function rlpBytesKeccak256(RLPItem memory item) internal pure returns (bytes32) { uint256 ptr = item.memPtr; uint256 len = item.len; bytes32 result; assembly { result := keccak256(ptr, len) } return result; } function payloadLocation(RLPItem memory item) internal pure returns (uint256, uint256) { uint256 offset = _payloadOffset(item.memPtr); uint256 memPtr = item.memPtr + offset; uint256 len = item.len - offset; // data length return (memPtr, len); } /* * @dev A cheaper version of keccak256(toBytes(item)) that avoids copying memory. * @return keccak256 hash of the item payload. */ function payloadKeccak256(RLPItem memory item) internal pure returns (bytes32) { (uint256 memPtr, uint256 len) = payloadLocation(item); bytes32 result; assembly { result := keccak256(memPtr, len) } return result; } /** RLPItem conversions into data types **/ // @returns raw rlp encoding in bytes function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) { bytes memory result = new bytes(item.len); if (result.length == 0) return result; uint256 ptr; assembly { ptr := add(0x20, result) } copy(item.memPtr, ptr, item.len); return result; } // any non-zero byte is considered true function toBoolean(RLPItem memory item) internal pure returns (bool) { require(item.len == 1); uint256 result; uint256 memPtr = item.memPtr; assembly { result := byte(0, mload(memPtr)) } return result == 0 ? false : true; } function toAddress(RLPItem memory item) internal pure returns (address) { // 1 byte for the length prefix require(item.len == 21); return address(uint160(toUint(item))); } function toUint(RLPItem memory item) internal pure returns (uint256) { require(item.len > 0 && item.len <= 33); uint256 offset = _payloadOffset(item.memPtr); uint256 len = item.len - offset; uint256 result; uint256 memPtr = item.memPtr + offset; assembly { result := mload(memPtr) // shfit to the correct location if neccesary if lt(len, 32) { result := div(result, exp(256, sub(32, len))) } } return result; } // enforces 32 byte length function toUintStrict(RLPItem memory item) internal pure returns (uint256) { // one byte prefix require(item.len == 33); uint256 result; uint256 memPtr = item.memPtr + 1; assembly { result := mload(memPtr) } return result; } function toBytes(RLPItem memory item) internal pure returns (bytes memory) { require(item.len > 0); uint256 offset = _payloadOffset(item.memPtr); uint256 len = item.len - offset; // data length bytes memory result = new bytes(len); uint256 destPtr; assembly { destPtr := add(0x20, result) } copy(item.memPtr + offset, destPtr, len); return result; } /* * Private Helpers */ // @return number of payload items inside an encoded list. function numItems(RLPItem memory item) private pure returns (uint256) { if (item.len == 0) return 0; uint256 count = 0; uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr); uint256 endPtr = item.memPtr + item.len; while (currPtr < endPtr) { currPtr = currPtr + _itemLength(currPtr); // skip over an item count++; } return count; } // @return entire rlp item byte length function _itemLength(uint256 memPtr) private pure returns (uint256) { uint256 itemLen; uint256 byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) itemLen = 1; else if (byte0 < STRING_LONG_START) itemLen = byte0 - STRING_SHORT_START + 1; else if (byte0 < LIST_SHORT_START) { assembly { let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is memPtr := add(memPtr, 1) // skip over the first byte /* 32 byte word size */ let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len itemLen := add(dataLen, add(byteLen, 1)) } } else if (byte0 < LIST_LONG_START) { itemLen = byte0 - LIST_SHORT_START + 1; } else { assembly { let byteLen := sub(byte0, 0xf7) memPtr := add(memPtr, 1) let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length itemLen := add(dataLen, add(byteLen, 1)) } } return itemLen; } // @return number of bytes until the data function _payloadOffset(uint256 memPtr) private pure returns (uint256) { uint256 byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) return 0; else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) return 1; else if (byte0 < LIST_SHORT_START) // being explicit return byte0 - (STRING_LONG_START - 1) + 1; else return byte0 - (LIST_LONG_START - 1) + 1; } /* * @param src Pointer to source * @param dest Pointer to destination * @param len Amount of memory to copy from the source */ function copy( uint256 src, uint256 dest, uint256 len ) private pure { if (len == 0) return; // copy as many word sizes as possible for (; len >= WORD_SIZE; len -= WORD_SIZE) { assembly { mstore(dest, mload(src)) } src += WORD_SIZE; dest += WORD_SIZE; } if (len == 0) return; // left over bytes. Mask is used to remove unwanted bytes from the word uint256 mask = 256**(WORD_SIZE - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) // zero out src let destpart := and(mload(dest), mask) // retrieve the bytes mstore(dest, or(destpart, srcpart)) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {RLPReader} from "./RLPReader.sol"; library MerklePatriciaProof { /* * @dev Verifies a merkle patricia proof. * @param value The terminating value in the trie. * @param encodedPath The path in the trie leading to value. * @param rlpParentNodes The rlp encoded stack of nodes. * @param root The root hash of the trie. * @return The boolean validity of the proof. */ function verify( bytes memory value, bytes memory encodedPath, bytes memory rlpParentNodes, bytes32 root ) internal pure returns (bool) { RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes); RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item); bytes memory currentNode; RLPReader.RLPItem[] memory currentNodeList; bytes32 nodeKey = root; uint256 pathPtr = 0; bytes memory path = _getNibbleArray(encodedPath); if (path.length == 0) { return false; } for (uint256 i = 0; i < parentNodes.length; i++) { if (pathPtr > path.length) { return false; } currentNode = RLPReader.toRlpBytes(parentNodes[i]); if (nodeKey != keccak256(currentNode)) { return false; } currentNodeList = RLPReader.toList(parentNodes[i]); if (currentNodeList.length == 17) { if (pathPtr == path.length) { if (keccak256(RLPReader.toBytes(currentNodeList[16])) == keccak256(value)) { return true; } else { return false; } } uint8 nextPathNibble = uint8(path[pathPtr]); if (nextPathNibble > 16) { return false; } nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[nextPathNibble])); pathPtr += 1; } else if (currentNodeList.length == 2) { uint256 traversed = _nibblesToTraverse(RLPReader.toBytes(currentNodeList[0]), path, pathPtr); if (pathPtr + traversed == path.length) { //leaf node if (keccak256(RLPReader.toBytes(currentNodeList[1])) == keccak256(value)) { return true; } else { return false; } } //extension node if (traversed == 0) { return false; } pathPtr += traversed; nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1])); } else { return false; } } } function _nibblesToTraverse( bytes memory encodedPartialPath, bytes memory path, uint256 pathPtr ) private pure returns (uint256) { uint256 len = 0; // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath // and slicedPath have elements that are each one hex character (1 nibble) bytes memory partialPath = _getNibbleArray(encodedPartialPath); bytes memory slicedPath = new bytes(partialPath.length); // pathPtr counts nibbles in path // partialPath.length is a number of nibbles for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) { bytes1 pathNibble = path[i]; slicedPath[i - pathPtr] = pathNibble; } if (keccak256(partialPath) == keccak256(slicedPath)) { len = partialPath.length; } else { len = 0; } return len; } // bytes b must be hp encoded function _getNibbleArray(bytes memory b) internal pure returns (bytes memory) { bytes memory nibbles = ""; if (b.length > 0) { uint8 offset; uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b)); if (hpNibble == 1 || hpNibble == 3) { nibbles = new bytes(b.length * 2 - 1); bytes1 oddNibble = _getNthNibbleOfBytes(1, b); nibbles[0] = oddNibble; offset = 1; } else { nibbles = new bytes(b.length * 2 - 2); offset = 0; } for (uint256 i = offset; i < nibbles.length; i++) { nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b); } } return nibbles; } function _getNthNibbleOfBytes(uint256 n, bytes memory str) private pure returns (bytes1) { return bytes1(n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library Merkle { function checkMembership( bytes32 leaf, uint256 index, bytes32 rootHash, bytes memory proof ) internal pure returns (bool) { require(proof.length % 32 == 0, "Invalid proof length"); uint256 proofHeight = proof.length / 32; // Proof of size n means, height of the tree is n+1. // In a tree of height n+1, max #leafs possible is 2 ^ n require(index < 2**proofHeight, "Leaf index is too big"); bytes32 proofElement; bytes32 computedHash = leaf; for (uint256 i = 32; i <= proof.length; i += 32) { assembly { proofElement := mload(add(proof, i)) } if (index % 2 == 0) { computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } index = index / 2; } return computedHash == rootHash; } }
pragma solidity ^0.8.0; import {RLPReader} from "./RLPReader.sol"; library ExitPayloadReader { using RLPReader for bytes; using RLPReader for RLPReader.RLPItem; uint8 constant WORD_SIZE = 32; struct ExitPayload { RLPReader.RLPItem[] data; } struct Receipt { RLPReader.RLPItem[] data; bytes raw; uint256 logIndex; } struct Log { RLPReader.RLPItem data; RLPReader.RLPItem[] list; } struct LogTopics { RLPReader.RLPItem[] data; } // copy paste of private copy() from RLPReader to avoid changing of existing contracts function copy( uint256 src, uint256 dest, uint256 len ) private pure { if (len == 0) return; // copy as many word sizes as possible for (; len >= WORD_SIZE; len -= WORD_SIZE) { assembly { mstore(dest, mload(src)) } src += WORD_SIZE; dest += WORD_SIZE; } // left over bytes. Mask is used to remove unwanted bytes from the word uint256 mask = 256**(WORD_SIZE - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) // zero out src let destpart := and(mload(dest), mask) // retrieve the bytes mstore(dest, or(destpart, srcpart)) } } function toExitPayload(bytes memory data) internal pure returns (ExitPayload memory) { RLPReader.RLPItem[] memory payloadData = data.toRlpItem().toList(); return ExitPayload(payloadData); } function getHeaderNumber(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[0].toUint(); } function getBlockProof(ExitPayload memory payload) internal pure returns (bytes memory) { return payload.data[1].toBytes(); } function getBlockNumber(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[2].toUint(); } function getBlockTime(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[3].toUint(); } function getTxRoot(ExitPayload memory payload) internal pure returns (bytes32) { return bytes32(payload.data[4].toUint()); } function getReceiptRoot(ExitPayload memory payload) internal pure returns (bytes32) { return bytes32(payload.data[5].toUint()); } function getReceipt(ExitPayload memory payload) internal pure returns (Receipt memory receipt) { receipt.raw = payload.data[6].toBytes(); RLPReader.RLPItem memory receiptItem = receipt.raw.toRlpItem(); if (receiptItem.isList()) { // legacy tx receipt.data = receiptItem.toList(); } else { // pop first byte before parsting receipt bytes memory typedBytes = receipt.raw; bytes memory result = new bytes(typedBytes.length - 1); uint256 srcPtr; uint256 destPtr; assembly { srcPtr := add(33, typedBytes) destPtr := add(0x20, result) } copy(srcPtr, destPtr, result.length); receipt.data = result.toRlpItem().toList(); } receipt.logIndex = getReceiptLogIndex(payload); return receipt; } function getReceiptProof(ExitPayload memory payload) internal pure returns (bytes memory) { return payload.data[7].toBytes(); } function getBranchMaskAsBytes(ExitPayload memory payload) internal pure returns (bytes memory) { return payload.data[8].toBytes(); } function getBranchMaskAsUint(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[8].toUint(); } function getReceiptLogIndex(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[9].toUint(); } // Receipt methods function toBytes(Receipt memory receipt) internal pure returns (bytes memory) { return receipt.raw; } function getLog(Receipt memory receipt) internal pure returns (Log memory) { RLPReader.RLPItem memory logData = receipt.data[3].toList()[receipt.logIndex]; return Log(logData, logData.toList()); } // Log methods function getEmitter(Log memory log) internal pure returns (address) { return RLPReader.toAddress(log.list[0]); } function getTopics(Log memory log) internal pure returns (LogTopics memory) { return LogTopics(log.list[1].toList()); } function getData(Log memory log) internal pure returns (bytes memory) { return log.list[2].toBytes(); } function toRlpBytes(Log memory log) internal pure returns (bytes memory) { return log.data.toRlpBytes(); } // LogTopics methods function getField(LogTopics memory topics, uint256 index) internal pure returns (RLPReader.RLPItem memory) { return topics.data[index]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 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 ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @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 caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 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: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../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 v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) 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 // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) 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 v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "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
[{"inputs":[{"internalType":"address","name":"hakiERC721","type":"address"},{"internalType":"address","name":"sekiraERC721","type":"address"},{"internalType":"address","name":"checkpointManager","type":"address"},{"internalType":"address","name":"fxRoot","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"collection","type":"address"}],"name":"CollectionNotWhitelisted","type":"error"},{"inputs":[{"internalType":"address","name":"attemptedStaker","type":"address"},{"internalType":"address","name":"actualStaker","type":"address"}],"name":"NotStaker","type":"error"},{"inputs":[],"name":"Paused","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"currentTime","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"}],"name":"TokenLocked","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"stake","type":"bool"}],"name":"Stake","type":"event"},{"inputs":[],"name":"SEND_MESSAGE_EVENT_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkpointManager","outputs":[{"internalType":"contract ICheckpointManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"contractToTokenIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"contractToTokenStaker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fxChildTunnel","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fxRoot","outputs":[{"internalType":"contract IFxStateSender","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"collection","type":"address"}],"name":"getStakedIds","outputs":[{"internalType":"uint256[]","name":"stakedIds","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"processedExits","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"inputData","type":"bytes"}],"name":"receiveMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"contracts","type":"address[]"},{"internalType":"bool","name":"state","type":"bool"}],"name":"setContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fxChildTunnel","type":"address"}],"name":"setFxChildTunnel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"lockupDays","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256[]","name":"lockupDays","type":"uint256[]"}],"name":"stakeMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"unlockOn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"collection","type":"address"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"address","name":"collection","type":"address"}],"name":"unstakeMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600a805460ff191660011790553480156200001e57600080fd5b506040516200354738038062003547833981016040819052620000419162000135565b600180546001600160a01b038085166001600160a01b0319928316179092556000805492841692909116919091179055620000836200007d3390565b620000c6565b50506001600160a01b039182166000908152600860205260408082208054600160ff19918216811790925593909416825290208054909116909117905562000192565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200013057600080fd5b919050565b600080600080608085870312156200014c57600080fd5b620001578562000118565b9350620001676020860162000118565b9250620001776040860162000118565b9150620001876060860162000118565b905092959194509250565b6133a580620001a26000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063715018a6116100c3578063c0857ba01161007c578063c0857ba014610339578063c4ae31681461034c578063ce55662314610354578063de9b771f1461037f578063f2fde38b14610392578063f953cec7146103a557600080fd5b8063715018a6146102d45780638381e182146102dc5780638da5cb5b146102ef578063972c492814610300578063a432080f14610313578063aea4e49e1461032657600080fd5b80635b3ccdd0116101155780635b3ccdd0146102565780635c975abb1461026b578063607f2d421461027857806362cd5c5a1461029b5780636e9c931c146102ae57806370a08231146102c157600080fd5b80630e387de614610152578063156768b51461018c57806328836fd7146101b757806334350ad2146101ea5780634404b5b914610236575b600080fd5b6101797f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b6040519081526020015b60405180910390f35b61017961019a366004612b79565b600660209081526000928352604080842090915290825290205481565b6101da6101c5366004612ba5565b60086020526000908152604090205460ff1681565b6040519015158152602001610183565b61021e6101f8366004612b79565b60076020908152600092835260408084209091529082529020546001600160a01b031681565b6040516001600160a01b039091168152602001610183565b610249610244366004612bc2565b6103b8565b6040516101839190612bfb565b610269610264366004612c8a565b610432565b005b600a546101da9060ff1681565b6101da610286366004612d0e565b60036020526000908152604090205460ff1681565b6102696102a9366004612d27565b6107c2565b6102696102bc366004612d7d565b610d15565b6101796102cf366004612ba5565b610ef4565b610269610fac565b6102696102ea366004612db5565b610fe2565b6004546001600160a01b031661021e565b60025461021e906001600160a01b031681565b610269610321366004612dda565b61138c565b610269610334366004612ba5565b611427565b60015461021e906001600160a01b031681565b6102696114b5565b610179610362366004612b79565b600960209081526000928352604080842090915290825290205481565b60005461021e906001600160a01b031681565b6102696103a0366004612ba5565b6114f3565b6102696103b3366004612e97565b61158e565b6001600160a01b03808316600090815260056020908152604080832093851683529281529082902080548351818402810184019094528084526060939283018282801561042457602002820191906000526020600020905b815481526020019060010190808311610410575b505050505090505b92915050565b600a5460ff1615610456576040516313d0ff5960e31b815260040160405180910390fd5b6001600160a01b03831660009081526008602052604090205460ff1661049f576040516335dbc35160e21b81526001600160a01b03841660048201526024015b60405180910390fd5b8381146104ee5760405162461bcd60e51b815260206004820152601f60248201527f746f6b656e4964732026206c6f636b757044617973206d6973736d61746368006044820152606401610496565b60005b848110156107ba573360009081526005602090815260408083206001600160a01b038816845282528083205460069092528220909188888581811061053857610538612f16565b905060200201358152602001908152602001600020819055503360076000866001600160a01b03166001600160a01b03168152602001908152602001600020600088888581811061058b5761058b612f16565b60209081029290920135835250818101929092526040908101600090812080546001600160a01b0319166001600160a01b039586161790553381526005835281812093881681529290915290208686838181106105ea576105ea612f16565b835460018101855560009485526020808620920293909301359201919091555083838381811061061c5761061c612f16565b90506020020135620151806106319190612f42565b905061063d8142612f61565b6001600160a01b03861660009081526009602052604081209089898681811061066857610668612f16565b90506020020135815260200190815260200160002081905550846001600160a01b03166323b872dd33308a8a878181106106a4576106a4612f16565b905060200201356040518463ffffffff1660e01b81526004016106c993929190612f79565b600060405180830381600087803b1580156106e357600080fd5b505af11580156106f7573d6000803e3d6000fd5b50505050610763338689898681811061071257610712612f16565b604080516001600160a01b039687166020808301919091529590961690860152909202013560608301525060808101839052600160a082015260c0015b60405160208183030381529060405261159e565b600080516020613350833981519152338689898681811061078657610786612f16565b90506020020135600160405161079f9493929190612f9d565b60405180910390a150806107b281612fc6565b9150506104f1565b505050505050565b600a5460ff16156107e6576040516313d0ff5960e31b815260040160405180910390fd5b60005b82811015610d0f576001600160a01b0382166000908152600760205260408120339186868581811061081d5761081d612f16565b60209081029290920135835250810191909152604001600020546001600160a01b0316146108b8576001600160a01b0382166000908152600760205260408120339186868581811061087157610871612f16565b60209081029290920135835250810191909152604090810160002054905163e837add960e01b81526001600160a01b03928316600482015291166024820152604401610496565b6001600160a01b038216600090815260096020526040812042918686858181106108e4576108e4612f16565b9050602002013581526020019081526020016000205411156109965783838281811061091257610912612f16565b905060200201354260096000856001600160a01b03166001600160a01b03168152602001908152602001600020600087878681811061095357610953612f16565b9050602002013581526020019081526020016000205460405163f25fd82f60e01b8152600401610496939291909283526020830191909152604082015260600190565b3360009081526005602090815260408083206001600160a01b038616845290915290205460011015610b08573360009081526005602090815260408083206001600160a01b0386168452909152812080546109f390600190612fe1565b81548110610a0357610a03612f16565b60009182526020808320909101546001600160a01b038616835260069091526040822090925081878786818110610a3c57610a3c612f16565b60209081029290920135835250818101929092526040908101600090812054338252600584528282206001600160a01b0389168352909352208054919250839183908110610a8c57610a8c612f16565b60009182526020808320909101929092553381526005825260408082206001600160a01b038816835290925220805480610ac857610ac8612ff8565b6000828152602080822083016000199081018390559092019092556001600160a01b03861682526006815260408083209483529390529190912055610b51565b3360009081526005602090815260408083206001600160a01b03861684529091529020805480610b3a57610b3a612ff8565b600190038181906000526020600020016000905590555b6001600160a01b038216600090815260076020526040812090858584818110610b7c57610b7c612f16565b60209081029290920135835250818101929092526040908101600090812080546001600160a01b03191690556001600160a01b03851681526006909252812090858584818110610bce57610bce612f16565b90506020020135815260200190815260200160002060009055816001600160a01b03166323b872dd3033878786818110610c0a57610c0a612f16565b905060200201356040518463ffffffff1660e01b8152600401610c2f93929190612f79565b600060405180830381600087803b158015610c4957600080fd5b505af1158015610c5d573d6000803e3d6000fd5b50505050610cb93383868685818110610c7857610c78612f16565b604080516001600160a01b039687166020808301919091529590961690860152909202013560608301525060006080820181905260a082015260c00161074f565b6000805160206133508339815191523383868685818110610cdc57610cdc612f16565b905060200201356000604051610cf59493929190612f9d565b60405180910390a180610d0781612fc6565b9150506107e9565b50505050565b600a5460ff1615610d39576040516313d0ff5960e31b815260040160405180910390fd5b6001600160a01b03821660009081526008602052604090205460ff16610d7d576040516335dbc35160e21b81526001600160a01b0383166004820152602401610496565b6001600160a01b0382166000818152600760209081526040808320878452825280832080546001600160a01b0319163390811790915583526005825280832093835283825280832080546006845282852089865284529184208290559382526001810184559282528120909101849055610dfa8262015180612f42565b9050610e068142612f61565b6001600160a01b0384166000818152600960209081526040808320898452909152908190209290925590516323b872dd60e01b81526323b872dd90610e5390339030908990600401612f79565b600060405180830381600087803b158015610e6d57600080fd5b505af1158015610e81573d6000803e3d6000fd5b5050604080513360208201526001600160a01b038716918101919091526060810187905260808101849052600160a0820152610ec2925060c001905061074f565b6000805160206133508339815191523384866001604051610ee69493929190612f9d565b60405180910390a150505050565b6040516370a0823160e01b81526001600160a01b0382166004820152600090737887f40763ace5f0e8320181fd5b42776d35b1ff9081906370a0823190602401602060405180830381865afa158015610f51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f75919061300e565b6001600160a01b03808516600090815260056020908152604080832093861683529290522054610fa59190612f61565b9392505050565b6004546001600160a01b03163314610fd65760405162461bcd60e51b815260040161049690613027565b610fe06000611609565b565b600a5460ff1615611006576040516313d0ff5960e31b815260040160405180910390fd5b6001600160a01b03818116600090815260076020908152604080832086845290915290205416331461107a576001600160a01b0381811660009081526007602090815260408083208684529091529081902054905163e837add960e01b815233600482015291166024820152604401610496565b6001600160a01b03811660009081526009602090815260408083208584529091529020544210156110f4576001600160a01b03811660009081526009602090815260408083208584529091529081902054905163f25fd82f60e01b8152600481018490524260248201526044810191909152606401610496565b3360009081526005602090815260408083206001600160a01b038516845290915290205460011015611239573360009081526005602090815260408083206001600160a01b03851684529091528120805461115190600190612fe1565b8154811061116157611161612f16565b60009182526020808320909101546001600160a01b03851680845260068352604080852088865284528085205433865260058552818620928652919093529190922080549293509091839190839081106111bd576111bd612f16565b60009182526020808320909101929092553381526005825260408082206001600160a01b0387168352909252208054806111f9576111f9612ff8565b6000828152602080822083016000199081018390559092019092556001600160a01b03851682526006815260408083209483529390529190912055611282565b3360009081526005602090815260408083206001600160a01b0385168452909152902080548061126b5761126b612ff8565b600190038181906000526020600020016000905590555b6001600160a01b0381166000818152600760209081526040808320868452825280832080546001600160a01b03191690558383526006825280832086845290915280822091909155516323b872dd60e01b81526323b872dd906112ed90309033908790600401612f79565b600060405180830381600087803b15801561130757600080fd5b505af115801561131b573d6000803e3d6000fd5b5050604080513360208201526001600160a01b038516918101919091526060810185905260006080820181905260a082015261135c925060c001905061074f565b60008051602061335083398151915233828460006040516113809493929190612f9d565b60405180910390a15050565b6004546001600160a01b031633146113b65760405162461bcd60e51b815260040161049690613027565b60005b82811015610d0f5781600860008686858181106113d8576113d8612f16565b90506020020160208101906113ed9190612ba5565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061141f81612fc6565b9150506113b9565b6002546001600160a01b0316156114935760405162461bcd60e51b815260206004820152602a60248201527f467842617365526f6f7454756e6e656c3a204348494c445f54554e4e454c5f4160448201526913149150511657d4d15560b21b6064820152608401610496565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031633146114df5760405162461bcd60e51b815260040161049690613027565b600a805460ff19811660ff90911615179055565b6004546001600160a01b0316331461151d5760405162461bcd60e51b815260040161049690613027565b6001600160a01b0381166115825760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610496565b61158b81611609565b50565b60006115998261165b565b505050565b60005460025460405163b472047760e01b81526001600160a01b039283169263b4720477926115d4929116908590600401613088565b600060405180830381600087803b1580156115ee57600080fd5b505af1158015611602573d6000803e3d6000fd5b5050505050565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060600061166883611941565b90506000611675826119a0565b90506000611682836119c9565b9050600081611690846119f2565b61169986611bae565b6040516020016116ab939291906130ca565b60408051601f1981840301815291815281516020928301206000818152600390935291205490915060ff161561172f5760405162461bcd60e51b8152602060048201526024808201527f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434560448201526314d4d15160e21b6064820152608401610496565b6000818152600360205260408120805460ff1916600117905561175185611bca565b9050600061175e82611d13565b905061176981611da3565b6002546001600160a01b039081169116146117d45760405162461bcd60e51b815260206004820152602560248201527f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f54604482015264155393915360da1b6064820152608401610496565b60006117df87611dcc565b90506117ff6117ef846020015190565b876117f98a611de8565b84611e04565b6118575760405162461bcd60e51b815260206004820152602360248201527f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505260448201526227a7a360e91b6064820152608401610496565b61188585611864896120bb565b61186d8a6120d7565b846118778c6120f3565b6118808d61210f565b61212b565b50600061189183612251565b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b0366118c76118c283600061228d565b6122c5565b146119145760405162461bcd60e51b815260206004820152601f60248201527f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e4154555245006044820152606401610496565b600061191f84612340565b80602001905181019061193291906130f7565b9b9a5050505050505050505050565b604080516020810190915260608152600061198b6119868460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b61235c565b60408051602081019091529081529392505050565b606061042c82600001516008815181106119bc576119bc612f16565b6020026020010151612471565b600061042c82600001516002815181106119e5576119e5612f16565b60200260200101516122c5565b6040805160208101909152600081528151606091901561042c57600080611a1a60008661250d565b60f81c90506001811480611a3157508060ff166003145b15611ad857600185516002611a469190612f42565b611a509190612fe1565b6001600160401b03811115611a6757611a67612e2a565b6040519080825280601f01601f191660200182016040528015611a91576020820181803683370190505b5092506000611aa160018761250d565b90508084600081518110611ab757611ab7612f16565b60200101906001600160f81b031916908160001a9053506001925050611b3b565b600285516002611ae89190612f42565b611af29190612fe1565b6001600160401b03811115611b0957611b09612e2a565b6040519080825280601f01601f191660200182016040528015611b33576020820181803683370190505b509250600091505b60ff82165b8351811015611ba557611b6a611b5960ff851683612fe1565b611b64906002612f61565b8761250d565b848281518110611b7c57611b7c612f16565b60200101906001600160f81b031916908160001a90535080611b9d81612fc6565b915050611b40565b50505092915050565b600061042c82600001516009815181106119e5576119e5612f16565b611bee60405180606001604052806060815260200160608152602001600081525090565b611c0882600001516006815181106119bc576119bc612f16565b602082810182905260408051808201825260008082529083015280518082019091528251815291810190820152611c3e8161258e565b15611c5357611c4c8161235c565b8252611cff565b60208201518051600090611c6990600190612fe1565b6001600160401b03811115611c8057611c80612e2a565b6040519080825280601f01601f191660200182016040528015611caa576020820181803683370190505b509050600080836021019150826020019050611cc8828285516125c7565b604080518082018252600080825260209182015281518083019092528451825280850190820152611cf89061235c565b8652505050505b611d0883611bae565b604083015250919050565b604080516080810182526000918101828152606080830193909352815260208101919091526000611d618360000151600381518110611d5457611d54612f16565b602002602001015161235c565b836040015181518110611d7657611d76612f16565b602002602001015190506040518060400160405280828152602001611d9a8361235c565b90529392505050565b600061042c8260200151600081518110611dbf57611dbf612f16565b6020026020010151612642565b600061042c82600001516005815181106119e5576119e5612f16565b606061042c82600001516007815181106119bc576119bc612f16565b600080611e388460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b90506000611e458261235c565b905060608085600080611e578b6119f2565b9050805160001415611e735760009750505050505050506120b3565b60005b86518110156120aa578151831115611e99576000985050505050505050506120b3565b611ebb878281518110611eae57611eae612f16565b602002602001015161265c565b955085805190602001208414611edc576000985050505050505050506120b3565b611ef1878281518110611d5457611d54612f16565b9450845160111415611fc6578151831415611f53578c80519060200120611f24866010815181106119bc576119bc612f16565b805190602001201415611f42576001985050505050505050506120b3565b6000985050505050505050506120b3565b6000828481518110611f6757611f67612f16565b016020015160f81c90506010811115611f8c57600099505050505050505050506120b3565b611fb1868260ff1681518110611fa457611fa4612f16565b60200260200101516126db565b9450611fbe600185612f61565b935050612098565b845160021415611f42576000611ff2611feb876000815181106119bc576119bc612f16565b8486612709565b83519091506120018286612f61565b1415612056578d80519060200120612025876001815181106119bc576119bc612f16565b80519060200120141561204457600199505050505050505050506120b3565b600099505050505050505050506120b3565b8061206d57600099505050505050505050506120b3565b6120778185612f61565b935061208f86600181518110611fa457611fa4612f16565b94506120989050565b806120a281612fc6565b915050611e76565b50505050505050505b949350505050565b600061042c82600001516003815181106119e5576119e5612f16565b600061042c82600001516004815181106119e5576119e5612f16565b600061042c82600001516000815181106119e5576119e5612f16565b606061042c82600001516001815181106119bc576119bc612f16565b6001546040516320a9cea560e11b8152600481018490526000918291829182916001600160a01b03909116906341539d4a9060240160a060405180830381865afa15801561217d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a1919061316d565b50935050925092506121f8828b6121b89190612fe1565b6040805160208082018f90528183018e9052606082018d905260808083018d90528351808403909101815260a09092019092528051910120908588612811565b6122445760405162461bcd60e51b815260206004820152601c60248201527f4678526f6f7454756e6e656c3a20494e56414c49445f484541444552000000006044820152606401610496565b9998505050505050505050565b60408051602081019091526060815260405180602001604052806122858460200151600181518110611d5457611d54612f16565b905292915050565b604080518082019091526000808252602082015282518051839081106122b5576122b5612f16565b6020026020010151905092915050565b8051600090158015906122da57508151602110155b6122e357600080fd5b60006122f28360200151612976565b905060008184600001516123069190612fe1565b905060008083866020015161231b9190612f61565b905080519150602083101561233757826020036101000a820491505b50949350505050565b606061042c82602001516002815181106119bc576119bc612f16565b60606123678261258e565b61237057600080fd5b600061237b836129f1565b90506000816001600160401b0381111561239757612397612e2a565b6040519080825280602002602001820160405280156123dc57816020015b60408051808201909152600080825260208201528152602001906001900390816123b55790505b50905060006123ee8560200151612976565b85602001516123fd9190612f61565b90506000805b848110156124665761241483612a74565b915060405180604001604052808381526020018481525084828151811061243d5761243d612f16565b60209081029190910101526124528284612f61565b92508061245e81612fc6565b915050612403565b509195945050505050565b805160609061247f57600080fd5b600061248e8360200151612976565b905060008184600001516124a29190612fe1565b90506000816001600160401b038111156124be576124be612e2a565b6040519080825280601f01601f1916602001820160405280156124e8576020820181803683370190505b50905060008160200190506123378487602001516125069190612f61565b8285612b18565b600061251a6002846131d0565b156125545760108261252d6002866131e4565b8151811061253d5761253d612f16565b016020015161254f919060f81c6131f8565b612584565b6010826125626002866131e4565b8151811061257257612572612f16565b0160200151612584919060f81c61321a565b60f81b9392505050565b805160009061259f57506000919050565b6020820151805160001a9060c08210156125bd575060009392505050565b5060019392505050565b806125d157505050565b6020811061260957825182526125e8602084612f61565b92506125f5602083612f61565b9150612602602082612fe1565b90506125d1565b60006001612618836020612fe1565b61262490610100613320565b61262e9190612fe1565b935183518516941916939093179091525050565b805160009060151461265357600080fd5b61042c826122c5565b6060600082600001516001600160401b0381111561267c5761267c612e2a565b6040519080825280601f01601f1916602001820160405280156126a6576020820181803683370190505b5090508051600014156126b95792915050565b60008160200190506126d48460200151828660000151612b18565b5092915050565b80516000906021146126ec57600080fd5b600080836020015160016127009190612f61565b51949350505050565b60008080612716866119f2565b9050600081516001600160401b0381111561273357612733612e2a565b6040519080825280601f01601f19166020018201604052801561275d576020820181803683370190505b509050845b825161276e9087612f61565b8110156127e157600087828151811061278957612789612f16565b01602001516001600160f81b031916905080836127a68985612fe1565b815181106127b6576127b6612f16565b60200101906001600160f81b031916908160001a9053505080806127d990612fc6565b915050612762565b508080519060200120828051906020012014156128015781519250612806565b600092505b509095945050505050565b60006020825161282191906131d0565b156128655760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e0e4dedecc40d8cadccee8d60631b6044820152606401610496565b60006020835161287591906131e4565b9050612882816002613320565b85106128c85760405162461bcd60e51b81526020600482015260156024820152744c65616620696e64657820697320746f6f2062696760581b6044820152606401610496565b60008660205b85518111612968578581015192506128e76002896131d0565b61291c576040805160208101849052908101849052606001604051602081830303815290604052805190602001209150612949565b60408051602081018590529081018390526060016040516020818303038152906040528051906020012091505b6129546002896131e4565b9750612961602082612f61565b90506128ce565b509094149695505050505050565b8051600090811a608081101561298f5750600092915050565b60b88110806129aa575060c081108015906129aa575060f881105b156129b85750600192915050565b60c08110156129e5576129cd600160b861332c565b6129da9060ff1682612fe1565b610fa5906001612f61565b6129cd600160f861332c565b8051600090612a0257506000919050565b600080612a128460200151612976565b8460200151612a219190612f61565b9050600084600001518560200151612a399190612f61565b90505b80821015612a6b57612a4d82612a74565b612a579083612f61565b915082612a6381612fc6565b935050612a3c565b50909392505050565b80516000908190811a6080811015612a8f57600191506126d4565b60b8811015612ab557612aa3608082612fe1565b612aae906001612f61565b91506126d4565b60c0811015612ae25760b78103600185019450806020036101000a855104600182018101935050506126d4565b60f8811015612af657612aa360c082612fe1565b60019390930151602084900360f7016101000a900490920160f5190192915050565b80612b2257505050565b60208110612b5a5782518252612b39602084612f61565b9250612b46602083612f61565b9150612b53602082612fe1565b9050612b22565b8061260957505050565b6001600160a01b038116811461158b57600080fd5b60008060408385031215612b8c57600080fd5b8235612b9781612b64565b946020939093013593505050565b600060208284031215612bb757600080fd5b8135610fa581612b64565b60008060408385031215612bd557600080fd5b8235612be081612b64565b91506020830135612bf081612b64565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612c3357835183529284019291840191600101612c17565b50909695505050505050565b60008083601f840112612c5157600080fd5b5081356001600160401b03811115612c6857600080fd5b6020830191508360208260051b8501011115612c8357600080fd5b9250929050565b600080600080600060608688031215612ca257600080fd5b85356001600160401b0380821115612cb957600080fd5b612cc589838a01612c3f565b909750955060208801359150612cda82612b64565b90935060408701359080821115612cf057600080fd5b50612cfd88828901612c3f565b969995985093965092949392505050565b600060208284031215612d2057600080fd5b5035919050565b600080600060408486031215612d3c57600080fd5b83356001600160401b03811115612d5257600080fd5b612d5e86828701612c3f565b9094509250506020840135612d7281612b64565b809150509250925092565b600080600060608486031215612d9257600080fd5b833592506020840135612da481612b64565b929592945050506040919091013590565b60008060408385031215612dc857600080fd5b823591506020830135612bf081612b64565b600080600060408486031215612def57600080fd5b83356001600160401b03811115612e0557600080fd5b612e1186828701612c3f565b90945092505060208401358015158114612d7257600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612e6857612e68612e2a565b604052919050565b60006001600160401b03821115612e8957612e89612e2a565b50601f01601f191660200190565b600060208284031215612ea957600080fd5b81356001600160401b03811115612ebf57600080fd5b8201601f81018413612ed057600080fd5b8035612ee3612ede82612e70565b612e40565b818152856020838501011115612ef857600080fd5b81602084016020830137600091810160200191909152949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612f5c57612f5c612f2c565b500290565b60008219821115612f7457612f74612f2c565b500190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0394851681529290931660208301526040820152901515606082015260800190565b6000600019821415612fda57612fda612f2c565b5060010190565b600082821015612ff357612ff3612f2c565b500390565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561302057600080fd5b5051919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60005b8381101561307757818101518382015260200161305f565b83811115610d0f5750506000910152565b60018060a01b038316815260406020820152600082518060408401526130b581606085016020870161305c565b601f01601f1916919091016060019392505050565b838152600083516130e281602085016020880161305c565b60209201918201929092526040019392505050565b60006020828403121561310957600080fd5b81516001600160401b0381111561311f57600080fd5b8201601f8101841361313057600080fd5b805161313e612ede82612e70565b81815285602083850101111561315357600080fd5b61316482602083016020860161305c565b95945050505050565b600080600080600060a0868803121561318557600080fd5b8551945060208601519350604086015192506060860151915060808601516131ac81612b64565b809150509295509295909350565b634e487b7160e01b600052601260045260246000fd5b6000826131df576131df6131ba565b500690565b6000826131f3576131f36131ba565b500490565b600060ff83168061320b5761320b6131ba565b8060ff84160691505092915050565b600060ff83168061322d5761322d6131ba565b8060ff84160491505092915050565b600181815b8085111561327757816000190482111561325d5761325d612f2c565b8085161561326a57918102915b93841c9390800290613241565b509250929050565b60008261328e5750600161042c565b8161329b5750600061042c565b81600181146132b157600281146132bb576132d7565b600191505061042c565b60ff8411156132cc576132cc612f2c565b50506001821b61042c565b5060208310610133831016604e8410600b84101617156132fa575081810a61042c565b613304838361323c565b806000190482111561331857613318612f2c565b029392505050565b6000610fa5838361327f565b600060ff821660ff84168082101561334657613346612f2c565b9003939250505056fe929ad80cfbf532d1e879107de0553ee80942d13c8043f2b2615f9b15b87d10daa2646970667358221220eab264a0563fd64dc614e670063e0aba83492e373a98df417ad6865f9f27ac9864736f6c634300080c00330000000000000000000000007887f40763ace5f0e8320181fd5b42776d35b1ff000000000000000000000000000000059619cdddc056910672abc90887136a9500000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061014d5760003560e01c8063715018a6116100c3578063c0857ba01161007c578063c0857ba014610339578063c4ae31681461034c578063ce55662314610354578063de9b771f1461037f578063f2fde38b14610392578063f953cec7146103a557600080fd5b8063715018a6146102d45780638381e182146102dc5780638da5cb5b146102ef578063972c492814610300578063a432080f14610313578063aea4e49e1461032657600080fd5b80635b3ccdd0116101155780635b3ccdd0146102565780635c975abb1461026b578063607f2d421461027857806362cd5c5a1461029b5780636e9c931c146102ae57806370a08231146102c157600080fd5b80630e387de614610152578063156768b51461018c57806328836fd7146101b757806334350ad2146101ea5780634404b5b914610236575b600080fd5b6101797f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b6040519081526020015b60405180910390f35b61017961019a366004612b79565b600660209081526000928352604080842090915290825290205481565b6101da6101c5366004612ba5565b60086020526000908152604090205460ff1681565b6040519015158152602001610183565b61021e6101f8366004612b79565b60076020908152600092835260408084209091529082529020546001600160a01b031681565b6040516001600160a01b039091168152602001610183565b610249610244366004612bc2565b6103b8565b6040516101839190612bfb565b610269610264366004612c8a565b610432565b005b600a546101da9060ff1681565b6101da610286366004612d0e565b60036020526000908152604090205460ff1681565b6102696102a9366004612d27565b6107c2565b6102696102bc366004612d7d565b610d15565b6101796102cf366004612ba5565b610ef4565b610269610fac565b6102696102ea366004612db5565b610fe2565b6004546001600160a01b031661021e565b60025461021e906001600160a01b031681565b610269610321366004612dda565b61138c565b610269610334366004612ba5565b611427565b60015461021e906001600160a01b031681565b6102696114b5565b610179610362366004612b79565b600960209081526000928352604080842090915290825290205481565b60005461021e906001600160a01b031681565b6102696103a0366004612ba5565b6114f3565b6102696103b3366004612e97565b61158e565b6001600160a01b03808316600090815260056020908152604080832093851683529281529082902080548351818402810184019094528084526060939283018282801561042457602002820191906000526020600020905b815481526020019060010190808311610410575b505050505090505b92915050565b600a5460ff1615610456576040516313d0ff5960e31b815260040160405180910390fd5b6001600160a01b03831660009081526008602052604090205460ff1661049f576040516335dbc35160e21b81526001600160a01b03841660048201526024015b60405180910390fd5b8381146104ee5760405162461bcd60e51b815260206004820152601f60248201527f746f6b656e4964732026206c6f636b757044617973206d6973736d61746368006044820152606401610496565b60005b848110156107ba573360009081526005602090815260408083206001600160a01b038816845282528083205460069092528220909188888581811061053857610538612f16565b905060200201358152602001908152602001600020819055503360076000866001600160a01b03166001600160a01b03168152602001908152602001600020600088888581811061058b5761058b612f16565b60209081029290920135835250818101929092526040908101600090812080546001600160a01b0319166001600160a01b039586161790553381526005835281812093881681529290915290208686838181106105ea576105ea612f16565b835460018101855560009485526020808620920293909301359201919091555083838381811061061c5761061c612f16565b90506020020135620151806106319190612f42565b905061063d8142612f61565b6001600160a01b03861660009081526009602052604081209089898681811061066857610668612f16565b90506020020135815260200190815260200160002081905550846001600160a01b03166323b872dd33308a8a878181106106a4576106a4612f16565b905060200201356040518463ffffffff1660e01b81526004016106c993929190612f79565b600060405180830381600087803b1580156106e357600080fd5b505af11580156106f7573d6000803e3d6000fd5b50505050610763338689898681811061071257610712612f16565b604080516001600160a01b039687166020808301919091529590961690860152909202013560608301525060808101839052600160a082015260c0015b60405160208183030381529060405261159e565b600080516020613350833981519152338689898681811061078657610786612f16565b90506020020135600160405161079f9493929190612f9d565b60405180910390a150806107b281612fc6565b9150506104f1565b505050505050565b600a5460ff16156107e6576040516313d0ff5960e31b815260040160405180910390fd5b60005b82811015610d0f576001600160a01b0382166000908152600760205260408120339186868581811061081d5761081d612f16565b60209081029290920135835250810191909152604001600020546001600160a01b0316146108b8576001600160a01b0382166000908152600760205260408120339186868581811061087157610871612f16565b60209081029290920135835250810191909152604090810160002054905163e837add960e01b81526001600160a01b03928316600482015291166024820152604401610496565b6001600160a01b038216600090815260096020526040812042918686858181106108e4576108e4612f16565b9050602002013581526020019081526020016000205411156109965783838281811061091257610912612f16565b905060200201354260096000856001600160a01b03166001600160a01b03168152602001908152602001600020600087878681811061095357610953612f16565b9050602002013581526020019081526020016000205460405163f25fd82f60e01b8152600401610496939291909283526020830191909152604082015260600190565b3360009081526005602090815260408083206001600160a01b038616845290915290205460011015610b08573360009081526005602090815260408083206001600160a01b0386168452909152812080546109f390600190612fe1565b81548110610a0357610a03612f16565b60009182526020808320909101546001600160a01b038616835260069091526040822090925081878786818110610a3c57610a3c612f16565b60209081029290920135835250818101929092526040908101600090812054338252600584528282206001600160a01b0389168352909352208054919250839183908110610a8c57610a8c612f16565b60009182526020808320909101929092553381526005825260408082206001600160a01b038816835290925220805480610ac857610ac8612ff8565b6000828152602080822083016000199081018390559092019092556001600160a01b03861682526006815260408083209483529390529190912055610b51565b3360009081526005602090815260408083206001600160a01b03861684529091529020805480610b3a57610b3a612ff8565b600190038181906000526020600020016000905590555b6001600160a01b038216600090815260076020526040812090858584818110610b7c57610b7c612f16565b60209081029290920135835250818101929092526040908101600090812080546001600160a01b03191690556001600160a01b03851681526006909252812090858584818110610bce57610bce612f16565b90506020020135815260200190815260200160002060009055816001600160a01b03166323b872dd3033878786818110610c0a57610c0a612f16565b905060200201356040518463ffffffff1660e01b8152600401610c2f93929190612f79565b600060405180830381600087803b158015610c4957600080fd5b505af1158015610c5d573d6000803e3d6000fd5b50505050610cb93383868685818110610c7857610c78612f16565b604080516001600160a01b039687166020808301919091529590961690860152909202013560608301525060006080820181905260a082015260c00161074f565b6000805160206133508339815191523383868685818110610cdc57610cdc612f16565b905060200201356000604051610cf59493929190612f9d565b60405180910390a180610d0781612fc6565b9150506107e9565b50505050565b600a5460ff1615610d39576040516313d0ff5960e31b815260040160405180910390fd5b6001600160a01b03821660009081526008602052604090205460ff16610d7d576040516335dbc35160e21b81526001600160a01b0383166004820152602401610496565b6001600160a01b0382166000818152600760209081526040808320878452825280832080546001600160a01b0319163390811790915583526005825280832093835283825280832080546006845282852089865284529184208290559382526001810184559282528120909101849055610dfa8262015180612f42565b9050610e068142612f61565b6001600160a01b0384166000818152600960209081526040808320898452909152908190209290925590516323b872dd60e01b81526323b872dd90610e5390339030908990600401612f79565b600060405180830381600087803b158015610e6d57600080fd5b505af1158015610e81573d6000803e3d6000fd5b5050604080513360208201526001600160a01b038716918101919091526060810187905260808101849052600160a0820152610ec2925060c001905061074f565b6000805160206133508339815191523384866001604051610ee69493929190612f9d565b60405180910390a150505050565b6040516370a0823160e01b81526001600160a01b0382166004820152600090737887f40763ace5f0e8320181fd5b42776d35b1ff9081906370a0823190602401602060405180830381865afa158015610f51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f75919061300e565b6001600160a01b03808516600090815260056020908152604080832093861683529290522054610fa59190612f61565b9392505050565b6004546001600160a01b03163314610fd65760405162461bcd60e51b815260040161049690613027565b610fe06000611609565b565b600a5460ff1615611006576040516313d0ff5960e31b815260040160405180910390fd5b6001600160a01b03818116600090815260076020908152604080832086845290915290205416331461107a576001600160a01b0381811660009081526007602090815260408083208684529091529081902054905163e837add960e01b815233600482015291166024820152604401610496565b6001600160a01b03811660009081526009602090815260408083208584529091529020544210156110f4576001600160a01b03811660009081526009602090815260408083208584529091529081902054905163f25fd82f60e01b8152600481018490524260248201526044810191909152606401610496565b3360009081526005602090815260408083206001600160a01b038516845290915290205460011015611239573360009081526005602090815260408083206001600160a01b03851684529091528120805461115190600190612fe1565b8154811061116157611161612f16565b60009182526020808320909101546001600160a01b03851680845260068352604080852088865284528085205433865260058552818620928652919093529190922080549293509091839190839081106111bd576111bd612f16565b60009182526020808320909101929092553381526005825260408082206001600160a01b0387168352909252208054806111f9576111f9612ff8565b6000828152602080822083016000199081018390559092019092556001600160a01b03851682526006815260408083209483529390529190912055611282565b3360009081526005602090815260408083206001600160a01b0385168452909152902080548061126b5761126b612ff8565b600190038181906000526020600020016000905590555b6001600160a01b0381166000818152600760209081526040808320868452825280832080546001600160a01b03191690558383526006825280832086845290915280822091909155516323b872dd60e01b81526323b872dd906112ed90309033908790600401612f79565b600060405180830381600087803b15801561130757600080fd5b505af115801561131b573d6000803e3d6000fd5b5050604080513360208201526001600160a01b038516918101919091526060810185905260006080820181905260a082015261135c925060c001905061074f565b60008051602061335083398151915233828460006040516113809493929190612f9d565b60405180910390a15050565b6004546001600160a01b031633146113b65760405162461bcd60e51b815260040161049690613027565b60005b82811015610d0f5781600860008686858181106113d8576113d8612f16565b90506020020160208101906113ed9190612ba5565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061141f81612fc6565b9150506113b9565b6002546001600160a01b0316156114935760405162461bcd60e51b815260206004820152602a60248201527f467842617365526f6f7454756e6e656c3a204348494c445f54554e4e454c5f4160448201526913149150511657d4d15560b21b6064820152608401610496565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031633146114df5760405162461bcd60e51b815260040161049690613027565b600a805460ff19811660ff90911615179055565b6004546001600160a01b0316331461151d5760405162461bcd60e51b815260040161049690613027565b6001600160a01b0381166115825760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610496565b61158b81611609565b50565b60006115998261165b565b505050565b60005460025460405163b472047760e01b81526001600160a01b039283169263b4720477926115d4929116908590600401613088565b600060405180830381600087803b1580156115ee57600080fd5b505af1158015611602573d6000803e3d6000fd5b5050505050565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060600061166883611941565b90506000611675826119a0565b90506000611682836119c9565b9050600081611690846119f2565b61169986611bae565b6040516020016116ab939291906130ca565b60408051601f1981840301815291815281516020928301206000818152600390935291205490915060ff161561172f5760405162461bcd60e51b8152602060048201526024808201527f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434560448201526314d4d15160e21b6064820152608401610496565b6000818152600360205260408120805460ff1916600117905561175185611bca565b9050600061175e82611d13565b905061176981611da3565b6002546001600160a01b039081169116146117d45760405162461bcd60e51b815260206004820152602560248201527f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f54604482015264155393915360da1b6064820152608401610496565b60006117df87611dcc565b90506117ff6117ef846020015190565b876117f98a611de8565b84611e04565b6118575760405162461bcd60e51b815260206004820152602360248201527f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505260448201526227a7a360e91b6064820152608401610496565b61188585611864896120bb565b61186d8a6120d7565b846118778c6120f3565b6118808d61210f565b61212b565b50600061189183612251565b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b0366118c76118c283600061228d565b6122c5565b146119145760405162461bcd60e51b815260206004820152601f60248201527f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e4154555245006044820152606401610496565b600061191f84612340565b80602001905181019061193291906130f7565b9b9a5050505050505050505050565b604080516020810190915260608152600061198b6119868460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b61235c565b60408051602081019091529081529392505050565b606061042c82600001516008815181106119bc576119bc612f16565b6020026020010151612471565b600061042c82600001516002815181106119e5576119e5612f16565b60200260200101516122c5565b6040805160208101909152600081528151606091901561042c57600080611a1a60008661250d565b60f81c90506001811480611a3157508060ff166003145b15611ad857600185516002611a469190612f42565b611a509190612fe1565b6001600160401b03811115611a6757611a67612e2a565b6040519080825280601f01601f191660200182016040528015611a91576020820181803683370190505b5092506000611aa160018761250d565b90508084600081518110611ab757611ab7612f16565b60200101906001600160f81b031916908160001a9053506001925050611b3b565b600285516002611ae89190612f42565b611af29190612fe1565b6001600160401b03811115611b0957611b09612e2a565b6040519080825280601f01601f191660200182016040528015611b33576020820181803683370190505b509250600091505b60ff82165b8351811015611ba557611b6a611b5960ff851683612fe1565b611b64906002612f61565b8761250d565b848281518110611b7c57611b7c612f16565b60200101906001600160f81b031916908160001a90535080611b9d81612fc6565b915050611b40565b50505092915050565b600061042c82600001516009815181106119e5576119e5612f16565b611bee60405180606001604052806060815260200160608152602001600081525090565b611c0882600001516006815181106119bc576119bc612f16565b602082810182905260408051808201825260008082529083015280518082019091528251815291810190820152611c3e8161258e565b15611c5357611c4c8161235c565b8252611cff565b60208201518051600090611c6990600190612fe1565b6001600160401b03811115611c8057611c80612e2a565b6040519080825280601f01601f191660200182016040528015611caa576020820181803683370190505b509050600080836021019150826020019050611cc8828285516125c7565b604080518082018252600080825260209182015281518083019092528451825280850190820152611cf89061235c565b8652505050505b611d0883611bae565b604083015250919050565b604080516080810182526000918101828152606080830193909352815260208101919091526000611d618360000151600381518110611d5457611d54612f16565b602002602001015161235c565b836040015181518110611d7657611d76612f16565b602002602001015190506040518060400160405280828152602001611d9a8361235c565b90529392505050565b600061042c8260200151600081518110611dbf57611dbf612f16565b6020026020010151612642565b600061042c82600001516005815181106119e5576119e5612f16565b606061042c82600001516007815181106119bc576119bc612f16565b600080611e388460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b90506000611e458261235c565b905060608085600080611e578b6119f2565b9050805160001415611e735760009750505050505050506120b3565b60005b86518110156120aa578151831115611e99576000985050505050505050506120b3565b611ebb878281518110611eae57611eae612f16565b602002602001015161265c565b955085805190602001208414611edc576000985050505050505050506120b3565b611ef1878281518110611d5457611d54612f16565b9450845160111415611fc6578151831415611f53578c80519060200120611f24866010815181106119bc576119bc612f16565b805190602001201415611f42576001985050505050505050506120b3565b6000985050505050505050506120b3565b6000828481518110611f6757611f67612f16565b016020015160f81c90506010811115611f8c57600099505050505050505050506120b3565b611fb1868260ff1681518110611fa457611fa4612f16565b60200260200101516126db565b9450611fbe600185612f61565b935050612098565b845160021415611f42576000611ff2611feb876000815181106119bc576119bc612f16565b8486612709565b83519091506120018286612f61565b1415612056578d80519060200120612025876001815181106119bc576119bc612f16565b80519060200120141561204457600199505050505050505050506120b3565b600099505050505050505050506120b3565b8061206d57600099505050505050505050506120b3565b6120778185612f61565b935061208f86600181518110611fa457611fa4612f16565b94506120989050565b806120a281612fc6565b915050611e76565b50505050505050505b949350505050565b600061042c82600001516003815181106119e5576119e5612f16565b600061042c82600001516004815181106119e5576119e5612f16565b600061042c82600001516000815181106119e5576119e5612f16565b606061042c82600001516001815181106119bc576119bc612f16565b6001546040516320a9cea560e11b8152600481018490526000918291829182916001600160a01b03909116906341539d4a9060240160a060405180830381865afa15801561217d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a1919061316d565b50935050925092506121f8828b6121b89190612fe1565b6040805160208082018f90528183018e9052606082018d905260808083018d90528351808403909101815260a09092019092528051910120908588612811565b6122445760405162461bcd60e51b815260206004820152601c60248201527f4678526f6f7454756e6e656c3a20494e56414c49445f484541444552000000006044820152606401610496565b9998505050505050505050565b60408051602081019091526060815260405180602001604052806122858460200151600181518110611d5457611d54612f16565b905292915050565b604080518082019091526000808252602082015282518051839081106122b5576122b5612f16565b6020026020010151905092915050565b8051600090158015906122da57508151602110155b6122e357600080fd5b60006122f28360200151612976565b905060008184600001516123069190612fe1565b905060008083866020015161231b9190612f61565b905080519150602083101561233757826020036101000a820491505b50949350505050565b606061042c82602001516002815181106119bc576119bc612f16565b60606123678261258e565b61237057600080fd5b600061237b836129f1565b90506000816001600160401b0381111561239757612397612e2a565b6040519080825280602002602001820160405280156123dc57816020015b60408051808201909152600080825260208201528152602001906001900390816123b55790505b50905060006123ee8560200151612976565b85602001516123fd9190612f61565b90506000805b848110156124665761241483612a74565b915060405180604001604052808381526020018481525084828151811061243d5761243d612f16565b60209081029190910101526124528284612f61565b92508061245e81612fc6565b915050612403565b509195945050505050565b805160609061247f57600080fd5b600061248e8360200151612976565b905060008184600001516124a29190612fe1565b90506000816001600160401b038111156124be576124be612e2a565b6040519080825280601f01601f1916602001820160405280156124e8576020820181803683370190505b50905060008160200190506123378487602001516125069190612f61565b8285612b18565b600061251a6002846131d0565b156125545760108261252d6002866131e4565b8151811061253d5761253d612f16565b016020015161254f919060f81c6131f8565b612584565b6010826125626002866131e4565b8151811061257257612572612f16565b0160200151612584919060f81c61321a565b60f81b9392505050565b805160009061259f57506000919050565b6020820151805160001a9060c08210156125bd575060009392505050565b5060019392505050565b806125d157505050565b6020811061260957825182526125e8602084612f61565b92506125f5602083612f61565b9150612602602082612fe1565b90506125d1565b60006001612618836020612fe1565b61262490610100613320565b61262e9190612fe1565b935183518516941916939093179091525050565b805160009060151461265357600080fd5b61042c826122c5565b6060600082600001516001600160401b0381111561267c5761267c612e2a565b6040519080825280601f01601f1916602001820160405280156126a6576020820181803683370190505b5090508051600014156126b95792915050565b60008160200190506126d48460200151828660000151612b18565b5092915050565b80516000906021146126ec57600080fd5b600080836020015160016127009190612f61565b51949350505050565b60008080612716866119f2565b9050600081516001600160401b0381111561273357612733612e2a565b6040519080825280601f01601f19166020018201604052801561275d576020820181803683370190505b509050845b825161276e9087612f61565b8110156127e157600087828151811061278957612789612f16565b01602001516001600160f81b031916905080836127a68985612fe1565b815181106127b6576127b6612f16565b60200101906001600160f81b031916908160001a9053505080806127d990612fc6565b915050612762565b508080519060200120828051906020012014156128015781519250612806565b600092505b509095945050505050565b60006020825161282191906131d0565b156128655760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e0e4dedecc40d8cadccee8d60631b6044820152606401610496565b60006020835161287591906131e4565b9050612882816002613320565b85106128c85760405162461bcd60e51b81526020600482015260156024820152744c65616620696e64657820697320746f6f2062696760581b6044820152606401610496565b60008660205b85518111612968578581015192506128e76002896131d0565b61291c576040805160208101849052908101849052606001604051602081830303815290604052805190602001209150612949565b60408051602081018590529081018390526060016040516020818303038152906040528051906020012091505b6129546002896131e4565b9750612961602082612f61565b90506128ce565b509094149695505050505050565b8051600090811a608081101561298f5750600092915050565b60b88110806129aa575060c081108015906129aa575060f881105b156129b85750600192915050565b60c08110156129e5576129cd600160b861332c565b6129da9060ff1682612fe1565b610fa5906001612f61565b6129cd600160f861332c565b8051600090612a0257506000919050565b600080612a128460200151612976565b8460200151612a219190612f61565b9050600084600001518560200151612a399190612f61565b90505b80821015612a6b57612a4d82612a74565b612a579083612f61565b915082612a6381612fc6565b935050612a3c565b50909392505050565b80516000908190811a6080811015612a8f57600191506126d4565b60b8811015612ab557612aa3608082612fe1565b612aae906001612f61565b91506126d4565b60c0811015612ae25760b78103600185019450806020036101000a855104600182018101935050506126d4565b60f8811015612af657612aa360c082612fe1565b60019390930151602084900360f7016101000a900490920160f5190192915050565b80612b2257505050565b60208110612b5a5782518252612b39602084612f61565b9250612b46602083612f61565b9150612b53602082612fe1565b9050612b22565b8061260957505050565b6001600160a01b038116811461158b57600080fd5b60008060408385031215612b8c57600080fd5b8235612b9781612b64565b946020939093013593505050565b600060208284031215612bb757600080fd5b8135610fa581612b64565b60008060408385031215612bd557600080fd5b8235612be081612b64565b91506020830135612bf081612b64565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612c3357835183529284019291840191600101612c17565b50909695505050505050565b60008083601f840112612c5157600080fd5b5081356001600160401b03811115612c6857600080fd5b6020830191508360208260051b8501011115612c8357600080fd5b9250929050565b600080600080600060608688031215612ca257600080fd5b85356001600160401b0380821115612cb957600080fd5b612cc589838a01612c3f565b909750955060208801359150612cda82612b64565b90935060408701359080821115612cf057600080fd5b50612cfd88828901612c3f565b969995985093965092949392505050565b600060208284031215612d2057600080fd5b5035919050565b600080600060408486031215612d3c57600080fd5b83356001600160401b03811115612d5257600080fd5b612d5e86828701612c3f565b9094509250506020840135612d7281612b64565b809150509250925092565b600080600060608486031215612d9257600080fd5b833592506020840135612da481612b64565b929592945050506040919091013590565b60008060408385031215612dc857600080fd5b823591506020830135612bf081612b64565b600080600060408486031215612def57600080fd5b83356001600160401b03811115612e0557600080fd5b612e1186828701612c3f565b90945092505060208401358015158114612d7257600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612e6857612e68612e2a565b604052919050565b60006001600160401b03821115612e8957612e89612e2a565b50601f01601f191660200190565b600060208284031215612ea957600080fd5b81356001600160401b03811115612ebf57600080fd5b8201601f81018413612ed057600080fd5b8035612ee3612ede82612e70565b612e40565b818152856020838501011115612ef857600080fd5b81602084016020830137600091810160200191909152949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612f5c57612f5c612f2c565b500290565b60008219821115612f7457612f74612f2c565b500190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0394851681529290931660208301526040820152901515606082015260800190565b6000600019821415612fda57612fda612f2c565b5060010190565b600082821015612ff357612ff3612f2c565b500390565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561302057600080fd5b5051919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60005b8381101561307757818101518382015260200161305f565b83811115610d0f5750506000910152565b60018060a01b038316815260406020820152600082518060408401526130b581606085016020870161305c565b601f01601f1916919091016060019392505050565b838152600083516130e281602085016020880161305c565b60209201918201929092526040019392505050565b60006020828403121561310957600080fd5b81516001600160401b0381111561311f57600080fd5b8201601f8101841361313057600080fd5b805161313e612ede82612e70565b81815285602083850101111561315357600080fd5b61316482602083016020860161305c565b95945050505050565b600080600080600060a0868803121561318557600080fd5b8551945060208601519350604086015192506060860151915060808601516131ac81612b64565b809150509295509295909350565b634e487b7160e01b600052601260045260246000fd5b6000826131df576131df6131ba565b500690565b6000826131f3576131f36131ba565b500490565b600060ff83168061320b5761320b6131ba565b8060ff84160691505092915050565b600060ff83168061322d5761322d6131ba565b8060ff84160491505092915050565b600181815b8085111561327757816000190482111561325d5761325d612f2c565b8085161561326a57918102915b93841c9390800290613241565b509250929050565b60008261328e5750600161042c565b8161329b5750600061042c565b81600181146132b157600281146132bb576132d7565b600191505061042c565b60ff8411156132cc576132cc612f2c565b50506001821b61042c565b5060208310610133831016604e8410600b84101617156132fa575081810a61042c565b613304838361323c565b806000190482111561331857613318612f2c565b029392505050565b6000610fa5838361327f565b600060ff821660ff84168082101561334657613346612f2c565b9003939250505056fe929ad80cfbf532d1e879107de0553ee80942d13c8043f2b2615f9b15b87d10daa2646970667358221220eab264a0563fd64dc614e670063e0aba83492e373a98df417ad6865f9f27ac9864736f6c634300080c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007887f40763ace5f0e8320181fd5b42776d35b1ff000000000000000000000000000000059619cdddc056910672abc90887136a9500000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2
-----Decoded View---------------
Arg [0] : hakiERC721 (address): 0x7887f40763aCe5f0e8320181FD5B42776D35B1FF
Arg [1] : sekiraERC721 (address): 0x000000059619cDDdC056910672AbC90887136a95
Arg [2] : checkpointManager (address): 0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287
Arg [3] : fxRoot (address): 0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000007887f40763ace5f0e8320181fd5b42776d35b1ff
Arg [1] : 000000000000000000000000000000059619cdddc056910672abc90887136a95
Arg [2] : 00000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287
Arg [3] : 000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.