Overview
Max Total Supply
40,740 METROMINIBLOCK
Holders
3,373
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
0 METROMINIBLOCKLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
MetroMiniBlock
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "../../lib/enumerable/ERC721AMultiMint.sol"; import "../../lib/Controllable.sol"; import "../../opensea/ContextMixin.sol"; import "../../opensea/NativeMetaTransaction.sol"; import "../../vault/v2/interfaces/IMetroVaultStorage.sol"; import "../../vault/v2/MetroVaultDoor.sol"; import "../../MetToken.sol"; contract MetroMiniBlock is Controllable, ERC721AMultiMint, IMetroBlockInfo { uint256 public constant MIN_MET_BLOCKS = 20_000; uint256 public constant MAX_ETH_BLOCKS = 20_000; uint256 public constant MAX_TRADE_BLOCKS = 10_000; uint256 public constant MAX_BLOCKS = MIN_MET_BLOCKS + MAX_ETH_BLOCKS + MAX_TRADE_BLOCKS; uint256 public constant BLOCK_ID_OFFSET = 20_000; uint256 public constant BLOCKS_PER_TRADE = 10; uint256 private constant MAX_GENESIS_BLOCK_ID = 10_000; uint256 public constant MAX_BLOCKS_PER_WHITELIST = 2; uint256 public constant MAX_BLOCKS_PER_MINT = 100; uint256 public constant CEIL_MET_PRICE = 10_000 ether; uint256 public constant FLOOR_MET_PRICE = 4_000 ether; uint256 private constant MET_PRICE_MAX_DELTA = CEIL_MET_PRICE - FLOOR_MET_PRICE; uint256 public constant PRICE_STEP = 50 ether; uint256 public constant PRICE_PERIOD = 10 minutes; uint32 public metMinted; uint32 public ethMinted; uint32 public tradeMinted; uint32 public auctionStartTimestamp; bool public metSaleActive = false; bool public ethSaleActive = false; bool public tradeSaleActive = false; uint128 public ethPrice = 0.1 ether; string public baseTokenURI = "ipfs://QmZGfurTKSkKp3DycpKV1AhnDtcSRtDyUZtRZnUwGQ9Ynr/"; address immutable public metTokenAddress; address immutable public vaultStorageAddress; address public blockInfoAddress; address public proxyRegistryAddress; address public signerAddress; address public genesisLockerAddress; address immutable public metroPassAddress; constructor( address _metTokenAddress, address _vaultStorageAddress, address _proxyRegistryAddress, address _signerAddress, address _genesisLockerAddress, address _metroPassAddress) ERC721AMultiMint("Metroverse Mini City Block", "METROMINIBLOCK") { metTokenAddress = _metTokenAddress; vaultStorageAddress = _vaultStorageAddress; proxyRegistryAddress = _proxyRegistryAddress; signerAddress = _signerAddress; genesisLockerAddress = _genesisLockerAddress; metroPassAddress = _metroPassAddress; } function setBlockInfoAddress(address _blockInfoAddress) external onlyOwner { blockInfoAddress = _blockInfoAddress; } function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner { proxyRegistryAddress = _proxyRegistryAddress; } function setSignerAddress(address _signerAddress) external onlyOwner { signerAddress = _signerAddress; } function setGenesisLockerAddress(address _genesisLockerAddress) external onlyOwner { genesisLockerAddress = _genesisLockerAddress; } function setEthPrice(uint128 price) public onlyOwner { ethPrice = price; } function startMetSale() public onlyOwner { metSaleActive = true; auctionStartTimestamp = uint32(block.timestamp); } function stopMetSale() public onlyOwner { metSaleActive = false; } function resumeMetSale() public onlyOwner { metSaleActive = true; } function startEthSale() public onlyOwner { ethSaleActive = true; } function stopEthSale() public onlyOwner { ethSaleActive = false; } function startTradeSale() public onlyOwner { tradeSaleActive = true; } function stopTradeSale() public onlyOwner { tradeSaleActive = false; } function setBaseURI(string calldata URI) public onlyOwner { baseTokenURI = URI; } function _baseURI() internal view virtual override returns (string memory) { return baseTokenURI; } function getBlockScore(uint256 tokenId) external view returns (uint256 score) { if (blockInfoAddress == address(0x0)) { return 0; } return IMetroBlockInfo(blockInfoAddress).getBlockScore(tokenId); } function getBlockInfo(uint256 tokenId) external view returns (uint256 info) { if (blockInfoAddress == address(0x0)) { return 0; } return IMetroBlockInfo(blockInfoAddress).getBlockInfo(tokenId); } function getHoodBoost(uint256[] calldata tokenIds) external view returns (uint256 score) { if (blockInfoAddress == address(0x0)) { return 0; } return IMetroBlockInfo(blockInfoAddress).getHoodBoost(tokenIds); } function getAux(address owner) public view returns (uint176) { return _getAux(owner); } function setAux(address owner, uint176 extra) public onlyController { _setAux(owner, extra); } function numberWhitelistMinted(address owner) public view returns (uint8) { return _numberWhitelistMinted(owner); } function timestampOf(uint256 tokenId) public view returns (uint64) { return _ownershipOf(tokenId).startTimestamp; } function setTimestampOf(uint256 tokenId, uint64 timestamp) public onlyController returns (uint64) { return _setTimestampOf(tokenId, timestamp); } function setTimestampsOf(address owner, uint256[] calldata tokenIds, uint64 timestamp) external onlyController returns (uint64[] memory) { return _setTimestampsOf(owner, tokenIds, timestamp); } function _startTokenId() internal view override virtual returns (uint256) { return BLOCK_ID_OFFSET + 1; } function totalMinted() public view virtual returns (uint256 supply) { return _totalMinted(); } function currentMetPrice() public view returns (uint256) { if (auctionStartTimestamp == 0) { return CEIL_MET_PRICE; } uint256 passedPeriods = (block.timestamp - auctionStartTimestamp) / PRICE_PERIOD; uint256 priceChange = PRICE_STEP * passedPeriods; if (priceChange < MET_PRICE_MAX_DELTA) { return CEIL_MET_PRICE - priceChange; } else { return FLOOR_MET_PRICE; } } function withdraw() external onlyOwner { payable(owner()).transfer(address(this).balance); } function metMint(uint256 amount) public { require(metSaleActive, "MET sale is not active"); require(amount > 0, "Cannot mint zero blocks"); require(amount <= MAX_BLOCKS_PER_MINT, "Cannot mint that many blocks"); metMinted += uint32(amount); require(totalMinted() + amount <= MAX_BLOCKS, "Exceeded max MET block count"); uint256 currentPrice = currentMetPrice(); MetToken metToken = MetToken(metTokenAddress); metToken.burnFrom(msg.sender, currentPrice * amount); _mintBlocks(amount); } function ethMint(bytes32 signatureR, bytes32 signatureVS, uint256 amount) public payable { require(ethSaleActive, "ETH sale is not active"); require(signerAddress != address(0x0), "Signer address is not set"); require(amount > 0, "Cannot mint zero blocks"); require(amount <= MAX_BLOCKS_PER_MINT, "Cannot mint that many blocks"); ethMinted += uint32(amount); require(ethMinted <= MAX_ETH_BLOCKS, "Exceeded max ETH block count"); require(totalMinted() + amount <= MAX_BLOCKS, "Exceeded max ETH block count"); bytes32 addressHash = keccak256(abi.encodePacked(msg.sender)); address signer = verifyHash(addressHash, signatureR, signatureVS); require(signer == signerAddress, "Not whitelisted"); uint256 whitelistTotal = numberWhitelistMinted(msg.sender) + amount; require(whitelistTotal <= MAX_BLOCKS_PER_WHITELIST, "Already minted"); require(msg.value == ethPrice * amount, "Wrong amount of ETH"); _setNumberWhitelistMinted(msg.sender, uint8(whitelistTotal)); _mintBlocks(amount); } function tradeMint(uint256[] calldata stakedTokenIds, uint256[] calldata unstakedTokenIds) public { require(tradeSaleActive, "Trade sale is not active"); require(genesisLockerAddress != address(0), "No genesis locker available"); require(vaultStorageAddress != address(0), "No vault storage available"); uint256 amount = (stakedTokenIds.length + unstakedTokenIds.length) * BLOCKS_PER_TRADE; require(amount > 0, "Cannot mint zero blocks"); require(amount <= MAX_BLOCKS_PER_MINT, "Cannot mint that many blocks"); tradeMinted += uint32(amount); require(tradeMinted <= MAX_TRADE_BLOCKS, "Exceeded max trade block count"); require(totalMinted() + amount <= MAX_BLOCKS, "Exceeded max trade block count"); IERC721 metroPass = IERC721(metroPassAddress); require(metroPass.balanceOf(msg.sender) > 0, "Only MetroPass holders are eligible"); IMetroVaultStorage vaultStorage = IMetroVaultStorage(vaultStorageAddress); if (stakedTokenIds.length > 0) { unchecked { uint256 prevTokenId; for (uint256 i = 0; i < stakedTokenIds.length; ++i) { uint256 tokenId = stakedTokenIds[i]; require(prevTokenId < tokenId, 'no duplicates allowed'); prevTokenId = tokenId; require(tokenId <= MAX_GENESIS_BLOCK_ID, "Only genesis blocks allowed"); Stake memory staked = vaultStorage.getStake(tokenId); require(staked.owner == msg.sender, "not an owner"); } } vaultStorage.setStakeOwner(stakedTokenIds, genesisLockerAddress, true); } if (unstakedTokenIds.length > 0) { unchecked { for (uint256 i = 0; i < unstakedTokenIds.length; ++i) { require(unstakedTokenIds[i] <= MAX_GENESIS_BLOCK_ID, "Only genesis blocks allowed"); } } vaultStorage.stakeBlocks(msg.sender, unstakedTokenIds, 0, 0); vaultStorage.setStakeOwner(unstakedTokenIds, genesisLockerAddress, false); } _mintBlocks(amount); } function _mintBlocks(uint256 amount) internal { _mint(msg.sender, amount, '', false); } function burn(uint256[] calldata tokenIds) public onlyController { for (uint256 i = 0; i < tokenIds.length; i++) { _burn(tokenIds[i]); } } function verifyHash(bytes32 hash, bytes32 signatureR, bytes32 signatureVS) public pure returns (address signer) { bytes32 messageDigest = ECDSA.toEthSignedMessageHash(hash); return ECDSA.recover(messageDigest, signatureR, signatureVS); } function isApprovedForAll(address owner, address operator) public view override returns (bool) { // whitelist OpenSea proxy contract for easy trading. if (proxyRegistryAddress != address(0x0)) { ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress); if (address(proxyRegistry.proxies(owner)) == operator) { return true; } } return isController(operator) || super.isApprovedForAll(owner, operator); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerQueryForNonexistentToken(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); error SetTimestampsDuplicates(); error SetTimestampsIncorrectOwner(); error InvalidQueryRange(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721AMultiMint is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; uint256 private constant MAX_RANGE = 20; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint24 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint24 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint24 numberBurned; // Keeps track of whitelist mint count with minimal overhead for tokenomics. uint8 numberWhitelistMinted; // For miscellaneous variable(s) pertaining to the address // If there are multiple variables, please pack them into a uint64. uint176 aux; } // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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; // The tokenId of the next token to be minted. uint32 internal _currentIndex; // The number of tokens burned. uint32 internal _burnCounter; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = uint32(_startTokenId()); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @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 override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } function _numberWhitelistMinted(address owner) internal view returns (uint8) { return _addressData[owner].numberWhitelistMinted; } function _setNumberWhitelistMinted(address owner, uint8 number) internal { _addressData[owner].numberWhitelistMinted = number; } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint176) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint176 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } function _setTimestampOf(uint256 tokenId, uint64 timestamp) internal returns (uint64) { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address owner = prevOwnership.addr; unchecked { TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = owner; currSlot.startTimestamp = timestamp; // If the ownership slot of tokenId+1 is not explicitly set, that means the setTimestampOf initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for timestampOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = owner; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } return prevOwnership.startTimestamp; } function _setTimestampsOf(address owner, uint256[] calldata tokenIds, uint64 timestamp) internal returns (uint64[] memory prevTimestamps) { unchecked { uint256 length = tokenIds.length; prevTimestamps = new uint64[](length); uint256 prevTokenId = 0; uint256 i = 0; while (i < length) { uint256 tokenId = tokenIds[i]; if (prevTokenId >= tokenId) revert SetTimestampsDuplicates(); TokenOwnership memory prevOwnership = _ownershipOf(tokenId); prevTimestamps[i++] = prevOwnership.startTimestamp; if (prevOwnership.addr != owner) revert SetTimestampsIncorrectOwner(); TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = owner; currSlot.startTimestamp = timestamp; for (;;) { uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; // If the nextslot is not the zero address then nextTokenId // is not part of a token range from owner if (nextSlot.addr != address(0)) { break; } // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId == _currentIndex) { break; } // nextTokenId is part of a token range, check if // nextTokenId is also the next in the tokenIds array // if not, then the timestamp for the tokens after // tokenId needs to be preserved if (i >= length || tokenIds[i] != nextTokenId) { nextSlot.addr = owner; nextSlot.startTimestamp = prevOwnership.startTimestamp; break; } // At this point nextTokenId is also next in the tokenIds // array, no need to change storage, just return the token // range timestamp and continue with the next tokenId prevTimestamps[i++] = prevOwnership.startTimestamp; tokenId = nextTokenId; } prevTokenId = tokenId; } } } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @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) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); 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 overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721AMultiMint.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_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 { _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 { _transfer(from, to, tokenId); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint24(quantity); _addressData[to].numberMinted += uint24(quantity); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; uint256 writeCount = (quantity + MAX_RANGE - 1) / MAX_RANGE; uint256 writeStep = quantity / writeCount; uint256 writePosition = startTokenId; for (uint256 i = 0; i < writeCount; ++i) { _ownerships[writePosition].addr = to; _ownerships[writePosition].startTimestamp = uint64(block.timestamp); writePosition += writeStep; } if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = uint32(updatedIndex); } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev This is equivalent to _burn(tokenId, false) */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * - `addr` = `address(0)` * - `startTimestamp` = `0` * - `burned` = `false` * * If the `tokenId` is burned: * - `addr` = `<Address of owner before token was burned>` * - `startTimestamp` = `<Timestamp when token was burned>` * - `burned = `true` * * Otherwise: * - `addr` = `<Address of owner>` * - `startTimestamp` = `<Timestamp of start of ownership>` * - `burned = `false` */ function explicitOwnershipOf(uint256 tokenId) public view returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _currentIndex) { return ownership; } ownership = _ownerships[tokenId]; if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start` < `stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _currentIndex; // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, _currentIndex)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownerships[i]; if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(totalSupply) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K pfp collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownerships[i]; if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } function isOwnerOfTokens(address owner, uint256[] calldata tokenIds) external view returns (bool) { uint256 tokenIdsLength = tokenIds.length; if (tokenIdsLength == 0) { return false; } uint256 tokenId = tokenIds[0]; if (_ownershipOf(tokenId).addr != owner) { return false; } unchecked { for (uint256 i=1; i<tokenIdsLength; ++i) { uint256 nextTokenId = tokenId+1; tokenId = tokenIds[i]; // if the next tokenId in the array is part of the same token range // continue without checking ownership again if (tokenId == nextTokenId && _ownerships[nextTokenId].addr == address(0)) { // make sure tokenId is still within the supply limit if (tokenId >= _currentIndex) { return false; } continue; } if (_ownershipOf(tokenId).addr != owner) { return false; } } } return true; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; import "@openzeppelin/contracts/access/Ownable.sol"; abstract contract Controllable is Ownable { mapping(address => bool) private controllers; function addController(address controller) external onlyOwner { controllers[controller] = true; } function removeController(address controller) external onlyOwner { controllers[controller] = false; } function isController(address account) public view returns (bool) { return controllers[account]; } modifier onlyController() { require(controllers[_msgSender()], "Controllable: caller is not the controller"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { if (msg.sender == address(this)) { bytes memory array = msg.data; uint256 index = msg.data.length; assembly { // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. sender := and( mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff ) } } else { sender = payable(msg.sender); } return sender; } } contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol"; import {EIP712Base} from "./EIP712Base.sol"; contract NativeMetaTransaction is EIP712Base { using SafeMath for uint256; bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( bytes( "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" ) ); event MetaTransactionExecuted( address userAddress, address payable relayerAddress, bytes functionSignature ); mapping(address => uint256) nonces; /* * Meta transaction structure. * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas * He should call the desired function directly in that case. */ struct MetaTransaction { uint256 nonce; address from; bytes functionSignature; } function executeMetaTransaction( address userAddress, bytes memory functionSignature, bytes32 sigR, bytes32 sigS, uint8 sigV ) public payable returns (bytes memory) { MetaTransaction memory metaTx = MetaTransaction({ nonce: nonces[userAddress], from: userAddress, functionSignature: functionSignature }); require( verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match" ); // increase nonce for user (to avoid re-use) nonces[userAddress] = nonces[userAddress].add(1); emit MetaTransactionExecuted( userAddress, payable(msg.sender), functionSignature ); // Append userAddress and relayer address at the end to extract it from calling context (bool success, bytes memory returnData) = address(this).call( abi.encodePacked(functionSignature, userAddress) ); require(success, "Function call not successful"); return returnData; } function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) { return keccak256( abi.encode( META_TRANSACTION_TYPEHASH, metaTx.nonce, metaTx.from, keccak256(metaTx.functionSignature) ) ); } function getNonce(address user) public view returns (uint256 nonce) { nonce = nonces[user]; } function verify( address signer, MetaTransaction memory metaTx, bytes32 sigR, bytes32 sigS, uint8 sigV ) internal view returns (bool) { require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); return signer == ecrecover( toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS ); } }
// SPDX-License-Identifier: MIT LICENSE import "../structs/MetroVaultStorageStructs.sol"; import "../../../nfts/interfaces/IMetroNFTLookup.sol"; pragma solidity 0.8.12; interface IMetroVaultStorage is IMetroNFTLookup { function getStake(uint256 tokenId) external view returns (Stake memory); function getAccount(address owner) external view returns (Account memory); function setStake(uint256 tokenId, Stake calldata newStake) external; function setStakeTimestamp(uint256[] calldata tokenIds, uint40 timestamp) external; function setStakeCity(uint256[] calldata tokenIds, uint16 cityId, bool resetTimestamp) external; function setStakeExtra(uint256[] calldata tokenIds, uint40 extra, bool resetTimestamp) external; function setStakeOwner(uint256[] calldata tokenIds, address owner, bool resetTimestamp) external; function changeStakeOwner(uint256 tokenId, address newOwner, bool resetTimestamp) external; function setAccountsExtra(address[] calldata owners, uint232[] calldata extras) external; function setAccountExtra(address owner, uint232 extra) external; function deleteStake(uint256[] calldata tokenIds) external; function stakeBlocks(address owner, uint256[] calldata tokenIds, uint16 cityId, uint40 extra) external; function stakeFromMint(address owner, uint256[] calldata tokenIds, uint16 cityId, uint40 extra) external; function unstakeBlocks(address owner, uint256[] calldata tokenIds) external; function unstakeBlocksTo(address owner, address to, uint256[] calldata tokenIds) external; function tokensOfOwner(address account, uint256 start, uint256 stop) external view returns (uint256[] memory); function stakeBlocks( address owner, uint256[] calldata tokenIds, uint16[] calldata cityIds, uint40[] calldata extras, uint40[] calldata timestamps ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IMetroVaultStorage.sol"; import "../../nfts/interfaces/IMetroBlockInfo.sol"; import "../../MetToken.sol"; struct EarningInfo { uint256 earned; uint256 earnRatePerSecond; } contract MetroVaultDoor is Ownable { uint256 public maxTokenCount = 20_000; address public tokenAddress; address public vaultAddress; address public blockInfoAddress; // To be used to migrate to another Vault bool claimDisabled; bool stakeDisabled; event Claimed(address indexed owner, uint256 amount); constructor(address _tokenAddress, address _vaultAddress) { tokenAddress = _tokenAddress; vaultAddress = _vaultAddress; } function setMaxTokenCount(uint256 _maxTokenCount) external onlyOwner { maxTokenCount = _maxTokenCount; } function setBlockInfoAddress(address _blockInfoAddress) public onlyOwner { blockInfoAddress = _blockInfoAddress; } function enableClaim() external onlyOwner { claimDisabled = false; } function disableClaim() external onlyOwner { claimDisabled = true; } function enableStake() external onlyOwner { stakeDisabled = false; } function disableStake() external onlyOwner { stakeDisabled = true; } function stake(uint256[] calldata tokenIds) external { require(!stakeDisabled, 'Staking is disabled'); IMetroVaultStorage vault = IMetroVaultStorage(vaultAddress); vault.stakeBlocks(_msgSender(), tokenIds, 0, 0); } function unstake(uint256[] calldata tokenIds, uint256[] calldata claimTokenIds) external { if (!claimDisabled && claimTokenIds.length > 0) { _claim(_msgSender(), claimTokenIds); } IMetroVaultStorage vault = IMetroVaultStorage(vaultAddress); vault.unstakeBlocks(_msgSender(), tokenIds); } function claim(uint256[] calldata tokenIds) external { require(!claimDisabled, 'Claim is disabled'); _claim(_msgSender(), tokenIds); } function claimForAddress(address account, uint256[] calldata tokenIds) external { require(!claimDisabled, 'Claim is disabled'); _claim(account, tokenIds); } function _claim(address account, uint256[] calldata tokenIds) internal { uint256 earned = 0; if (blockInfoAddress == address(0x0)) { return; } uint256 prevTokenId; IMetroVaultStorage vault = IMetroVaultStorage(vaultAddress); IMetroBlockInfo blockInfoContract = IMetroBlockInfo(blockInfoAddress); for (uint i = 0; i < tokenIds.length; i++) { uint256 tokenId = tokenIds[i]; require(prevTokenId < tokenId, 'no duplicates allowed'); prevTokenId = tokenId; uint256 score = blockInfoContract.getBlockScore(tokenId); Stake memory staked = vault.getStake(tokenId); require(staked.owner == account, "not an owner"); earned += 1 ether * score * (block.timestamp - staked.timestamp) / 1 days; } vault.setStakeTimestamp(tokenIds, uint40(block.timestamp)); if (earned > 0) { uint256 boost = blockInfoContract.getHoodBoost(tokenIds); earned = boost * earned / 10000; MetToken(tokenAddress).mint(account, earned); } emit Claimed(account, earned); } function earningInfo(uint256[] calldata tokenIds) external view returns (EarningInfo memory) { uint256 totalScore = 0; uint256 earned = 0; IMetroVaultStorage vault = IMetroVaultStorage(vaultAddress); IMetroBlockInfo blockInfoContract = IMetroBlockInfo(blockInfoAddress); for (uint i = 0; i < tokenIds.length; i++) { uint256 tokenId = tokenIds[i]; uint256 score = blockInfoContract.getBlockScore(tokenId); totalScore += score; Stake memory staked = vault.getStake(tokenId); earned += 1 ether * score * (block.timestamp - staked.timestamp) / 1 days; } uint256 boost = blockInfoContract.getHoodBoost(tokenIds); earned = boost * earned / 10000; uint256 earnRatePerSecond = totalScore * 1 ether / 1 days; earnRatePerSecond = boost * earnRatePerSecond / 10000; return EarningInfo(earned, earnRatePerSecond); } function tokensOfOwner(address account) public view returns (uint256[] memory) { return IMetroVaultStorage(vaultAddress).tokensOfOwner(account, 0, maxTokenCount); } function tokensOfOwnerCustom(address account, uint256 start, uint256 stop) public view returns (uint256[] memory) { return IMetroVaultStorage(vaultAddress).tokensOfOwner(account, start, stop); } }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; contract MetToken is ERC20, ERC20Burnable, Ownable { mapping(address => bool) controllers; constructor() ERC20("Metroverse", "MET") { } function mint(address to, uint256 amount) external { require(controllers[msg.sender], "Only controllers can mint"); _mint(to, amount); } function burnFrom(address account, uint256 amount) public override { if (controllers[msg.sender]) { _burn(account, amount); } else { super.burnFrom(account, amount); } } function addController(address controller) external onlyOwner { controllers[controller] = true; } function removeController(address controller) external onlyOwner { controllers[controller] = false; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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 `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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 v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.0 (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.0 (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 v4.4.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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Initializable} from "./Initializable.sol"; contract EIP712Base is Initializable { struct EIP712Domain { string name; string version; address verifyingContract; bytes32 salt; } string public constant ERC712_VERSION = "1"; bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( bytes( "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" ) ); bytes32 internal domainSeperator; // supposed to be called once while initializing. // one of the contracts that inherits this contract follows proxy pattern // so it is not possible to do this in a constructor function _initializeEIP712(string memory name) internal initializer { _setDomainSeperator(name); } function _setDomainSeperator(string memory name) internal { domainSeperator = keccak256( abi.encode( EIP712_DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(ERC712_VERSION)), address(this), bytes32(getChainId()) ) ); } function getDomainSeperator() public view returns (bytes32) { return domainSeperator; } function getChainId() public view returns (uint256) { uint256 id; assembly { id := chainid() } return id; } /** * Accept message hash and returns hash message in EIP712 compatible form * So that it can be used to recover signer from signature signed using EIP712 formatted data * https://eips.ethereum.org/EIPS/eip-712 * "\\x19" makes the encoding deterministic * "\\x01" is the version byte to make it compatible to EIP-191 */ function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) { return keccak256( abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Initializable { bool inited = false; modifier initializer() { require(!inited, "already inited"); _; inited = true; } }
// SPDX-License-Identifier: MIT LICENSE pragma solidity 0.8.12; struct Stake { address owner; uint40 timestamp; uint16 cityId; uint40 extra; } struct Account { uint24 balance; uint232 extra; }
// SPDX-License-Identifier: MIT LICENSE pragma solidity 0.8.12; interface IMetroNFTLookup { function getNFTContractAddress(uint256 tokenId) external view returns (address); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.4; import "./IMetroBlockScores.sol"; interface IMetroBlockInfo is IMetroBlockScores { function getBlockInfo(uint256 tokenId) external view returns (uint256 info); function getHoodBoost(uint256[] calldata tokenIds) external view returns (uint256 score); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.4; interface IMetroBlockScores { function getBlockScore(uint256 tokenId) external view returns (uint256 score); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 currentAllowance = allowance(account, _msgSender()); require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance"); unchecked { _approve(account, _msgSender(), currentAllowance - amount); } _burn(account, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
{ "optimizer": { "enabled": true, "runs": 2000 }, "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":"_metTokenAddress","type":"address"},{"internalType":"address","name":"_vaultStorageAddress","type":"address"},{"internalType":"address","name":"_proxyRegistryAddress","type":"address"},{"internalType":"address","name":"_signerAddress","type":"address"},{"internalType":"address","name":"_genesisLockerAddress","type":"address"},{"internalType":"address","name":"_metroPassAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"SetTimestampsDuplicates","type":"error"},{"inputs":[],"name":"SetTimestampsIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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":"BLOCKS_PER_TRADE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BLOCK_ID_OFFSET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CEIL_MET_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FLOOR_MET_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BLOCKS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BLOCKS_PER_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BLOCKS_PER_WHITELIST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ETH_BLOCKS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TRADE_BLOCKS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_MET_BLOCKS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_STEP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"addController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"auctionStartTimestamp","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockInfoAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentMetPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"signatureR","type":"bytes32"},{"internalType":"bytes32","name":"signatureVS","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ethMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"ethMinted","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethPrice","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct ERC721AMultiMint.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct ERC721AMultiMint.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genesisLockerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getAux","outputs":[{"internalType":"uint176","name":"","type":"uint176"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBlockInfo","outputs":[{"internalType":"uint256","name":"info","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBlockScore","outputs":[{"internalType":"uint256","name":"score","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"getHoodBoost","outputs":[{"internalType":"uint256","name":"score","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isController","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"isOwnerOfTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"metMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"metMinted","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metroPassAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"numberWhitelistMinted","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyRegistryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"removeController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resumeMetSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint176","name":"extra","type":"uint176"}],"name":"setAux","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"URI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_blockInfoAddress","type":"address"}],"name":"setBlockInfoAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"price","type":"uint128"}],"name":"setEthPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_genesisLockerAddress","type":"address"}],"name":"setGenesisLockerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_proxyRegistryAddress","type":"address"}],"name":"setProxyRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signerAddress","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint64","name":"timestamp","type":"uint64"}],"name":"setTimestampOf","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint64","name":"timestamp","type":"uint64"}],"name":"setTimestampsOf","outputs":[{"internalType":"uint64[]","name":"","type":"uint64[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startEthSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startMetSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTradeSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopEthSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopMetSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopTradeSale","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":"timestampOf","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"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":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"stakedTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"unstakedTokenIds","type":"uint256[]"}],"name":"tradeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tradeMinted","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradeSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"vaultStorageAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes32","name":"signatureR","type":"bytes32"},{"internalType":"bytes32","name":"signatureVS","type":"bytes32"}],"name":"verifyHash","outputs":[{"internalType":"address","name":"signer","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6008805462ffffff60c01b19169055600980546001600160801b03191667016345785d8a0000179055610140604052603660e08181529062005dde6101003980516200005491600a916020909101906200020c565b503480156200006257600080fd5b5060405162005e1438038062005e148339810160408190526200008591620002cf565b6040518060400160405280601a81526020017f4d6574726f7665727365204d696e69204369747920426c6f636b0000000000008152506040518060400160405280600e81526020016d4d4554524f4d494e49424c4f434b60901b815250620000fc620000f6620001a260201b60201c565b620001a6565b8151620001119060029060208501906200020c565b508051620001279060039060208401906200020c565b5062000132620001f6565b6008805463ffffffff191663ffffffff9290921691909117905550506001600160a01b0395861660805293851660a052600c80546001600160a01b0319908116948716949094179055600d8054841692861692909217909155600e80549092169084161790551660c052620003b4565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600062000207614e20600162000350565b905090565b8280546200021a9062000377565b90600052602060002090601f0160209004810192826200023e576000855562000289565b82601f106200025957805160ff191683800117855562000289565b8280016001018555821562000289579182015b82811115620002895782518255916020019190600101906200026c565b50620002979291506200029b565b5090565b5b808211156200029757600081556001016200029c565b80516001600160a01b0381168114620002ca57600080fd5b919050565b60008060008060008060c08789031215620002e957600080fd5b620002f487620002b2565b95506200030460208801620002b2565b94506200031460408801620002b2565b93506200032460608801620002b2565b92506200033460808801620002b2565b91506200034460a08801620002b2565b90509295509295509295565b600082198211156200037257634e487b7160e01b600052601160045260246000fd5b500190565b600181811c908216806200038c57607f821691505b60208210811415620003ae57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c0516159de6200040060003960008181610bdf015261230c015260008181610c130152818161208c01526123f9015260008181610acb0152612c6901526159de6000f3fe6080604052600436106105935760003560e01c8063759a987b116102e0578063bf0b175e11610184578063d26ea6c0116100e1578063ebee180311610095578063fc4903a81161006f578063fc4903a814610fc5578063fcad7cd414610fe5578063ff186b2e14610ffa57600080fd5b8063ebee180314610749578063f2fde38b14610f85578063f6a74ed714610fa557600080fd5b8063d547cfb7116100c6578063d547cfb714610f23578063d9a1a76514610f38578063e985e9c514610f6557600080fd5b8063d26ea6c014610eed578063d2e7d90414610f0d57600080fd5b8063c87b56dd11610138578063cd7c03261161011d578063cd7c032614610e8d578063d15dbf7814610ead578063d24b7e7a14610ecd57600080fd5b8063c87b56dd14610e4d578063cc72d9da14610e6d57600080fd5b8063c1ba42c911610169578063c1ba42c914610ddf578063c23dc68f14610dfc578063c6a96c8f14610e2957600080fd5b8063bf0b175e14610d83578063c0cba26114610dca57600080fd5b8063a1e63ca21161023d578063b429afeb116101f1578063b97882d6116101cb578063b97882d614610d30578063bb141cf414610d4e578063bcb904fd14610d6e57600080fd5b8063b429afeb14610cb7578063b80f55c914610cf0578063b88d4fde14610d1057600080fd5b8063a22d4b9011610222578063a22d4b9014610c55578063a2309ff814610c82578063a7fc7a0714610c9757600080fd5b8063a1e63ca214610c01578063a22cb46514610c3557600080fd5b80639395bfcf116102945780639964d142116102795780639964d14214610b8d57806399a2557a14610bad5780639e0a88c614610bcd57600080fd5b80639395bfcf14610b5857806395d89b4114610b7857600080fd5b8063818ebfe1116102c5578063818ebfe114610aed5780638462151c14610b0d5780638da5cb5b14610b3a57600080fd5b8063759a987b14610aa45780637bc76c3914610ab957600080fd5b80632d9c77e111610447578063578ec92f116103a45780636352211e116103585780636e5a2990116103325780636e5a299014610a3e57806370a0823114610a6f578063715018a614610a8f57600080fd5b80636352211e146109cb57806367741188146109eb5780636af2112814610a0057600080fd5b80635b7633d0116103895780635b7633d01461095e5780635bbb21771461097e5780635ff63608146109ab57600080fd5b8063578ec92f1461092a57806359a99fef1461094b57600080fd5b806348f176aa116103fb578063514da8f4116103e0578063514da8f4146108d557806355f804b3146108ea57806357589f361461090a57600080fd5b806348f176aa146108a0578063500543c7146108b557600080fd5b8063366857511161042c57806336685751146108555780633ccfd60b1461086b57806342842e0e1461088057600080fd5b80632d9c77e1146107ea5780633445cc2c1461082357600080fd5b806315bcf8e2116104f557806323ab68b0116104a957806323c49ec71161048e57806323c49ec71461079f57806326833dcc146107c05780632d977569146107d557600080fd5b806323ab68b01461075f57806323b872dd1461077f57600080fd5b80631976295a116104da5780631976295a146107345780631c0acc71146107495780631de700fc1461074957600080fd5b806315bcf8e21461070a57806318160ddd1461071f57600080fd5b8063081812fc1161054c578063095ea7b311610531578063095ea7b31461069f5780630c1df89d146106bf5780630c45c817146106ed57600080fd5b8063081812fc1461065257806308ef37001461068a57600080fd5b8063029451721161057d57806302945172146105ed578063046dc1661461060e57806306fdde031461063057600080fd5b80628ee0031461059857806301ffc9a7146105cd575b600080fd5b3480156105a457600080fd5b506105b86105b3366004614eb2565b611044565b60405190151581526020015b60405180910390f35b3480156105d957600080fd5b506105b86105e8366004614f1d565b61115e565b3480156105f957600080fd5b506008546105b890600160c81b900460ff1681565b34801561061a57600080fd5b5061062e610629366004614f3a565b6111fb565b005b34801561063c57600080fd5b50610645611289565b6040516105c49190614faf565b34801561065e57600080fd5b5061067261066d366004614fc2565b61131b565b6040516001600160a01b0390911681526020016105c4565b34801561069657600080fd5b5061062e611378565b3480156106ab57600080fd5b5061062e6106ba366004614fdb565b611402565b3480156106cb57600080fd5b506106df6106da366004615007565b6114c2565b6040519081526020016105c4565b3480156106f957600080fd5b506106df6802b5e3af16b188000081565b34801561071657600080fd5b5061062e611569565b34801561072b57600080fd5b506106df6115f3565b34801561074057600080fd5b5061062e61161d565b34801561075557600080fd5b506106df614e2081565b34801561076b57600080fd5b5061062e61077a366004614f3a565b6116b7565b34801561078b57600080fd5b5061062e61079a366004615049565b611740565b3480156107ab57600080fd5b506008546105b890600160d01b900460ff1681565b3480156107cc57600080fd5b506106df61174b565b3480156107e157600080fd5b506106df600281565b3480156107f657600080fd5b5061080a610805366004614fc2565b611767565b60405167ffffffffffffffff90911681526020016105c4565b34801561082f57600080fd5b5061084361083e366004614f3a565b61177c565b60405160ff90911681526020016105c4565b34801561086157600080fd5b506106df61271081565b34801561087757600080fd5b5061062e6117aa565b34801561088c57600080fd5b5061062e61089b366004615049565b611841565b3480156108ac57600080fd5b506106df606481565b3480156108c157600080fd5b506106df6108d0366004614fc2565b61185c565b3480156108e157600080fd5b5061062e6118fe565b3480156108f657600080fd5b5061062e61090536600461508a565b611988565b34801561091657600080fd5b5061062e6109253660046150fc565b6119ee565b34801561093657600080fd5b506008546105b890600160c01b900460ff1681565b61062e610959366004615150565b611ab3565b34801561096a57600080fd5b50600d54610672906001600160a01b031681565b34801561098a57600080fd5b5061099e6109993660046151c3565b611f12565b6040516105c49190615269565b3480156109b757600080fd5b5061062e6109c63660046152d4565b611fd9565b3480156109d757600080fd5b506106726109e6366004614fc2565b6127f7565b3480156109f757600080fd5b5061062e612809565b348015610a0c57600080fd5b50600854610a299068010000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016105c4565b348015610a4a57600080fd5b50600854610a2990700100000000000000000000000000000000900463ffffffff1681565b348015610a7b57600080fd5b506106df610a8a366004614f3a565b61288d565b348015610a9b57600080fd5b5061062e6128f0565b348015610ab057600080fd5b506106df600a81565b348015610ac557600080fd5b506106727f000000000000000000000000000000000000000000000000000000000000000081565b348015610af957600080fd5b50600e54610672906001600160a01b031681565b348015610b1957600080fd5b50610b2d610b28366004614f3a565b612956565b6040516105c49190615340565b348015610b4657600080fd5b506000546001600160a01b0316610672565b348015610b6457600080fd5b5061062e610b73366004614fc2565b612aa7565b348015610b8457600080fd5b50610645612d09565b348015610b9957600080fd5b50610672610ba8366004615150565b612d18565b348015610bb957600080fd5b50610b2d610bc8366004615378565b612d88565b348015610bd957600080fd5b506106727f000000000000000000000000000000000000000000000000000000000000000081565b348015610c0d57600080fd5b506106727f000000000000000000000000000000000000000000000000000000000000000081565b348015610c4157600080fd5b5061062e610c503660046153ad565b612f7b565b348015610c6157600080fd5b50610c75610c703660046153fd565b61302a565b6040516105c49190615464565b348015610c8e57600080fd5b506106df6130b6565b348015610ca357600080fd5b5061062e610cb2366004614f3a565b6130c5565b348015610cc357600080fd5b506105b8610cd2366004614f3a565b6001600160a01b031660009081526001602052604090205460ff1690565b348015610cfc57600080fd5b5061062e610d0b366004615007565b613146565b348015610d1c57600080fd5b5061062e610d2b3660046154a6565b6131f6565b348015610d3c57600080fd5b506106df69021e19e0c9bab240000081565b348015610d5a57600080fd5b506106df610d69366004614fc2565b613247565b348015610d7a57600080fd5b5061062e6132ac565b348015610d8f57600080fd5b50610da3610d9e366004614f3a565b613330565b60405175ffffffffffffffffffffffffffffffffffffffffffff90911681526020016105c4565b348015610dd657600080fd5b506106df613374565b348015610deb57600080fd5b506106df68d8d726b7177a80000081565b348015610e0857600080fd5b50610e1c610e17366004614fc2565b61342e565b6040516105c4919061556a565b348015610e3557600080fd5b50600854610a2990600160a01b900463ffffffff1681565b348015610e5957600080fd5b50610645610e68366004614fc2565b6134f5565b348015610e7957600080fd5b5061062e610e88366004614f3a565b613592565b348015610e9957600080fd5b50600c54610672906001600160a01b031681565b348015610eb957600080fd5b5061080a610ec83660046155a0565b61361b565b348015610ed957600080fd5b5061062e610ee83660046155cc565b613697565b348015610ef957600080fd5b5061062e610f08366004614f3a565b613734565b348015610f1957600080fd5b506106df61025881565b348015610f2f57600080fd5b506106456137bd565b348015610f4457600080fd5b50600854610a29906c01000000000000000000000000900463ffffffff1681565b348015610f7157600080fd5b506105b8610f803660046155fe565b61384b565b348015610f9157600080fd5b5061062e610fa0366004614f3a565b613956565b348015610fb157600080fd5b5061062e610fc0366004614f3a565b613a35565b348015610fd157600080fd5b50600b54610672906001600160a01b031681565b348015610ff157600080fd5b5061062e613ab0565b34801561100657600080fd5b50600954611023906fffffffffffffffffffffffffffffffff1681565b6040516fffffffffffffffffffffffffffffffff90911681526020016105c4565b60008180611056576000915050611157565b60008484600081811061106b5761106b61562c565b905060200201359050856001600160a01b031661108782613b34565b516001600160a01b0316146110a157600092505050611157565b60015b8281101561114f57600182018686838181106110c2576110c261562c565b90506020020135925080831480156110ef57506000818152600460205260409020546001600160a01b0316155b156111165760085463ffffffff168310611110576000945050505050611157565b50611147565b876001600160a01b031661112984613b34565b516001600160a01b031614611145576000945050505050611157565b505b6001016110a4565b506001925050505b9392505050565b60006001600160e01b031982167f80ac58cd0000000000000000000000000000000000000000000000000000000014806111c157506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806111f557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6000546001600160a01b0316331461125a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60606002805461129890615642565b80601f01602080910402602001604051908101604052809291908181526020018280546112c490615642565b80156113115780601f106112e657610100808354040283529160200191611311565b820191906000526020600020905b8154815290600101906020018083116112f457829003601f168201915b5050505050905090565b600061132682613c82565b61135c576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000546001600160a01b031633146113d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600880547fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b179055565b600061140d826127f7565b9050806001600160a01b0316836001600160a01b0316141561145b576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b0382161480159061147b5750611479813361384b565b155b156114b2576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114bd838383613cc7565b505050565b600b546000906001600160a01b03166114dd575060006111f5565b600b546040517f0c1df89d0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690630c1df89d9061152890869086906004016156cc565b602060405180830381865afa158015611545573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115791906156e0565b6000546001600160a01b031633146115c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600880547fffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffff16600160d01b179055565b60006115fd613d30565b60085463ffffffff64010000000082048116918116919091031603919050565b6000546001600160a01b031633146116775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b6008805463ffffffff4216600160a01b027fffffffffffffff0000000000ffffffffffffffffffffffffffffffffffffffff90911617600160c01b179055565b6000546001600160a01b031633146117115760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6114bd838383613d3f565b61271061175a614e208061570f565b611764919061570f565b81565b600061177282613b34565b6020015192915050565b6001600160a01b0381166000908152600560205260408120546901000000000000000000900460ff166111f5565b6000546001600160a01b031633146118045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f1935050505015801561183e573d6000803e3d6000fd5b50565b6114bd838383604051806020016040528060008152506131f6565b600b546000906001600160a01b031661187757506000919050565b600b546040517f500543c7000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b039091169063500543c7906024015b602060405180830381865afa1580156118da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f591906156e0565b6000546001600160a01b031633146119585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600880547fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff16600160c81b179055565b6000546001600160a01b031633146119e25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b6114bd600a8383614db8565b3360009081526001602052604090205460ff16611a605760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401611251565b6001600160a01b0382166000908152600560205260409020805469ffffffffffffffffffff166a010000000000000000000075ffffffffffffffffffffffffffffffffffffffffffff8416021790555050565b600854600160c81b900460ff16611b0c5760405162461bcd60e51b815260206004820152601660248201527f4554482073616c65206973206e6f7420616374697665000000000000000000006044820152606401611251565b600d546001600160a01b0316611b645760405162461bcd60e51b815260206004820152601960248201527f5369676e65722061646472657373206973206e6f7420736574000000000000006044820152606401611251565b60008111611bb45760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74206d696e74207a65726f20626c6f636b730000000000000000006044820152606401611251565b6064811115611c055760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206d696e742074686174206d616e7920626c6f636b73000000006044820152606401611251565b806008600c8282829054906101000a900463ffffffff16611c269190615727565b92506101000a81548163ffffffff021916908363ffffffff160217905550614e206008600c9054906101000a900463ffffffff1663ffffffff161115611cae5760405162461bcd60e51b815260206004820152601c60248201527f4578636565646564206d61782045544820626c6f636b20636f756e74000000006044820152606401611251565b612710611cbd614e208061570f565b611cc7919061570f565b81611cd06130b6565b611cda919061570f565b1115611d285760405162461bcd60e51b815260206004820152601c60248201527f4578636565646564206d61782045544820626c6f636b20636f756e74000000006044820152606401611251565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b1660208201526000906034016040516020818303038152906040528051906020012090506000611d81828686612d18565b600d549091506001600160a01b03808316911614611de15760405162461bcd60e51b815260206004820152600f60248201527f4e6f742077686974656c697374656400000000000000000000000000000000006044820152606401611251565b600083611ded3361177c565b60ff16611dfa919061570f565b90506002811115611e4d5760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e7465640000000000000000000000000000000000006044820152606401611251565b600954611e6d9085906fffffffffffffffffffffffffffffffff1661574f565b3414611ebb5760405162461bcd60e51b815260206004820152601360248201527f57726f6e6720616d6f756e74206f6620455448000000000000000000000000006044820152606401611251565b33600090815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff16690100000000000000000060ff841602179055611f0a84613f7e565b505050505050565b805160609060008167ffffffffffffffff811115611f3257611f3261517c565b604051908082528060200260200182016040528015611f7d57816020015b6040805160608101825260008082526020808301829052928201528252600019909201910181611f505790505b50905060005b828114611fd157611fac858281518110611f9f57611f9f61562c565b602002602001015161342e565b828281518110611fbe57611fbe61562c565b6020908102919091010152600101611f83565b509392505050565b600854600160d01b900460ff166120325760405162461bcd60e51b815260206004820152601860248201527f54726164652073616c65206973206e6f742061637469766500000000000000006044820152606401611251565b600e546001600160a01b031661208a5760405162461bcd60e51b815260206004820152601b60248201527f4e6f2067656e65736973206c6f636b657220617661696c61626c6500000000006044820152606401611251565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166121005760405162461bcd60e51b815260206004820152601a60248201527f4e6f207661756c742073746f7261676520617661696c61626c650000000000006044820152606401611251565b6000600a61210e838661570f565b612118919061574f565b90506000811161216a5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74206d696e74207a65726f20626c6f636b730000000000000000006044820152606401611251565b60648111156121bb5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206d696e742074686174206d616e7920626c6f636b73000000006044820152606401611251565b80600860108282829054906101000a900463ffffffff166121dc9190615727565b92506101000a81548163ffffffff021916908363ffffffff160217905550612710600860109054906101000a900463ffffffff1663ffffffff1611156122645760405162461bcd60e51b815260206004820152601e60248201527f4578636565646564206d617820747261646520626c6f636b20636f756e7400006044820152606401611251565b612710612273614e208061570f565b61227d919061570f565b816122866130b6565b612290919061570f565b11156122de5760405162461bcd60e51b815260206004820152601e60248201527f4578636565646564206d617820747261646520626c6f636b20636f756e7400006044820152606401611251565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201527f0000000000000000000000000000000000000000000000000000000000000000906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015612360573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061238491906156e0565b116123f75760405162461bcd60e51b815260206004820152602360248201527f4f6e6c79204d6574726f5061737320686f6c646572732061726520656c69676960448201527f626c6500000000000000000000000000000000000000000000000000000000006064820152608401611251565b7f0000000000000000000000000000000000000000000000000000000000000000851561265c576000805b878110156125d657600089898381811061243e5761243e61562c565b9050602002013590508083106124965760405162461bcd60e51b815260206004820152601560248201527f6e6f206475706c69636174657320616c6c6f77656400000000000000000000006044820152606401611251565b8092506127108111156124eb5760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c792067656e6573697320626c6f636b7320616c6c6f77656400000000006044820152606401611251565b6040517fce325bf8000000000000000000000000000000000000000000000000000000008152600481018290526000906001600160a01b0386169063ce325bf890602401608060405180830381865afa15801561254c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125709190615783565b80519091506001600160a01b031633146125cc5760405162461bcd60e51b815260206004820152600c60248201527f6e6f7420616e206f776e657200000000000000000000000000000000000000006044820152606401611251565b5050600101612422565b5050600e546040517ff747dee00000000000000000000000000000000000000000000000000000000081526001600160a01b038084169263f747dee092612629928c928c9291169060019060040161580b565b600060405180830381600087803b15801561264357600080fd5b505af1158015612657573d6000803e3d6000fd5b505050505b83156127e55760005b848110156126df576127108686838181106126825761268261562c565b9050602002013511156126d75760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c792067656e6573697320626c6f636b7320616c6c6f77656400000000006044820152606401611251565b600101612665565b506040517f91555a920000000000000000000000000000000000000000000000000000000081526001600160a01b038216906391555a929061272e903390899089906000908190600401615840565b600060405180830381600087803b15801561274857600080fd5b505af115801561275c573d6000803e3d6000fd5b5050600e546040517ff747dee00000000000000000000000000000000000000000000000000000000081526001600160a01b03858116945063f747dee093506127b2928a928a929091169060009060040161580b565b600060405180830381600087803b1580156127cc57600080fd5b505af11580156127e0573d6000803e3d6000fd5b505050505b6127ee83613f7e565b50505050505050565b600061280282613b34565b5192915050565b6000546001600160a01b031633146128635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600880547fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff169055565b60006001600160a01b0382166128cf576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205462ffffff1690565b6000546001600160a01b0316331461294a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b6129546000613f9a565b565b606060008060006129668561288d565b905060008167ffffffffffffffff8111156129835761298361517c565b6040519080825280602002602001820160405280156129ac578160200160208202803683370190505b50604080516060810182526000808252602082018190529181018290529192506129d4613d30565b90505b838614612a9b57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16158015928201929092529250612a3e57612a93565b81516001600160a01b031615612a5357815194505b876001600160a01b0316856001600160a01b03161415612a935780838780600101985081518110612a8657612a8661562c565b6020026020010181815250505b6001016129d7565b50909695505050505050565b600854600160c01b900460ff16612b005760405162461bcd60e51b815260206004820152601660248201527f4d45542073616c65206973206e6f7420616374697665000000000000000000006044820152606401611251565b60008111612b505760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74206d696e74207a65726f20626c6f636b730000000000000000006044820152606401611251565b6064811115612ba15760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206d696e742074686174206d616e7920626c6f636b73000000006044820152606401611251565b806008808282829054906101000a900463ffffffff16612bc19190615727565b92506101000a81548163ffffffff021916908363ffffffff160217905550612710614e2080612bf0919061570f565b612bfa919061570f565b81612c036130b6565b612c0d919061570f565b1115612c5b5760405162461bcd60e51b815260206004820152601c60248201527f4578636565646564206d6178204d455420626c6f636b20636f756e74000000006044820152606401611251565b6000612c65613374565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0381166379cc679033612ca2868661574f565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612ce857600080fd5b505af1158015612cfc573d6000803e3d6000fd5b505050506114bd83613f7e565b60606003805461129890615642565b600080612d72856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050612d7f818585613ff7565b95945050505050565b6060818310612dc3576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085460009063ffffffff16612dd7613d30565b851015612de957612de6613d30565b94505b80841115612df5578093505b6000612e008761288d565b905084861015612e1f5785850381811015612e19578091505b50612e23565b5060005b60008167ffffffffffffffff811115612e3e57612e3e61517c565b604051908082528060200260200182016040528015612e67578160200160208202803683370190505b50905081612e7a57935061115792505050565b6000612e858861342e565b905060008160400151612e96575080515b885b888114158015612ea85750848714155b15612f6a57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16158015928201929092529350612f0d57612f62565b82516001600160a01b031615612f2257825191505b8a6001600160a01b0316826001600160a01b03161415612f625780848880600101995081518110612f5557612f5561562c565b6020026020010181815250505b600101612e98565b505050928352509095945050505050565b6001600160a01b038216331415612fbe576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b3360009081526001602052604090205460609060ff1661309f5760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401611251565b6130ab8585858561401d565b90505b949350505050565b60006130c0614294565b905090565b6000546001600160a01b0316331461311f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b3360009081526001602052604090205460ff166131b85760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401611251565b60005b818110156114bd576131e48383838181106131d8576131d861562c565b905060200201356142ad565b806131ee81615886565b9150506131bb565b613201848484613d3f565b6001600160a01b0383163b151580156132235750613221848484846142b8565b155b15613241576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600b546000906001600160a01b031661326257506000919050565b600b546040517fbb141cf4000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b039091169063bb141cf4906024016118bd565b6000546001600160a01b031633146133065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600880547fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff169055565b6001600160a01b0381166000908152600560205260408120546a0100000000000000000000900475ffffffffffffffffffffffffffffffffffffffffffff166111f5565b600854600090600160a01b900463ffffffff1661339a575069021e19e0c9bab240000090565b600854600090610258906133bb90600160a01b900463ffffffff16426158a1565b6133c591906158ce565b905060006133dc826802b5e3af16b188000061574f565b90506133fb68d8d726b7177a80000069021e19e0c9bab24000006158a1565b81101561341d576134168169021e19e0c9bab24000006158a1565b9250505090565b68d8d726b7177a8000009250505090565b604080516060808201835260008083526020808401829052838501829052845192830185528183528201819052928101929092529061346b613d30565b831080613480575060085463ffffffff168310155b1561348b5792915050565b50600082815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff1615801592820192909252906134ec5792915050565b61115783613b34565b606061350082613c82565b613536576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006135406143cf565b90508051600014156135615760405180602001604052806000815250611157565b8061356b846143de565b60405160200161357c9291906158e2565b6040516020818303038152906040529392505050565b6000546001600160a01b031633146135ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600e805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3360009081526001602052604081205460ff1661368d5760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401611251565b6111578383614510565b6000546001600160a01b031633146136f15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600980547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff92909216919091179055565b6000546001600160a01b0316331461378e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600a80546137ca90615642565b80601f01602080910402602001604051908101604052809291908181526020018280546137f690615642565b80156138435780601f1061381857610100808354040283529160200191613843565b820191906000526020600020905b81548152906001019060200180831161382657829003601f168201915b505050505081565b600c546000906001600160a01b03161561390657600c546040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015291821691841690829063c455279190602401602060405180830381865afa1580156138c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138eb9190615908565b6001600160a01b031614156139045760019150506111f5565b505b6001600160a01b03821660009081526001602052604090205460ff168061115757506001600160a01b0380841660009081526007602090815260408083209386168352929052205460ff16611157565b6000546001600160a01b031633146139b05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b6001600160a01b038116613a2c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401611251565b61183e81613f9a565b6000546001600160a01b03163314613a8f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b6001600160a01b03166000908152600160205260409020805460ff19169055565b6000546001600160a01b03163314613b0a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600880547fffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffff169055565b60408051606081018252600080825260208201819052918101919091528180613b5b613d30565b11158015613b70575060085463ffffffff1681105b15613c5057600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290613c4e5780516001600160a01b031615613be4579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215613c49579392505050565b613be4565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081613c8d613d30565b11158015613ca2575060085463ffffffff1682105b80156111f5575050600090815260046020526040902054600160e01b900460ff161590565b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006130c0614e20600161570f565b6000613d4a82613b34565b9050836001600160a01b031681600001516001600160a01b031614613d9b576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000336001600160a01b0386161480613db95750613db9853361384b565b80613dd4575033613dc98461131b565b6001600160a01b0316145b905080613e0d576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038416613e4d576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613e5960008487613cc7565b6001600160a01b038581166000908152600560209081526040808320805462ffffff1980821662ffffff928316600019018316179092558986168086528386208054938416938316600190810190931693909317909255888552600490935281842080546001600160e01b031916909117600160a01b4267ffffffffffffffff1602178155918701808452922080549193909116613f325760085463ffffffff168214613f32578054602086015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b61183e33826040518060200160405280600081525060006145c9565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600061400786868661484f565b9150915061401481614897565b50949350505050565b6060828067ffffffffffffffff8111156140395761403961517c565b604051908082528060200260200182016040528015614062578160200160208202803683370190505b5091506000805b828110156142895760008787838181106140855761408561562c565b9050602002013590508083106140c7576040517f8838421e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006140d282613b34565b905080602001518684806001019550815181106140f1576140f161562c565b602002602001019067ffffffffffffffff16908167ffffffffffffffff1681525050896001600160a01b031681600001516001600160a01b031614614162576040517fc2e8ff5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600460205260409020805467ffffffffffffffff8916600160a01b026001600160e01b03199091166001600160a01b038d16171781555b60018301600081815260046020526040902080546001600160a01b0316156141c757505061427e565b60085463ffffffff168214156141de57505061427e565b87861015806142055750818c8c888181106141fb576141fb61562c565b9050602002013514155b15614241578054602085015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038f16171790555061427e565b6020840151895160018801978b91811061425d5761425d61562c565b67ffffffffffffffff9092166020928302919091019091015250925061419e565b829450505050614069565b505050949350505050565b600061429e613d30565b60085463ffffffff1603919050565b61183e816000614a88565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a0290614306903390899088908890600401615925565b6020604051808303816000875af1925050508015614341575060408051601f3d908101601f1916820190925261433e91810190615961565b60015b61439c573d80801561436f576040519150601f19603f3d011682016040523d82523d6000602084013e614374565b606091505b508051614394576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b0319167f150b7a02000000000000000000000000000000000000000000000000000000001490506130ae565b6060600a805461129890615642565b60608161441e57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115614448578061443281615886565b91506144419050600a836158ce565b9150614422565b60008167ffffffffffffffff8111156144635761446361517c565b6040519080825280601f01601f19166020018201604052801561448d576020820181803683370190505b5090505b84156130ae576144a26001836158a1565b91506144af600a8661597e565b6144ba90603061570f565b60f81b8183815181106144cf576144cf61562c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350614509600a866158ce565b9450614491565b60008061451c84613b34565b805160008681526004602052604080822080546001600160a01b038086166001600160e01b031990921691909117600160a01b67ffffffffffffffff8b160217825560018a01808552929093208054959650939490939192166145ba5760085463ffffffff1682146145ba578054602086015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038616171781555b50505050602001519392505050565b60085463ffffffff166001600160a01b038516614612576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83614649576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03851660009081526005602052604081208054630100000062ffffff19821662ffffff8084168a01811691821783900481168a01169091027fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000009092161717905581908186019060146013880104908188816146cd576146cd6158b8565b0490508460005b83811015614723576000828152600460205260409020805467ffffffffffffffff4216600160a01b026001600160e01b03199091166001600160a01b038e1617179055908201906001016146d4565b5086801561473a57506001600160a01b038a163b15155b156147c9575b60405185906001600160a01b038c16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461478b60008b878060010198508b6142b8565b6147a8576040516368d2bf6b60e11b815260040160405180910390fd5b838514156147405760085463ffffffff1686146147c457600080fd5b61480f565b5b6040516001860195906001600160a01b038c16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4838514156147ca575b5050600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff949094169390931790925550613f779050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b0161488987828885614ccb565b935093505050935093915050565b60008160048111156148ab576148ab615992565b14156148b45750565b60018160048111156148c8576148c8615992565b14156149165760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401611251565b600281600481111561492a5761492a615992565b14156149785760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401611251565b600381600481111561498c5761498c615992565b1415614a005760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401611251565b6004816004811115614a1457614a14615992565b141561183e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401611251565b6000614a9383613b34565b80519091508215614b12576000336001600160a01b0383161480614abc5750614abc823361384b565b80614ad7575033614acc8661131b565b6001600160a01b0316145b905080614b10576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b614b1e60008583613cc7565b6001600160a01b03818116600081815260056020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffff000000ffffff000000811662ffffff8083166000190181169182176001660100000000000062ffffff19909516909317849004821683019091169092029190911782558a855260049093528184208054600160e01b6001600160e01b0319909116909617600160a01b4267ffffffffffffffff1602177fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff16959095178555918901808452922080549194909116614c465760085463ffffffff168214614c46578054602087015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060088054600163ffffffff64010000000080840482169290920116027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9091161790555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115614d025750600090506003614daf565b8460ff16601b14158015614d1a57508460ff16601c14155b15614d2b5750600090506004614daf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614d7f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614da857600060019250925050614daf565b9150600090505b94509492505050565b828054614dc490615642565b90600052602060002090601f016020900481019282614de65760008555614e2c565b82601f10614dff5782800160ff19823516178555614e2c565b82800160010185558215614e2c579182015b82811115614e2c578235825591602001919060010190614e11565b50614e38929150614e3c565b5090565b5b80821115614e385760008155600101614e3d565b6001600160a01b038116811461183e57600080fd5b60008083601f840112614e7857600080fd5b50813567ffffffffffffffff811115614e9057600080fd5b6020830191508360208260051b8501011115614eab57600080fd5b9250929050565b600080600060408486031215614ec757600080fd5b8335614ed281614e51565b9250602084013567ffffffffffffffff811115614eee57600080fd5b614efa86828701614e66565b9497909650939450505050565b6001600160e01b03198116811461183e57600080fd5b600060208284031215614f2f57600080fd5b813561115781614f07565b600060208284031215614f4c57600080fd5b813561115781614e51565b60005b83811015614f72578181015183820152602001614f5a565b838111156132415750506000910152565b60008151808452614f9b816020860160208601614f57565b601f01601f19169290920160200192915050565b6020815260006111576020830184614f83565b600060208284031215614fd457600080fd5b5035919050565b60008060408385031215614fee57600080fd5b8235614ff981614e51565b946020939093013593505050565b6000806020838503121561501a57600080fd5b823567ffffffffffffffff81111561503157600080fd5b61503d85828601614e66565b90969095509350505050565b60008060006060848603121561505e57600080fd5b833561506981614e51565b9250602084013561507981614e51565b929592945050506040919091013590565b6000806020838503121561509d57600080fd5b823567ffffffffffffffff808211156150b557600080fd5b818501915085601f8301126150c957600080fd5b8135818111156150d857600080fd5b8660208285010111156150ea57600080fd5b60209290920196919550909350505050565b6000806040838503121561510f57600080fd5b823561511a81614e51565b9150602083013575ffffffffffffffffffffffffffffffffffffffffffff8116811461514557600080fd5b809150509250929050565b60008060006060848603121561516557600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156151bb576151bb61517c565b604052919050565b600060208083850312156151d657600080fd5b823567ffffffffffffffff808211156151ee57600080fd5b818501915085601f83011261520257600080fd5b8135818111156152145761521461517c565b8060051b9150615225848301615192565b818152918301840191848101908884111561523f57600080fd5b938501935b8385101561525d57843582529385019390850190615244565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612a9b576152c183855180516001600160a01b0316825260208082015167ffffffffffffffff16908301526040908101511515910152565b9284019260609290920191600101615285565b600080600080604085870312156152ea57600080fd5b843567ffffffffffffffff8082111561530257600080fd5b61530e88838901614e66565b9096509450602087013591508082111561532757600080fd5b5061533487828801614e66565b95989497509550505050565b6020808252825182820181905260009190848201906040850190845b81811015612a9b5783518352928401929184019160010161535c565b60008060006060848603121561538d57600080fd5b833561539881614e51565b95602085013595506040909401359392505050565b600080604083850312156153c057600080fd5b82356153cb81614e51565b91506020830135801515811461514557600080fd5b803567ffffffffffffffff811681146153f857600080fd5b919050565b6000806000806060858703121561541357600080fd5b843561541e81614e51565b9350602085013567ffffffffffffffff81111561543a57600080fd5b61544687828801614e66565b90945092506154599050604086016153e0565b905092959194509250565b6020808252825182820181905260009190848201906040850190845b81811015612a9b57835167ffffffffffffffff1683529284019291840191600101615480565b600080600080608085870312156154bc57600080fd5b84356154c781614e51565b93506020858101356154d881614e51565b935060408601359250606086013567ffffffffffffffff808211156154fc57600080fd5b818801915088601f83011261551057600080fd5b8135818111156155225761552261517c565b61553484601f19601f84011601615192565b9150808252898482850101111561554a57600080fd5b808484018584013760008482840101525080935050505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff1690820152604080830151151590820152606081016111f5565b600080604083850312156155b357600080fd5b823591506155c3602084016153e0565b90509250929050565b6000602082840312156155de57600080fd5b81356fffffffffffffffffffffffffffffffff8116811461115757600080fd5b6000806040838503121561561157600080fd5b823561561c81614e51565b9150602083013561514581614e51565b634e487b7160e01b600052603260045260246000fd5b600181811c9082168061565657607f821691505b6020821081141561567757634e487b7160e01b600052602260045260246000fd5b50919050565b81835260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156156af57600080fd5b8260051b8083602087013760009401602001938452509192915050565b6020815260006130ae60208301848661567d565b6000602082840312156156f257600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115615722576157226156f9565b500190565b600063ffffffff808316818516808303821115615746576157466156f9565b01949350505050565b6000816000190483118215151615615769576157696156f9565b500290565b805164ffffffffff811681146153f857600080fd5b60006080828403121561579557600080fd5b6040516080810181811067ffffffffffffffff821117156157b8576157b861517c565b60405282516157c681614e51565b81526157d46020840161576e565b6020820152604083015161ffff811681146157ee57600080fd5b60408201526157ff6060840161576e565b60608201529392505050565b60608152600061581f60608301868861567d565b6001600160a01b039490941660208301525090151560409091015292915050565b6001600160a01b038616815260806020820152600061586360808301868861567d565b905061ffff8416604083015264ffffffffff831660608301529695505050505050565b600060001982141561589a5761589a6156f9565b5060010190565b6000828210156158b3576158b36156f9565b500390565b634e487b7160e01b600052601260045260246000fd5b6000826158dd576158dd6158b8565b500490565b600083516158f4818460208801614f57565b835190830190615746818360208801614f57565b60006020828403121561591a57600080fd5b815161115781614e51565b60006001600160a01b038087168352808616602084015250836040830152608060608301526159576080830184614f83565b9695505050505050565b60006020828403121561597357600080fd5b815161115781614f07565b60008261598d5761598d6158b8565b500690565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c94c711e83ed25243a900b71ed9dd4b0399558aa8f36e2b9d2d7c2495667d4cd64736f6c634300080c0033697066733a2f2f516d5a47667572544b536b4b7033447963704b563141686e4474635352744479555a74525a6e5577475139596e722f0000000000000000000000001ffe8a8177d3c261600a8bd8080d424d64b7fbc2000000000000000000000000be6a60772cc87f10921b1bdc13f89c4920040a75000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000cc6779dc34473b3fbd248793cf88565a3711a522000000000000000000000000af0efc6291307f9c3aa872cfabc78e6e4317a906000000000000000000000000dfe071702852081a82818f404f1e745cbf6ac527
Deployed Bytecode
0x6080604052600436106105935760003560e01c8063759a987b116102e0578063bf0b175e11610184578063d26ea6c0116100e1578063ebee180311610095578063fc4903a81161006f578063fc4903a814610fc5578063fcad7cd414610fe5578063ff186b2e14610ffa57600080fd5b8063ebee180314610749578063f2fde38b14610f85578063f6a74ed714610fa557600080fd5b8063d547cfb7116100c6578063d547cfb714610f23578063d9a1a76514610f38578063e985e9c514610f6557600080fd5b8063d26ea6c014610eed578063d2e7d90414610f0d57600080fd5b8063c87b56dd11610138578063cd7c03261161011d578063cd7c032614610e8d578063d15dbf7814610ead578063d24b7e7a14610ecd57600080fd5b8063c87b56dd14610e4d578063cc72d9da14610e6d57600080fd5b8063c1ba42c911610169578063c1ba42c914610ddf578063c23dc68f14610dfc578063c6a96c8f14610e2957600080fd5b8063bf0b175e14610d83578063c0cba26114610dca57600080fd5b8063a1e63ca21161023d578063b429afeb116101f1578063b97882d6116101cb578063b97882d614610d30578063bb141cf414610d4e578063bcb904fd14610d6e57600080fd5b8063b429afeb14610cb7578063b80f55c914610cf0578063b88d4fde14610d1057600080fd5b8063a22d4b9011610222578063a22d4b9014610c55578063a2309ff814610c82578063a7fc7a0714610c9757600080fd5b8063a1e63ca214610c01578063a22cb46514610c3557600080fd5b80639395bfcf116102945780639964d142116102795780639964d14214610b8d57806399a2557a14610bad5780639e0a88c614610bcd57600080fd5b80639395bfcf14610b5857806395d89b4114610b7857600080fd5b8063818ebfe1116102c5578063818ebfe114610aed5780638462151c14610b0d5780638da5cb5b14610b3a57600080fd5b8063759a987b14610aa45780637bc76c3914610ab957600080fd5b80632d9c77e111610447578063578ec92f116103a45780636352211e116103585780636e5a2990116103325780636e5a299014610a3e57806370a0823114610a6f578063715018a614610a8f57600080fd5b80636352211e146109cb57806367741188146109eb5780636af2112814610a0057600080fd5b80635b7633d0116103895780635b7633d01461095e5780635bbb21771461097e5780635ff63608146109ab57600080fd5b8063578ec92f1461092a57806359a99fef1461094b57600080fd5b806348f176aa116103fb578063514da8f4116103e0578063514da8f4146108d557806355f804b3146108ea57806357589f361461090a57600080fd5b806348f176aa146108a0578063500543c7146108b557600080fd5b8063366857511161042c57806336685751146108555780633ccfd60b1461086b57806342842e0e1461088057600080fd5b80632d9c77e1146107ea5780633445cc2c1461082357600080fd5b806315bcf8e2116104f557806323ab68b0116104a957806323c49ec71161048e57806323c49ec71461079f57806326833dcc146107c05780632d977569146107d557600080fd5b806323ab68b01461075f57806323b872dd1461077f57600080fd5b80631976295a116104da5780631976295a146107345780631c0acc71146107495780631de700fc1461074957600080fd5b806315bcf8e21461070a57806318160ddd1461071f57600080fd5b8063081812fc1161054c578063095ea7b311610531578063095ea7b31461069f5780630c1df89d146106bf5780630c45c817146106ed57600080fd5b8063081812fc1461065257806308ef37001461068a57600080fd5b8063029451721161057d57806302945172146105ed578063046dc1661461060e57806306fdde031461063057600080fd5b80628ee0031461059857806301ffc9a7146105cd575b600080fd5b3480156105a457600080fd5b506105b86105b3366004614eb2565b611044565b60405190151581526020015b60405180910390f35b3480156105d957600080fd5b506105b86105e8366004614f1d565b61115e565b3480156105f957600080fd5b506008546105b890600160c81b900460ff1681565b34801561061a57600080fd5b5061062e610629366004614f3a565b6111fb565b005b34801561063c57600080fd5b50610645611289565b6040516105c49190614faf565b34801561065e57600080fd5b5061067261066d366004614fc2565b61131b565b6040516001600160a01b0390911681526020016105c4565b34801561069657600080fd5b5061062e611378565b3480156106ab57600080fd5b5061062e6106ba366004614fdb565b611402565b3480156106cb57600080fd5b506106df6106da366004615007565b6114c2565b6040519081526020016105c4565b3480156106f957600080fd5b506106df6802b5e3af16b188000081565b34801561071657600080fd5b5061062e611569565b34801561072b57600080fd5b506106df6115f3565b34801561074057600080fd5b5061062e61161d565b34801561075557600080fd5b506106df614e2081565b34801561076b57600080fd5b5061062e61077a366004614f3a565b6116b7565b34801561078b57600080fd5b5061062e61079a366004615049565b611740565b3480156107ab57600080fd5b506008546105b890600160d01b900460ff1681565b3480156107cc57600080fd5b506106df61174b565b3480156107e157600080fd5b506106df600281565b3480156107f657600080fd5b5061080a610805366004614fc2565b611767565b60405167ffffffffffffffff90911681526020016105c4565b34801561082f57600080fd5b5061084361083e366004614f3a565b61177c565b60405160ff90911681526020016105c4565b34801561086157600080fd5b506106df61271081565b34801561087757600080fd5b5061062e6117aa565b34801561088c57600080fd5b5061062e61089b366004615049565b611841565b3480156108ac57600080fd5b506106df606481565b3480156108c157600080fd5b506106df6108d0366004614fc2565b61185c565b3480156108e157600080fd5b5061062e6118fe565b3480156108f657600080fd5b5061062e61090536600461508a565b611988565b34801561091657600080fd5b5061062e6109253660046150fc565b6119ee565b34801561093657600080fd5b506008546105b890600160c01b900460ff1681565b61062e610959366004615150565b611ab3565b34801561096a57600080fd5b50600d54610672906001600160a01b031681565b34801561098a57600080fd5b5061099e6109993660046151c3565b611f12565b6040516105c49190615269565b3480156109b757600080fd5b5061062e6109c63660046152d4565b611fd9565b3480156109d757600080fd5b506106726109e6366004614fc2565b6127f7565b3480156109f757600080fd5b5061062e612809565b348015610a0c57600080fd5b50600854610a299068010000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016105c4565b348015610a4a57600080fd5b50600854610a2990700100000000000000000000000000000000900463ffffffff1681565b348015610a7b57600080fd5b506106df610a8a366004614f3a565b61288d565b348015610a9b57600080fd5b5061062e6128f0565b348015610ab057600080fd5b506106df600a81565b348015610ac557600080fd5b506106727f0000000000000000000000001ffe8a8177d3c261600a8bd8080d424d64b7fbc281565b348015610af957600080fd5b50600e54610672906001600160a01b031681565b348015610b1957600080fd5b50610b2d610b28366004614f3a565b612956565b6040516105c49190615340565b348015610b4657600080fd5b506000546001600160a01b0316610672565b348015610b6457600080fd5b5061062e610b73366004614fc2565b612aa7565b348015610b8457600080fd5b50610645612d09565b348015610b9957600080fd5b50610672610ba8366004615150565b612d18565b348015610bb957600080fd5b50610b2d610bc8366004615378565b612d88565b348015610bd957600080fd5b506106727f000000000000000000000000dfe071702852081a82818f404f1e745cbf6ac52781565b348015610c0d57600080fd5b506106727f000000000000000000000000be6a60772cc87f10921b1bdc13f89c4920040a7581565b348015610c4157600080fd5b5061062e610c503660046153ad565b612f7b565b348015610c6157600080fd5b50610c75610c703660046153fd565b61302a565b6040516105c49190615464565b348015610c8e57600080fd5b506106df6130b6565b348015610ca357600080fd5b5061062e610cb2366004614f3a565b6130c5565b348015610cc357600080fd5b506105b8610cd2366004614f3a565b6001600160a01b031660009081526001602052604090205460ff1690565b348015610cfc57600080fd5b5061062e610d0b366004615007565b613146565b348015610d1c57600080fd5b5061062e610d2b3660046154a6565b6131f6565b348015610d3c57600080fd5b506106df69021e19e0c9bab240000081565b348015610d5a57600080fd5b506106df610d69366004614fc2565b613247565b348015610d7a57600080fd5b5061062e6132ac565b348015610d8f57600080fd5b50610da3610d9e366004614f3a565b613330565b60405175ffffffffffffffffffffffffffffffffffffffffffff90911681526020016105c4565b348015610dd657600080fd5b506106df613374565b348015610deb57600080fd5b506106df68d8d726b7177a80000081565b348015610e0857600080fd5b50610e1c610e17366004614fc2565b61342e565b6040516105c4919061556a565b348015610e3557600080fd5b50600854610a2990600160a01b900463ffffffff1681565b348015610e5957600080fd5b50610645610e68366004614fc2565b6134f5565b348015610e7957600080fd5b5061062e610e88366004614f3a565b613592565b348015610e9957600080fd5b50600c54610672906001600160a01b031681565b348015610eb957600080fd5b5061080a610ec83660046155a0565b61361b565b348015610ed957600080fd5b5061062e610ee83660046155cc565b613697565b348015610ef957600080fd5b5061062e610f08366004614f3a565b613734565b348015610f1957600080fd5b506106df61025881565b348015610f2f57600080fd5b506106456137bd565b348015610f4457600080fd5b50600854610a29906c01000000000000000000000000900463ffffffff1681565b348015610f7157600080fd5b506105b8610f803660046155fe565b61384b565b348015610f9157600080fd5b5061062e610fa0366004614f3a565b613956565b348015610fb157600080fd5b5061062e610fc0366004614f3a565b613a35565b348015610fd157600080fd5b50600b54610672906001600160a01b031681565b348015610ff157600080fd5b5061062e613ab0565b34801561100657600080fd5b50600954611023906fffffffffffffffffffffffffffffffff1681565b6040516fffffffffffffffffffffffffffffffff90911681526020016105c4565b60008180611056576000915050611157565b60008484600081811061106b5761106b61562c565b905060200201359050856001600160a01b031661108782613b34565b516001600160a01b0316146110a157600092505050611157565b60015b8281101561114f57600182018686838181106110c2576110c261562c565b90506020020135925080831480156110ef57506000818152600460205260409020546001600160a01b0316155b156111165760085463ffffffff168310611110576000945050505050611157565b50611147565b876001600160a01b031661112984613b34565b516001600160a01b031614611145576000945050505050611157565b505b6001016110a4565b506001925050505b9392505050565b60006001600160e01b031982167f80ac58cd0000000000000000000000000000000000000000000000000000000014806111c157506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806111f557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6000546001600160a01b0316331461125a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60606002805461129890615642565b80601f01602080910402602001604051908101604052809291908181526020018280546112c490615642565b80156113115780601f106112e657610100808354040283529160200191611311565b820191906000526020600020905b8154815290600101906020018083116112f457829003601f168201915b5050505050905090565b600061132682613c82565b61135c576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000546001600160a01b031633146113d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600880547fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b179055565b600061140d826127f7565b9050806001600160a01b0316836001600160a01b0316141561145b576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b0382161480159061147b5750611479813361384b565b155b156114b2576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114bd838383613cc7565b505050565b600b546000906001600160a01b03166114dd575060006111f5565b600b546040517f0c1df89d0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690630c1df89d9061152890869086906004016156cc565b602060405180830381865afa158015611545573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115791906156e0565b6000546001600160a01b031633146115c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600880547fffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffff16600160d01b179055565b60006115fd613d30565b60085463ffffffff64010000000082048116918116919091031603919050565b6000546001600160a01b031633146116775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b6008805463ffffffff4216600160a01b027fffffffffffffff0000000000ffffffffffffffffffffffffffffffffffffffff90911617600160c01b179055565b6000546001600160a01b031633146117115760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6114bd838383613d3f565b61271061175a614e208061570f565b611764919061570f565b81565b600061177282613b34565b6020015192915050565b6001600160a01b0381166000908152600560205260408120546901000000000000000000900460ff166111f5565b6000546001600160a01b031633146118045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f1935050505015801561183e573d6000803e3d6000fd5b50565b6114bd838383604051806020016040528060008152506131f6565b600b546000906001600160a01b031661187757506000919050565b600b546040517f500543c7000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b039091169063500543c7906024015b602060405180830381865afa1580156118da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f591906156e0565b6000546001600160a01b031633146119585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600880547fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff16600160c81b179055565b6000546001600160a01b031633146119e25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b6114bd600a8383614db8565b3360009081526001602052604090205460ff16611a605760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401611251565b6001600160a01b0382166000908152600560205260409020805469ffffffffffffffffffff166a010000000000000000000075ffffffffffffffffffffffffffffffffffffffffffff8416021790555050565b600854600160c81b900460ff16611b0c5760405162461bcd60e51b815260206004820152601660248201527f4554482073616c65206973206e6f7420616374697665000000000000000000006044820152606401611251565b600d546001600160a01b0316611b645760405162461bcd60e51b815260206004820152601960248201527f5369676e65722061646472657373206973206e6f7420736574000000000000006044820152606401611251565b60008111611bb45760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74206d696e74207a65726f20626c6f636b730000000000000000006044820152606401611251565b6064811115611c055760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206d696e742074686174206d616e7920626c6f636b73000000006044820152606401611251565b806008600c8282829054906101000a900463ffffffff16611c269190615727565b92506101000a81548163ffffffff021916908363ffffffff160217905550614e206008600c9054906101000a900463ffffffff1663ffffffff161115611cae5760405162461bcd60e51b815260206004820152601c60248201527f4578636565646564206d61782045544820626c6f636b20636f756e74000000006044820152606401611251565b612710611cbd614e208061570f565b611cc7919061570f565b81611cd06130b6565b611cda919061570f565b1115611d285760405162461bcd60e51b815260206004820152601c60248201527f4578636565646564206d61782045544820626c6f636b20636f756e74000000006044820152606401611251565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b1660208201526000906034016040516020818303038152906040528051906020012090506000611d81828686612d18565b600d549091506001600160a01b03808316911614611de15760405162461bcd60e51b815260206004820152600f60248201527f4e6f742077686974656c697374656400000000000000000000000000000000006044820152606401611251565b600083611ded3361177c565b60ff16611dfa919061570f565b90506002811115611e4d5760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e7465640000000000000000000000000000000000006044820152606401611251565b600954611e6d9085906fffffffffffffffffffffffffffffffff1661574f565b3414611ebb5760405162461bcd60e51b815260206004820152601360248201527f57726f6e6720616d6f756e74206f6620455448000000000000000000000000006044820152606401611251565b33600090815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff16690100000000000000000060ff841602179055611f0a84613f7e565b505050505050565b805160609060008167ffffffffffffffff811115611f3257611f3261517c565b604051908082528060200260200182016040528015611f7d57816020015b6040805160608101825260008082526020808301829052928201528252600019909201910181611f505790505b50905060005b828114611fd157611fac858281518110611f9f57611f9f61562c565b602002602001015161342e565b828281518110611fbe57611fbe61562c565b6020908102919091010152600101611f83565b509392505050565b600854600160d01b900460ff166120325760405162461bcd60e51b815260206004820152601860248201527f54726164652073616c65206973206e6f742061637469766500000000000000006044820152606401611251565b600e546001600160a01b031661208a5760405162461bcd60e51b815260206004820152601b60248201527f4e6f2067656e65736973206c6f636b657220617661696c61626c6500000000006044820152606401611251565b7f000000000000000000000000be6a60772cc87f10921b1bdc13f89c4920040a756001600160a01b03166121005760405162461bcd60e51b815260206004820152601a60248201527f4e6f207661756c742073746f7261676520617661696c61626c650000000000006044820152606401611251565b6000600a61210e838661570f565b612118919061574f565b90506000811161216a5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74206d696e74207a65726f20626c6f636b730000000000000000006044820152606401611251565b60648111156121bb5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206d696e742074686174206d616e7920626c6f636b73000000006044820152606401611251565b80600860108282829054906101000a900463ffffffff166121dc9190615727565b92506101000a81548163ffffffff021916908363ffffffff160217905550612710600860109054906101000a900463ffffffff1663ffffffff1611156122645760405162461bcd60e51b815260206004820152601e60248201527f4578636565646564206d617820747261646520626c6f636b20636f756e7400006044820152606401611251565b612710612273614e208061570f565b61227d919061570f565b816122866130b6565b612290919061570f565b11156122de5760405162461bcd60e51b815260206004820152601e60248201527f4578636565646564206d617820747261646520626c6f636b20636f756e7400006044820152606401611251565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000dfe071702852081a82818f404f1e745cbf6ac527906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015612360573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061238491906156e0565b116123f75760405162461bcd60e51b815260206004820152602360248201527f4f6e6c79204d6574726f5061737320686f6c646572732061726520656c69676960448201527f626c6500000000000000000000000000000000000000000000000000000000006064820152608401611251565b7f000000000000000000000000be6a60772cc87f10921b1bdc13f89c4920040a75851561265c576000805b878110156125d657600089898381811061243e5761243e61562c565b9050602002013590508083106124965760405162461bcd60e51b815260206004820152601560248201527f6e6f206475706c69636174657320616c6c6f77656400000000000000000000006044820152606401611251565b8092506127108111156124eb5760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c792067656e6573697320626c6f636b7320616c6c6f77656400000000006044820152606401611251565b6040517fce325bf8000000000000000000000000000000000000000000000000000000008152600481018290526000906001600160a01b0386169063ce325bf890602401608060405180830381865afa15801561254c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125709190615783565b80519091506001600160a01b031633146125cc5760405162461bcd60e51b815260206004820152600c60248201527f6e6f7420616e206f776e657200000000000000000000000000000000000000006044820152606401611251565b5050600101612422565b5050600e546040517ff747dee00000000000000000000000000000000000000000000000000000000081526001600160a01b038084169263f747dee092612629928c928c9291169060019060040161580b565b600060405180830381600087803b15801561264357600080fd5b505af1158015612657573d6000803e3d6000fd5b505050505b83156127e55760005b848110156126df576127108686838181106126825761268261562c565b9050602002013511156126d75760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c792067656e6573697320626c6f636b7320616c6c6f77656400000000006044820152606401611251565b600101612665565b506040517f91555a920000000000000000000000000000000000000000000000000000000081526001600160a01b038216906391555a929061272e903390899089906000908190600401615840565b600060405180830381600087803b15801561274857600080fd5b505af115801561275c573d6000803e3d6000fd5b5050600e546040517ff747dee00000000000000000000000000000000000000000000000000000000081526001600160a01b03858116945063f747dee093506127b2928a928a929091169060009060040161580b565b600060405180830381600087803b1580156127cc57600080fd5b505af11580156127e0573d6000803e3d6000fd5b505050505b6127ee83613f7e565b50505050505050565b600061280282613b34565b5192915050565b6000546001600160a01b031633146128635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600880547fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff169055565b60006001600160a01b0382166128cf576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205462ffffff1690565b6000546001600160a01b0316331461294a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b6129546000613f9a565b565b606060008060006129668561288d565b905060008167ffffffffffffffff8111156129835761298361517c565b6040519080825280602002602001820160405280156129ac578160200160208202803683370190505b50604080516060810182526000808252602082018190529181018290529192506129d4613d30565b90505b838614612a9b57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16158015928201929092529250612a3e57612a93565b81516001600160a01b031615612a5357815194505b876001600160a01b0316856001600160a01b03161415612a935780838780600101985081518110612a8657612a8661562c565b6020026020010181815250505b6001016129d7565b50909695505050505050565b600854600160c01b900460ff16612b005760405162461bcd60e51b815260206004820152601660248201527f4d45542073616c65206973206e6f7420616374697665000000000000000000006044820152606401611251565b60008111612b505760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74206d696e74207a65726f20626c6f636b730000000000000000006044820152606401611251565b6064811115612ba15760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206d696e742074686174206d616e7920626c6f636b73000000006044820152606401611251565b806008808282829054906101000a900463ffffffff16612bc19190615727565b92506101000a81548163ffffffff021916908363ffffffff160217905550612710614e2080612bf0919061570f565b612bfa919061570f565b81612c036130b6565b612c0d919061570f565b1115612c5b5760405162461bcd60e51b815260206004820152601c60248201527f4578636565646564206d6178204d455420626c6f636b20636f756e74000000006044820152606401611251565b6000612c65613374565b90507f0000000000000000000000001ffe8a8177d3c261600a8bd8080d424d64b7fbc26001600160a01b0381166379cc679033612ca2868661574f565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612ce857600080fd5b505af1158015612cfc573d6000803e3d6000fd5b505050506114bd83613f7e565b60606003805461129890615642565b600080612d72856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050612d7f818585613ff7565b95945050505050565b6060818310612dc3576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085460009063ffffffff16612dd7613d30565b851015612de957612de6613d30565b94505b80841115612df5578093505b6000612e008761288d565b905084861015612e1f5785850381811015612e19578091505b50612e23565b5060005b60008167ffffffffffffffff811115612e3e57612e3e61517c565b604051908082528060200260200182016040528015612e67578160200160208202803683370190505b50905081612e7a57935061115792505050565b6000612e858861342e565b905060008160400151612e96575080515b885b888114158015612ea85750848714155b15612f6a57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16158015928201929092529350612f0d57612f62565b82516001600160a01b031615612f2257825191505b8a6001600160a01b0316826001600160a01b03161415612f625780848880600101995081518110612f5557612f5561562c565b6020026020010181815250505b600101612e98565b505050928352509095945050505050565b6001600160a01b038216331415612fbe576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b3360009081526001602052604090205460609060ff1661309f5760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401611251565b6130ab8585858561401d565b90505b949350505050565b60006130c0614294565b905090565b6000546001600160a01b0316331461311f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b3360009081526001602052604090205460ff166131b85760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401611251565b60005b818110156114bd576131e48383838181106131d8576131d861562c565b905060200201356142ad565b806131ee81615886565b9150506131bb565b613201848484613d3f565b6001600160a01b0383163b151580156132235750613221848484846142b8565b155b15613241576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600b546000906001600160a01b031661326257506000919050565b600b546040517fbb141cf4000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b039091169063bb141cf4906024016118bd565b6000546001600160a01b031633146133065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600880547fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff169055565b6001600160a01b0381166000908152600560205260408120546a0100000000000000000000900475ffffffffffffffffffffffffffffffffffffffffffff166111f5565b600854600090600160a01b900463ffffffff1661339a575069021e19e0c9bab240000090565b600854600090610258906133bb90600160a01b900463ffffffff16426158a1565b6133c591906158ce565b905060006133dc826802b5e3af16b188000061574f565b90506133fb68d8d726b7177a80000069021e19e0c9bab24000006158a1565b81101561341d576134168169021e19e0c9bab24000006158a1565b9250505090565b68d8d726b7177a8000009250505090565b604080516060808201835260008083526020808401829052838501829052845192830185528183528201819052928101929092529061346b613d30565b831080613480575060085463ffffffff168310155b1561348b5792915050565b50600082815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff1615801592820192909252906134ec5792915050565b61115783613b34565b606061350082613c82565b613536576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006135406143cf565b90508051600014156135615760405180602001604052806000815250611157565b8061356b846143de565b60405160200161357c9291906158e2565b6040516020818303038152906040529392505050565b6000546001600160a01b031633146135ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600e805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3360009081526001602052604081205460ff1661368d5760405162461bcd60e51b815260206004820152602a60248201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74207468652060448201526931b7b73a3937b63632b960b11b6064820152608401611251565b6111578383614510565b6000546001600160a01b031633146136f15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600980547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff92909216919091179055565b6000546001600160a01b0316331461378e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600a80546137ca90615642565b80601f01602080910402602001604051908101604052809291908181526020018280546137f690615642565b80156138435780601f1061381857610100808354040283529160200191613843565b820191906000526020600020905b81548152906001019060200180831161382657829003601f168201915b505050505081565b600c546000906001600160a01b03161561390657600c546040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015291821691841690829063c455279190602401602060405180830381865afa1580156138c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138eb9190615908565b6001600160a01b031614156139045760019150506111f5565b505b6001600160a01b03821660009081526001602052604090205460ff168061115757506001600160a01b0380841660009081526007602090815260408083209386168352929052205460ff16611157565b6000546001600160a01b031633146139b05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b6001600160a01b038116613a2c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401611251565b61183e81613f9a565b6000546001600160a01b03163314613a8f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b6001600160a01b03166000908152600160205260409020805460ff19169055565b6000546001600160a01b03163314613b0a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611251565b600880547fffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffff169055565b60408051606081018252600080825260208201819052918101919091528180613b5b613d30565b11158015613b70575060085463ffffffff1681105b15613c5057600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290613c4e5780516001600160a01b031615613be4579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215613c49579392505050565b613be4565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081613c8d613d30565b11158015613ca2575060085463ffffffff1682105b80156111f5575050600090815260046020526040902054600160e01b900460ff161590565b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006130c0614e20600161570f565b6000613d4a82613b34565b9050836001600160a01b031681600001516001600160a01b031614613d9b576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000336001600160a01b0386161480613db95750613db9853361384b565b80613dd4575033613dc98461131b565b6001600160a01b0316145b905080613e0d576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038416613e4d576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613e5960008487613cc7565b6001600160a01b038581166000908152600560209081526040808320805462ffffff1980821662ffffff928316600019018316179092558986168086528386208054938416938316600190810190931693909317909255888552600490935281842080546001600160e01b031916909117600160a01b4267ffffffffffffffff1602178155918701808452922080549193909116613f325760085463ffffffff168214613f32578054602086015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b61183e33826040518060200160405280600081525060006145c9565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600061400786868661484f565b9150915061401481614897565b50949350505050565b6060828067ffffffffffffffff8111156140395761403961517c565b604051908082528060200260200182016040528015614062578160200160208202803683370190505b5091506000805b828110156142895760008787838181106140855761408561562c565b9050602002013590508083106140c7576040517f8838421e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006140d282613b34565b905080602001518684806001019550815181106140f1576140f161562c565b602002602001019067ffffffffffffffff16908167ffffffffffffffff1681525050896001600160a01b031681600001516001600160a01b031614614162576040517fc2e8ff5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600460205260409020805467ffffffffffffffff8916600160a01b026001600160e01b03199091166001600160a01b038d16171781555b60018301600081815260046020526040902080546001600160a01b0316156141c757505061427e565b60085463ffffffff168214156141de57505061427e565b87861015806142055750818c8c888181106141fb576141fb61562c565b9050602002013514155b15614241578054602085015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038f16171790555061427e565b6020840151895160018801978b91811061425d5761425d61562c565b67ffffffffffffffff9092166020928302919091019091015250925061419e565b829450505050614069565b505050949350505050565b600061429e613d30565b60085463ffffffff1603919050565b61183e816000614a88565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a0290614306903390899088908890600401615925565b6020604051808303816000875af1925050508015614341575060408051601f3d908101601f1916820190925261433e91810190615961565b60015b61439c573d80801561436f576040519150601f19603f3d011682016040523d82523d6000602084013e614374565b606091505b508051614394576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b0319167f150b7a02000000000000000000000000000000000000000000000000000000001490506130ae565b6060600a805461129890615642565b60608161441e57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115614448578061443281615886565b91506144419050600a836158ce565b9150614422565b60008167ffffffffffffffff8111156144635761446361517c565b6040519080825280601f01601f19166020018201604052801561448d576020820181803683370190505b5090505b84156130ae576144a26001836158a1565b91506144af600a8661597e565b6144ba90603061570f565b60f81b8183815181106144cf576144cf61562c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350614509600a866158ce565b9450614491565b60008061451c84613b34565b805160008681526004602052604080822080546001600160a01b038086166001600160e01b031990921691909117600160a01b67ffffffffffffffff8b160217825560018a01808552929093208054959650939490939192166145ba5760085463ffffffff1682146145ba578054602086015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038616171781555b50505050602001519392505050565b60085463ffffffff166001600160a01b038516614612576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83614649576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03851660009081526005602052604081208054630100000062ffffff19821662ffffff8084168a01811691821783900481168a01169091027fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000009092161717905581908186019060146013880104908188816146cd576146cd6158b8565b0490508460005b83811015614723576000828152600460205260409020805467ffffffffffffffff4216600160a01b026001600160e01b03199091166001600160a01b038e1617179055908201906001016146d4565b5086801561473a57506001600160a01b038a163b15155b156147c9575b60405185906001600160a01b038c16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461478b60008b878060010198508b6142b8565b6147a8576040516368d2bf6b60e11b815260040160405180910390fd5b838514156147405760085463ffffffff1686146147c457600080fd5b61480f565b5b6040516001860195906001600160a01b038c16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4838514156147ca575b5050600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff949094169390931790925550613f779050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b0161488987828885614ccb565b935093505050935093915050565b60008160048111156148ab576148ab615992565b14156148b45750565b60018160048111156148c8576148c8615992565b14156149165760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401611251565b600281600481111561492a5761492a615992565b14156149785760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401611251565b600381600481111561498c5761498c615992565b1415614a005760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401611251565b6004816004811115614a1457614a14615992565b141561183e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401611251565b6000614a9383613b34565b80519091508215614b12576000336001600160a01b0383161480614abc5750614abc823361384b565b80614ad7575033614acc8661131b565b6001600160a01b0316145b905080614b10576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b614b1e60008583613cc7565b6001600160a01b03818116600081815260056020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffff000000ffffff000000811662ffffff8083166000190181169182176001660100000000000062ffffff19909516909317849004821683019091169092029190911782558a855260049093528184208054600160e01b6001600160e01b0319909116909617600160a01b4267ffffffffffffffff1602177fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff16959095178555918901808452922080549194909116614c465760085463ffffffff168214614c46578054602087015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060088054600163ffffffff64010000000080840482169290920116027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9091161790555050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115614d025750600090506003614daf565b8460ff16601b14158015614d1a57508460ff16601c14155b15614d2b5750600090506004614daf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614d7f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614da857600060019250925050614daf565b9150600090505b94509492505050565b828054614dc490615642565b90600052602060002090601f016020900481019282614de65760008555614e2c565b82601f10614dff5782800160ff19823516178555614e2c565b82800160010185558215614e2c579182015b82811115614e2c578235825591602001919060010190614e11565b50614e38929150614e3c565b5090565b5b80821115614e385760008155600101614e3d565b6001600160a01b038116811461183e57600080fd5b60008083601f840112614e7857600080fd5b50813567ffffffffffffffff811115614e9057600080fd5b6020830191508360208260051b8501011115614eab57600080fd5b9250929050565b600080600060408486031215614ec757600080fd5b8335614ed281614e51565b9250602084013567ffffffffffffffff811115614eee57600080fd5b614efa86828701614e66565b9497909650939450505050565b6001600160e01b03198116811461183e57600080fd5b600060208284031215614f2f57600080fd5b813561115781614f07565b600060208284031215614f4c57600080fd5b813561115781614e51565b60005b83811015614f72578181015183820152602001614f5a565b838111156132415750506000910152565b60008151808452614f9b816020860160208601614f57565b601f01601f19169290920160200192915050565b6020815260006111576020830184614f83565b600060208284031215614fd457600080fd5b5035919050565b60008060408385031215614fee57600080fd5b8235614ff981614e51565b946020939093013593505050565b6000806020838503121561501a57600080fd5b823567ffffffffffffffff81111561503157600080fd5b61503d85828601614e66565b90969095509350505050565b60008060006060848603121561505e57600080fd5b833561506981614e51565b9250602084013561507981614e51565b929592945050506040919091013590565b6000806020838503121561509d57600080fd5b823567ffffffffffffffff808211156150b557600080fd5b818501915085601f8301126150c957600080fd5b8135818111156150d857600080fd5b8660208285010111156150ea57600080fd5b60209290920196919550909350505050565b6000806040838503121561510f57600080fd5b823561511a81614e51565b9150602083013575ffffffffffffffffffffffffffffffffffffffffffff8116811461514557600080fd5b809150509250929050565b60008060006060848603121561516557600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156151bb576151bb61517c565b604052919050565b600060208083850312156151d657600080fd5b823567ffffffffffffffff808211156151ee57600080fd5b818501915085601f83011261520257600080fd5b8135818111156152145761521461517c565b8060051b9150615225848301615192565b818152918301840191848101908884111561523f57600080fd5b938501935b8385101561525d57843582529385019390850190615244565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612a9b576152c183855180516001600160a01b0316825260208082015167ffffffffffffffff16908301526040908101511515910152565b9284019260609290920191600101615285565b600080600080604085870312156152ea57600080fd5b843567ffffffffffffffff8082111561530257600080fd5b61530e88838901614e66565b9096509450602087013591508082111561532757600080fd5b5061533487828801614e66565b95989497509550505050565b6020808252825182820181905260009190848201906040850190845b81811015612a9b5783518352928401929184019160010161535c565b60008060006060848603121561538d57600080fd5b833561539881614e51565b95602085013595506040909401359392505050565b600080604083850312156153c057600080fd5b82356153cb81614e51565b91506020830135801515811461514557600080fd5b803567ffffffffffffffff811681146153f857600080fd5b919050565b6000806000806060858703121561541357600080fd5b843561541e81614e51565b9350602085013567ffffffffffffffff81111561543a57600080fd5b61544687828801614e66565b90945092506154599050604086016153e0565b905092959194509250565b6020808252825182820181905260009190848201906040850190845b81811015612a9b57835167ffffffffffffffff1683529284019291840191600101615480565b600080600080608085870312156154bc57600080fd5b84356154c781614e51565b93506020858101356154d881614e51565b935060408601359250606086013567ffffffffffffffff808211156154fc57600080fd5b818801915088601f83011261551057600080fd5b8135818111156155225761552261517c565b61553484601f19601f84011601615192565b9150808252898482850101111561554a57600080fd5b808484018584013760008482840101525080935050505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff1690820152604080830151151590820152606081016111f5565b600080604083850312156155b357600080fd5b823591506155c3602084016153e0565b90509250929050565b6000602082840312156155de57600080fd5b81356fffffffffffffffffffffffffffffffff8116811461115757600080fd5b6000806040838503121561561157600080fd5b823561561c81614e51565b9150602083013561514581614e51565b634e487b7160e01b600052603260045260246000fd5b600181811c9082168061565657607f821691505b6020821081141561567757634e487b7160e01b600052602260045260246000fd5b50919050565b81835260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156156af57600080fd5b8260051b8083602087013760009401602001938452509192915050565b6020815260006130ae60208301848661567d565b6000602082840312156156f257600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115615722576157226156f9565b500190565b600063ffffffff808316818516808303821115615746576157466156f9565b01949350505050565b6000816000190483118215151615615769576157696156f9565b500290565b805164ffffffffff811681146153f857600080fd5b60006080828403121561579557600080fd5b6040516080810181811067ffffffffffffffff821117156157b8576157b861517c565b60405282516157c681614e51565b81526157d46020840161576e565b6020820152604083015161ffff811681146157ee57600080fd5b60408201526157ff6060840161576e565b60608201529392505050565b60608152600061581f60608301868861567d565b6001600160a01b039490941660208301525090151560409091015292915050565b6001600160a01b038616815260806020820152600061586360808301868861567d565b905061ffff8416604083015264ffffffffff831660608301529695505050505050565b600060001982141561589a5761589a6156f9565b5060010190565b6000828210156158b3576158b36156f9565b500390565b634e487b7160e01b600052601260045260246000fd5b6000826158dd576158dd6158b8565b500490565b600083516158f4818460208801614f57565b835190830190615746818360208801614f57565b60006020828403121561591a57600080fd5b815161115781614e51565b60006001600160a01b038087168352808616602084015250836040830152608060608301526159576080830184614f83565b9695505050505050565b60006020828403121561597357600080fd5b815161115781614f07565b60008261598d5761598d6158b8565b500690565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c94c711e83ed25243a900b71ed9dd4b0399558aa8f36e2b9d2d7c2495667d4cd64736f6c634300080c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001ffe8a8177d3c261600a8bd8080d424d64b7fbc2000000000000000000000000be6a60772cc87f10921b1bdc13f89c4920040a75000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000cc6779dc34473b3fbd248793cf88565a3711a522000000000000000000000000af0efc6291307f9c3aa872cfabc78e6e4317a906000000000000000000000000dfe071702852081a82818f404f1e745cbf6ac527
-----Decoded View---------------
Arg [0] : _metTokenAddress (address): 0x1ffe8A8177D3C261600A8bD8080D424d64b7FBC2
Arg [1] : _vaultStorageAddress (address): 0xBe6a60772Cc87f10921B1bdC13f89c4920040a75
Arg [2] : _proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
Arg [3] : _signerAddress (address): 0xcc6779dC34473B3fBD248793CF88565a3711a522
Arg [4] : _genesisLockerAddress (address): 0xAf0EFc6291307F9C3aa872cfABc78e6e4317a906
Arg [5] : _metroPassAddress (address): 0xDFE071702852081a82818F404f1e745cBF6ac527
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000001ffe8a8177d3c261600a8bd8080d424d64b7fbc2
Arg [1] : 000000000000000000000000be6a60772cc87f10921b1bdc13f89c4920040a75
Arg [2] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [3] : 000000000000000000000000cc6779dc34473b3fbd248793cf88565a3711a522
Arg [4] : 000000000000000000000000af0efc6291307f9c3aa872cfabc78e6e4317a906
Arg [5] : 000000000000000000000000dfe071702852081a82818f404f1e745cbf6ac527
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.