Overview
POL Balance
0 POL
POL Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 21 from a total of 21 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Cross Chain | 42030079 | 633 days ago | IN | 1 POL | 0.06039454 | ||||
Set Approval For... | 42022349 | 634 days ago | IN | 0 POL | 0.01914058 | ||||
Mint | 42022296 | 634 days ago | IN | 0 POL | 0.02636189 | ||||
Mint | 42022294 | 634 days ago | IN | 0 POL | 0.02540648 | ||||
Mint | 42022292 | 634 days ago | IN | 0 POL | 0.02463043 | ||||
Mint | 42022289 | 634 days ago | IN | 0 POL | 0.02664699 | ||||
Mint | 42022173 | 634 days ago | IN | 0 POL | 0.02610752 | ||||
Mint | 42022170 | 634 days ago | IN | 0 POL | 0.02607461 | ||||
Mint | 42022167 | 634 days ago | IN | 0 POL | 0.02589504 | ||||
Mint | 42022163 | 634 days ago | IN | 0 POL | 0.0268004 | ||||
Mint | 42022159 | 634 days ago | IN | 0 POL | 0.02505804 | ||||
Mint | 42022157 | 634 days ago | IN | 0 POL | 0.02267644 | ||||
Mint | 42022155 | 634 days ago | IN | 0 POL | 0.0227571 | ||||
Mint | 42022155 | 634 days ago | IN | 0 POL | 0.0227571 | ||||
Mint | 42022141 | 634 days ago | IN | 0 POL | 0.03044516 | ||||
Mint | 42022139 | 634 days ago | IN | 0 POL | 0.02648147 | ||||
Mint | 42022134 | 634 days ago | IN | 0 POL | 0.02661075 | ||||
Mint | 42022132 | 634 days ago | IN | 0 POL | 0.02459348 | ||||
Mint | 42022090 | 634 days ago | IN | 0 POL | 0.02752228 | ||||
Mint | 42022061 | 634 days ago | IN | 0 POL | 0.03675962 | ||||
Mint | 42021316 | 634 days ago | IN | 0 POL | 0.04389489 |
Loading...
Loading
Contract Name:
CrossChainNFT
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC721/ERC721.sol'; import './interfaces/ILayerZeroEndpoint.sol'; import './interfaces/ILayerZeroReceiver.sol'; import './NonblockingLzApp.sol'; error NotTokenOwner(); error InsufficientGas(); error SupplyExceeded(); contract CrossChainNFT is Ownable, ERC721, NonblockingLzApp { uint256 public counter; uint256 public currentTokenId; uint256 public immutable MAX_ID; event ReceivedNFT( uint16 _srcChainId, address _from, uint256 _tokenId, uint256 counter ); constructor( address _endpoint, uint256 _startTokenId ) ERC721('CrossChainNFT', 'CCNFT') NonblockingLzApp(_endpoint) { currentTokenId = _startTokenId; MAX_ID = currentTokenId + 99999; } function mint() external { if (currentTokenId == MAX_ID) revert SupplyExceeded(); _mint(msg.sender, currentTokenId); unchecked { ++currentTokenId; ++counter; } } function crossChain(uint16 dstChainId, uint256 tokenId) public payable { if (msg.sender != ownerOf(tokenId)) revert NotTokenOwner(); // Remove NFT on current chain unchecked { --counter; } _burn(tokenId); bytes memory payload = abi.encode(msg.sender, tokenId); uint16 version = 1; uint256 gasForLzReceive = 350000; bytes memory adapterParams = abi.encodePacked(version, gasForLzReceive); (uint256 messageFee, ) = lzEndpoint.estimateFees( dstChainId, address(this), payload, false, adapterParams ); if (msg.value <= messageFee) revert InsufficientGas(); _lzSend( dstChainId, payload, payable(msg.sender), address(0x0), adapterParams, msg.value ); } function _nonblockingLzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 /*_nonce*/, bytes memory _payload ) internal override { address from; assembly { from := mload(add(_srcAddress, 20)) } (address toAddress, uint256 tokenId) = abi.decode( _payload, (address, uint256) ); _mint(toAddress, tokenId); unchecked { ++counter; } emit ReceivedNFT(_srcChainId, from, tokenId, counter); } // Endpoint.sol estimateFees() returns the fees for the message function estimateFees( uint16 dstChainId, uint256 tokenId ) external view returns (uint256) { bytes memory payload = abi.encode(msg.sender, tokenId); uint16 version = 1; uint256 gasForLzReceive = 350000; bytes memory adapterParams = abi.encodePacked(version, gasForLzReceive); (uint256 messageFee, ) = lzEndpoint.estimateFees( dstChainId, address(this), payload, false, adapterParams ); return messageFee; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.2) (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: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); 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) { _requireMinted(tokenId); 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 token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); 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: caller is not token owner or 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: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @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 _ownerOf(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) { 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, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @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, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {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 an {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 Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @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 { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such * that `ownerOf(tokenId)` is `a`. */ // solhint-disable-next-line func-name-mixedcase function __unsafe_increaseBalance(address account, uint256 amount) internal { _balances[account] += amount; } }
// 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.8.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 have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the 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 (last updated v4.8.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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-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/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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { 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] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.5.0; import "./ILayerZeroUserApplicationConfig.sol"; interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig { // @notice send a LayerZero message to the specified address at a LayerZero endpoint. // @param _dstChainId - the destination chain identifier // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains // @param _payload - a custom bytes payload to send to the destination contract // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination function send( uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams ) external payable; // @notice used by the messaging library to publish verified payload // @param _srcChainId - the source chain identifier // @param _srcAddress - the source contract (as bytes) at the source chain // @param _dstAddress - the address on destination chain // @param _nonce - the unbound message ordering nonce // @param _gasLimit - the gas limit for external contract execution // @param _payload - verified payload to send to the destination contract function receivePayload( uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload ) external; // @notice get the inboundNonce of a receiver from a source chain which could be EVM or non-EVM chain // @param _srcChainId - the source chain identifier // @param _srcAddress - the source chain contract address function getInboundNonce( uint16 _srcChainId, bytes calldata _srcAddress ) external view returns (uint64); // @notice get the outboundNonce from this source chain which, consequently, is always an EVM // @param _srcAddress - the source chain contract address function getOutboundNonce( uint16 _dstChainId, address _srcAddress ) external view returns (uint64); // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery // @param _dstChainId - the destination chain identifier // @param _userApplication - the user app address on this EVM chain // @param _payload - the custom message to send over LayerZero // @param _payInZRO - if false, user app pays the protocol fee in native token // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain function estimateFees( uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam ) external view returns (uint nativeFee, uint zroFee); // @notice get this Endpoint's immutable source identifier function getChainId() external view returns (uint16); // @notice the interface to retry failed message on this Endpoint destination // @param _srcChainId - the source chain identifier // @param _srcAddress - the source chain contract address // @param _payload - the payload to be retried function retryPayload( uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload ) external; // @notice query if any STORED payload (message blocking) at the endpoint. // @param _srcChainId - the source chain identifier // @param _srcAddress - the source chain contract address function hasStoredPayload( uint16 _srcChainId, bytes calldata _srcAddress ) external view returns (bool); // @notice query if the _libraryAddress is valid for sending msgs. // @param _userApplication - the user app address on this EVM chain function getSendLibraryAddress( address _userApplication ) external view returns (address); // @notice query if the _libraryAddress is valid for receiving msgs. // @param _userApplication - the user app address on this EVM chain function getReceiveLibraryAddress( address _userApplication ) external view returns (address); // @notice query if the non-reentrancy guard for send() is on // @return true if the guard is on. false otherwise function isSendingPayload() external view returns (bool); // @notice query if the non-reentrancy guard for receive() is on // @return true if the guard is on. false otherwise function isReceivingPayload() external view returns (bool); // @notice get the configuration of the LayerZero messaging library of the specified version // @param _version - messaging library version // @param _chainId - the chainId for the pending config change // @param _userApplication - the contract address of the user application // @param _configType - type of configuration. every messaging library has its own convention. function getConfig( uint16 _version, uint16 _chainId, address _userApplication, uint _configType ) external view returns (bytes memory); // @notice get the send() LayerZero messaging library version // @param _userApplication - the contract address of the user application function getSendVersion( address _userApplication ) external view returns (uint16); // @notice get the lzReceive() LayerZero messaging library version // @param _userApplication - the contract address of the user application function getReceiveVersion( address _userApplication ) external view returns (uint16); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.5.0; interface ILayerZeroReceiver { // @notice LayerZero endpoint will invoke this function to deliver the message on the destination // @param _srcChainId - the source endpoint identifier // @param _srcAddress - the source sending contract address from the source chain // @param _nonce - the ordered message nonce // @param _payload - the signed payload is the UA bytes has encoded to be sent function lzReceive( uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload ) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.5.0; interface ILayerZeroUserApplicationConfig { // @notice set the configuration of the LayerZero messaging library of the specified version // @param _version - messaging library version // @param _chainId - the chainId for the pending config change // @param _configType - type of configuration. every messaging library has its own convention. // @param _config - configuration in the bytes. can encode arbitrary content. function setConfig( uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config ) external; // @notice set the send() LayerZero messaging library version to _version // @param _version - new messaging library version function setSendVersion(uint16 _version) external; // @notice set the lzReceive() LayerZero messaging library version to _version // @param _version - new messaging library version function setReceiveVersion(uint16 _version) external; // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload // @param _srcChainId - the chainId of the source chain // @param _srcAddress - the contract address of the source contract at the source chain function forceResumeReceive( uint16 _srcChainId, bytes calldata _srcAddress ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/ILayerZeroReceiver.sol"; import "./interfaces/ILayerZeroUserApplicationConfig.sol"; import "./interfaces/ILayerZeroEndpoint.sol"; import "./utils/BytesLib.sol"; /* * a generic LzReceiver implementation */ abstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig { using BytesLib for bytes; // ua can not send payload larger than this by default, but it can be changed by the ua owner uint public constant DEFAULT_PAYLOAD_SIZE_LIMIT = 10000; ILayerZeroEndpoint public immutable lzEndpoint; mapping(uint16 => bytes) public trustedRemoteLookup; mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup; mapping(uint16 => uint) public payloadSizeLimitLookup; address public precrime; event SetPrecrime(address precrime); event SetTrustedRemote(uint16 _remoteChainId, bytes _path); event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress); event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas); constructor(address _endpoint) { lzEndpoint = ILayerZeroEndpoint(_endpoint); } function lzReceive( uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload ) public virtual override { // lzReceive must be called by the endpoint for security require( _msgSender() == address(lzEndpoint), "LzApp: invalid endpoint caller" ); bytes memory trustedRemote = trustedRemoteLookup[_srcChainId]; // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote. require( _srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote), "LzApp: invalid source sending contract" ); _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload); } // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging function _blockingLzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) internal virtual; function _lzSend( uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams, uint _nativeFee ) internal virtual { bytes memory trustedRemote = trustedRemoteLookup[_dstChainId]; require( trustedRemote.length != 0, "LzApp: destination chain is not a trusted source" ); _checkPayloadSize(_dstChainId, _payload.length); lzEndpoint.send{value: _nativeFee}( _dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams ); } function _checkGasLimit( uint16 _dstChainId, uint16 _type, bytes memory _adapterParams, uint _extraGas ) internal view virtual { uint providedGasLimit = _getGasLimit(_adapterParams); uint minGasLimit = minDstGasLookup[_dstChainId][_type] + _extraGas; require(minGasLimit > 0, "LzApp: minGasLimit not set"); require(providedGasLimit >= minGasLimit, "LzApp: gas limit is too low"); } function _getGasLimit( bytes memory _adapterParams ) internal pure virtual returns (uint gasLimit) { require(_adapterParams.length >= 34, "LzApp: invalid adapterParams"); assembly { gasLimit := mload(add(_adapterParams, 34)) } } function _checkPayloadSize( uint16 _dstChainId, uint _payloadSize ) internal view virtual { uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId]; if (payloadSizeLimit == 0) { // use default if not set payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT; } require( _payloadSize <= payloadSizeLimit, "LzApp: payload size is too large" ); } //---------------------------UserApplication config---------------------------------------- function getConfig( uint16 _version, uint16 _chainId, address, uint _configType ) external view returns (bytes memory) { return lzEndpoint.getConfig( _version, _chainId, address(this), _configType ); } // generic config for LayerZero user Application function setConfig( uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config ) external override onlyOwner { lzEndpoint.setConfig(_version, _chainId, _configType, _config); } function setSendVersion(uint16 _version) external override onlyOwner { lzEndpoint.setSendVersion(_version); } function setReceiveVersion(uint16 _version) external override onlyOwner { lzEndpoint.setReceiveVersion(_version); } function forceResumeReceive( uint16 _srcChainId, bytes calldata _srcAddress ) external override onlyOwner { lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress); } // _path = abi.encodePacked(remoteAddress, localAddress) // this function set the trusted path for the cross-chain communication function setTrustedRemote( uint16 _srcChainId, bytes calldata _path ) external onlyOwner { trustedRemoteLookup[_srcChainId] = _path; emit SetTrustedRemote(_srcChainId, _path); } function setTrustedRemoteAddress( uint16 _remoteChainId, bytes calldata _remoteAddress ) external onlyOwner { trustedRemoteLookup[_remoteChainId] = abi.encodePacked( _remoteAddress, address(this) ); emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress); } function getTrustedRemoteAddress( uint16 _remoteChainId ) external view returns (bytes memory) { bytes memory path = trustedRemoteLookup[_remoteChainId]; require(path.length != 0, "LzApp: no trusted path record"); return path.slice(0, path.length - 20); // the last 20 bytes should be address(this) } function setPrecrime(address _precrime) external onlyOwner { precrime = _precrime; emit SetPrecrime(_precrime); } function setMinDstGas( uint16 _dstChainId, uint16 _packetType, uint _minGas ) external onlyOwner { require(_minGas > 0, "LzApp: invalid minGas"); minDstGasLookup[_dstChainId][_packetType] = _minGas; emit SetMinDstGas(_dstChainId, _packetType, _minGas); } // if the size is 0, it means default size limit function setPayloadSizeLimit( uint16 _dstChainId, uint _size ) external onlyOwner { payloadSizeLimitLookup[_dstChainId] = _size; } //--------------------------- VIEW FUNCTION ---------------------------------------- function isTrustedRemote( uint16 _srcChainId, bytes calldata _srcAddress ) external view returns (bool) { bytes memory trustedSource = trustedRemoteLookup[_srcChainId]; return keccak256(trustedSource) == keccak256(_srcAddress); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./LzApp.sol"; import "./utils/ExcessivelySafeCall.sol"; /* * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress) */ abstract contract NonblockingLzApp is LzApp { using ExcessivelySafeCall for address; constructor(address _endpoint) LzApp(_endpoint) {} mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages; event MessageFailed( uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason ); event RetryMessageSuccess( uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash ); // overriding the virtual function in LzReceiver function _blockingLzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) internal virtual override { (bool success, bytes memory reason) = address(this).excessivelySafeCall( gasleft(), 150, abi.encodeWithSelector( this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload ) ); // try-catch all errors/exceptions if (!success) { _storeFailedMessage( _srcChainId, _srcAddress, _nonce, _payload, reason ); } } function _storeFailedMessage( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload, bytes memory _reason ) internal virtual { failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload); emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason); } function nonblockingLzReceive( uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload ) public virtual { // only internal transaction require( _msgSender() == address(this), "NonblockingLzApp: caller must be LzApp" ); _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload); } //@notice override this function function _nonblockingLzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) internal virtual; function retryMessage( uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload ) public payable virtual { // assert there is message to retry bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce]; require( payloadHash != bytes32(0), "NonblockingLzApp: no stored message" ); require( keccak256(_payload) == payloadHash, "NonblockingLzApp: invalid payload" ); // clear the stored message failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0); // execute the message. revert if it fails again _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload); emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash); } }
// SPDX-License-Identifier: Unlicense /* * @title Solidity Bytes Arrays Utils * @author Gonçalo Sá <[email protected]> * * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity. * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage. */ pragma solidity >=0.8.0 <0.9.0; library BytesLib { function concat( bytes memory _preBytes, bytes memory _postBytes ) internal pure returns (bytes memory) { bytes memory tempBytes; assembly { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // Store the length of the first bytes array at the beginning of // the memory for tempBytes. let length := mload(_preBytes) mstore(tempBytes, length) // Maintain a memory counter for the current write location in the // temp bytes array by adding the 32 bytes for the array length to // the starting location. let mc := add(tempBytes, 0x20) // Stop copying when the memory counter reaches the length of the // first bytes array. let end := add(mc, length) for { // Initialize a copy counter to the start of the _preBytes data, // 32 bytes into its memory. let cc := add(_preBytes, 0x20) } lt(mc, end) { // Increase both counters by 32 bytes each iteration. mc := add(mc, 0x20) cc := add(cc, 0x20) } { // Write the _preBytes data into the tempBytes memory 32 bytes // at a time. mstore(mc, mload(cc)) } // Add the length of _postBytes to the current length of tempBytes // and store it as the new length in the first 32 bytes of the // tempBytes memory. length := mload(_postBytes) mstore(tempBytes, add(length, mload(tempBytes))) // Move the memory counter back from a multiple of 0x20 to the // actual end of the _preBytes data. mc := end // Stop copying when the memory counter reaches the new combined // length of the arrays. end := add(mc, length) for { let cc := add(_postBytes, 0x20) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } // Update the free-memory pointer by padding our last write location // to 32 bytes: add 31 bytes to the end of tempBytes to move to the // next 32 byte block, then round down to the nearest multiple of // 32. If the sum of the length of the two arrays is zero then add // one before rounding down to leave a blank 32 bytes (the length block with 0). mstore( 0x40, and( add(add(end, iszero(add(length, mload(_preBytes)))), 31), not(31) // Round down to the nearest 32 bytes. ) ) } return tempBytes; } function concatStorage( bytes storage _preBytes, bytes memory _postBytes ) internal { assembly { // Read the first 32 bytes of _preBytes storage, which is the length // of the array. (We don't need to use the offset into the slot // because arrays use the entire slot.) let fslot := sload(_preBytes.slot) // Arrays of 31 bytes or less have an even value in their slot, // while longer arrays have an odd value. The actual length is // the slot divided by two for odd values, and the lowest order // byte divided by two for even values. // If the slot is even, bitwise and the slot with 255 and divide by // two to get the length. If the slot is odd, bitwise and the slot // with -1 and divide by two. let slength := div( and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2 ) let mlength := mload(_postBytes) let newlength := add(slength, mlength) // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage switch add(lt(slength, 32), lt(newlength, 32)) case 2 { // Since the new array still fits in the slot, we just need to // update the contents of the slot. // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length sstore( _preBytes.slot, // all the modifications to the slot are inside this // next block add( // we can just add to the slot contents because the // bytes we want to change are the LSBs fslot, add( mul( div( // load the bytes from memory mload(add(_postBytes, 0x20)), // zero all bytes to the right exp(0x100, sub(32, mlength)) ), // and now shift left the number of bytes to // leave space for the length in the slot exp(0x100, sub(32, newlength)) ), // increase length by the double of the memory // bytes length mul(mlength, 2) ) ) ) } case 1 { // The stored value fits in the slot, but the combined value // will exceed it. // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) let sc := add(keccak256(0x0, 0x20), div(slength, 32)) // save new length sstore(_preBytes.slot, add(mul(newlength, 2), 1)) // The contents of the _postBytes array start 32 bytes into // the structure. Our first read should obtain the `submod` // bytes that can fit into the unused space in the last word // of the stored array. To get this, we read 32 bytes starting // from `submod`, so the data we read overlaps with the array // contents by `submod` bytes. Masking the lowest-order // `submod` bytes allows us to add that value directly to the // stored value. let submod := sub(32, slength) let mc := add(_postBytes, submod) let end := add(_postBytes, mlength) let mask := sub(exp(0x100, submod), 1) sstore( sc, add( and( fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00 ), and(mload(mc), mask) ) ) for { mc := add(mc, 0x20) sc := add(sc, 1) } lt(mc, end) { sc := add(sc, 1) mc := add(mc, 0x20) } { sstore(sc, mload(mc)) } mask := exp(0x100, sub(mc, end)) sstore(sc, mul(div(mload(mc), mask), mask)) } default { // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) // Start copying to the last used word of the stored array. let sc := add(keccak256(0x0, 0x20), div(slength, 32)) // save new length sstore(_preBytes.slot, add(mul(newlength, 2), 1)) // Copy over the first `submod` bytes of the new data as in // case 1 above. let slengthmod := mod(slength, 32) let mlengthmod := mod(mlength, 32) let submod := sub(32, slengthmod) let mc := add(_postBytes, submod) let end := add(_postBytes, mlength) let mask := sub(exp(0x100, submod), 1) sstore(sc, add(sload(sc), and(mload(mc), mask))) for { sc := add(sc, 1) mc := add(mc, 0x20) } lt(mc, end) { sc := add(sc, 1) mc := add(mc, 0x20) } { sstore(sc, mload(mc)) } mask := exp(0x100, sub(mc, end)) sstore(sc, mul(div(mload(mc), mask), mask)) } } } function slice( bytes memory _bytes, uint256 _start, uint256 _length ) internal pure returns (bytes memory) { require(_length + 31 >= _length, "slice_overflow"); require(_bytes.length >= _start + _length, "slice_outOfBounds"); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add( add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)) ) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add( add( add(_bytes, lengthmod), mul(0x20, iszero(lengthmod)) ), _start ) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) //zero out the 32 bytes slice we are about to return //we need to do it because Solidity does not garbage collect mstore(tempBytes, 0) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } function toAddress( bytes memory _bytes, uint256 _start ) internal pure returns (address) { require(_bytes.length >= _start + 20, "toAddress_outOfBounds"); address tempAddress; assembly { tempAddress := div( mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000 ) } return tempAddress; } function toUint8( bytes memory _bytes, uint256 _start ) internal pure returns (uint8) { require(_bytes.length >= _start + 1, "toUint8_outOfBounds"); uint8 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x1), _start)) } return tempUint; } function toUint16( bytes memory _bytes, uint256 _start ) internal pure returns (uint16) { require(_bytes.length >= _start + 2, "toUint16_outOfBounds"); uint16 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x2), _start)) } return tempUint; } function toUint32( bytes memory _bytes, uint256 _start ) internal pure returns (uint32) { require(_bytes.length >= _start + 4, "toUint32_outOfBounds"); uint32 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x4), _start)) } return tempUint; } function toUint64( bytes memory _bytes, uint256 _start ) internal pure returns (uint64) { require(_bytes.length >= _start + 8, "toUint64_outOfBounds"); uint64 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x8), _start)) } return tempUint; } function toUint96( bytes memory _bytes, uint256 _start ) internal pure returns (uint96) { require(_bytes.length >= _start + 12, "toUint96_outOfBounds"); uint96 tempUint; assembly { tempUint := mload(add(add(_bytes, 0xc), _start)) } return tempUint; } function toUint128( bytes memory _bytes, uint256 _start ) internal pure returns (uint128) { require(_bytes.length >= _start + 16, "toUint128_outOfBounds"); uint128 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x10), _start)) } return tempUint; } function toUint256( bytes memory _bytes, uint256 _start ) internal pure returns (uint256) { require(_bytes.length >= _start + 32, "toUint256_outOfBounds"); uint256 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x20), _start)) } return tempUint; } function toBytes32( bytes memory _bytes, uint256 _start ) internal pure returns (bytes32) { require(_bytes.length >= _start + 32, "toBytes32_outOfBounds"); bytes32 tempBytes32; assembly { tempBytes32 := mload(add(add(_bytes, 0x20), _start)) } return tempBytes32; } function equal( bytes memory _preBytes, bytes memory _postBytes ) internal pure returns (bool) { bool success = true; assembly { let length := mload(_preBytes) // if lengths don't match the arrays are not equal switch eq(length, mload(_postBytes)) case 1 { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 let mc := add(_preBytes, 0x20) let end := add(mc, length) for { let cc := add(_postBytes, 0x20) // the next line is the loop condition: // while(uint256(mc < end) + cb == 2) } eq(add(lt(mc, end), cb), 2) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { // if any of these checks fails then arrays are not equal if iszero(eq(mload(mc), mload(cc))) { // unsuccess: success := 0 cb := 0 } } } default { // unsuccess: success := 0 } } return success; } function equalStorage( bytes storage _preBytes, bytes memory _postBytes ) internal view returns (bool) { bool success = true; assembly { // we know _preBytes_offset is 0 let fslot := sload(_preBytes.slot) // Decode the length of the stored array like in concatStorage(). let slength := div( and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2 ) let mlength := mload(_postBytes) // if lengths don't match the arrays are not equal switch eq(slength, mlength) case 1 { // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage if iszero(iszero(slength)) { switch lt(slength, 32) case 1 { // blank the last byte which is the length fslot := mul(div(fslot, 0x100), 0x100) if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) { // unsuccess: success := 0 } } default { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) let sc := keccak256(0x0, 0x20) let mc := add(_postBytes, 0x20) let end := add(mc, mlength) // the next line is the loop condition: // while(uint256(mc < end) + cb == 2) for { } eq(add(lt(mc, end), cb), 2) { sc := add(sc, 1) mc := add(mc, 0x20) } { if iszero(eq(sload(sc), mload(mc))) { // unsuccess: success := 0 cb := 0 } } } } } default { // unsuccess: success := 0 } } return success; } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity >=0.7.6; library ExcessivelySafeCall { uint256 constant LOW_28_MASK = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff; /// @notice Use when you _really_ really _really_ don't trust the called /// contract. This prevents the called contract from causing reversion of /// the caller in as many ways as we can. /// @dev The main difference between this and a solidity low-level call is /// that we limit the number of bytes that the callee can cause to be /// copied to caller memory. This prevents stupid things like malicious /// contracts returning 10,000,000 bytes causing a local OOG when copying /// to memory. /// @param _target The address to call /// @param _gas The amount of gas to forward to the remote contract /// @param _maxCopy The maximum number of bytes of returndata to copy /// to memory. /// @param _calldata The data to send to the remote contract /// @return success and returndata, as `.call()`. Returndata is capped to /// `_maxCopy` bytes. function excessivelySafeCall( address _target, uint256 _gas, uint16 _maxCopy, bytes memory _calldata ) internal returns (bool, bytes memory) { // set up for assembly call uint256 _toCopy; bool _success; bytes memory _returnData = new bytes(_maxCopy); // dispatch message to recipient // by assembly calling "handle" function // we call via assembly to avoid memcopying a very large returndata // returned by a malicious contract assembly { _success := call( _gas, // gas _target, // recipient 0, // ether value add(_calldata, 0x20), // inloc mload(_calldata), // inlen 0, // outloc 0 // outlen ) // limit our copy to 256 bytes _toCopy := returndatasize() if gt(_toCopy, _maxCopy) { _toCopy := _maxCopy } // Store the length of the copied bytes mstore(_returnData, _toCopy) // copy the bytes from returndata[0:_toCopy] returndatacopy(add(_returnData, 0x20), 0, _toCopy) } return (_success, _returnData); } /// @notice Use when you _really_ really _really_ don't trust the called /// contract. This prevents the called contract from causing reversion of /// the caller in as many ways as we can. /// @dev The main difference between this and a solidity low-level call is /// that we limit the number of bytes that the callee can cause to be /// copied to caller memory. This prevents stupid things like malicious /// contracts returning 10,000,000 bytes causing a local OOG when copying /// to memory. /// @param _target The address to call /// @param _gas The amount of gas to forward to the remote contract /// @param _maxCopy The maximum number of bytes of returndata to copy /// to memory. /// @param _calldata The data to send to the remote contract /// @return success and returndata, as `.call()`. Returndata is capped to /// `_maxCopy` bytes. function excessivelySafeStaticCall( address _target, uint256 _gas, uint16 _maxCopy, bytes memory _calldata ) internal view returns (bool, bytes memory) { // set up for assembly call uint256 _toCopy; bool _success; bytes memory _returnData = new bytes(_maxCopy); // dispatch message to recipient // by assembly calling "handle" function // we call via assembly to avoid memcopying a very large returndata // returned by a malicious contract assembly { _success := staticcall( _gas, // gas _target, // recipient add(_calldata, 0x20), // inloc mload(_calldata), // inlen 0, // outloc 0 // outlen ) // limit our copy to 256 bytes _toCopy := returndatasize() if gt(_toCopy, _maxCopy) { _toCopy := _maxCopy } // Store the length of the copied bytes mstore(_returnData, _toCopy) // copy the bytes from returndata[0:_toCopy] returndatacopy(add(_returnData, 0x20), 0, _toCopy) } return (_success, _returnData); } /** * @notice Swaps function selectors in encoded contract calls * @dev Allows reuse of encoded calldata for functions with identical * argument types but different names. It simply swaps out the first 4 bytes * for the new selector. This function modifies memory in place, and should * only be used with caution. * @param _newSelector The new 4-byte selector * @param _buf The encoded contract args */ function swapSelector( bytes4 _newSelector, bytes memory _buf ) internal pure { require(_buf.length >= 4); uint256 _mask = LOW_28_MASK; assembly { // load the first word of let _word := mload(add(_buf, 0x20)) // mask out the top 4 bytes // /x _word := and(_word, _mask) _word := or(_newSelector, _word) mstore(add(_buf, 0x20), _word) } } }
{ "optimizer": { "enabled": false, "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":"_endpoint","type":"address"},{"internalType":"uint256","name":"_startTokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InsufficientGas","type":"error"},{"inputs":[],"name":"NotTokenOwner","type":"error"},{"inputs":[],"name":"SupplyExceeded","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"_payload","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"_reason","type":"bytes"}],"name":"MessageFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"counter","type":"uint256"}],"name":"ReceivedNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"RetryMessageSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"_type","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"_minDstGas","type":"uint256"}],"name":"SetMinDstGas","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"precrime","type":"address"}],"name":"SetPrecrime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_path","type":"bytes"}],"name":"SetTrustedRemote","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_remoteAddress","type":"bytes"}],"name":"SetTrustedRemoteAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_PAYLOAD_SIZE_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"counter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"dstChainId","type":"uint16"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"crossChain","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"currentTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"dstChainId","type":"uint16"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"estimateFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint64","name":"","type":"uint64"}],"name":"failedMessages","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"forceResumeReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"_configType","type":"uint256"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_remoteChainId","type":"uint16"}],"name":"getTrustedRemoteAddress","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"isTrustedRemote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lzEndpoint","outputs":[{"internalType":"contract ILayerZeroEndpoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"}],"name":"minDstGasLookup","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"nonblockingLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"payloadSizeLimitLookup","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"precrime","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"retryMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"_configType","type":"uint256"},{"internalType":"bytes","name":"_config","type":"bytes"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"uint16","name":"_packetType","type":"uint16"},{"internalType":"uint256","name":"_minGas","type":"uint256"}],"name":"setMinDstGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"uint256","name":"_size","type":"uint256"}],"name":"setPayloadSizeLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_precrime","type":"address"}],"name":"setPrecrime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setReceiveVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setSendVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_path","type":"bytes"}],"name":"setTrustedRemote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"internalType":"bytes","name":"_remoteAddress","type":"bytes"}],"name":"setTrustedRemoteAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"trustedRemoteLookup","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b5060405162006464380380620064648339818101604052810190620000379190620002bb565b81806040518060400160405280600d81526020017f43726f7373436861696e4e4654000000000000000000000000000000000000008152506040518060400160405280600581526020017f43434e4654000000000000000000000000000000000000000000000000000000815250620000c5620000b96200014a60201b60201c565b6200015260201b60201c565b8160019081620000d6919062000572565b508060029081620000e8919062000572565b5050508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505080600d819055506201869f600d546200013b919062000688565b60a081815250505050620006c3565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000248826200021b565b9050919050565b6200025a816200023b565b81146200026657600080fd5b50565b6000815190506200027a816200024f565b92915050565b6000819050919050565b620002958162000280565b8114620002a157600080fd5b50565b600081519050620002b5816200028a565b92915050565b60008060408385031215620002d557620002d462000216565b5b6000620002e58582860162000269565b9250506020620002f885828601620002a4565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200038457607f821691505b6020821081036200039a57620003996200033c565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620004047fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003c5565b620004108683620003c5565b95508019841693508086168417925050509392505050565b6000819050919050565b6000620004536200044d620004478462000280565b62000428565b62000280565b9050919050565b6000819050919050565b6200046f8362000432565b620004876200047e826200045a565b848454620003d2565b825550505050565b600090565b6200049e6200048f565b620004ab81848462000464565b505050565b5b81811015620004d357620004c760008262000494565b600181019050620004b1565b5050565b601f8211156200052257620004ec81620003a0565b620004f784620003b5565b8101602085101562000507578190505b6200051f6200051685620003b5565b830182620004b0565b50505b505050565b600082821c905092915050565b6000620005476000198460080262000527565b1980831691505092915050565b600062000562838362000534565b9150826002028217905092915050565b6200057d8262000302565b67ffffffffffffffff8111156200059957620005986200030d565b5b620005a582546200036b565b620005b2828285620004d7565b600060209050601f831160018114620005ea5760008415620005d5578287015190505b620005e1858262000554565b86555062000651565b601f198416620005fa86620003a0565b60005b828110156200062457848901518255600182019150602085019450602081019050620005fd565b8683101562000644578489015162000640601f89168262000534565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000620006958262000280565b9150620006a28362000280565b9250828201905080821115620006bd57620006bc62000659565b5b92915050565b60805160a051615d356200072f600039600081816110e90152611172015260008181610a6401528181610e3c0152818161105b015281816112790152818161142c015281816115f301528181611ca001528181611e1f0152818161234c0152612b1c0152615d356000f3fe6080604052600436106102655760003560e01c806370a0823111610144578063b88d4fde116100b6578063d1deba1f1161007a578063d1deba1f14610951578063df2a5b3b1461096d578063e985e9c514610996578063eb8d72b7146109d3578063f2fde38b146109fc578063f5ecbdbc14610a2557610265565b8063b88d4fde1461086e578063baf3292d14610897578063c4461834146108c0578063c87b56dd146108eb578063cbed8b9c1461092857610265565b8063950c8a7411610108578063950c8a741461075e57806395d89b41146107895780639f38369a146107b4578063a22cb465146107f1578063a6c3d1651461081a578063b353aaa71461084357610265565b806370a0823114610665578063715018a6146106a25780637533d788146106b95780638cfd8f5c146106f65780638da5cb5b1461073357610265565b80631e128296116101dd57806342842e0e116101a157806342842e0e1461054557806342d65a8d1461056e5780635b8c41e61461059757806361bc221a146105d45780636352211e146105ff57806366ad5c8a1461063c57610265565b80631e1282961461044957806323b872dd14610465578063362790f61461048e5780633d8b38f6146104cb5780633f1f4fa41461050857610265565b8063081812fc1161022f578063081812fc1461034f578063095ea7b31461038c5780630df37483146103b557806310ddb137146103de5780631249c58b1461040757806317bac0521461041e57610265565b80621d35671461026a5780629a9b7b1461029357806301ffc9a7146102be57806306fdde03146102fb57806307e0db1714610326575b600080fd5b34801561027657600080fd5b50610291600480360381019061028c9190613a92565b610a62565b005b34801561029f57600080fd5b506102a8610cb8565b6040516102b59190613b52565b60405180910390f35b3480156102ca57600080fd5b506102e560048036038101906102e09190613bc5565b610cbe565b6040516102f29190613c0d565b60405180910390f35b34801561030757600080fd5b50610310610da0565b60405161031d9190613cb8565b60405180910390f35b34801561033257600080fd5b5061034d60048036038101906103489190613cda565b610e32565b005b34801561035b57600080fd5b5061037660048036038101906103719190613d33565b610ec8565b6040516103839190613da1565b60405180910390f35b34801561039857600080fd5b506103b360048036038101906103ae9190613de8565b610f0e565b005b3480156103c157600080fd5b506103dc60048036038101906103d79190613e28565b611025565b005b3480156103ea57600080fd5b5061040560048036038101906104009190613cda565b611051565b005b34801561041357600080fd5b5061041c6110e7565b005b34801561042a57600080fd5b50610433611170565b6040516104409190613b52565b60405180910390f35b610463600480360381019061045e9190613e28565b611194565b005b34801561047157600080fd5b5061048c60048036038101906104879190613e68565b61136d565b005b34801561049a57600080fd5b506104b560048036038101906104b09190613e28565b6113cd565b6040516104c29190613b52565b60405180910390f35b3480156104d757600080fd5b506104f260048036038101906104ed9190613ebb565b6114dd565b6040516104ff9190613c0d565b60405180910390f35b34801561051457600080fd5b5061052f600480360381019061052a9190613cda565b6115b1565b60405161053c9190613b52565b60405180910390f35b34801561055157600080fd5b5061056c60048036038101906105679190613e68565b6115c9565b005b34801561057a57600080fd5b5061059560048036038101906105909190613ebb565b6115e9565b005b3480156105a357600080fd5b506105be60048036038101906105b9919061404b565b611685565b6040516105cb91906140d3565b60405180910390f35b3480156105e057600080fd5b506105e96116cd565b6040516105f69190613b52565b60405180910390f35b34801561060b57600080fd5b5061062660048036038101906106219190613d33565b6116d3565b6040516106339190613da1565b60405180910390f35b34801561064857600080fd5b50610663600480360381019061065e9190613a92565b611759565b005b34801561067157600080fd5b5061068c600480360381019061068791906140ee565b61186a565b6040516106999190613b52565b60405180910390f35b3480156106ae57600080fd5b506106b7611921565b005b3480156106c557600080fd5b506106e060048036038101906106db9190613cda565b611935565b6040516106ed9190614170565b60405180910390f35b34801561070257600080fd5b5061071d60048036038101906107189190614192565b6119d5565b60405161072a9190613b52565b60405180910390f35b34801561073f57600080fd5b506107486119fa565b6040516107559190613da1565b60405180910390f35b34801561076a57600080fd5b50610773611a23565b6040516107809190613da1565b60405180910390f35b34801561079557600080fd5b5061079e611a49565b6040516107ab9190613cb8565b60405180910390f35b3480156107c057600080fd5b506107db60048036038101906107d69190613cda565b611adb565b6040516107e89190614170565b60405180910390f35b3480156107fd57600080fd5b50610818600480360381019061081391906141fe565b611bf4565b005b34801561082657600080fd5b50610841600480360381019061083c9190613ebb565b611c0a565b005b34801561084f57600080fd5b50610858611c9e565b604051610865919061429d565b60405180910390f35b34801561087a57600080fd5b50610895600480360381019061089091906142b8565b611cc2565b005b3480156108a357600080fd5b506108be60048036038101906108b991906140ee565b611d24565b005b3480156108cc57600080fd5b506108d5611da7565b6040516108e29190613b52565b60405180910390f35b3480156108f757600080fd5b50610912600480360381019061090d9190613d33565b611dad565b60405161091f9190613cb8565b60405180910390f35b34801561093457600080fd5b5061094f600480360381019061094a919061433b565b611e15565b005b61096b60048036038101906109669190613a92565b611eb7565b005b34801561097957600080fd5b50610994600480360381019061098f91906143c3565b6120fa565b005b3480156109a257600080fd5b506109bd60048036038101906109b89190614416565b6121be565b6040516109ca9190613c0d565b60405180910390f35b3480156109df57600080fd5b506109fa60048036038101906109f59190613ebb565b612252565b005b348015610a0857600080fd5b50610a236004803603810190610a1e91906140ee565b6122c5565b005b348015610a3157600080fd5b50610a4c6004803603810190610a479190614456565b612348565b604051610a599190614170565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610aa16123f9565b73ffffffffffffffffffffffffffffffffffffffff1614610af7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aee90614509565b60405180910390fd5b6000600760008861ffff1661ffff1681526020019081526020016000208054610b1f90614558565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4b90614558565b8015610b985780601f10610b6d57610100808354040283529160200191610b98565b820191906000526020600020905b815481529060010190602001808311610b7b57829003601f168201915b50505050509050805186869050148015610bb3575060008151115b8015610bdc575080805190602001208686604051610bd29291906145b9565b6040518091039020145b610c1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1290614644565b60405180910390fd5b610caf8787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612401565b50505050505050565b600d5481565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610d8957507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610d995750610d98826124cc565b5b9050919050565b606060018054610daf90614558565b80601f0160208091040260200160405190810160405280929190818152602001828054610ddb90614558565b8015610e285780601f10610dfd57610100808354040283529160200191610e28565b820191906000526020600020905b815481529060010190602001808311610e0b57829003601f168201915b5050505050905090565b610e3a612536565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166307e0db17826040518263ffffffff1660e01b8152600401610e939190614673565b600060405180830381600087803b158015610ead57600080fd5b505af1158015610ec1573d6000803e3d6000fd5b5050505050565b6000610ed3826125b4565b6005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610f19826116d3565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8090614700565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610fa86123f9565b73ffffffffffffffffffffffffffffffffffffffff161480610fd75750610fd681610fd16123f9565b6121be565b5b611016576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100d90614792565b60405180910390fd5b61102083836125ff565b505050565b61102d612536565b80600960008461ffff1661ffff168152602001908152602001600020819055505050565b611059612536565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166310ddb137826040518263ffffffff1660e01b81526004016110b29190614673565b600060405180830381600087803b1580156110cc57600080fd5b505af11580156110e0573d6000803e3d6000fd5b5050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600d5403611142576040517f7d3d824900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61114e33600d546126b8565b600d6000815460010191905081905550600c6000815460010191905081905550565b7f000000000000000000000000000000000000000000000000000000000000000081565b61119d816116d3565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611201576040517f59dc379f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c60008154600190039190508190555061121b816128d5565b600033826040516020016112309291906147b2565b6040516020818303038152906040529050600060019050600062055730905060008282604051602001611264929190614832565b604051602081830303815290604052905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166340a7bb108830886000876040518663ffffffff1660e01b81526004016112d995949392919061485e565b6040805180830381865afa1580156112f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131991906148d4565b509050803411611355576040517f1c26714c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61136487863360008634612a23565b50505050505050565b61137e6113786123f9565b82612bb9565b6113bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b490614986565b60405180910390fd5b6113c8838383612c4e565b505050565b60008033836040516020016113e39291906147b2565b6040516020818303038152906040529050600060019050600062055730905060008282604051602001611417929190614832565b604051602081830303815290604052905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166340a7bb108930886000876040518663ffffffff1660e01b815260040161148c95949392919061485e565b6040805180830381865afa1580156114a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114cc91906148d4565b509050809550505050505092915050565b600080600760008661ffff1661ffff168152602001908152602001600020805461150690614558565b80601f016020809104026020016040519081016040528092919081815260200182805461153290614558565b801561157f5780601f106115545761010080835404028352916020019161157f565b820191906000526020600020905b81548152906001019060200180831161156257829003601f168201915b5050505050905083836040516115969291906145b9565b60405180910390208180519060200120149150509392505050565b60096020528060005260406000206000915090505481565b6115e483838360405180602001604052806000815250611cc2565b505050565b6115f1612536565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166342d65a8d8484846040518463ffffffff1660e01b815260040161164e939291906149d3565b600060405180830381600087803b15801561166857600080fd5b505af115801561167c573d6000803e3d6000fd5b50505050505050565b600b6020528260005260406000208280516020810182018051848252602083016020850120818352809550505050505060205280600052604060002060009250925050505481565b600c5481565b6000806116df83612f47565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611750576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174790614a51565b60405180910390fd5b80915050919050565b3073ffffffffffffffffffffffffffffffffffffffff166117786123f9565b73ffffffffffffffffffffffffffffffffffffffff16146117ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c590614ae3565b60405180910390fd5b6118628686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612f84565b505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036118da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d190614b75565b60405180910390fd5b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611929612536565b611933600061300a565b565b6007602052806000526040600020600091509050805461195490614558565b80601f016020809104026020016040519081016040528092919081815260200182805461198090614558565b80156119cd5780601f106119a2576101008083540402835291602001916119cd565b820191906000526020600020905b8154815290600101906020018083116119b057829003601f168201915b505050505081565b6008602052816000526040600020602052806000526040600020600091509150505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060028054611a5890614558565b80601f0160208091040260200160405190810160405280929190818152602001828054611a8490614558565b8015611ad15780601f10611aa657610100808354040283529160200191611ad1565b820191906000526020600020905b815481529060010190602001808311611ab457829003601f168201915b5050505050905090565b60606000600760008461ffff1661ffff1681526020019081526020016000208054611b0590614558565b80601f0160208091040260200160405190810160405280929190818152602001828054611b3190614558565b8015611b7e5780601f10611b5357610100808354040283529160200191611b7e565b820191906000526020600020905b815481529060010190602001808311611b6157829003601f168201915b505050505090506000815103611bc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bc090614be1565b60405180910390fd5b611bec600060148351611bdc9190614c30565b836130ce9092919063ffffffff16565b915050919050565b611c06611bff6123f9565b83836131ec565b5050565b611c12612536565b818130604051602001611c2793929190614cac565b604051602081830303815290604052600760008561ffff1661ffff1681526020019081526020016000209081611c5d9190614e78565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611c91939291906149d3565b60405180910390a1505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b611cd3611ccd6123f9565b83612bb9565b611d12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d0990614986565b60405180910390fd5b611d1e84848484613358565b50505050565b611d2c612536565b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b81604051611d9c9190613da1565b60405180910390a150565b61271081565b6060611db8826125b4565b6000611dc26133b4565b90506000815111611de25760405180602001604052806000815250611e0d565b80611dec846133cb565b604051602001611dfd929190614f86565b6040516020818303038152906040525b915050919050565b611e1d612536565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cbed8b9c86868686866040518663ffffffff1660e01b8152600401611e7e959493929190614faa565b600060405180830381600087803b158015611e9857600080fd5b505af1158015611eac573d6000803e3d6000fd5b505050505050505050565b6000600b60008861ffff1661ffff1681526020019081526020016000208686604051611ee49291906145b9565b908152602001604051809103902060008567ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000205490506000801b8103611f5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f569061506a565b60405180910390fd5b808383604051611f709291906145b9565b604051809103902014611fb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611faf906150fc565b60405180910390fd5b6000801b600b60008961ffff1661ffff1681526020019081526020016000208787604051611fe79291906145b9565b908152602001604051809103902060008667ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020819055506120b28787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612f84565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e587878787856040516120e995949392919061512b565b60405180910390a150505050505050565b612102612536565b60008111612145576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213c906151c5565b60405180910390fd5b80600860008561ffff1661ffff16815260200190815260200160002060008461ffff1661ffff168152602001908152602001600020819055507f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac08383836040516121b1939291906151e5565b60405180910390a1505050565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61225a612536565b8181600760008661ffff1661ffff1681526020019081526020016000209182612284929190615227565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab8383836040516122b8939291906149d3565b60405180910390a1505050565b6122cd612536565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361233c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161233390615369565b60405180910390fd5b6123458161300a565b50565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f5ecbdbc868630866040518563ffffffff1660e01b81526004016123a99493929190615389565b600060405180830381865afa1580156123c6573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906123ef919061543e565b9050949350505050565b600033905090565b6000806124ad5a60966366ad5c8a60e01b898989896040516024016124299493929190615487565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050503073ffffffffffffffffffffffffffffffffffffffff16613499909392919063ffffffff16565b91509150816124c4576124c38686868685613531565b5b505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61253e6123f9565b73ffffffffffffffffffffffffffffffffffffffff1661255c6119fa565b73ffffffffffffffffffffffffffffffffffffffff16146125b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a990615526565b60405180910390fd5b565b6125bd816135df565b6125fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125f390614a51565b60405180910390fd5b50565b816005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16612672836116d3565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612727576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271e90615592565b60405180910390fd5b612730816135df565b15612770576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612767906155fe565b60405180910390fd5b61277e600083836001613620565b612787816135df565b156127c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127be906155fe565b60405180910390fd5b6001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816003600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46128d1600083836001613626565b5050565b60006128e0826116d3565b90506128f0816000846001613620565b6128f9826116d3565b90506005600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506003600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612a1f816000846001613626565b5050565b6000600760008861ffff1661ffff1681526020019081526020016000208054612a4b90614558565b80601f0160208091040260200160405190810160405280929190818152602001828054612a7790614558565b8015612ac45780601f10612a9957610100808354040283529160200191612ac4565b820191906000526020600020905b815481529060010190602001808311612aa757829003601f168201915b505050505090506000815103612b0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b0690615690565b60405180910390fd5b612b1a87875161362c565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c58031008389848a8a8a8a6040518863ffffffff1660e01b8152600401612b7e969594939291906156d1565b6000604051808303818588803b158015612b9757600080fd5b505af1158015612bab573d6000803e3d6000fd5b505050505050505050505050565b600080612bc5836116d3565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612c075750612c0681856121be565b5b80612c4557508373ffffffffffffffffffffffffffffffffffffffff16612c2d84610ec8565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16612c6e826116d3565b73ffffffffffffffffffffffffffffffffffffffff1614612cc4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cbb906157b9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612d33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d2a9061584b565b60405180910390fd5b612d408383836001613620565b8273ffffffffffffffffffffffffffffffffffffffff16612d60826116d3565b73ffffffffffffffffffffffffffffffffffffffff1614612db6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dad906157b9565b60405180910390fd5b6005600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816003600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612f428383836001613626565b505050565b60006003600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006014840151905060008083806020019051810190612fa49190615897565b91509150612fb282826126b8565b600c60008154600101919050819055507f31ae2bb20187b24b2039def7711f43f56311ec96de17b7ef01d1b1da40eb2eee878483600c54604051612ff994939291906158d7565b60405180910390a150505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b606081601f836130de919061591c565b101561311f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131169061599c565b60405180910390fd5b818361312b919061591c565b8451101561316e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161316590615a08565b60405180910390fd5b606082156000811461318f57604051915060008252602082016040526131e0565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156131cd57805183526020830192506020810190506131b0565b50868552601f19601f8301166040525050505b50809150509392505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361325a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161325190615a74565b60405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161334b9190613c0d565b60405180910390a3505050565b613363848484612c4e565b61336f848484846136a2565b6133ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133a590615b06565b60405180910390fd5b50505050565b606060405180602001604052806000815250905090565b6060600060016133da84613829565b01905060008167ffffffffffffffff8111156133f9576133f8613f20565b5b6040519080825280601f01601f19166020018201604052801561342b5781602001600182028036833780820191505090505b509050600082602001820190505b60011561348e578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161348257613481615b26565b5b04945060008503613439575b819350505050919050565b6000606060008060008661ffff1667ffffffffffffffff8111156134c0576134bf613f20565b5b6040519080825280601f01601f1916602001820160405280156134f25781602001600182028036833780820191505090505b50905060008087516020890160008d8df191503d925086831115613514578692505b828152826000602083013e81819450945050505094509492505050565b8180519060200120600b60008761ffff1661ffff168152602001908152602001600020856040516135629190615b86565b908152602001604051809103902060008567ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020819055507fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c85858585856040516135d0959493929190615b9d565b60405180910390a15050505050565b60008073ffffffffffffffffffffffffffffffffffffffff1661360183612f47565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b50505050565b50505050565b6000600960008461ffff1661ffff1681526020019081526020016000205490506000810361365a5761271090505b8082111561369d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161369490615c51565b60405180910390fd5b505050565b60006136c38473ffffffffffffffffffffffffffffffffffffffff1661397c565b1561381c578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026136ec6123f9565b8786866040518563ffffffff1660e01b815260040161370e9493929190615c71565b6020604051808303816000875af192505050801561374a57506040513d601f19601f820116820180604052508101906137479190615cd2565b60015b6137cc573d806000811461377a576040519150601f19603f3d011682016040523d82523d6000602084013e61377f565b606091505b5060008151036137c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137bb90615b06565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050613821565b600190505b949350505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613887577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161387d5761387c615b26565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106138c4576d04ee2d6d415b85acef810000000083816138ba576138b9615b26565b5b0492506020810190505b662386f26fc1000083106138f357662386f26fc1000083816138e9576138e8615b26565b5b0492506010810190505b6305f5e100831061391c576305f5e100838161391257613911615b26565b5b0492506008810190505b612710831061394157612710838161393757613936615b26565b5b0492506004810190505b60648310613964576064838161395a57613959615b26565b5b0492506002810190505b600a8310613973576001810190505b80915050919050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600061ffff82169050919050565b6139ca816139b3565b81146139d557600080fd5b50565b6000813590506139e7816139c1565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112613a1257613a116139ed565b5b8235905067ffffffffffffffff811115613a2f57613a2e6139f2565b5b602083019150836001820283011115613a4b57613a4a6139f7565b5b9250929050565b600067ffffffffffffffff82169050919050565b613a6f81613a52565b8114613a7a57600080fd5b50565b600081359050613a8c81613a66565b92915050565b60008060008060008060808789031215613aaf57613aae6139a9565b5b6000613abd89828a016139d8565b965050602087013567ffffffffffffffff811115613ade57613add6139ae565b5b613aea89828a016139fc565b95509550506040613afd89828a01613a7d565b935050606087013567ffffffffffffffff811115613b1e57613b1d6139ae565b5b613b2a89828a016139fc565b92509250509295509295509295565b6000819050919050565b613b4c81613b39565b82525050565b6000602082019050613b676000830184613b43565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613ba281613b6d565b8114613bad57600080fd5b50565b600081359050613bbf81613b99565b92915050565b600060208284031215613bdb57613bda6139a9565b5b6000613be984828501613bb0565b91505092915050565b60008115159050919050565b613c0781613bf2565b82525050565b6000602082019050613c226000830184613bfe565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613c62578082015181840152602081019050613c47565b60008484015250505050565b6000601f19601f8301169050919050565b6000613c8a82613c28565b613c948185613c33565b9350613ca4818560208601613c44565b613cad81613c6e565b840191505092915050565b60006020820190508181036000830152613cd28184613c7f565b905092915050565b600060208284031215613cf057613cef6139a9565b5b6000613cfe848285016139d8565b91505092915050565b613d1081613b39565b8114613d1b57600080fd5b50565b600081359050613d2d81613d07565b92915050565b600060208284031215613d4957613d486139a9565b5b6000613d5784828501613d1e565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613d8b82613d60565b9050919050565b613d9b81613d80565b82525050565b6000602082019050613db66000830184613d92565b92915050565b613dc581613d80565b8114613dd057600080fd5b50565b600081359050613de281613dbc565b92915050565b60008060408385031215613dff57613dfe6139a9565b5b6000613e0d85828601613dd3565b9250506020613e1e85828601613d1e565b9150509250929050565b60008060408385031215613e3f57613e3e6139a9565b5b6000613e4d858286016139d8565b9250506020613e5e85828601613d1e565b9150509250929050565b600080600060608486031215613e8157613e806139a9565b5b6000613e8f86828701613dd3565b9350506020613ea086828701613dd3565b9250506040613eb186828701613d1e565b9150509250925092565b600080600060408486031215613ed457613ed36139a9565b5b6000613ee2868287016139d8565b935050602084013567ffffffffffffffff811115613f0357613f026139ae565b5b613f0f868287016139fc565b92509250509250925092565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613f5882613c6e565b810181811067ffffffffffffffff82111715613f7757613f76613f20565b5b80604052505050565b6000613f8a61399f565b9050613f968282613f4f565b919050565b600067ffffffffffffffff821115613fb657613fb5613f20565b5b613fbf82613c6e565b9050602081019050919050565b82818337600083830152505050565b6000613fee613fe984613f9b565b613f80565b90508281526020810184848401111561400a57614009613f1b565b5b614015848285613fcc565b509392505050565b600082601f830112614032576140316139ed565b5b8135614042848260208601613fdb565b91505092915050565b600080600060608486031215614064576140636139a9565b5b6000614072868287016139d8565b935050602084013567ffffffffffffffff811115614093576140926139ae565b5b61409f8682870161401d565b92505060406140b086828701613a7d565b9150509250925092565b6000819050919050565b6140cd816140ba565b82525050565b60006020820190506140e860008301846140c4565b92915050565b600060208284031215614104576141036139a9565b5b600061411284828501613dd3565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60006141428261411b565b61414c8185614126565b935061415c818560208601613c44565b61416581613c6e565b840191505092915050565b6000602082019050818103600083015261418a8184614137565b905092915050565b600080604083850312156141a9576141a86139a9565b5b60006141b7858286016139d8565b92505060206141c8858286016139d8565b9150509250929050565b6141db81613bf2565b81146141e657600080fd5b50565b6000813590506141f8816141d2565b92915050565b60008060408385031215614215576142146139a9565b5b600061422385828601613dd3565b9250506020614234858286016141e9565b9150509250929050565b6000819050919050565b600061426361425e61425984613d60565b61423e565b613d60565b9050919050565b600061427582614248565b9050919050565b60006142878261426a565b9050919050565b6142978161427c565b82525050565b60006020820190506142b2600083018461428e565b92915050565b600080600080608085870312156142d2576142d16139a9565b5b60006142e087828801613dd3565b94505060206142f187828801613dd3565b935050604061430287828801613d1e565b925050606085013567ffffffffffffffff811115614323576143226139ae565b5b61432f8782880161401d565b91505092959194509250565b600080600080600060808688031215614357576143566139a9565b5b6000614365888289016139d8565b9550506020614376888289016139d8565b945050604061438788828901613d1e565b935050606086013567ffffffffffffffff8111156143a8576143a76139ae565b5b6143b4888289016139fc565b92509250509295509295909350565b6000806000606084860312156143dc576143db6139a9565b5b60006143ea868287016139d8565b93505060206143fb868287016139d8565b925050604061440c86828701613d1e565b9150509250925092565b6000806040838503121561442d5761442c6139a9565b5b600061443b85828601613dd3565b925050602061444c85828601613dd3565b9150509250929050565b600080600080608085870312156144705761446f6139a9565b5b600061447e878288016139d8565b945050602061448f878288016139d8565b93505060406144a087828801613dd3565b92505060606144b187828801613d1e565b91505092959194509250565b7f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c65720000600082015250565b60006144f3601e83613c33565b91506144fe826144bd565b602082019050919050565b60006020820190508181036000830152614522816144e6565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061457057607f821691505b60208210810361458357614582614529565b5b50919050565b600081905092915050565b60006145a08385614589565b93506145ad838584613fcc565b82840190509392505050565b60006145c6828486614594565b91508190509392505050565b7f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b600061462e602683613c33565b9150614639826145d2565b604082019050919050565b6000602082019050818103600083015261465d81614621565b9050919050565b61466d816139b3565b82525050565b60006020820190506146886000830184614664565b92915050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006146ea602183613c33565b91506146f58261468e565b604082019050919050565b60006020820190508181036000830152614719816146dd565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b600061477c603d83613c33565b915061478782614720565b604082019050919050565b600060208201905081810360008301526147ab8161476f565b9050919050565b60006040820190506147c76000830185613d92565b6147d46020830184613b43565b9392505050565b60008160f01b9050919050565b60006147f3826147db565b9050919050565b61480b614806826139b3565b6147e8565b82525050565b6000819050919050565b61482c61482782613b39565b614811565b82525050565b600061483e82856147fa565b60028201915061484e828461481b565b6020820191508190509392505050565b600060a0820190506148736000830188614664565b6148806020830187613d92565b81810360408301526148928186614137565b90506148a16060830185613bfe565b81810360808301526148b38184614137565b90509695505050505050565b6000815190506148ce81613d07565b92915050565b600080604083850312156148eb576148ea6139a9565b5b60006148f9858286016148bf565b925050602061490a858286016148bf565b9150509250929050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b6000614970602d83613c33565b915061497b82614914565b604082019050919050565b6000602082019050818103600083015261499f81614963565b9050919050565b60006149b28385614126565b93506149bf838584613fcc565b6149c883613c6e565b840190509392505050565b60006040820190506149e86000830186614664565b81810360208301526149fb8184866149a6565b9050949350505050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b6000614a3b601883613c33565b9150614a4682614a05565b602082019050919050565b60006020820190508181036000830152614a6a81614a2e565b9050919050565b7f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d75737420626560008201527f204c7a4170700000000000000000000000000000000000000000000000000000602082015250565b6000614acd602683613c33565b9150614ad882614a71565b604082019050919050565b60006020820190508181036000830152614afc81614ac0565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b6000614b5f602983613c33565b9150614b6a82614b03565b604082019050919050565b60006020820190508181036000830152614b8e81614b52565b9050919050565b7f4c7a4170703a206e6f20747275737465642070617468207265636f7264000000600082015250565b6000614bcb601d83613c33565b9150614bd682614b95565b602082019050919050565b60006020820190508181036000830152614bfa81614bbe565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614c3b82613b39565b9150614c4683613b39565b9250828203905081811115614c5e57614c5d614c01565b5b92915050565b60008160601b9050919050565b6000614c7c82614c64565b9050919050565b6000614c8e82614c71565b9050919050565b614ca6614ca182613d80565b614c83565b82525050565b6000614cb9828587614594565b9150614cc58284614c95565b601482019150819050949350505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302614d387fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614cfb565b614d428683614cfb565b95508019841693508086168417925050509392505050565b6000614d75614d70614d6b84613b39565b61423e565b613b39565b9050919050565b6000819050919050565b614d8f83614d5a565b614da3614d9b82614d7c565b848454614d08565b825550505050565b600090565b614db8614dab565b614dc3818484614d86565b505050565b5b81811015614de757614ddc600082614db0565b600181019050614dc9565b5050565b601f821115614e2c57614dfd81614cd6565b614e0684614ceb565b81016020851015614e15578190505b614e29614e2185614ceb565b830182614dc8565b50505b505050565b600082821c905092915050565b6000614e4f60001984600802614e31565b1980831691505092915050565b6000614e688383614e3e565b9150826002028217905092915050565b614e818261411b565b67ffffffffffffffff811115614e9a57614e99613f20565b5b614ea48254614558565b614eaf828285614deb565b600060209050601f831160018114614ee25760008415614ed0578287015190505b614eda8582614e5c565b865550614f42565b601f198416614ef086614cd6565b60005b82811015614f1857848901518255600182019150602085019450602081019050614ef3565b86831015614f355784890151614f31601f891682614e3e565b8355505b6001600288020188555050505b505050505050565b600081905092915050565b6000614f6082613c28565b614f6a8185614f4a565b9350614f7a818560208601613c44565b80840191505092915050565b6000614f928285614f55565b9150614f9e8284614f55565b91508190509392505050565b6000608082019050614fbf6000830188614664565b614fcc6020830187614664565b614fd96040830186613b43565b8181036060830152614fec8184866149a6565b90509695505050505050565b7f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360008201527f6167650000000000000000000000000000000000000000000000000000000000602082015250565b6000615054602383613c33565b915061505f82614ff8565b604082019050919050565b6000602082019050818103600083015261508381615047565b9050919050565b7f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f6160008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b60006150e6602183613c33565b91506150f18261508a565b604082019050919050565b60006020820190508181036000830152615115816150d9565b9050919050565b61512581613a52565b82525050565b60006080820190506151406000830188614664565b81810360208301526151538186886149a6565b9050615162604083018561511c565b61516f60608301846140c4565b9695505050505050565b7f4c7a4170703a20696e76616c6964206d696e4761730000000000000000000000600082015250565b60006151af601583613c33565b91506151ba82615179565b602082019050919050565b600060208201905081810360008301526151de816151a2565b9050919050565b60006060820190506151fa6000830186614664565b6152076020830185614664565b6152146040830184613b43565b949350505050565b600082905092915050565b615231838361521c565b67ffffffffffffffff81111561524a57615249613f20565b5b6152548254614558565b61525f828285614deb565b6000601f83116001811461528e576000841561527c578287013590505b6152868582614e5c565b8655506152ee565b601f19841661529c86614cd6565b60005b828110156152c45784890135825560018201915060208501945060208101905061529f565b868310156152e157848901356152dd601f891682614e3e565b8355505b6001600288020188555050505b50505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000615353602683613c33565b915061535e826152f7565b604082019050919050565b6000602082019050818103600083015261538281615346565b9050919050565b600060808201905061539e6000830187614664565b6153ab6020830186614664565b6153b86040830185613d92565b6153c56060830184613b43565b95945050505050565b60006153e16153dc84613f9b565b613f80565b9050828152602081018484840111156153fd576153fc613f1b565b5b615408848285613c44565b509392505050565b600082601f830112615425576154246139ed565b5b81516154358482602086016153ce565b91505092915050565b600060208284031215615454576154536139a9565b5b600082015167ffffffffffffffff811115615472576154716139ae565b5b61547e84828501615410565b91505092915050565b600060808201905061549c6000830187614664565b81810360208301526154ae8186614137565b90506154bd604083018561511c565b81810360608301526154cf8184614137565b905095945050505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000615510602083613c33565b915061551b826154da565b602082019050919050565b6000602082019050818103600083015261553f81615503565b9050919050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b600061557c602083613c33565b915061558782615546565b602082019050919050565b600060208201905081810360008301526155ab8161556f565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006155e8601c83613c33565b91506155f3826155b2565b602082019050919050565b60006020820190508181036000830152615617816155db565b9050919050565b7f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060008201527f61207472757374656420736f7572636500000000000000000000000000000000602082015250565b600061567a603083613c33565b91506156858261561e565b604082019050919050565b600060208201905081810360008301526156a98161566d565b9050919050565b60006156bb82613d60565b9050919050565b6156cb816156b0565b82525050565b600060c0820190506156e66000830189614664565b81810360208301526156f88188614137565b9050818103604083015261570c8187614137565b905061571b60608301866156c2565b6157286080830185613d92565b81810360a083015261573a8184614137565b9050979650505050505050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b60006157a3602583613c33565b91506157ae82615747565b604082019050919050565b600060208201905081810360008301526157d281615796565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000615835602483613c33565b9150615840826157d9565b604082019050919050565b6000602082019050818103600083015261586481615828565b9050919050565b615874816156b0565b811461587f57600080fd5b50565b6000815190506158918161586b565b92915050565b600080604083850312156158ae576158ad6139a9565b5b60006158bc85828601615882565b92505060206158cd858286016148bf565b9150509250929050565b60006080820190506158ec6000830187614664565b6158f96020830186613d92565b6159066040830185613b43565b6159136060830184613b43565b95945050505050565b600061592782613b39565b915061593283613b39565b925082820190508082111561594a57615949614c01565b5b92915050565b7f736c6963655f6f766572666c6f77000000000000000000000000000000000000600082015250565b6000615986600e83613c33565b915061599182615950565b602082019050919050565b600060208201905081810360008301526159b581615979565b9050919050565b7f736c6963655f6f75744f66426f756e6473000000000000000000000000000000600082015250565b60006159f2601183613c33565b91506159fd826159bc565b602082019050919050565b60006020820190508181036000830152615a21816159e5565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000615a5e601983613c33565b9150615a6982615a28565b602082019050919050565b60006020820190508181036000830152615a8d81615a51565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000615af0603283613c33565b9150615afb82615a94565b604082019050919050565b60006020820190508181036000830152615b1f81615ae3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000615b608261411b565b615b6a8185614589565b9350615b7a818560208601613c44565b80840191505092915050565b6000615b928284615b55565b915081905092915050565b600060a082019050615bb26000830188614664565b8181036020830152615bc48187614137565b9050615bd3604083018661511c565b8181036060830152615be58185614137565b90508181036080830152615bf98184614137565b90509695505050505050565b7f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c61726765600082015250565b6000615c3b602083613c33565b9150615c4682615c05565b602082019050919050565b60006020820190508181036000830152615c6a81615c2e565b9050919050565b6000608082019050615c866000830187613d92565b615c936020830186613d92565b615ca06040830185613b43565b8181036060830152615cb28184614137565b905095945050505050565b600081519050615ccc81613b99565b92915050565b600060208284031215615ce857615ce76139a9565b5b6000615cf684828501615cbd565b9150509291505056fea264697066735822122093aa0f0a0f247e724eda4844a1e6f5c4f731c090cfc7c0247ab8fbdded3adf4464736f6c634300081100330000000000000000000000003c2269811836af69497e5f486a85d7316753cf62000000000000000000000000000000000000000000000000000000000003d090
Deployed Bytecode
0x6080604052600436106102655760003560e01c806370a0823111610144578063b88d4fde116100b6578063d1deba1f1161007a578063d1deba1f14610951578063df2a5b3b1461096d578063e985e9c514610996578063eb8d72b7146109d3578063f2fde38b146109fc578063f5ecbdbc14610a2557610265565b8063b88d4fde1461086e578063baf3292d14610897578063c4461834146108c0578063c87b56dd146108eb578063cbed8b9c1461092857610265565b8063950c8a7411610108578063950c8a741461075e57806395d89b41146107895780639f38369a146107b4578063a22cb465146107f1578063a6c3d1651461081a578063b353aaa71461084357610265565b806370a0823114610665578063715018a6146106a25780637533d788146106b95780638cfd8f5c146106f65780638da5cb5b1461073357610265565b80631e128296116101dd57806342842e0e116101a157806342842e0e1461054557806342d65a8d1461056e5780635b8c41e61461059757806361bc221a146105d45780636352211e146105ff57806366ad5c8a1461063c57610265565b80631e1282961461044957806323b872dd14610465578063362790f61461048e5780633d8b38f6146104cb5780633f1f4fa41461050857610265565b8063081812fc1161022f578063081812fc1461034f578063095ea7b31461038c5780630df37483146103b557806310ddb137146103de5780631249c58b1461040757806317bac0521461041e57610265565b80621d35671461026a5780629a9b7b1461029357806301ffc9a7146102be57806306fdde03146102fb57806307e0db1714610326575b600080fd5b34801561027657600080fd5b50610291600480360381019061028c9190613a92565b610a62565b005b34801561029f57600080fd5b506102a8610cb8565b6040516102b59190613b52565b60405180910390f35b3480156102ca57600080fd5b506102e560048036038101906102e09190613bc5565b610cbe565b6040516102f29190613c0d565b60405180910390f35b34801561030757600080fd5b50610310610da0565b60405161031d9190613cb8565b60405180910390f35b34801561033257600080fd5b5061034d60048036038101906103489190613cda565b610e32565b005b34801561035b57600080fd5b5061037660048036038101906103719190613d33565b610ec8565b6040516103839190613da1565b60405180910390f35b34801561039857600080fd5b506103b360048036038101906103ae9190613de8565b610f0e565b005b3480156103c157600080fd5b506103dc60048036038101906103d79190613e28565b611025565b005b3480156103ea57600080fd5b5061040560048036038101906104009190613cda565b611051565b005b34801561041357600080fd5b5061041c6110e7565b005b34801561042a57600080fd5b50610433611170565b6040516104409190613b52565b60405180910390f35b610463600480360381019061045e9190613e28565b611194565b005b34801561047157600080fd5b5061048c60048036038101906104879190613e68565b61136d565b005b34801561049a57600080fd5b506104b560048036038101906104b09190613e28565b6113cd565b6040516104c29190613b52565b60405180910390f35b3480156104d757600080fd5b506104f260048036038101906104ed9190613ebb565b6114dd565b6040516104ff9190613c0d565b60405180910390f35b34801561051457600080fd5b5061052f600480360381019061052a9190613cda565b6115b1565b60405161053c9190613b52565b60405180910390f35b34801561055157600080fd5b5061056c60048036038101906105679190613e68565b6115c9565b005b34801561057a57600080fd5b5061059560048036038101906105909190613ebb565b6115e9565b005b3480156105a357600080fd5b506105be60048036038101906105b9919061404b565b611685565b6040516105cb91906140d3565b60405180910390f35b3480156105e057600080fd5b506105e96116cd565b6040516105f69190613b52565b60405180910390f35b34801561060b57600080fd5b5061062660048036038101906106219190613d33565b6116d3565b6040516106339190613da1565b60405180910390f35b34801561064857600080fd5b50610663600480360381019061065e9190613a92565b611759565b005b34801561067157600080fd5b5061068c600480360381019061068791906140ee565b61186a565b6040516106999190613b52565b60405180910390f35b3480156106ae57600080fd5b506106b7611921565b005b3480156106c557600080fd5b506106e060048036038101906106db9190613cda565b611935565b6040516106ed9190614170565b60405180910390f35b34801561070257600080fd5b5061071d60048036038101906107189190614192565b6119d5565b60405161072a9190613b52565b60405180910390f35b34801561073f57600080fd5b506107486119fa565b6040516107559190613da1565b60405180910390f35b34801561076a57600080fd5b50610773611a23565b6040516107809190613da1565b60405180910390f35b34801561079557600080fd5b5061079e611a49565b6040516107ab9190613cb8565b60405180910390f35b3480156107c057600080fd5b506107db60048036038101906107d69190613cda565b611adb565b6040516107e89190614170565b60405180910390f35b3480156107fd57600080fd5b50610818600480360381019061081391906141fe565b611bf4565b005b34801561082657600080fd5b50610841600480360381019061083c9190613ebb565b611c0a565b005b34801561084f57600080fd5b50610858611c9e565b604051610865919061429d565b60405180910390f35b34801561087a57600080fd5b50610895600480360381019061089091906142b8565b611cc2565b005b3480156108a357600080fd5b506108be60048036038101906108b991906140ee565b611d24565b005b3480156108cc57600080fd5b506108d5611da7565b6040516108e29190613b52565b60405180910390f35b3480156108f757600080fd5b50610912600480360381019061090d9190613d33565b611dad565b60405161091f9190613cb8565b60405180910390f35b34801561093457600080fd5b5061094f600480360381019061094a919061433b565b611e15565b005b61096b60048036038101906109669190613a92565b611eb7565b005b34801561097957600080fd5b50610994600480360381019061098f91906143c3565b6120fa565b005b3480156109a257600080fd5b506109bd60048036038101906109b89190614416565b6121be565b6040516109ca9190613c0d565b60405180910390f35b3480156109df57600080fd5b506109fa60048036038101906109f59190613ebb565b612252565b005b348015610a0857600080fd5b50610a236004803603810190610a1e91906140ee565b6122c5565b005b348015610a3157600080fd5b50610a4c6004803603810190610a479190614456565b612348565b604051610a599190614170565b60405180910390f35b7f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6273ffffffffffffffffffffffffffffffffffffffff16610aa16123f9565b73ffffffffffffffffffffffffffffffffffffffff1614610af7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aee90614509565b60405180910390fd5b6000600760008861ffff1661ffff1681526020019081526020016000208054610b1f90614558565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4b90614558565b8015610b985780601f10610b6d57610100808354040283529160200191610b98565b820191906000526020600020905b815481529060010190602001808311610b7b57829003601f168201915b50505050509050805186869050148015610bb3575060008151115b8015610bdc575080805190602001208686604051610bd29291906145b9565b6040518091039020145b610c1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1290614644565b60405180910390fd5b610caf8787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612401565b50505050505050565b600d5481565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610d8957507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610d995750610d98826124cc565b5b9050919050565b606060018054610daf90614558565b80601f0160208091040260200160405190810160405280929190818152602001828054610ddb90614558565b8015610e285780601f10610dfd57610100808354040283529160200191610e28565b820191906000526020600020905b815481529060010190602001808311610e0b57829003601f168201915b5050505050905090565b610e3a612536565b7f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6273ffffffffffffffffffffffffffffffffffffffff166307e0db17826040518263ffffffff1660e01b8152600401610e939190614673565b600060405180830381600087803b158015610ead57600080fd5b505af1158015610ec1573d6000803e3d6000fd5b5050505050565b6000610ed3826125b4565b6005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610f19826116d3565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8090614700565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610fa86123f9565b73ffffffffffffffffffffffffffffffffffffffff161480610fd75750610fd681610fd16123f9565b6121be565b5b611016576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100d90614792565b60405180910390fd5b61102083836125ff565b505050565b61102d612536565b80600960008461ffff1661ffff168152602001908152602001600020819055505050565b611059612536565b7f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6273ffffffffffffffffffffffffffffffffffffffff166310ddb137826040518263ffffffff1660e01b81526004016110b29190614673565b600060405180830381600087803b1580156110cc57600080fd5b505af11580156110e0573d6000803e3d6000fd5b5050505050565b7f000000000000000000000000000000000000000000000000000000000005572f600d5403611142576040517f7d3d824900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61114e33600d546126b8565b600d6000815460010191905081905550600c6000815460010191905081905550565b7f000000000000000000000000000000000000000000000000000000000005572f81565b61119d816116d3565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611201576040517f59dc379f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c60008154600190039190508190555061121b816128d5565b600033826040516020016112309291906147b2565b6040516020818303038152906040529050600060019050600062055730905060008282604051602001611264929190614832565b604051602081830303815290604052905060007f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6273ffffffffffffffffffffffffffffffffffffffff166340a7bb108830886000876040518663ffffffff1660e01b81526004016112d995949392919061485e565b6040805180830381865afa1580156112f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131991906148d4565b509050803411611355576040517f1c26714c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61136487863360008634612a23565b50505050505050565b61137e6113786123f9565b82612bb9565b6113bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b490614986565b60405180910390fd5b6113c8838383612c4e565b505050565b60008033836040516020016113e39291906147b2565b6040516020818303038152906040529050600060019050600062055730905060008282604051602001611417929190614832565b604051602081830303815290604052905060007f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6273ffffffffffffffffffffffffffffffffffffffff166340a7bb108930886000876040518663ffffffff1660e01b815260040161148c95949392919061485e565b6040805180830381865afa1580156114a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114cc91906148d4565b509050809550505050505092915050565b600080600760008661ffff1661ffff168152602001908152602001600020805461150690614558565b80601f016020809104026020016040519081016040528092919081815260200182805461153290614558565b801561157f5780601f106115545761010080835404028352916020019161157f565b820191906000526020600020905b81548152906001019060200180831161156257829003601f168201915b5050505050905083836040516115969291906145b9565b60405180910390208180519060200120149150509392505050565b60096020528060005260406000206000915090505481565b6115e483838360405180602001604052806000815250611cc2565b505050565b6115f1612536565b7f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6273ffffffffffffffffffffffffffffffffffffffff166342d65a8d8484846040518463ffffffff1660e01b815260040161164e939291906149d3565b600060405180830381600087803b15801561166857600080fd5b505af115801561167c573d6000803e3d6000fd5b50505050505050565b600b6020528260005260406000208280516020810182018051848252602083016020850120818352809550505050505060205280600052604060002060009250925050505481565b600c5481565b6000806116df83612f47565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611750576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174790614a51565b60405180910390fd5b80915050919050565b3073ffffffffffffffffffffffffffffffffffffffff166117786123f9565b73ffffffffffffffffffffffffffffffffffffffff16146117ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c590614ae3565b60405180910390fd5b6118628686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612f84565b505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036118da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d190614b75565b60405180910390fd5b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611929612536565b611933600061300a565b565b6007602052806000526040600020600091509050805461195490614558565b80601f016020809104026020016040519081016040528092919081815260200182805461198090614558565b80156119cd5780601f106119a2576101008083540402835291602001916119cd565b820191906000526020600020905b8154815290600101906020018083116119b057829003601f168201915b505050505081565b6008602052816000526040600020602052806000526040600020600091509150505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060028054611a5890614558565b80601f0160208091040260200160405190810160405280929190818152602001828054611a8490614558565b8015611ad15780601f10611aa657610100808354040283529160200191611ad1565b820191906000526020600020905b815481529060010190602001808311611ab457829003601f168201915b5050505050905090565b60606000600760008461ffff1661ffff1681526020019081526020016000208054611b0590614558565b80601f0160208091040260200160405190810160405280929190818152602001828054611b3190614558565b8015611b7e5780601f10611b5357610100808354040283529160200191611b7e565b820191906000526020600020905b815481529060010190602001808311611b6157829003601f168201915b505050505090506000815103611bc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bc090614be1565b60405180910390fd5b611bec600060148351611bdc9190614c30565b836130ce9092919063ffffffff16565b915050919050565b611c06611bff6123f9565b83836131ec565b5050565b611c12612536565b818130604051602001611c2793929190614cac565b604051602081830303815290604052600760008561ffff1661ffff1681526020019081526020016000209081611c5d9190614e78565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611c91939291906149d3565b60405180910390a1505050565b7f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6281565b611cd3611ccd6123f9565b83612bb9565b611d12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d0990614986565b60405180910390fd5b611d1e84848484613358565b50505050565b611d2c612536565b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b81604051611d9c9190613da1565b60405180910390a150565b61271081565b6060611db8826125b4565b6000611dc26133b4565b90506000815111611de25760405180602001604052806000815250611e0d565b80611dec846133cb565b604051602001611dfd929190614f86565b6040516020818303038152906040525b915050919050565b611e1d612536565b7f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6273ffffffffffffffffffffffffffffffffffffffff1663cbed8b9c86868686866040518663ffffffff1660e01b8152600401611e7e959493929190614faa565b600060405180830381600087803b158015611e9857600080fd5b505af1158015611eac573d6000803e3d6000fd5b505050505050505050565b6000600b60008861ffff1661ffff1681526020019081526020016000208686604051611ee49291906145b9565b908152602001604051809103902060008567ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000205490506000801b8103611f5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f569061506a565b60405180910390fd5b808383604051611f709291906145b9565b604051809103902014611fb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611faf906150fc565b60405180910390fd5b6000801b600b60008961ffff1661ffff1681526020019081526020016000208787604051611fe79291906145b9565b908152602001604051809103902060008667ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020819055506120b28787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612f84565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e587878787856040516120e995949392919061512b565b60405180910390a150505050505050565b612102612536565b60008111612145576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213c906151c5565b60405180910390fd5b80600860008561ffff1661ffff16815260200190815260200160002060008461ffff1661ffff168152602001908152602001600020819055507f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac08383836040516121b1939291906151e5565b60405180910390a1505050565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61225a612536565b8181600760008661ffff1661ffff1681526020019081526020016000209182612284929190615227565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab8383836040516122b8939291906149d3565b60405180910390a1505050565b6122cd612536565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361233c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161233390615369565b60405180910390fd5b6123458161300a565b50565b60607f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6273ffffffffffffffffffffffffffffffffffffffff1663f5ecbdbc868630866040518563ffffffff1660e01b81526004016123a99493929190615389565b600060405180830381865afa1580156123c6573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906123ef919061543e565b9050949350505050565b600033905090565b6000806124ad5a60966366ad5c8a60e01b898989896040516024016124299493929190615487565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050503073ffffffffffffffffffffffffffffffffffffffff16613499909392919063ffffffff16565b91509150816124c4576124c38686868685613531565b5b505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61253e6123f9565b73ffffffffffffffffffffffffffffffffffffffff1661255c6119fa565b73ffffffffffffffffffffffffffffffffffffffff16146125b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a990615526565b60405180910390fd5b565b6125bd816135df565b6125fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125f390614a51565b60405180910390fd5b50565b816005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16612672836116d3565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612727576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271e90615592565b60405180910390fd5b612730816135df565b15612770576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612767906155fe565b60405180910390fd5b61277e600083836001613620565b612787816135df565b156127c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127be906155fe565b60405180910390fd5b6001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816003600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46128d1600083836001613626565b5050565b60006128e0826116d3565b90506128f0816000846001613620565b6128f9826116d3565b90506005600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506003600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612a1f816000846001613626565b5050565b6000600760008861ffff1661ffff1681526020019081526020016000208054612a4b90614558565b80601f0160208091040260200160405190810160405280929190818152602001828054612a7790614558565b8015612ac45780601f10612a9957610100808354040283529160200191612ac4565b820191906000526020600020905b815481529060010190602001808311612aa757829003601f168201915b505050505090506000815103612b0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b0690615690565b60405180910390fd5b612b1a87875161362c565b7f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6273ffffffffffffffffffffffffffffffffffffffff1663c58031008389848a8a8a8a6040518863ffffffff1660e01b8152600401612b7e969594939291906156d1565b6000604051808303818588803b158015612b9757600080fd5b505af1158015612bab573d6000803e3d6000fd5b505050505050505050505050565b600080612bc5836116d3565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612c075750612c0681856121be565b5b80612c4557508373ffffffffffffffffffffffffffffffffffffffff16612c2d84610ec8565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16612c6e826116d3565b73ffffffffffffffffffffffffffffffffffffffff1614612cc4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cbb906157b9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612d33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d2a9061584b565b60405180910390fd5b612d408383836001613620565b8273ffffffffffffffffffffffffffffffffffffffff16612d60826116d3565b73ffffffffffffffffffffffffffffffffffffffff1614612db6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dad906157b9565b60405180910390fd5b6005600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816003600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612f428383836001613626565b505050565b60006003600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006014840151905060008083806020019051810190612fa49190615897565b91509150612fb282826126b8565b600c60008154600101919050819055507f31ae2bb20187b24b2039def7711f43f56311ec96de17b7ef01d1b1da40eb2eee878483600c54604051612ff994939291906158d7565b60405180910390a150505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b606081601f836130de919061591c565b101561311f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131169061599c565b60405180910390fd5b818361312b919061591c565b8451101561316e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161316590615a08565b60405180910390fd5b606082156000811461318f57604051915060008252602082016040526131e0565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156131cd57805183526020830192506020810190506131b0565b50868552601f19601f8301166040525050505b50809150509392505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361325a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161325190615a74565b60405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161334b9190613c0d565b60405180910390a3505050565b613363848484612c4e565b61336f848484846136a2565b6133ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133a590615b06565b60405180910390fd5b50505050565b606060405180602001604052806000815250905090565b6060600060016133da84613829565b01905060008167ffffffffffffffff8111156133f9576133f8613f20565b5b6040519080825280601f01601f19166020018201604052801561342b5781602001600182028036833780820191505090505b509050600082602001820190505b60011561348e578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161348257613481615b26565b5b04945060008503613439575b819350505050919050565b6000606060008060008661ffff1667ffffffffffffffff8111156134c0576134bf613f20565b5b6040519080825280601f01601f1916602001820160405280156134f25781602001600182028036833780820191505090505b50905060008087516020890160008d8df191503d925086831115613514578692505b828152826000602083013e81819450945050505094509492505050565b8180519060200120600b60008761ffff1661ffff168152602001908152602001600020856040516135629190615b86565b908152602001604051809103902060008567ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020819055507fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c85858585856040516135d0959493929190615b9d565b60405180910390a15050505050565b60008073ffffffffffffffffffffffffffffffffffffffff1661360183612f47565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b50505050565b50505050565b6000600960008461ffff1661ffff1681526020019081526020016000205490506000810361365a5761271090505b8082111561369d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161369490615c51565b60405180910390fd5b505050565b60006136c38473ffffffffffffffffffffffffffffffffffffffff1661397c565b1561381c578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026136ec6123f9565b8786866040518563ffffffff1660e01b815260040161370e9493929190615c71565b6020604051808303816000875af192505050801561374a57506040513d601f19601f820116820180604052508101906137479190615cd2565b60015b6137cc573d806000811461377a576040519150601f19603f3d011682016040523d82523d6000602084013e61377f565b606091505b5060008151036137c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137bb90615b06565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050613821565b600190505b949350505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613887577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161387d5761387c615b26565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106138c4576d04ee2d6d415b85acef810000000083816138ba576138b9615b26565b5b0492506020810190505b662386f26fc1000083106138f357662386f26fc1000083816138e9576138e8615b26565b5b0492506010810190505b6305f5e100831061391c576305f5e100838161391257613911615b26565b5b0492506008810190505b612710831061394157612710838161393757613936615b26565b5b0492506004810190505b60648310613964576064838161395a57613959615b26565b5b0492506002810190505b600a8310613973576001810190505b80915050919050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600061ffff82169050919050565b6139ca816139b3565b81146139d557600080fd5b50565b6000813590506139e7816139c1565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112613a1257613a116139ed565b5b8235905067ffffffffffffffff811115613a2f57613a2e6139f2565b5b602083019150836001820283011115613a4b57613a4a6139f7565b5b9250929050565b600067ffffffffffffffff82169050919050565b613a6f81613a52565b8114613a7a57600080fd5b50565b600081359050613a8c81613a66565b92915050565b60008060008060008060808789031215613aaf57613aae6139a9565b5b6000613abd89828a016139d8565b965050602087013567ffffffffffffffff811115613ade57613add6139ae565b5b613aea89828a016139fc565b95509550506040613afd89828a01613a7d565b935050606087013567ffffffffffffffff811115613b1e57613b1d6139ae565b5b613b2a89828a016139fc565b92509250509295509295509295565b6000819050919050565b613b4c81613b39565b82525050565b6000602082019050613b676000830184613b43565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613ba281613b6d565b8114613bad57600080fd5b50565b600081359050613bbf81613b99565b92915050565b600060208284031215613bdb57613bda6139a9565b5b6000613be984828501613bb0565b91505092915050565b60008115159050919050565b613c0781613bf2565b82525050565b6000602082019050613c226000830184613bfe565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613c62578082015181840152602081019050613c47565b60008484015250505050565b6000601f19601f8301169050919050565b6000613c8a82613c28565b613c948185613c33565b9350613ca4818560208601613c44565b613cad81613c6e565b840191505092915050565b60006020820190508181036000830152613cd28184613c7f565b905092915050565b600060208284031215613cf057613cef6139a9565b5b6000613cfe848285016139d8565b91505092915050565b613d1081613b39565b8114613d1b57600080fd5b50565b600081359050613d2d81613d07565b92915050565b600060208284031215613d4957613d486139a9565b5b6000613d5784828501613d1e565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613d8b82613d60565b9050919050565b613d9b81613d80565b82525050565b6000602082019050613db66000830184613d92565b92915050565b613dc581613d80565b8114613dd057600080fd5b50565b600081359050613de281613dbc565b92915050565b60008060408385031215613dff57613dfe6139a9565b5b6000613e0d85828601613dd3565b9250506020613e1e85828601613d1e565b9150509250929050565b60008060408385031215613e3f57613e3e6139a9565b5b6000613e4d858286016139d8565b9250506020613e5e85828601613d1e565b9150509250929050565b600080600060608486031215613e8157613e806139a9565b5b6000613e8f86828701613dd3565b9350506020613ea086828701613dd3565b9250506040613eb186828701613d1e565b9150509250925092565b600080600060408486031215613ed457613ed36139a9565b5b6000613ee2868287016139d8565b935050602084013567ffffffffffffffff811115613f0357613f026139ae565b5b613f0f868287016139fc565b92509250509250925092565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613f5882613c6e565b810181811067ffffffffffffffff82111715613f7757613f76613f20565b5b80604052505050565b6000613f8a61399f565b9050613f968282613f4f565b919050565b600067ffffffffffffffff821115613fb657613fb5613f20565b5b613fbf82613c6e565b9050602081019050919050565b82818337600083830152505050565b6000613fee613fe984613f9b565b613f80565b90508281526020810184848401111561400a57614009613f1b565b5b614015848285613fcc565b509392505050565b600082601f830112614032576140316139ed565b5b8135614042848260208601613fdb565b91505092915050565b600080600060608486031215614064576140636139a9565b5b6000614072868287016139d8565b935050602084013567ffffffffffffffff811115614093576140926139ae565b5b61409f8682870161401d565b92505060406140b086828701613a7d565b9150509250925092565b6000819050919050565b6140cd816140ba565b82525050565b60006020820190506140e860008301846140c4565b92915050565b600060208284031215614104576141036139a9565b5b600061411284828501613dd3565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60006141428261411b565b61414c8185614126565b935061415c818560208601613c44565b61416581613c6e565b840191505092915050565b6000602082019050818103600083015261418a8184614137565b905092915050565b600080604083850312156141a9576141a86139a9565b5b60006141b7858286016139d8565b92505060206141c8858286016139d8565b9150509250929050565b6141db81613bf2565b81146141e657600080fd5b50565b6000813590506141f8816141d2565b92915050565b60008060408385031215614215576142146139a9565b5b600061422385828601613dd3565b9250506020614234858286016141e9565b9150509250929050565b6000819050919050565b600061426361425e61425984613d60565b61423e565b613d60565b9050919050565b600061427582614248565b9050919050565b60006142878261426a565b9050919050565b6142978161427c565b82525050565b60006020820190506142b2600083018461428e565b92915050565b600080600080608085870312156142d2576142d16139a9565b5b60006142e087828801613dd3565b94505060206142f187828801613dd3565b935050604061430287828801613d1e565b925050606085013567ffffffffffffffff811115614323576143226139ae565b5b61432f8782880161401d565b91505092959194509250565b600080600080600060808688031215614357576143566139a9565b5b6000614365888289016139d8565b9550506020614376888289016139d8565b945050604061438788828901613d1e565b935050606086013567ffffffffffffffff8111156143a8576143a76139ae565b5b6143b4888289016139fc565b92509250509295509295909350565b6000806000606084860312156143dc576143db6139a9565b5b60006143ea868287016139d8565b93505060206143fb868287016139d8565b925050604061440c86828701613d1e565b9150509250925092565b6000806040838503121561442d5761442c6139a9565b5b600061443b85828601613dd3565b925050602061444c85828601613dd3565b9150509250929050565b600080600080608085870312156144705761446f6139a9565b5b600061447e878288016139d8565b945050602061448f878288016139d8565b93505060406144a087828801613dd3565b92505060606144b187828801613d1e565b91505092959194509250565b7f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c65720000600082015250565b60006144f3601e83613c33565b91506144fe826144bd565b602082019050919050565b60006020820190508181036000830152614522816144e6565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061457057607f821691505b60208210810361458357614582614529565b5b50919050565b600081905092915050565b60006145a08385614589565b93506145ad838584613fcc565b82840190509392505050565b60006145c6828486614594565b91508190509392505050565b7f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b600061462e602683613c33565b9150614639826145d2565b604082019050919050565b6000602082019050818103600083015261465d81614621565b9050919050565b61466d816139b3565b82525050565b60006020820190506146886000830184614664565b92915050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006146ea602183613c33565b91506146f58261468e565b604082019050919050565b60006020820190508181036000830152614719816146dd565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b600061477c603d83613c33565b915061478782614720565b604082019050919050565b600060208201905081810360008301526147ab8161476f565b9050919050565b60006040820190506147c76000830185613d92565b6147d46020830184613b43565b9392505050565b60008160f01b9050919050565b60006147f3826147db565b9050919050565b61480b614806826139b3565b6147e8565b82525050565b6000819050919050565b61482c61482782613b39565b614811565b82525050565b600061483e82856147fa565b60028201915061484e828461481b565b6020820191508190509392505050565b600060a0820190506148736000830188614664565b6148806020830187613d92565b81810360408301526148928186614137565b90506148a16060830185613bfe565b81810360808301526148b38184614137565b90509695505050505050565b6000815190506148ce81613d07565b92915050565b600080604083850312156148eb576148ea6139a9565b5b60006148f9858286016148bf565b925050602061490a858286016148bf565b9150509250929050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b6000614970602d83613c33565b915061497b82614914565b604082019050919050565b6000602082019050818103600083015261499f81614963565b9050919050565b60006149b28385614126565b93506149bf838584613fcc565b6149c883613c6e565b840190509392505050565b60006040820190506149e86000830186614664565b81810360208301526149fb8184866149a6565b9050949350505050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b6000614a3b601883613c33565b9150614a4682614a05565b602082019050919050565b60006020820190508181036000830152614a6a81614a2e565b9050919050565b7f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d75737420626560008201527f204c7a4170700000000000000000000000000000000000000000000000000000602082015250565b6000614acd602683613c33565b9150614ad882614a71565b604082019050919050565b60006020820190508181036000830152614afc81614ac0565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b6000614b5f602983613c33565b9150614b6a82614b03565b604082019050919050565b60006020820190508181036000830152614b8e81614b52565b9050919050565b7f4c7a4170703a206e6f20747275737465642070617468207265636f7264000000600082015250565b6000614bcb601d83613c33565b9150614bd682614b95565b602082019050919050565b60006020820190508181036000830152614bfa81614bbe565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614c3b82613b39565b9150614c4683613b39565b9250828203905081811115614c5e57614c5d614c01565b5b92915050565b60008160601b9050919050565b6000614c7c82614c64565b9050919050565b6000614c8e82614c71565b9050919050565b614ca6614ca182613d80565b614c83565b82525050565b6000614cb9828587614594565b9150614cc58284614c95565b601482019150819050949350505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302614d387fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614cfb565b614d428683614cfb565b95508019841693508086168417925050509392505050565b6000614d75614d70614d6b84613b39565b61423e565b613b39565b9050919050565b6000819050919050565b614d8f83614d5a565b614da3614d9b82614d7c565b848454614d08565b825550505050565b600090565b614db8614dab565b614dc3818484614d86565b505050565b5b81811015614de757614ddc600082614db0565b600181019050614dc9565b5050565b601f821115614e2c57614dfd81614cd6565b614e0684614ceb565b81016020851015614e15578190505b614e29614e2185614ceb565b830182614dc8565b50505b505050565b600082821c905092915050565b6000614e4f60001984600802614e31565b1980831691505092915050565b6000614e688383614e3e565b9150826002028217905092915050565b614e818261411b565b67ffffffffffffffff811115614e9a57614e99613f20565b5b614ea48254614558565b614eaf828285614deb565b600060209050601f831160018114614ee25760008415614ed0578287015190505b614eda8582614e5c565b865550614f42565b601f198416614ef086614cd6565b60005b82811015614f1857848901518255600182019150602085019450602081019050614ef3565b86831015614f355784890151614f31601f891682614e3e565b8355505b6001600288020188555050505b505050505050565b600081905092915050565b6000614f6082613c28565b614f6a8185614f4a565b9350614f7a818560208601613c44565b80840191505092915050565b6000614f928285614f55565b9150614f9e8284614f55565b91508190509392505050565b6000608082019050614fbf6000830188614664565b614fcc6020830187614664565b614fd96040830186613b43565b8181036060830152614fec8184866149a6565b90509695505050505050565b7f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360008201527f6167650000000000000000000000000000000000000000000000000000000000602082015250565b6000615054602383613c33565b915061505f82614ff8565b604082019050919050565b6000602082019050818103600083015261508381615047565b9050919050565b7f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f6160008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b60006150e6602183613c33565b91506150f18261508a565b604082019050919050565b60006020820190508181036000830152615115816150d9565b9050919050565b61512581613a52565b82525050565b60006080820190506151406000830188614664565b81810360208301526151538186886149a6565b9050615162604083018561511c565b61516f60608301846140c4565b9695505050505050565b7f4c7a4170703a20696e76616c6964206d696e4761730000000000000000000000600082015250565b60006151af601583613c33565b91506151ba82615179565b602082019050919050565b600060208201905081810360008301526151de816151a2565b9050919050565b60006060820190506151fa6000830186614664565b6152076020830185614664565b6152146040830184613b43565b949350505050565b600082905092915050565b615231838361521c565b67ffffffffffffffff81111561524a57615249613f20565b5b6152548254614558565b61525f828285614deb565b6000601f83116001811461528e576000841561527c578287013590505b6152868582614e5c565b8655506152ee565b601f19841661529c86614cd6565b60005b828110156152c45784890135825560018201915060208501945060208101905061529f565b868310156152e157848901356152dd601f891682614e3e565b8355505b6001600288020188555050505b50505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000615353602683613c33565b915061535e826152f7565b604082019050919050565b6000602082019050818103600083015261538281615346565b9050919050565b600060808201905061539e6000830187614664565b6153ab6020830186614664565b6153b86040830185613d92565b6153c56060830184613b43565b95945050505050565b60006153e16153dc84613f9b565b613f80565b9050828152602081018484840111156153fd576153fc613f1b565b5b615408848285613c44565b509392505050565b600082601f830112615425576154246139ed565b5b81516154358482602086016153ce565b91505092915050565b600060208284031215615454576154536139a9565b5b600082015167ffffffffffffffff811115615472576154716139ae565b5b61547e84828501615410565b91505092915050565b600060808201905061549c6000830187614664565b81810360208301526154ae8186614137565b90506154bd604083018561511c565b81810360608301526154cf8184614137565b905095945050505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000615510602083613c33565b915061551b826154da565b602082019050919050565b6000602082019050818103600083015261553f81615503565b9050919050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b600061557c602083613c33565b915061558782615546565b602082019050919050565b600060208201905081810360008301526155ab8161556f565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006155e8601c83613c33565b91506155f3826155b2565b602082019050919050565b60006020820190508181036000830152615617816155db565b9050919050565b7f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060008201527f61207472757374656420736f7572636500000000000000000000000000000000602082015250565b600061567a603083613c33565b91506156858261561e565b604082019050919050565b600060208201905081810360008301526156a98161566d565b9050919050565b60006156bb82613d60565b9050919050565b6156cb816156b0565b82525050565b600060c0820190506156e66000830189614664565b81810360208301526156f88188614137565b9050818103604083015261570c8187614137565b905061571b60608301866156c2565b6157286080830185613d92565b81810360a083015261573a8184614137565b9050979650505050505050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b60006157a3602583613c33565b91506157ae82615747565b604082019050919050565b600060208201905081810360008301526157d281615796565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000615835602483613c33565b9150615840826157d9565b604082019050919050565b6000602082019050818103600083015261586481615828565b9050919050565b615874816156b0565b811461587f57600080fd5b50565b6000815190506158918161586b565b92915050565b600080604083850312156158ae576158ad6139a9565b5b60006158bc85828601615882565b92505060206158cd858286016148bf565b9150509250929050565b60006080820190506158ec6000830187614664565b6158f96020830186613d92565b6159066040830185613b43565b6159136060830184613b43565b95945050505050565b600061592782613b39565b915061593283613b39565b925082820190508082111561594a57615949614c01565b5b92915050565b7f736c6963655f6f766572666c6f77000000000000000000000000000000000000600082015250565b6000615986600e83613c33565b915061599182615950565b602082019050919050565b600060208201905081810360008301526159b581615979565b9050919050565b7f736c6963655f6f75744f66426f756e6473000000000000000000000000000000600082015250565b60006159f2601183613c33565b91506159fd826159bc565b602082019050919050565b60006020820190508181036000830152615a21816159e5565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000615a5e601983613c33565b9150615a6982615a28565b602082019050919050565b60006020820190508181036000830152615a8d81615a51565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000615af0603283613c33565b9150615afb82615a94565b604082019050919050565b60006020820190508181036000830152615b1f81615ae3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000615b608261411b565b615b6a8185614589565b9350615b7a818560208601613c44565b80840191505092915050565b6000615b928284615b55565b915081905092915050565b600060a082019050615bb26000830188614664565b8181036020830152615bc48187614137565b9050615bd3604083018661511c565b8181036060830152615be58185614137565b90508181036080830152615bf98184614137565b90509695505050505050565b7f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c61726765600082015250565b6000615c3b602083613c33565b9150615c4682615c05565b602082019050919050565b60006020820190508181036000830152615c6a81615c2e565b9050919050565b6000608082019050615c866000830187613d92565b615c936020830186613d92565b615ca06040830185613b43565b8181036060830152615cb28184614137565b905095945050505050565b600081519050615ccc81613b99565b92915050565b600060208284031215615ce857615ce76139a9565b5b6000615cf684828501615cbd565b9150509291505056fea264697066735822122093aa0f0a0f247e724eda4844a1e6f5c4f731c090cfc7c0247ab8fbdded3adf4464736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62000000000000000000000000000000000000000000000000000000000003d090
-----Decoded View---------------
Arg [0] : _endpoint (address): 0x3c2269811836af69497E5F486A85D7316753cf62
Arg [1] : _startTokenId (uint256): 250000
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62
Arg [1] : 000000000000000000000000000000000000000000000000000000000003d090
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.