ERC-721
Overview
Max Total Supply
242 MRTN
Holders
105
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 MRTNLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
MarsGenesisMartiansCore
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721Full.sol"; import "./MarsGenesisMartiansAuction.sol"; import "./MarsGenesisMartiansWallet.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; /// @title MarsGenesis Martians main ERC721 contract /// @author MarsGenesis (@DarthCryptoPepe) /// @notice Encapsulates the ERC721 methods and main features of MarsGenesis Martians contract MarsGenesisMartiansCore is ERC721Full { using Counters for Counters.Counter; /// @dev IPFS image containing the 10,000 martians string public constant ALL_MARTIANS = "ipfs://QmSvVHLTLXw6cqFsG5A1Y5Fc3dYsF2sVcut9mEAUxPTtHo"; /// @dev Maximum number of public minted martians uint16 private constant MAX_MARTIANS = 10000; /// @dev Number of reserved martians for the pre-release land owners (initial is 10,000) uint16 private _reservedMartians = 10000; /// @dev Interface for auction contract bytes4 private constant InterfaceSignature_MarsGenesisMartiansAuction = bytes4(keccak256('martianIdIsForSale(uint256 tokenId)')) ^ bytes4(keccak256('martianNoLongerForSale(uint256)')); /// @dev Martian ID tracker Counters.Counter private _tokenIdTracker; /// @dev Address of the deployer account address private _deployerAddress; /// @dev Auction contract address MarsGenesisMartiansAuction private _auctionContract; /// @dev Wallet contract address MarsGenesisMartiansWallet private _walletContract; /// @dev MarsGenesisCore lands contract address ERC721 private _marsGenesisCoreContract; /*** EVENTS ***/ /// @dev The Discovery event is fired whenever a new martian comes into existence. event Discovery(address _owner, uint256 _tokenId, uint256 _martianId, uint256 _landId); /*** MARTIANS ***/ /// @dev A mapping containing the Martian IDs for all martians in existence mapping(uint => uint) public tokenToMartianId; /// @dev A mapping to keep track of martianIds minted mapping(uint => bool) private _mintedIds; /// @dev A mapping to keep track redeemed lands mapping(uint256 => bool) public landTokenIdRedeemed; /*** INIT ***/ /// @notice Inits the main MarsGenesisMartians contract ERC721 compatible /// @dev Contract starts paused. An admin needs to unpause to allow any transfer of martians constructor(address payable _walletAddress, address _marsCoreAddress) ERC721Full("MarsGenesisMartians", "MRTN") { _deployerAddress = msg.sender; _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _walletContract = MarsGenesisMartiansWallet(_walletAddress); _marsGenesisCoreContract = ERC721(_marsCoreAddress); pause(); } /*** EXTERNAL ***/ /// @notice Mints multiple new martians /// @dev The method includes a signature that was provided by the MarsGenesis backend, to ensure data integrity /// @param signatures The signatures provided by the backend to ensure data integrity /// @param martianIds The IDs of the martians to be minted /// @param landTokenIds The IDs of the MarsGenesis parcels to be redeemed /// @param promoOwner Any promo martian address /// @return true function mintMartians(bytes[] memory signatures, uint[] memory martianIds, uint[] memory landTokenIds, address promoOwner) external payable returns (bool) { uint total = martianIds.length; require(landTokenIds.length <= total, "D0"); if (landTokenIds.length > 0) { require(_reservedMartians >= uint16(landTokenIds.length)); for(uint i = 0; i < total; i++) { require(_marsGenesisCoreContract.ownerOf(landTokenIds[i]) == msg.sender, "E1"); require(landTokenIdRedeemed[landTokenIds[i]] == false, "E2"); landTokenIdRedeemed[landTokenIds[i]] = true; } _reservedMartians -= uint16(landTokenIds.length); } require(_tokenIdTracker.current() + total + _reservedMartians <= MAX_MARTIANS, "MAX"); address martianOwner; if (hasRole(DEFAULT_ADMIN_ROLE, _msgSender())) { martianOwner = promoOwner; } else { require(msg.value >= 0.08 ether * (total - landTokenIds.length), "$"); martianOwner = _msgSender(); } for(uint i = 0; i < total; i++) { require(_mintedIds[martianIds[i]] == false, "ID"); bytes32 hash = keccak256(abi.encodePacked(address(this), martianIds[i], msg.sender)); address signer = _recoverSigner(hash, signatures[i]); require(signer == _deployerAddress, "SIGN"); uint newTokenId = _mintMartian(martianOwner, martianIds[i]); if (i < landTokenIds.length) { emit Discovery(martianOwner, newTokenId, martianIds[i], landTokenIds[i]); } else { emit Discovery(martianOwner, newTokenId, martianIds[i], 10001); } } return true; } /// @notice Sets a martian for sale /// @dev Gets approval for the contract to do so /// @param tokenId The id of the martian /// @param minSalePriceInWei The minimum price for the sale, in Wei function offerMartianForSale(uint tokenId, uint minSalePriceInWei) external { approve(address(_auctionContract), tokenId); _auctionContract.offerMartianForSale(tokenId, minSalePriceInWei); } /// @notice Accepts a bid for a martian /// @dev Gets approval for the contract to do so /// @param tokenId The id of the martian /// @param minPrice The minimum accepted price, in Wei function acceptBidForMartian(uint tokenId, uint minPrice) external { approve(address(_auctionContract), tokenId); _auctionContract.acceptBidForMartian(tokenId, minPrice); } /// @notice Retrieves the tokenURI for a given martian /// @param tokenId The id of the martian /// @return string The martian's metadata URI function tokenURI(uint256 tokenId) public view override returns (string memory) { return string(abi.encodePacked("ipfs://QmaX4HK36mY2egxPJuztnZjxPVG4jMMZ9A8amYzXys1roq/", _intToString(tokenToMartianId[tokenId]))); } /// Deployer methods /// @notice Sends free balance to the main wallet /// @dev Only callable by the deployer function sendBalanceToWallet() external { require(msg.sender == _deployerAddress); (bool success,) = address(_walletContract).call{value: address(this).balance}(""); require(success); } /// @notice Updates the auction contract address /// @param _address The address of the auction contract /// @dev Only callable by admin function setAuctionAddress(address _address) external { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender())); MarsGenesisMartiansAuction candidateContract = MarsGenesisMartiansAuction(_address); require(candidateContract.supportsInterface(InterfaceSignature_MarsGenesisMartiansAuction), "E10"); _auctionContract = candidateContract; } /// @notice Updates the wallet contract address /// @param _address The address of the wallet contract /// @dev Only callable by admin function setWalletAddress(address payable _address) external { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender())); _walletContract = MarsGenesisMartiansWallet(_address); } /// @notice Updates the martians reserve /// @param amount The amount of pending martians reserved /// @dev Only callable by admin function setReservedMartiansAmount(uint16 amount) external { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender())); _reservedMartians = amount; } /// @notice Returns the URI of the contract metadata /// @return URI of contract metadata function contractURI() public pure returns (string memory) { return "https://marsgenesis-web3.herokuapp.com/metadata/MarsGenesisMartians.json"; } /*** INTERNAL ***/ function _mintMartian(address to, uint martianId) private returns (uint) { uint newTokenId = _tokenIdTracker.current(); _mint(to, newTokenId); _tokenIdTracker.increment(); tokenToMartianId[newTokenId] = martianId; _mintedIds[martianId] = true; return newTokenId; } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721Full) { super._beforeTokenTransfer(from, to, tokenId); require(address(_auctionContract) != address(0), "AUC_ADDR"); if(_auctionContract.martianIdIsForSale(tokenId)) { _auctionContract.martianNoLongerForSale(tokenId); } } /// Signing helpers function _recoverSigner(bytes32 _message, bytes memory _sig) private pure returns (address) { uint8 v; bytes32 r; bytes32 s; (v, r, s) = _splitSignature(_sig); return ecrecover(_message, v, r, s); } function _splitSignature(bytes memory _sig) private pure returns (uint8, bytes32, bytes32) { require(_sig.length == 65); bytes32 r; bytes32 s; uint8 v; assembly { r := mload(add(_sig, 32)) s := mload(add(_sig, 64)) v := byte(0, mload(add(_sig, 96))) } return (v, r, s); } function _intToString(uint256 value) private pure returns (string memory) { 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); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; contract ERC721Full is Context, AccessControlEnumerable, ERC721, ERC721Enumerable, ERC721Pausable { /*** INIT ***/ constructor(string memory name, string memory symbol) ERC721(name, symbol) { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); } /*** METHODS ***/ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { super._beforeTokenTransfer(from, to, tokenId); } function pause() public { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "INVALID_ROLE"); _pause(); } function unpause() public { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "INVALID_ROLE"); _unpause(); } function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerable, ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./MarsGenesisMartiansAuctionBase.sol"; /// @title MarsGenesis Martians Auction Contract /// @author MarsGenesis /// @notice You can use this contract to buy, sell and bid on MarsGenesis martians contract MarsGenesisMartiansAuction is MarsGenesisMartiansAuctionBase { /// @dev Address of the tax wallet address private _taxWallet; /// @notice Inits the contract /// @param _erc721Address The address of the main MarsGenesis contract /// @param _walletAddress The address of the wallet of MarsGenesis contract /// @param _cut The contract owner tax on sales /// @param taxWallet The address for the tax on sales constructor (address _erc721Address, address payable _walletAddress, uint256 _cut, address taxWallet) MarsGenesisMartiansAuctionBase(_erc721Address, _walletAddress, _cut) { _taxWallet = taxWallet; } /*** EXTERNAL ***/ /// @notice Enters a bid for a specific martian (payable) /// @dev If there was a previous (lower) bid, it removes it and adds its amount to pending withdrawals. /// On success, it emits the MartianBidEntered event. /// @param tokenId The id of the martian to bet upon function enterBidForMartian(uint tokenId) external payable { require(nonFungibleContract.ownerOf(tokenId) != address(0), "Martian not yet owned"); require(nonFungibleContract.ownerOf(tokenId) != msg.sender, "You already own the martian"); require(msg.value > 0, "Amount must be > 0"); Bid memory existing = martianIdToBids[tokenId]; require(msg.value > existing.value, "Amount must be > than existing bid"); if (existing.value > 0) { // Refund the previous bid addressToPendingWithdrawal[existing.bidder] += existing.value; } martianIdToBids[tokenId] = Bid(true, tokenId, msg.sender, msg.value); emit MartianBidEntered(tokenId, msg.value, msg.sender); } /// @notice Buys a martian for a specific price (payable) /// @dev The martian must be for sale before other user calls this method. If the same user had the higher bid before, it gets refunded into the pending withdrawals. On success, emits the MartianBought event. Executes a ERC721 safeTransferFrom /// @param tokenId The id of the martian to be bought function buyMartian(uint tokenId) external payable { require(msg.sender != nonFungibleContract.ownerOf(tokenId), "You cant buy your own martian"); Offer memory offer = martianIdToOfferForSale[tokenId]; require(offer.isForSale, "Item is not for sale"); require(offer.seller == nonFungibleContract.ownerOf(tokenId), "Seller is no longer the owner of the item"); require(msg.value >= offer.minValue, "Not enough balance"); address seller = offer.seller; nonFungibleContract.safeTransferFrom(seller, msg.sender, tokenId); // 5% tax uint taxAmount = msg.value * ownerCut / 100; uint netAmount = msg.value - taxAmount; addressToPendingWithdrawal[seller] += netAmount; addressToPendingWithdrawal[_taxWallet] += taxAmount; emit MartianBought(tokenId, msg.value, seller, msg.sender); // Check for the case where there is a bid from the new owner and refund it. // Any other bid can stay in place. Bid memory bid = martianIdToBids[tokenId]; if (bid.bidder == msg.sender) { addressToPendingWithdrawal[msg.sender] += bid.value; martianIdToBids[tokenId] = Bid(false, tokenId, address(0), 0); } } /// @notice Offers a martian that ones own for sale for a min price /// @dev On success, emits the event MartianOffered /// @param tokenId The id of the martian to put for sale /// @param minSalePriceInWei The minimum price of the martian (Wei) function offerMartianForSale(uint tokenId, uint minSalePriceInWei) external { require(msg.sender == address(nonFungibleContract), "Use MarsContractBase:offerMartianForSale instead"); require(nonFungibleContract.ownerOf(tokenId) == msg.sender || nonFungibleContract.getApproved(tokenId) == address(this), "Only owner can add item from sale"); martianIdToOfferForSale[tokenId] = Offer(true, tokenId, nonFungibleContract.ownerOf(tokenId), minSalePriceInWei); emit MartianOffered(tokenId, minSalePriceInWei, nonFungibleContract.ownerOf(tokenId)); } /// @notice Sends free balance to the main wallet /// @dev Only callable by the deployer function sendBalanceToWallet() external { require(msg.sender == _deployerAddress, "INVALID_ROLE"); require(ownerBalance > 0, "No Balance to send"); uint amount = ownerBalance; ownerBalance = 0; (bool success,) = address(walletContract).call{value: amount}(""); require(success); } /// @notice Users can withdraw their available balance /// @dev Avoids reentrancy function withdraw() external { uint amount = addressToPendingWithdrawal[msg.sender]; addressToPendingWithdrawal[msg.sender] = 0; payable(msg.sender).transfer(amount); } /// @notice Sets the wallet for the design % /// @dev Only callable by the deployer function setTaxWallet(address taxWallet) external { require(msg.sender == _deployerAddress, "INVALID_ROLE"); _taxWallet = taxWallet; } /// @notice Owner of a martian can accept a bid for its martian /// @dev Only callable by the main contract. On success, emits the event MartianBought. Disccounts the contract tax (cut) from the final price. Executes a ERC721 safeTransferFrom /// @param tokenId The id of the martian /// @param minPrice The minimum price of the martian function acceptBidForMartian(uint tokenId, uint minPrice) external { require(msg.sender == address(nonFungibleContract), "Use MarsContractBase:acceptBidForMartian instead"); require(nonFungibleContract.ownerOf(tokenId) == msg.sender || nonFungibleContract.getApproved(tokenId) == address(this), "Sender is not owner"); address seller = nonFungibleContract.ownerOf(tokenId); Bid memory bid = martianIdToBids[tokenId]; require(bid.value > 0, "Value must be > 0"); require(bid.value >= minPrice, "Value < minPrice"); nonFungibleContract.safeTransferFrom(seller, bid.bidder, tokenId); uint amount = bid.value; martianIdToBids[tokenId] = Bid(false, tokenId, address(0), 0); // 5% tax uint taxAmount = amount * ownerCut / 100; uint netAmount = amount - taxAmount; addressToPendingWithdrawal[seller] += netAmount; addressToPendingWithdrawal[_taxWallet] += taxAmount; emit MartianBought(tokenId, bid.value, seller, bid.bidder); } /// @notice Users can withdraw their own bid for a specific martian /// @dev The bid amount is automatically transfered back to the user. Emits MartianBidWithdrawn event. Avoids reentrancy. /// @param tokenId The id of the martian that had the bid on function withdrawBidForMartian(uint tokenId) external { require(nonFungibleContract.ownerOf(tokenId) != address(0), "Sender cant be 0x0"); require(nonFungibleContract.ownerOf(tokenId) != msg.sender, "Sender cant be the owner"); Bid memory bid = martianIdToBids[tokenId]; require(bid.bidder == msg.sender, "Only bidder can withdraw their bid"); uint amount = bid.value; martianIdToBids[tokenId] = Bid(false, tokenId, address(0), 0); payable(msg.sender).transfer(amount); emit MartianBidWithdrawn(tokenId, bid.value, msg.sender); } /// @notice Updates the wallet contract address /// @param _address The address of the wallet contract /// @dev Only callable by deployer function setWalletAddress(address payable _address) external { require(msg.sender == _deployerAddress, "INVALID_ROLE"); MarsGenesisMartiansWallet candidateContract = MarsGenesisMartiansWallet(_address); walletContract = candidateContract; } /*** PUBLIC ***/ /// @notice Checks if a martian is for sale /// @param tokenId The id of the martian to check /// @return boolean, true if the martian is for sale function martianIdIsForSale(uint256 tokenId) public view returns(bool) { return martianIdToOfferForSale[tokenId].isForSale; } /// @notice Puts a martian no longer for sale /// @dev Callable only by the main contract or the owner of a martian. Emits the event MartianNoLongerForSale /// @param tokenId The id of the martian function martianNoLongerForSale(uint tokenId) public { require(nonFungibleContract.ownerOf(tokenId) == msg.sender || nonFungibleContract.getApproved(tokenId) == address(this), "Only owner can remove item from sale"); martianIdToOfferForSale[tokenId] = Offer(false, tokenId, msg.sender, 0); emit MartianNoLongerForSale(tokenId, nonFungibleContract.ownerOf(tokenId)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "./ERC721Full.sol"; import "./MarsGenesisMartiansWallet.sol"; /// @title MarsGenesis Martians Auction Base Contract /// @author MarsGenesis /// @notice Serves as the base for MarsGenesisMartiansAuction contract contract MarsGenesisMartiansAuctionBase is ERC165 { /// @dev Interface signatures bytes4 constant InterfaceSignature_ERC721 = bytes4(0x80ac58cd); bytes4 constant InterfaceSignature_ERC721_Metadata = bytes4(0x5b5e139f); bytes4 constant InterfaceSignature_ERC721_Enumerable = bytes4(0x780e9d63); bytes4 constant InterfaceSignature_MarsGenesisMartiansAuction = bytes4(keccak256('martianIdIsForSale(uint256 tokenId)')) ^ bytes4(keccak256('martianNoLongerForSale(uint256)')); /// @dev Contract owner balance uint public ownerBalance; /// @dev Contract owner tax on sales uint256 public ownerCut; /// @dev Reference to main contract that implements ERC721 ERC721Full nonFungibleContract; /// @dev Auction contract address MarsGenesisMartiansWallet walletContract; /// @dev Address of the deployer account address _deployerAddress; /// @notice Inits the contract /// @dev The main contract should support specific interfaces /// @param _erc721Address The address of the main MarsGenesisMartians contract /// @param _walletAddress The address of the wallet of MarsGenesisMartians contract /// @param _cut The contract owner tax on sales constructor (address _erc721Address, address payable _walletAddress, uint256 _cut) { require(_cut <= 100, "INVALID_OWNER_CUT"); ownerCut = _cut; _deployerAddress = msg.sender; ERC721Full candidateContract = ERC721Full(_erc721Address); require(candidateContract.supportsInterface(InterfaceSignature_ERC721), "ERC721 not supported"); require(candidateContract.supportsInterface(InterfaceSignature_ERC721_Metadata), "ERC721Metadata not supported"); require(candidateContract.supportsInterface(InterfaceSignature_ERC721_Enumerable), "ERC721Enumerable not supported"); nonFungibleContract = candidateContract; walletContract = MarsGenesisMartiansWallet(_walletAddress); } /*** EVENTS ***/ /// @dev Event fired when a martian is offered for sale event MartianOffered(uint indexed tokenId, uint minValue, address indexed from); /// @dev Event fired when a user bids on a martian event MartianBidEntered(uint indexed tokenId, uint value, address indexed from); /// @dev Event fired when a bid is withdrawn event MartianBidWithdrawn(uint indexed tokenId, uint value, address indexed from); /// @dev Event fired when a martian is bought via auctioning or direct sale event MartianBought(uint indexed tokenId, uint value, address indexed from, address indexed to); /// @dev Event fired when a martian is no longer for sale event MartianNoLongerForSale(uint indexed tokenId, address indexed from); /*** STORAGE ***/ /// @dev The main Offer struct for auctioning struct Offer { bool isForSale; uint tokenId; address seller; uint minValue; } /// @dev The main Bid struct for auctioning struct Bid { bool hasBid; uint tokenId; address bidder; uint value; } /// @dev A mapping of martians that are offered for sale at a specific minimum value mapping (uint => Offer) public martianIdToOfferForSale; /// @dev A mapping of the martianId to its highest bid mapping (uint => Bid) public martianIdToBids; /// @dev A mapping of address to their pending withdrawal mapping (address => uint) public addressToPendingWithdrawal; /*** ERC165 ***/ /// @notice Checks for interface support /// @param interfaceId The interfaceId bytes /// @return bool, true or false for the support function supportsInterface(bytes4 interfaceId) public override pure returns (bool) { return interfaceId == InterfaceSignature_MarsGenesisMartiansAuction; } }
///// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; /// @title MarsGenesis Martians wallet contract /// @author MarsGenesis /// @dev Equity values are 0 to 10000 (representing 0 to 100 with decimals). So an equity of 3000 means 30% /// @notice Encapsulates the wallet and cap table management contract MarsGenesisMartiansWallet is AccessControlEnumerable { /// @dev Address of the deployer account address private _deployerAddress; /*** CAP TABLE ***/ address[] private _founders; mapping(address => uint) public founderToEquity; mapping(address => FounderAuthorization[]) private _addressToFounderAuthorization; /// @dev A mapping of cxo address to their pending withdrawal mapping (address => uint) public addressToPendingWithdrawal; /// @dev The max shares being 100 represented by 10000 (to accept decimal positions) uint private constant TOTAL_CAP = 10000; struct FounderAuthorization { address founder; uint equity; bool approved; bool isRemoval; } /*** INIT ***/ /// @notice Inits the wallet /// @dev defines a initial cap table with specific equity per founder. Equity values 0 - 10000 representing 0-100% equity /// @param cxo1 founder 1 /// @param cxo2 founder 2 /// @param cxo3 founder 3 /// @param cdo1 founder 4 /// @param cdo2 founder 5 constructor (address cxo1, address cxo2, address cxo3, address cdo1, address cdo2) { _deployerAddress = msg.sender; _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); // Initial cap table createInitialFounder(cxo1, 3000); createInitialFounder(cxo2, 3000); createInitialFounder(cxo3, 3000); createInitialFounder(cdo1, 500); createInitialFounder(cdo2, 500); } /// @notice Inits the a initial founder. /// @dev Only callable once on contract construction /// @param founderAddress The address of a initial founder /// @param equity The equity of the initial founder. Equity values 0 - 10000 representing 0-100% equity function createInitialFounder(address founderAddress, uint equity) private { require(msg.sender == _deployerAddress, "ONLY_DEPLOYER"); require(equity <= TOTAL_CAP, "INVALID EQUITY (0-10000)"); _founders.push(founderAddress); _setupRole(DEFAULT_ADMIN_ROLE, founderAddress); founderToEquity[founderAddress] = equity; } /*** PUBLIC ***/ /// @notice Wallet should receive ether from MarsGenesisMartiansCore and MarsGenesisMartiansAuction /// @dev Ether received is splitted by equity among wallet founders receive() external payable { require(msg.value > 0, "INVALID_AMOUNT"); _updatePendingWithdrawals(msg.value); } function authorize(bool approved, uint equity, address who) public { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "INVALID_ROLE"); require(equity <= TOTAL_CAP, "INVALID EQUITY (0-10000)"); require(equity >= 0, "INVALID EQUITY (0-10000)"); FounderAuthorization[] storage auths = _addressToFounderAuthorization[who]; bool exists = false; for (uint i = 0; i < auths.length; i++) { if (auths[i].founder == msg.sender) { exists = true; auths[i].equity = equity; auths[i].approved = approved; auths[i].isRemoval = false; } } if (!exists) { auths.push(FounderAuthorization({founder: msg.sender, equity: equity, approved: approved, isRemoval: false})); } } function revoke(bool approved, address who) public { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "INVALID_ROLE"); FounderAuthorization[] storage auths = _addressToFounderAuthorization[who]; bool exists = false; for (uint i = 0; i < auths.length; i++) { if (auths[i].founder == msg.sender) { exists = true; auths[i].equity = 0; auths[i].approved = approved; auths[i].isRemoval = true; } } if (!exists) { auths.push(FounderAuthorization({founder: msg.sender, equity: 0, approved: approved, isRemoval: true})); } } function updateCapTable(address who, uint equity, bool isRemoval) public { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "INVALID_ROLE"); require(equity <= TOTAL_CAP, "INVALID EQUITY (0-10000)"); require(equity >= 0, "INVALID EQUITY (0-10000)"); FounderAuthorization[] storage auths = _addressToFounderAuthorization[who]; uint equityYes = 0; for (uint i = 0; i < auths.length; i++) { if (equity == auths[i].equity && auths[i].approved == true && isRemoval == auths[i].isRemoval) { equityYes += founderToEquity[auths[i].founder]; } } if (equityYes >= 7000) { if (isRemoval) { _removeFounder(who); } else { _addFounder(who, equity); } delete _addressToFounderAuthorization[who]; } } function withdraw() external { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "INVALID_ROLE"); uint amount = addressToPendingWithdrawal[_msgSender()]; addressToPendingWithdrawal[_msgSender()] = 0; payable(_msgSender()).transfer(amount); } /*** PRIVATE ***/ function _addFounder(address who, uint equity) private { require(!_founderExists(who), "FOUNDER ALREADY EXISTS"); for (uint i = 0; i < _founders.length; i++) { founderToEquity[_founders[i]] = founderToEquity[_founders[i]] * (TOTAL_CAP - equity) / TOTAL_CAP; } _founders.push(who); grantRole(DEFAULT_ADMIN_ROLE, who); founderToEquity[who] = equity; } function _removeFounder(address who) private { require(_founderExists(who), "FOUNDER DOESNT EXIST"); uint equityToSplit = founderToEquity[who]; uint indexToRemove; for (uint i = 0; i < _founders.length; i++) { if (_founders[i] == who) { indexToRemove = i; founderToEquity[who] = 0; } else { founderToEquity[_founders[i]] = TOTAL_CAP * founderToEquity[_founders[i]] / (TOTAL_CAP - equityToSplit); } } delete _founders[indexToRemove]; revokeRole(DEFAULT_ADMIN_ROLE, who); } function _founderExists(address who) private view returns(bool) { bool exists = false; for (uint i = 0; i < _founders.length; i++) { if (_founders[i] == who) { exists = true; } } return exists; } function _updatePendingWithdrawals(uint amount) private { for (uint i = 0; i < _founders.length; i++) { addressToPendingWithdrawal[_founders[i]] = addressToPendingWithdrawal[_founders[i]] + (amount * founderToEquity[_founders[i]] / TOTAL_CAP); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { function hasRole(bytes32 role, address account) external view returns (bool); function getRoleAdmin(bytes32 role) external view returns (bytes32); function grantRole(bytes32 role, address account) external; function revokeRole(bytes32 role, address account) external; function renounceRole(bytes32 role, address account) external; } /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping (address => bool) members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/ */ function _checkRole(bytes32 role, address account) internal view { if(!hasRole(role, account)) { revert(string(abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ))); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { emit RoleAdminChanged(role, getRoleAdmin(role), adminRole); _roles[role].adminRole = adminRole; } function _grantRole(bytes32 role, address account) private { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable { function getRoleMember(bytes32 role, uint256 index) external view returns (address); function getRoleMemberCount(bytes32 role) external view returns (uint256); } /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping (bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {grantRole} to track enumerable memberships */ function grantRole(bytes32 role, address account) public virtual override { super.grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {revokeRole} to track enumerable memberships */ function revokeRole(bytes32 role, address account) public virtual override { super.revokeRole(role, account); _roleMembers[role].remove(account); } /** * @dev Overload {renounceRole} to track enumerable memberships */ function renounceRole(bytes32 role, address account) public virtual override { super.renounceRole(role, account); _roleMembers[role].remove(account); } /** * @dev Overload {_setupRole} to track enumerable memberships */ function _setupRole(bytes32 role, address account) internal virtual override { super._setupRole(role, account); _roleMembers[role].add(account); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor () { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _owners; // Mapping owner address to token count mapping (address => uint256) private _balances; // Mapping from token ID to approved address mapping (uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. 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 virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _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 { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual { _mint(to, tokenId); require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { // solhint-disable-next-line no-inline-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { } }
// SPDX-License-Identifier: MIT 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 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 pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../security/Pausable.sol"; /** * @dev ERC721 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC721Pausable is ERC721, Pausable { /** * @dev See {ERC721-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); require(!paused(), "ERC721Pausable: token transfer while paused"); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT 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 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; // solhint-disable-next-line no-inline-assembly 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant alphabet = "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] = alphabet[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT 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 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 pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address payable","name":"_walletAddress","type":"address"},{"internalType":"address","name":"_marsCoreAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_martianId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_landId","type":"uint256"}],"name":"Discovery","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ALL_MARTIANS","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minPrice","type":"uint256"}],"name":"acceptBidForMartian","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":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"uint256","name":"","type":"uint256"}],"name":"landTokenIdRedeemed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"signatures","type":"bytes[]"},{"internalType":"uint256[]","name":"martianIds","type":"uint256[]"},{"internalType":"uint256[]","name":"landTokenIds","type":"uint256[]"},{"internalType":"address","name":"promoOwner","type":"address"}],"name":"mintMartians","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minSalePriceInWei","type":"uint256"}],"name":"offerMartianForSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","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":[],"name":"sendBalanceToWallet","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":"_address","type":"address"}],"name":"setAuctionAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"amount","type":"uint16"}],"name":"setReservedMartiansAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_address","type":"address"}],"name":"setWalletAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenToMartianId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052612710600c60016101000a81548161ffff021916908361ffff1602179055503480156200003057600080fd5b506040516200693138038062006931833981810160405281019062000056919062000765565b6040518060400160405280601381526020017f4d61727347656e657369734d61727469616e73000000000000000000000000008152506040518060400160405280600481526020017f4d52544e0000000000000000000000000000000000000000000000000000000081525081818160029080519060200190620000dc92919062000606565b508060039080519060200190620000f592919062000606565b5050506000600c60006101000a81548160ff021916908315150217905550620001376000801b6200012b6200022960201b60201c565b6200023160201b60201c565b505033600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200018f6000801b336200023160201b60201c565b81601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620002216200027960201b60201c565b505062000934565b600033905090565b620002488282620002f160201b62001fa51760201c565b6200027481600160008581526020019081526020016000206200030760201b62001fb31790919060201c565b505050565b6200029d6000801b620002916200022960201b60201c565b6200033f60201b60201c565b620002df576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002d6906200080d565b60405180910390fd5b620002ef620003a960201b60201c565b565b6200030382826200046160201b60201c565b5050565b600062000337836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6200055260201b60201c565b905092915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b620003b9620005cc60201b60201c565b15620003fc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003f3906200087f565b60405180910390fd5b6001600c60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620004486200022960201b60201c565b604051620004579190620008b2565b60405180910390a1565b6200047382826200033f60201b60201c565b6200054e57600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620004f36200022960201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000620005668383620005e360201b60201c565b620005c1578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050620005c6565b600090505b92915050565b6000600c60009054906101000a900460ff16905090565b600080836001016000848152602001908152602001600020541415905092915050565b8280546200061490620008fe565b90600052602060002090601f01602090048101928262000638576000855562000684565b82601f106200065357805160ff191683800117855562000684565b8280016001018555821562000684579182015b828111156200068357825182559160200191906001019062000666565b5b50905062000693919062000697565b5090565b5b80821115620006b257600081600090555060010162000698565b5090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620006e882620006bb565b9050919050565b620006fa81620006db565b81146200070657600080fd5b50565b6000815190506200071a81620006ef565b92915050565b60006200072d82620006bb565b9050919050565b6200073f8162000720565b81146200074b57600080fd5b50565b6000815190506200075f8162000734565b92915050565b600080604083850312156200077f576200077e620006b6565b5b60006200078f8582860162000709565b9250506020620007a2858286016200074e565b9150509250929050565b600082825260208201905092915050565b7f494e56414c49445f524f4c450000000000000000000000000000000000000000600082015250565b6000620007f5600c83620007ac565b91506200080282620007bd565b602082019050919050565b600060208201905081810360008301526200082881620007e6565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b600062000867601083620007ac565b915062000874826200082f565b602082019050919050565b600060208201905081810360008301526200089a8162000858565b9050919050565b620008ac8162000720565b82525050565b6000602082019050620008c96000830184620008a1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200091757607f821691505b602082108114156200092e576200092d620008cf565b5b50919050565b615fed80620009446000396000f3fe6080604052600436106102255760003560e01c806370a0823111610123578063ac1a386a116100ab578063e07bb8921161006f578063e07bb89214610852578063e8a3d4851461088f578063e985e9c5146108ba578063f3eb1668146108f7578063fada3dee1461092057610225565b8063ac1a386a1461075d578063b88d4fde14610786578063c87b56dd146107af578063ca15c873146107ec578063d547741f1461082957610225565b806391d14854116100f257806391d148541461067857806393ac3638146106b557806395d89b41146106de578063a217fddf14610709578063a22cb4651461073457610225565b806370a08231146105aa5780637c1f9fc2146105e75780638456cb59146106245780639010d07c1461063b57610225565b806323b872dd116101b15780633f4ba83a116101755780633f4ba83a146104c557806342842e0e146104dc5780634f6ccce7146105055780635c975abb146105425780636352211e1461056d57610225565b806323b872dd146103d0578063248a9ca3146103f95780632f2ff15d146104365780632f745c591461045f57806336568abe1461049c57610225565b8063095ea7b3116101f8578063095ea7b3146102f85780631017b8d61461032157806318160ddd1461034c5780631cce0fb714610377578063225d7da5146103a057610225565b806301ffc9a71461022a57806302114ad71461026757806306fdde0314610290578063081812fc146102bb575b600080fd5b34801561023657600080fd5b50610251600480360381019061024c9190613d90565b610937565b60405161025e9190613dd8565b60405180910390f35b34801561027357600080fd5b5061028e60048036038101906102899190613e29565b610949565b005b34801561029c57600080fd5b506102a5610a08565b6040516102b29190613f02565b60405180910390f35b3480156102c757600080fd5b506102e260048036038101906102dd9190613f24565b610a9a565b6040516102ef9190613f92565b60405180910390f35b34801561030457600080fd5b5061031f600480360381019061031a9190613fd9565b610b1f565b005b34801561032d57600080fd5b50610336610c37565b6040516103439190613f02565b60405180910390f35b34801561035857600080fd5b50610361610c53565b60405161036e9190614028565b60405180910390f35b34801561038357600080fd5b5061039e6004803603810190610399919061407d565b610c60565b005b6103ba60048036038101906103b59190614388565b610c9d565b6040516103c79190613dd8565b60405180910390f35b3480156103dc57600080fd5b506103f760048036038101906103f29190614443565b61132a565b005b34801561040557600080fd5b50610420600480360381019061041b91906144cc565b61138a565b60405161042d9190614508565b60405180910390f35b34801561044257600080fd5b5061045d60048036038101906104589190614523565b6113a9565b005b34801561046b57600080fd5b5061048660048036038101906104819190613fd9565b6113dd565b6040516104939190614028565b60405180910390f35b3480156104a857600080fd5b506104c360048036038101906104be9190614523565b611482565b005b3480156104d157600080fd5b506104da6114b6565b005b3480156104e857600080fd5b5061050360048036038101906104fe9190614443565b611513565b005b34801561051157600080fd5b5061052c60048036038101906105279190613f24565b611533565b6040516105399190614028565b60405180910390f35b34801561054e57600080fd5b506105576115a4565b6040516105649190613dd8565b60405180910390f35b34801561057957600080fd5b50610594600480360381019061058f9190613f24565b6115bb565b6040516105a19190613f92565b60405180910390f35b3480156105b657600080fd5b506105d160048036038101906105cc9190614563565b61166d565b6040516105de9190614028565b60405180910390f35b3480156105f357600080fd5b5061060e60048036038101906106099190613f24565b611725565b60405161061b9190613dd8565b60405180910390f35b34801561063057600080fd5b50610639611745565b005b34801561064757600080fd5b50610662600480360381019061065d9190614590565b6117a2565b60405161066f9190613f92565b60405180910390f35b34801561068457600080fd5b5061069f600480360381019061069a9190614523565b6117d1565b6040516106ac9190613dd8565b60405180910390f35b3480156106c157600080fd5b506106dc60048036038101906106d79190614563565b61183b565b005b3480156106ea57600080fd5b506106f36119ac565b6040516107009190613f02565b60405180910390f35b34801561071557600080fd5b5061071e611a3e565b60405161072b9190614508565b60405180910390f35b34801561074057600080fd5b5061075b600480360381019061075691906145fc565b611a45565b005b34801561076957600080fd5b50610784600480360381019061077f919061467a565b611bc6565b005b34801561079257600080fd5b506107ad60048036038101906107a891906146a7565b611c27565b005b3480156107bb57600080fd5b506107d660048036038101906107d19190613f24565b611c89565b6040516107e39190613f02565b60405180910390f35b3480156107f857600080fd5b50610813600480360381019061080e91906144cc565b611ccd565b6040516108209190614028565b60405180910390f35b34801561083557600080fd5b50610850600480360381019061084b9190614523565b611cf1565b005b34801561085e57600080fd5b5061087960048036038101906108749190613f24565b611d25565b6040516108869190614028565b60405180910390f35b34801561089b57600080fd5b506108a4611d3d565b6040516108b19190613f02565b60405180910390f35b3480156108c657600080fd5b506108e160048036038101906108dc919061472a565b611d5d565b6040516108ee9190613dd8565b60405180910390f35b34801561090357600080fd5b5061091e60048036038101906109199190613e29565b611df1565b005b34801561092c57600080fd5b50610935611eb0565b005b600061094282611fe3565b9050919050565b610975600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683610b1f565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302114ad783836040518363ffffffff1660e01b81526004016109d292919061476a565b600060405180830381600087803b1580156109ec57600080fd5b505af1158015610a00573d6000803e3d6000fd5b505050505050565b606060028054610a17906147c2565b80601f0160208091040260200160405190810160405280929190818152602001828054610a43906147c2565b8015610a905780601f10610a6557610100808354040283529160200191610a90565b820191906000526020600020905b815481529060010190602001808311610a7357829003601f168201915b5050505050905090565b6000610aa58261205d565b610ae4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610adb90614866565b60405180910390fd5b6006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610b2a826115bb565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b92906148f8565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610bba6120c9565b73ffffffffffffffffffffffffffffffffffffffff161480610be95750610be881610be36120c9565b611d5d565b5b610c28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1f9061498a565b60405180910390fd5b610c3283836120d1565b505050565b604051806060016040528060358152602001615f3b6035913981565b6000600a80549050905090565b610c746000801b610c6f6120c9565b6117d1565b610c7d57600080fd5b80600c60016101000a81548161ffff021916908361ffff16021790555050565b600080845190508084511115610ce8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdf906149f6565b60405180910390fd5b600084511115610f6b57835161ffff16600c60019054906101000a900461ffff1661ffff161015610d1857600080fd5b60005b81811015610f2f573373ffffffffffffffffffffffffffffffffffffffff16601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e878481518110610d8b57610d8a614a16565b5b60200260200101516040518263ffffffff1660e01b8152600401610daf9190614028565b60206040518083038186803b158015610dc757600080fd5b505afa158015610ddb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dff9190614a5a565b73ffffffffffffffffffffffffffffffffffffffff1614610e55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4c90614ad3565b60405180910390fd5b6000151560146000878481518110610e7057610e6f614a16565b5b6020026020010151815260200190815260200160002060009054906101000a900460ff16151514610ed6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ecd90614b3f565b60405180910390fd5b600160146000878481518110610eef57610eee614a16565b5b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610f2790614b8e565b915050610d1b565b508351600c60018282829054906101000a900461ffff16610f509190614bd7565b92506101000a81548161ffff021916908361ffff1602179055505b61271061ffff16600c60019054906101000a900461ffff1661ffff1682610f92600d61218a565b610f9c9190614c0b565b610fa69190614c0b565b1115610fe7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fde90614cad565b60405180910390fd5b6000610ffd6000801b610ff86120c9565b6117d1565b1561100a57839050611077565b8451826110179190614ccd565b67011c37937e08000061102a9190614d01565b34101561106c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106390614da7565b60405180910390fd5b6110746120c9565b90505b60005b8281101561131b57600015156013600089848151811061109d5761109c614a16565b5b6020026020010151815260200190815260200160002060009054906101000a900460ff16151514611103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fa90614e13565b60405180910390fd5b60003088838151811061111957611118614a16565b5b60200260200101513360405160200161113493929190614e9c565b6040516020818303038152906040528051906020012090506000611172828b858151811061116557611164614a16565b5b6020026020010151612198565b9050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611204576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fb90614f25565b60405180910390fd5b600061122a858b868151811061121d5761121c614a16565b5b602002602001015161220d565b905088518410156112ab577fcf0d25ae0ad65eb42e1958e0259f500e3102529a322cdea3090921be6ee9bec785828c878151811061126b5761126a614a16565b5b60200260200101518c888151811061128657611285614a16565b5b602002602001015160405161129e9493929190614f45565b60405180910390a1611305565b7fcf0d25ae0ad65eb42e1958e0259f500e3102529a322cdea3090921be6ee9bec785828c87815181106112e1576112e0614a16565b5b60200260200101516127116040516112fc9493929190614fcf565b60405180910390a15b505050808061131390614b8e565b91505061107a565b50600192505050949350505050565b61133b6113356120c9565b8261227e565b61137a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137190615086565b60405180910390fd5b61138583838361235c565b505050565b6000806000838152602001908152602001600020600101549050919050565b6113b382826125b8565b6113d88160016000858152602001908152602001600020611fb390919063ffffffff16565b505050565b60006113e88361166d565b8210611429576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142090615118565b60405180910390fd5b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b61148c82826125e1565b6114b1816001600085815260200190815260200160002061266490919063ffffffff16565b505050565b6114ca6000801b6114c56120c9565b6117d1565b611509576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150090615184565b60405180910390fd5b611511612694565b565b61152e83838360405180602001604052806000815250611c27565b505050565b600061153d610c53565b821061157e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157590615216565b60405180910390fd5b600a828154811061159257611591614a16565b5b90600052602060002001549050919050565b6000600c60009054906101000a900460ff16905090565b6000806004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611664576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165b906152a8565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d59061533a565b60405180910390fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60146020528060005260406000206000915054906101000a900460ff1681565b6117596000801b6117546120c9565b6117d1565b611798576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178f90615184565b60405180910390fd5b6117a0612736565b565b60006117c982600160008681526020019081526020016000206127d990919063ffffffff16565b905092915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61184f6000801b61184a6120c9565b6117d1565b61185857600080fd5b60008190508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f80b23bd1312ff525cc30f881ac90cbcc87b462298f6d62b2c173116bdda40ff87fdf6c5da332443b6359599d7c22fd038dbb896eaa02019b406fc6ff7d70410a6f186040518263ffffffff1660e01b81526004016118d89190615369565b60206040518083038186803b1580156118f057600080fd5b505afa158015611904573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119289190615399565b611967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195e90615412565b60405180910390fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6060600380546119bb906147c2565b80601f01602080910402602001604051908101604052809291908181526020018280546119e7906147c2565b8015611a345780601f10611a0957610100808354040283529160200191611a34565b820191906000526020600020905b815481529060010190602001808311611a1757829003601f168201915b5050505050905090565b6000801b81565b611a4d6120c9565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611abb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ab29061547e565b60405180910390fd5b8060076000611ac86120c9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611b756120c9565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611bba9190613dd8565b60405180910390a35050565b611bda6000801b611bd56120c9565b6117d1565b611be357600080fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611c38611c326120c9565b8361227e565b611c77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6e90615086565b60405180910390fd5b611c83848484846127f3565b50505050565b6060611ca7601260008481526020019081526020016000205461284f565b604051602001611cb7919061554c565b6040516020818303038152906040529050919050565b6000611cea600160008481526020019081526020016000206129b0565b9050919050565b611cfb82826129c5565b611d20816001600085815260200190815260200160002061266490919063ffffffff16565b505050565b60126020528060005260406000206000915090505481565b6060604051806080016040528060488152602001615f7060489139905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611e1d600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683610b1f565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3eb166883836040518363ffffffff1660e01b8152600401611e7a92919061476a565b600060405180830381600087803b158015611e9457600080fd5b505af1158015611ea8573d6000803e3d6000fd5b505050505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f0a57600080fd5b6000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1647604051611f529061559f565b60006040518083038185875af1925050503d8060008114611f8f576040519150601f19603f3d011682016040523d82523d6000602084013e611f94565b606091505b5050905080611fa257600080fd5b50565b611faf82826129ee565b5050565b6000611fdb836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612ace565b905092915050565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612056575061205582612b3e565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816006600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16612144836115bb565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081600001549050919050565b6000806000806121a785612c20565b809350819450829550505050600186848484604051600081526020016040526040516121d694939291906155d0565b6020604051602081039080840390855afa1580156121f8573d6000803e3d6000fd5b50505060206040510351935050505092915050565b60008061221a600d61218a565b90506122268482612c63565b612230600d612e31565b82601260008381526020019081526020016000208190555060016013600085815260200190815260200160002060006101000a81548160ff0219169083151502179055508091505092915050565b60006122898261205d565b6122c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122bf90615687565b60405180910390fd5b60006122d3836115bb565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061234257508373ffffffffffffffffffffffffffffffffffffffff1661232a84610a9a565b73ffffffffffffffffffffffffffffffffffffffff16145b8061235357506123528185611d5d565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661237c826115bb565b73ffffffffffffffffffffffffffffffffffffffff16146123d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123c990615719565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612442576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612439906157ab565b60405180910390fd5b61244d838383612e47565b6124586000826120d1565b6001600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124a89190614ccd565b925050819055506001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124ff9190614c0b565b92505081905550816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6125c18261138a565b6125d2816125cd6120c9565b613027565b6125dc83836129ee565b505050565b6125e96120c9565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612656576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161264d9061583d565b60405180910390fd5b61266082826130c4565b5050565b600061268c836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6131a5565b905092915050565b61269c6115a4565b6126db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126d2906158a9565b60405180910390fd5b6000600c60006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61271f6120c9565b60405161272c9190613f92565b60405180910390a1565b61273e6115a4565b1561277e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161277590615915565b60405180910390fd5b6001600c60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586127c26120c9565b6040516127cf9190613f92565b60405180910390a1565b60006127e883600001836132b1565b60001c905092915050565b6127fe84848461235c565b61280a84848484613325565b612849576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612840906159a7565b60405180910390fd5b50505050565b60606000821415612897576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506129ab565b600082905060005b600082146128c95780806128b290614b8e565b915050600a826128c291906159f6565b915061289f565b60008167ffffffffffffffff8111156128e5576128e46140af565b5b6040519080825280601f01601f1916602001820160405280156129175781602001600182028036833780820191505090505b5090505b600085146129a4576001826129309190614ccd565b9150600a8561293f9190615a27565b603061294b9190614c0b565b60f81b81838151811061296157612960614a16565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561299d91906159f6565b945061291b565b8093505050505b919050565b60006129be826000016134bc565b9050919050565b6129ce8261138a565b6129df816129da6120c9565b613027565b6129e983836130c4565b505050565b6129f882826117d1565b612aca57600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612a6f6120c9565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000612ada83836134cd565b612b33578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612b38565b600090505b92915050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612c0957507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612c195750612c18826134f0565b5b9050919050565b60008060006041845114612c3357600080fd5b60008060006020870151925060408701519150606087015160001a90508083839550955095505050509193909250565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612cd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cca90615aa4565b60405180910390fd5b612cdc8161205d565b15612d1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d1390615b10565b60405180910390fd5b612d2860008383612e47565b6001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612d789190614c0b565b92505081905550816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b6001816000016000828254019250508190555050565b612e5283838361356a565b600073ffffffffffffffffffffffffffffffffffffffff16600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612ee4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612edb90615b7c565b60405180910390fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bed4e457826040518263ffffffff1660e01b8152600401612f3f9190614028565b60206040518083038186803b158015612f5757600080fd5b505afa158015612f6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f8f9190615399565b1561302257600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166380b23bd1826040518263ffffffff1660e01b8152600401612fef9190614028565b600060405180830381600087803b15801561300957600080fd5b505af115801561301d573d6000803e3d6000fd5b505050505b505050565b61303182826117d1565b6130c0576130568173ffffffffffffffffffffffffffffffffffffffff16601461357a565b6130648360001c602061357a565b604051602001613075929190615c34565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130b79190613f02565b60405180910390fd5b5050565b6130ce82826117d1565b156131a157600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506131466120c9565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b600080836001016000848152602001908152602001600020549050600081146132a55760006001826131d79190614ccd565b90506000600186600001805490506131ef9190614ccd565b9050600086600001828154811061320957613208614a16565b5b906000526020600020015490508087600001848154811061322d5761322c614a16565b5b906000526020600020018190555083876001016000838152602001908152602001600020819055508660000180548061326957613268615c6e565b5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506132ab565b60009150505b92915050565b6000818360000180549050116132fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132f390615d0f565b60405180910390fd5b82600001828154811061331257613311614a16565b5b9060005260206000200154905092915050565b60006133468473ffffffffffffffffffffffffffffffffffffffff166137b6565b156134af578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261336f6120c9565b8786866040518563ffffffff1660e01b81526004016133919493929190615d84565b602060405180830381600087803b1580156133ab57600080fd5b505af19250505080156133dc57506040513d601f19601f820116820180604052508101906133d99190615de5565b60015b61345f573d806000811461340c576040519150601f19603f3d011682016040523d82523d6000602084013e613411565b606091505b50600081511415613457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161344e906159a7565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506134b4565b600190505b949350505050565b600081600001805490509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806135635750613562826137c9565b5b9050919050565b613575838383613843565b505050565b60606000600283600261358d9190614d01565b6135979190614c0b565b67ffffffffffffffff8111156135b0576135af6140af565b5b6040519080825280601f01601f1916602001820160405280156135e25781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061361a57613619614a16565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061367e5761367d614a16565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026136be9190614d01565b6136c89190614c0b565b90505b6001811115613768577f3031323334353637383961626364656600000000000000000000000000000000600f86166010811061370a57613709614a16565b5b1a60f81b82828151811061372157613720614a16565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061376190615e12565b90506136cb565b50600084146137ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137a390615e88565b60405180910390fd5b8091505092915050565b600080823b905060008111915050919050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061383c575061383b8261389b565b5b9050919050565b61384e838383613905565b6138566115a4565b15613896576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161388d90615f1a565b60405180910390fd5b505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b613910838383613a19565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156139535761394e81613a1e565b613992565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614613991576139908382613a67565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156139d5576139d081613bd4565b613a14565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613a1357613a128282613ca5565b5b5b505050565b505050565b600a80549050600b600083815260200190815260200160002081905550600a81908060018154018082558091505060019003906000526020600020016000909190919091505550565b60006001613a748461166d565b613a7e9190614ccd565b9050600060096000848152602001908152602001600020549050818114613b63576000600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816009600083815260200190815260200160002081905550505b6009600084815260200190815260200160002060009055600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b60006001600a80549050613be89190614ccd565b90506000600b60008481526020019081526020016000205490506000600a8381548110613c1857613c17614a16565b5b9060005260206000200154905080600a8381548110613c3a57613c39614a16565b5b906000526020600020018190555081600b600083815260200190815260200160002081905550600b600085815260200190815260200160002060009055600a805480613c8957613c88615c6e565b5b6001900381819060005260206000200160009055905550505050565b6000613cb08361166d565b905081600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806009600084815260200190815260200160002081905550505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613d6d81613d38565b8114613d7857600080fd5b50565b600081359050613d8a81613d64565b92915050565b600060208284031215613da657613da5613d2e565b5b6000613db484828501613d7b565b91505092915050565b60008115159050919050565b613dd281613dbd565b82525050565b6000602082019050613ded6000830184613dc9565b92915050565b6000819050919050565b613e0681613df3565b8114613e1157600080fd5b50565b600081359050613e2381613dfd565b92915050565b60008060408385031215613e4057613e3f613d2e565b5b6000613e4e85828601613e14565b9250506020613e5f85828601613e14565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613ea3578082015181840152602081019050613e88565b83811115613eb2576000848401525b50505050565b6000601f19601f8301169050919050565b6000613ed482613e69565b613ede8185613e74565b9350613eee818560208601613e85565b613ef781613eb8565b840191505092915050565b60006020820190508181036000830152613f1c8184613ec9565b905092915050565b600060208284031215613f3a57613f39613d2e565b5b6000613f4884828501613e14565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613f7c82613f51565b9050919050565b613f8c81613f71565b82525050565b6000602082019050613fa76000830184613f83565b92915050565b613fb681613f71565b8114613fc157600080fd5b50565b600081359050613fd381613fad565b92915050565b60008060408385031215613ff057613fef613d2e565b5b6000613ffe85828601613fc4565b925050602061400f85828601613e14565b9150509250929050565b61402281613df3565b82525050565b600060208201905061403d6000830184614019565b92915050565b600061ffff82169050919050565b61405a81614043565b811461406557600080fd5b50565b60008135905061407781614051565b92915050565b60006020828403121561409357614092613d2e565b5b60006140a184828501614068565b91505092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6140e782613eb8565b810181811067ffffffffffffffff82111715614106576141056140af565b5b80604052505050565b6000614119613d24565b905061412582826140de565b919050565b600067ffffffffffffffff821115614145576141446140af565b5b602082029050602081019050919050565b600080fd5b600080fd5b600067ffffffffffffffff82111561417b5761417a6140af565b5b61418482613eb8565b9050602081019050919050565b82818337600083830152505050565b60006141b36141ae84614160565b61410f565b9050828152602081018484840111156141cf576141ce61415b565b5b6141da848285614191565b509392505050565b600082601f8301126141f7576141f66140aa565b5b81356142078482602086016141a0565b91505092915050565b600061422361421e8461412a565b61410f565b9050808382526020820190506020840283018581111561424657614245614156565b5b835b8181101561428d57803567ffffffffffffffff81111561426b5761426a6140aa565b5b80860161427889826141e2565b85526020850194505050602081019050614248565b5050509392505050565b600082601f8301126142ac576142ab6140aa565b5b81356142bc848260208601614210565b91505092915050565b600067ffffffffffffffff8211156142e0576142df6140af565b5b602082029050602081019050919050565b60006143046142ff846142c5565b61410f565b9050808382526020820190506020840283018581111561432757614326614156565b5b835b81811015614350578061433c8882613e14565b845260208401935050602081019050614329565b5050509392505050565b600082601f83011261436f5761436e6140aa565b5b813561437f8482602086016142f1565b91505092915050565b600080600080608085870312156143a2576143a1613d2e565b5b600085013567ffffffffffffffff8111156143c0576143bf613d33565b5b6143cc87828801614297565b945050602085013567ffffffffffffffff8111156143ed576143ec613d33565b5b6143f98782880161435a565b935050604085013567ffffffffffffffff81111561441a57614419613d33565b5b6144268782880161435a565b925050606061443787828801613fc4565b91505092959194509250565b60008060006060848603121561445c5761445b613d2e565b5b600061446a86828701613fc4565b935050602061447b86828701613fc4565b925050604061448c86828701613e14565b9150509250925092565b6000819050919050565b6144a981614496565b81146144b457600080fd5b50565b6000813590506144c6816144a0565b92915050565b6000602082840312156144e2576144e1613d2e565b5b60006144f0848285016144b7565b91505092915050565b61450281614496565b82525050565b600060208201905061451d60008301846144f9565b92915050565b6000806040838503121561453a57614539613d2e565b5b6000614548858286016144b7565b925050602061455985828601613fc4565b9150509250929050565b60006020828403121561457957614578613d2e565b5b600061458784828501613fc4565b91505092915050565b600080604083850312156145a7576145a6613d2e565b5b60006145b5858286016144b7565b92505060206145c685828601613e14565b9150509250929050565b6145d981613dbd565b81146145e457600080fd5b50565b6000813590506145f6816145d0565b92915050565b6000806040838503121561461357614612613d2e565b5b600061462185828601613fc4565b9250506020614632858286016145e7565b9150509250929050565b600061464782613f51565b9050919050565b6146578161463c565b811461466257600080fd5b50565b6000813590506146748161464e565b92915050565b6000602082840312156146905761468f613d2e565b5b600061469e84828501614665565b91505092915050565b600080600080608085870312156146c1576146c0613d2e565b5b60006146cf87828801613fc4565b94505060206146e087828801613fc4565b93505060406146f187828801613e14565b925050606085013567ffffffffffffffff81111561471257614711613d33565b5b61471e878288016141e2565b91505092959194509250565b6000806040838503121561474157614740613d2e565b5b600061474f85828601613fc4565b925050602061476085828601613fc4565b9150509250929050565b600060408201905061477f6000830185614019565b61478c6020830184614019565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806147da57607f821691505b602082108114156147ee576147ed614793565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000614850602c83613e74565b915061485b826147f4565b604082019050919050565b6000602082019050818103600083015261487f81614843565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006148e2602183613e74565b91506148ed82614886565b604082019050919050565b60006020820190508181036000830152614911816148d5565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b6000614974603883613e74565b915061497f82614918565b604082019050919050565b600060208201905081810360008301526149a381614967565b9050919050565b7f4430000000000000000000000000000000000000000000000000000000000000600082015250565b60006149e0600283613e74565b91506149eb826149aa565b602082019050919050565b60006020820190508181036000830152614a0f816149d3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050614a5481613fad565b92915050565b600060208284031215614a7057614a6f613d2e565b5b6000614a7e84828501614a45565b91505092915050565b7f4531000000000000000000000000000000000000000000000000000000000000600082015250565b6000614abd600283613e74565b9150614ac882614a87565b602082019050919050565b60006020820190508181036000830152614aec81614ab0565b9050919050565b7f4532000000000000000000000000000000000000000000000000000000000000600082015250565b6000614b29600283613e74565b9150614b3482614af3565b602082019050919050565b60006020820190508181036000830152614b5881614b1c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614b9982613df3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614bcc57614bcb614b5f565b5b600182019050919050565b6000614be282614043565b9150614bed83614043565b925082821015614c0057614bff614b5f565b5b828203905092915050565b6000614c1682613df3565b9150614c2183613df3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614c5657614c55614b5f565b5b828201905092915050565b7f4d41580000000000000000000000000000000000000000000000000000000000600082015250565b6000614c97600383613e74565b9150614ca282614c61565b602082019050919050565b60006020820190508181036000830152614cc681614c8a565b9050919050565b6000614cd882613df3565b9150614ce383613df3565b925082821015614cf657614cf5614b5f565b5b828203905092915050565b6000614d0c82613df3565b9150614d1783613df3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614d5057614d4f614b5f565b5b828202905092915050565b7f2400000000000000000000000000000000000000000000000000000000000000600082015250565b6000614d91600183613e74565b9150614d9c82614d5b565b602082019050919050565b60006020820190508181036000830152614dc081614d84565b9050919050565b7f4944000000000000000000000000000000000000000000000000000000000000600082015250565b6000614dfd600283613e74565b9150614e0882614dc7565b602082019050919050565b60006020820190508181036000830152614e2c81614df0565b9050919050565b60008160601b9050919050565b6000614e4b82614e33565b9050919050565b6000614e5d82614e40565b9050919050565b614e75614e7082613f71565b614e52565b82525050565b6000819050919050565b614e96614e9182613df3565b614e7b565b82525050565b6000614ea88286614e64565b601482019150614eb88285614e85565b602082019150614ec88284614e64565b601482019150819050949350505050565b7f5349474e00000000000000000000000000000000000000000000000000000000600082015250565b6000614f0f600483613e74565b9150614f1a82614ed9565b602082019050919050565b60006020820190508181036000830152614f3e81614f02565b9050919050565b6000608082019050614f5a6000830187613f83565b614f676020830186614019565b614f746040830185614019565b614f816060830184614019565b95945050505050565b6000819050919050565b6000819050919050565b6000614fb9614fb4614faf84614f8a565b614f94565b613df3565b9050919050565b614fc981614f9e565b82525050565b6000608082019050614fe46000830187613f83565b614ff16020830186614019565b614ffe6040830185614019565b61500b6060830184614fc0565b95945050505050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b6000615070603183613e74565b915061507b82615014565b604082019050919050565b6000602082019050818103600083015261509f81615063565b9050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b6000615102602b83613e74565b915061510d826150a6565b604082019050919050565b60006020820190508181036000830152615131816150f5565b9050919050565b7f494e56414c49445f524f4c450000000000000000000000000000000000000000600082015250565b600061516e600c83613e74565b915061517982615138565b602082019050919050565b6000602082019050818103600083015261519d81615161565b9050919050565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b6000615200602c83613e74565b915061520b826151a4565b604082019050919050565b6000602082019050818103600083015261522f816151f3565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b6000615292602983613e74565b915061529d82615236565b604082019050919050565b600060208201905081810360008301526152c181615285565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000615324602a83613e74565b915061532f826152c8565b604082019050919050565b6000602082019050818103600083015261535381615317565b9050919050565b61536381613d38565b82525050565b600060208201905061537e600083018461535a565b92915050565b600081519050615393816145d0565b92915050565b6000602082840312156153af576153ae613d2e565b5b60006153bd84828501615384565b91505092915050565b7f4531300000000000000000000000000000000000000000000000000000000000600082015250565b60006153fc600383613e74565b9150615407826153c6565b602082019050919050565b6000602082019050818103600083015261542b816153ef565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000615468601983613e74565b915061547382615432565b602082019050919050565b600060208201905081810360008301526154978161545b565b9050919050565b600081905092915050565b7f697066733a2f2f516d615834484b33366d5932656778504a757a746e5a6a785060008201527f5647346a4d4d5a394138616d597a58797331726f712f00000000000000000000602082015250565b600061550560368361549e565b9150615510826154a9565b603682019050919050565b600061552682613e69565b615530818561549e565b9350615540818560208601613e85565b80840191505092915050565b6000615557826154f8565b9150615563828461551b565b915081905092915050565b600081905092915050565b50565b600061558960008361556e565b915061559482615579565b600082019050919050565b60006155aa8261557c565b9150819050919050565b600060ff82169050919050565b6155ca816155b4565b82525050565b60006080820190506155e560008301876144f9565b6155f260208301866155c1565b6155ff60408301856144f9565b61560c60608301846144f9565b95945050505050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000615671602c83613e74565b915061567c82615615565b604082019050919050565b600060208201905081810360008301526156a081615664565b9050919050565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b6000615703602983613e74565b915061570e826156a7565b604082019050919050565b60006020820190508181036000830152615732816156f6565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000615795602483613e74565b91506157a082615739565b604082019050919050565b600060208201905081810360008301526157c481615788565b9050919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000615827602f83613e74565b9150615832826157cb565b604082019050919050565b600060208201905081810360008301526158568161581a565b9050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000615893601483613e74565b915061589e8261585d565b602082019050919050565b600060208201905081810360008301526158c281615886565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b60006158ff601083613e74565b915061590a826158c9565b602082019050919050565b6000602082019050818103600083015261592e816158f2565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000615991603283613e74565b915061599c82615935565b604082019050919050565b600060208201905081810360008301526159c081615984565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000615a0182613df3565b9150615a0c83613df3565b925082615a1c57615a1b6159c7565b5b828204905092915050565b6000615a3282613df3565b9150615a3d83613df3565b925082615a4d57615a4c6159c7565b5b828206905092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000615a8e602083613e74565b9150615a9982615a58565b602082019050919050565b60006020820190508181036000830152615abd81615a81565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000615afa601c83613e74565b9150615b0582615ac4565b602082019050919050565b60006020820190508181036000830152615b2981615aed565b9050919050565b7f4155435f41444452000000000000000000000000000000000000000000000000600082015250565b6000615b66600883613e74565b9150615b7182615b30565b602082019050919050565b60006020820190508181036000830152615b9581615b59565b9050919050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000615bd260178361549e565b9150615bdd82615b9c565b601782019050919050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000615c1e60118361549e565b9150615c2982615be8565b601182019050919050565b6000615c3f82615bc5565b9150615c4b828561551b565b9150615c5682615c11565b9150615c62828461551b565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60008201527f6473000000000000000000000000000000000000000000000000000000000000602082015250565b6000615cf9602283613e74565b9150615d0482615c9d565b604082019050919050565b60006020820190508181036000830152615d2881615cec565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000615d5682615d2f565b615d608185615d3a565b9350615d70818560208601613e85565b615d7981613eb8565b840191505092915050565b6000608082019050615d996000830187613f83565b615da66020830186613f83565b615db36040830185614019565b8181036060830152615dc58184615d4b565b905095945050505050565b600081519050615ddf81613d64565b92915050565b600060208284031215615dfb57615dfa613d2e565b5b6000615e0984828501615dd0565b91505092915050565b6000615e1d82613df3565b91506000821415615e3157615e30614b5f565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000615e72602083613e74565b9150615e7d82615e3c565b602082019050919050565b60006020820190508181036000830152615ea181615e65565b9050919050565b7f4552433732315061757361626c653a20746f6b656e207472616e73666572207760008201527f68696c6520706175736564000000000000000000000000000000000000000000602082015250565b6000615f04602b83613e74565b9150615f0f82615ea8565b604082019050919050565b60006020820190508181036000830152615f3381615ef7565b905091905056fe697066733a2f2f516d537656484c544c5877366371467347354131593546633364597346327356637574396d45415578505474486f68747470733a2f2f6d61727367656e657369732d776562332e6865726f6b756170702e636f6d2f6d657461646174612f4d61727347656e657369734d61727469616e732e6a736f6ea2646970667358221220df6399788f074b87a38ebcba604b0cc9c5203c1d8ad529b9372de079206a9f6f64736f6c6343000809003300000000000000000000000010235f2d820bdac032fdeea25f9a57eb0890c3e0000000000000000000000000e6ddbea6749cc793ba12ac22bca03c3f1fcf3a80
Deployed Bytecode
0x6080604052600436106102255760003560e01c806370a0823111610123578063ac1a386a116100ab578063e07bb8921161006f578063e07bb89214610852578063e8a3d4851461088f578063e985e9c5146108ba578063f3eb1668146108f7578063fada3dee1461092057610225565b8063ac1a386a1461075d578063b88d4fde14610786578063c87b56dd146107af578063ca15c873146107ec578063d547741f1461082957610225565b806391d14854116100f257806391d148541461067857806393ac3638146106b557806395d89b41146106de578063a217fddf14610709578063a22cb4651461073457610225565b806370a08231146105aa5780637c1f9fc2146105e75780638456cb59146106245780639010d07c1461063b57610225565b806323b872dd116101b15780633f4ba83a116101755780633f4ba83a146104c557806342842e0e146104dc5780634f6ccce7146105055780635c975abb146105425780636352211e1461056d57610225565b806323b872dd146103d0578063248a9ca3146103f95780632f2ff15d146104365780632f745c591461045f57806336568abe1461049c57610225565b8063095ea7b3116101f8578063095ea7b3146102f85780631017b8d61461032157806318160ddd1461034c5780631cce0fb714610377578063225d7da5146103a057610225565b806301ffc9a71461022a57806302114ad71461026757806306fdde0314610290578063081812fc146102bb575b600080fd5b34801561023657600080fd5b50610251600480360381019061024c9190613d90565b610937565b60405161025e9190613dd8565b60405180910390f35b34801561027357600080fd5b5061028e60048036038101906102899190613e29565b610949565b005b34801561029c57600080fd5b506102a5610a08565b6040516102b29190613f02565b60405180910390f35b3480156102c757600080fd5b506102e260048036038101906102dd9190613f24565b610a9a565b6040516102ef9190613f92565b60405180910390f35b34801561030457600080fd5b5061031f600480360381019061031a9190613fd9565b610b1f565b005b34801561032d57600080fd5b50610336610c37565b6040516103439190613f02565b60405180910390f35b34801561035857600080fd5b50610361610c53565b60405161036e9190614028565b60405180910390f35b34801561038357600080fd5b5061039e6004803603810190610399919061407d565b610c60565b005b6103ba60048036038101906103b59190614388565b610c9d565b6040516103c79190613dd8565b60405180910390f35b3480156103dc57600080fd5b506103f760048036038101906103f29190614443565b61132a565b005b34801561040557600080fd5b50610420600480360381019061041b91906144cc565b61138a565b60405161042d9190614508565b60405180910390f35b34801561044257600080fd5b5061045d60048036038101906104589190614523565b6113a9565b005b34801561046b57600080fd5b5061048660048036038101906104819190613fd9565b6113dd565b6040516104939190614028565b60405180910390f35b3480156104a857600080fd5b506104c360048036038101906104be9190614523565b611482565b005b3480156104d157600080fd5b506104da6114b6565b005b3480156104e857600080fd5b5061050360048036038101906104fe9190614443565b611513565b005b34801561051157600080fd5b5061052c60048036038101906105279190613f24565b611533565b6040516105399190614028565b60405180910390f35b34801561054e57600080fd5b506105576115a4565b6040516105649190613dd8565b60405180910390f35b34801561057957600080fd5b50610594600480360381019061058f9190613f24565b6115bb565b6040516105a19190613f92565b60405180910390f35b3480156105b657600080fd5b506105d160048036038101906105cc9190614563565b61166d565b6040516105de9190614028565b60405180910390f35b3480156105f357600080fd5b5061060e60048036038101906106099190613f24565b611725565b60405161061b9190613dd8565b60405180910390f35b34801561063057600080fd5b50610639611745565b005b34801561064757600080fd5b50610662600480360381019061065d9190614590565b6117a2565b60405161066f9190613f92565b60405180910390f35b34801561068457600080fd5b5061069f600480360381019061069a9190614523565b6117d1565b6040516106ac9190613dd8565b60405180910390f35b3480156106c157600080fd5b506106dc60048036038101906106d79190614563565b61183b565b005b3480156106ea57600080fd5b506106f36119ac565b6040516107009190613f02565b60405180910390f35b34801561071557600080fd5b5061071e611a3e565b60405161072b9190614508565b60405180910390f35b34801561074057600080fd5b5061075b600480360381019061075691906145fc565b611a45565b005b34801561076957600080fd5b50610784600480360381019061077f919061467a565b611bc6565b005b34801561079257600080fd5b506107ad60048036038101906107a891906146a7565b611c27565b005b3480156107bb57600080fd5b506107d660048036038101906107d19190613f24565b611c89565b6040516107e39190613f02565b60405180910390f35b3480156107f857600080fd5b50610813600480360381019061080e91906144cc565b611ccd565b6040516108209190614028565b60405180910390f35b34801561083557600080fd5b50610850600480360381019061084b9190614523565b611cf1565b005b34801561085e57600080fd5b5061087960048036038101906108749190613f24565b611d25565b6040516108869190614028565b60405180910390f35b34801561089b57600080fd5b506108a4611d3d565b6040516108b19190613f02565b60405180910390f35b3480156108c657600080fd5b506108e160048036038101906108dc919061472a565b611d5d565b6040516108ee9190613dd8565b60405180910390f35b34801561090357600080fd5b5061091e60048036038101906109199190613e29565b611df1565b005b34801561092c57600080fd5b50610935611eb0565b005b600061094282611fe3565b9050919050565b610975600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683610b1f565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302114ad783836040518363ffffffff1660e01b81526004016109d292919061476a565b600060405180830381600087803b1580156109ec57600080fd5b505af1158015610a00573d6000803e3d6000fd5b505050505050565b606060028054610a17906147c2565b80601f0160208091040260200160405190810160405280929190818152602001828054610a43906147c2565b8015610a905780601f10610a6557610100808354040283529160200191610a90565b820191906000526020600020905b815481529060010190602001808311610a7357829003601f168201915b5050505050905090565b6000610aa58261205d565b610ae4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610adb90614866565b60405180910390fd5b6006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610b2a826115bb565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b92906148f8565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610bba6120c9565b73ffffffffffffffffffffffffffffffffffffffff161480610be95750610be881610be36120c9565b611d5d565b5b610c28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1f9061498a565b60405180910390fd5b610c3283836120d1565b505050565b604051806060016040528060358152602001615f3b6035913981565b6000600a80549050905090565b610c746000801b610c6f6120c9565b6117d1565b610c7d57600080fd5b80600c60016101000a81548161ffff021916908361ffff16021790555050565b600080845190508084511115610ce8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdf906149f6565b60405180910390fd5b600084511115610f6b57835161ffff16600c60019054906101000a900461ffff1661ffff161015610d1857600080fd5b60005b81811015610f2f573373ffffffffffffffffffffffffffffffffffffffff16601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e878481518110610d8b57610d8a614a16565b5b60200260200101516040518263ffffffff1660e01b8152600401610daf9190614028565b60206040518083038186803b158015610dc757600080fd5b505afa158015610ddb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dff9190614a5a565b73ffffffffffffffffffffffffffffffffffffffff1614610e55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4c90614ad3565b60405180910390fd5b6000151560146000878481518110610e7057610e6f614a16565b5b6020026020010151815260200190815260200160002060009054906101000a900460ff16151514610ed6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ecd90614b3f565b60405180910390fd5b600160146000878481518110610eef57610eee614a16565b5b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610f2790614b8e565b915050610d1b565b508351600c60018282829054906101000a900461ffff16610f509190614bd7565b92506101000a81548161ffff021916908361ffff1602179055505b61271061ffff16600c60019054906101000a900461ffff1661ffff1682610f92600d61218a565b610f9c9190614c0b565b610fa69190614c0b565b1115610fe7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fde90614cad565b60405180910390fd5b6000610ffd6000801b610ff86120c9565b6117d1565b1561100a57839050611077565b8451826110179190614ccd565b67011c37937e08000061102a9190614d01565b34101561106c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106390614da7565b60405180910390fd5b6110746120c9565b90505b60005b8281101561131b57600015156013600089848151811061109d5761109c614a16565b5b6020026020010151815260200190815260200160002060009054906101000a900460ff16151514611103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fa90614e13565b60405180910390fd5b60003088838151811061111957611118614a16565b5b60200260200101513360405160200161113493929190614e9c565b6040516020818303038152906040528051906020012090506000611172828b858151811061116557611164614a16565b5b6020026020010151612198565b9050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611204576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fb90614f25565b60405180910390fd5b600061122a858b868151811061121d5761121c614a16565b5b602002602001015161220d565b905088518410156112ab577fcf0d25ae0ad65eb42e1958e0259f500e3102529a322cdea3090921be6ee9bec785828c878151811061126b5761126a614a16565b5b60200260200101518c888151811061128657611285614a16565b5b602002602001015160405161129e9493929190614f45565b60405180910390a1611305565b7fcf0d25ae0ad65eb42e1958e0259f500e3102529a322cdea3090921be6ee9bec785828c87815181106112e1576112e0614a16565b5b60200260200101516127116040516112fc9493929190614fcf565b60405180910390a15b505050808061131390614b8e565b91505061107a565b50600192505050949350505050565b61133b6113356120c9565b8261227e565b61137a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137190615086565b60405180910390fd5b61138583838361235c565b505050565b6000806000838152602001908152602001600020600101549050919050565b6113b382826125b8565b6113d88160016000858152602001908152602001600020611fb390919063ffffffff16565b505050565b60006113e88361166d565b8210611429576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142090615118565b60405180910390fd5b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b61148c82826125e1565b6114b1816001600085815260200190815260200160002061266490919063ffffffff16565b505050565b6114ca6000801b6114c56120c9565b6117d1565b611509576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150090615184565b60405180910390fd5b611511612694565b565b61152e83838360405180602001604052806000815250611c27565b505050565b600061153d610c53565b821061157e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157590615216565b60405180910390fd5b600a828154811061159257611591614a16565b5b90600052602060002001549050919050565b6000600c60009054906101000a900460ff16905090565b6000806004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611664576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165b906152a8565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d59061533a565b60405180910390fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60146020528060005260406000206000915054906101000a900460ff1681565b6117596000801b6117546120c9565b6117d1565b611798576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178f90615184565b60405180910390fd5b6117a0612736565b565b60006117c982600160008681526020019081526020016000206127d990919063ffffffff16565b905092915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61184f6000801b61184a6120c9565b6117d1565b61185857600080fd5b60008190508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f80b23bd1312ff525cc30f881ac90cbcc87b462298f6d62b2c173116bdda40ff87fdf6c5da332443b6359599d7c22fd038dbb896eaa02019b406fc6ff7d70410a6f186040518263ffffffff1660e01b81526004016118d89190615369565b60206040518083038186803b1580156118f057600080fd5b505afa158015611904573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119289190615399565b611967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195e90615412565b60405180910390fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6060600380546119bb906147c2565b80601f01602080910402602001604051908101604052809291908181526020018280546119e7906147c2565b8015611a345780601f10611a0957610100808354040283529160200191611a34565b820191906000526020600020905b815481529060010190602001808311611a1757829003601f168201915b5050505050905090565b6000801b81565b611a4d6120c9565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611abb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ab29061547e565b60405180910390fd5b8060076000611ac86120c9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611b756120c9565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611bba9190613dd8565b60405180910390a35050565b611bda6000801b611bd56120c9565b6117d1565b611be357600080fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611c38611c326120c9565b8361227e565b611c77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6e90615086565b60405180910390fd5b611c83848484846127f3565b50505050565b6060611ca7601260008481526020019081526020016000205461284f565b604051602001611cb7919061554c565b6040516020818303038152906040529050919050565b6000611cea600160008481526020019081526020016000206129b0565b9050919050565b611cfb82826129c5565b611d20816001600085815260200190815260200160002061266490919063ffffffff16565b505050565b60126020528060005260406000206000915090505481565b6060604051806080016040528060488152602001615f7060489139905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611e1d600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683610b1f565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3eb166883836040518363ffffffff1660e01b8152600401611e7a92919061476a565b600060405180830381600087803b158015611e9457600080fd5b505af1158015611ea8573d6000803e3d6000fd5b505050505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f0a57600080fd5b6000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1647604051611f529061559f565b60006040518083038185875af1925050503d8060008114611f8f576040519150601f19603f3d011682016040523d82523d6000602084013e611f94565b606091505b5050905080611fa257600080fd5b50565b611faf82826129ee565b5050565b6000611fdb836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612ace565b905092915050565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612056575061205582612b3e565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816006600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16612144836115bb565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081600001549050919050565b6000806000806121a785612c20565b809350819450829550505050600186848484604051600081526020016040526040516121d694939291906155d0565b6020604051602081039080840390855afa1580156121f8573d6000803e3d6000fd5b50505060206040510351935050505092915050565b60008061221a600d61218a565b90506122268482612c63565b612230600d612e31565b82601260008381526020019081526020016000208190555060016013600085815260200190815260200160002060006101000a81548160ff0219169083151502179055508091505092915050565b60006122898261205d565b6122c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122bf90615687565b60405180910390fd5b60006122d3836115bb565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061234257508373ffffffffffffffffffffffffffffffffffffffff1661232a84610a9a565b73ffffffffffffffffffffffffffffffffffffffff16145b8061235357506123528185611d5d565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661237c826115bb565b73ffffffffffffffffffffffffffffffffffffffff16146123d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123c990615719565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612442576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612439906157ab565b60405180910390fd5b61244d838383612e47565b6124586000826120d1565b6001600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124a89190614ccd565b925050819055506001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124ff9190614c0b565b92505081905550816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6125c18261138a565b6125d2816125cd6120c9565b613027565b6125dc83836129ee565b505050565b6125e96120c9565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612656576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161264d9061583d565b60405180910390fd5b61266082826130c4565b5050565b600061268c836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6131a5565b905092915050565b61269c6115a4565b6126db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126d2906158a9565b60405180910390fd5b6000600c60006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61271f6120c9565b60405161272c9190613f92565b60405180910390a1565b61273e6115a4565b1561277e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161277590615915565b60405180910390fd5b6001600c60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586127c26120c9565b6040516127cf9190613f92565b60405180910390a1565b60006127e883600001836132b1565b60001c905092915050565b6127fe84848461235c565b61280a84848484613325565b612849576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612840906159a7565b60405180910390fd5b50505050565b60606000821415612897576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506129ab565b600082905060005b600082146128c95780806128b290614b8e565b915050600a826128c291906159f6565b915061289f565b60008167ffffffffffffffff8111156128e5576128e46140af565b5b6040519080825280601f01601f1916602001820160405280156129175781602001600182028036833780820191505090505b5090505b600085146129a4576001826129309190614ccd565b9150600a8561293f9190615a27565b603061294b9190614c0b565b60f81b81838151811061296157612960614a16565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561299d91906159f6565b945061291b565b8093505050505b919050565b60006129be826000016134bc565b9050919050565b6129ce8261138a565b6129df816129da6120c9565b613027565b6129e983836130c4565b505050565b6129f882826117d1565b612aca57600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612a6f6120c9565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000612ada83836134cd565b612b33578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612b38565b600090505b92915050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612c0957507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612c195750612c18826134f0565b5b9050919050565b60008060006041845114612c3357600080fd5b60008060006020870151925060408701519150606087015160001a90508083839550955095505050509193909250565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612cd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cca90615aa4565b60405180910390fd5b612cdc8161205d565b15612d1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d1390615b10565b60405180910390fd5b612d2860008383612e47565b6001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612d789190614c0b565b92505081905550816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b6001816000016000828254019250508190555050565b612e5283838361356a565b600073ffffffffffffffffffffffffffffffffffffffff16600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612ee4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612edb90615b7c565b60405180910390fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bed4e457826040518263ffffffff1660e01b8152600401612f3f9190614028565b60206040518083038186803b158015612f5757600080fd5b505afa158015612f6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f8f9190615399565b1561302257600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166380b23bd1826040518263ffffffff1660e01b8152600401612fef9190614028565b600060405180830381600087803b15801561300957600080fd5b505af115801561301d573d6000803e3d6000fd5b505050505b505050565b61303182826117d1565b6130c0576130568173ffffffffffffffffffffffffffffffffffffffff16601461357a565b6130648360001c602061357a565b604051602001613075929190615c34565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130b79190613f02565b60405180910390fd5b5050565b6130ce82826117d1565b156131a157600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506131466120c9565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b600080836001016000848152602001908152602001600020549050600081146132a55760006001826131d79190614ccd565b90506000600186600001805490506131ef9190614ccd565b9050600086600001828154811061320957613208614a16565b5b906000526020600020015490508087600001848154811061322d5761322c614a16565b5b906000526020600020018190555083876001016000838152602001908152602001600020819055508660000180548061326957613268615c6e565b5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506132ab565b60009150505b92915050565b6000818360000180549050116132fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132f390615d0f565b60405180910390fd5b82600001828154811061331257613311614a16565b5b9060005260206000200154905092915050565b60006133468473ffffffffffffffffffffffffffffffffffffffff166137b6565b156134af578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261336f6120c9565b8786866040518563ffffffff1660e01b81526004016133919493929190615d84565b602060405180830381600087803b1580156133ab57600080fd5b505af19250505080156133dc57506040513d601f19601f820116820180604052508101906133d99190615de5565b60015b61345f573d806000811461340c576040519150601f19603f3d011682016040523d82523d6000602084013e613411565b606091505b50600081511415613457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161344e906159a7565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506134b4565b600190505b949350505050565b600081600001805490509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806135635750613562826137c9565b5b9050919050565b613575838383613843565b505050565b60606000600283600261358d9190614d01565b6135979190614c0b565b67ffffffffffffffff8111156135b0576135af6140af565b5b6040519080825280601f01601f1916602001820160405280156135e25781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061361a57613619614a16565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061367e5761367d614a16565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026136be9190614d01565b6136c89190614c0b565b90505b6001811115613768577f3031323334353637383961626364656600000000000000000000000000000000600f86166010811061370a57613709614a16565b5b1a60f81b82828151811061372157613720614a16565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061376190615e12565b90506136cb565b50600084146137ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137a390615e88565b60405180910390fd5b8091505092915050565b600080823b905060008111915050919050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061383c575061383b8261389b565b5b9050919050565b61384e838383613905565b6138566115a4565b15613896576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161388d90615f1a565b60405180910390fd5b505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b613910838383613a19565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156139535761394e81613a1e565b613992565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614613991576139908382613a67565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156139d5576139d081613bd4565b613a14565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613a1357613a128282613ca5565b5b5b505050565b505050565b600a80549050600b600083815260200190815260200160002081905550600a81908060018154018082558091505060019003906000526020600020016000909190919091505550565b60006001613a748461166d565b613a7e9190614ccd565b9050600060096000848152602001908152602001600020549050818114613b63576000600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816009600083815260200190815260200160002081905550505b6009600084815260200190815260200160002060009055600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b60006001600a80549050613be89190614ccd565b90506000600b60008481526020019081526020016000205490506000600a8381548110613c1857613c17614a16565b5b9060005260206000200154905080600a8381548110613c3a57613c39614a16565b5b906000526020600020018190555081600b600083815260200190815260200160002081905550600b600085815260200190815260200160002060009055600a805480613c8957613c88615c6e565b5b6001900381819060005260206000200160009055905550505050565b6000613cb08361166d565b905081600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806009600084815260200190815260200160002081905550505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613d6d81613d38565b8114613d7857600080fd5b50565b600081359050613d8a81613d64565b92915050565b600060208284031215613da657613da5613d2e565b5b6000613db484828501613d7b565b91505092915050565b60008115159050919050565b613dd281613dbd565b82525050565b6000602082019050613ded6000830184613dc9565b92915050565b6000819050919050565b613e0681613df3565b8114613e1157600080fd5b50565b600081359050613e2381613dfd565b92915050565b60008060408385031215613e4057613e3f613d2e565b5b6000613e4e85828601613e14565b9250506020613e5f85828601613e14565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613ea3578082015181840152602081019050613e88565b83811115613eb2576000848401525b50505050565b6000601f19601f8301169050919050565b6000613ed482613e69565b613ede8185613e74565b9350613eee818560208601613e85565b613ef781613eb8565b840191505092915050565b60006020820190508181036000830152613f1c8184613ec9565b905092915050565b600060208284031215613f3a57613f39613d2e565b5b6000613f4884828501613e14565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613f7c82613f51565b9050919050565b613f8c81613f71565b82525050565b6000602082019050613fa76000830184613f83565b92915050565b613fb681613f71565b8114613fc157600080fd5b50565b600081359050613fd381613fad565b92915050565b60008060408385031215613ff057613fef613d2e565b5b6000613ffe85828601613fc4565b925050602061400f85828601613e14565b9150509250929050565b61402281613df3565b82525050565b600060208201905061403d6000830184614019565b92915050565b600061ffff82169050919050565b61405a81614043565b811461406557600080fd5b50565b60008135905061407781614051565b92915050565b60006020828403121561409357614092613d2e565b5b60006140a184828501614068565b91505092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6140e782613eb8565b810181811067ffffffffffffffff82111715614106576141056140af565b5b80604052505050565b6000614119613d24565b905061412582826140de565b919050565b600067ffffffffffffffff821115614145576141446140af565b5b602082029050602081019050919050565b600080fd5b600080fd5b600067ffffffffffffffff82111561417b5761417a6140af565b5b61418482613eb8565b9050602081019050919050565b82818337600083830152505050565b60006141b36141ae84614160565b61410f565b9050828152602081018484840111156141cf576141ce61415b565b5b6141da848285614191565b509392505050565b600082601f8301126141f7576141f66140aa565b5b81356142078482602086016141a0565b91505092915050565b600061422361421e8461412a565b61410f565b9050808382526020820190506020840283018581111561424657614245614156565b5b835b8181101561428d57803567ffffffffffffffff81111561426b5761426a6140aa565b5b80860161427889826141e2565b85526020850194505050602081019050614248565b5050509392505050565b600082601f8301126142ac576142ab6140aa565b5b81356142bc848260208601614210565b91505092915050565b600067ffffffffffffffff8211156142e0576142df6140af565b5b602082029050602081019050919050565b60006143046142ff846142c5565b61410f565b9050808382526020820190506020840283018581111561432757614326614156565b5b835b81811015614350578061433c8882613e14565b845260208401935050602081019050614329565b5050509392505050565b600082601f83011261436f5761436e6140aa565b5b813561437f8482602086016142f1565b91505092915050565b600080600080608085870312156143a2576143a1613d2e565b5b600085013567ffffffffffffffff8111156143c0576143bf613d33565b5b6143cc87828801614297565b945050602085013567ffffffffffffffff8111156143ed576143ec613d33565b5b6143f98782880161435a565b935050604085013567ffffffffffffffff81111561441a57614419613d33565b5b6144268782880161435a565b925050606061443787828801613fc4565b91505092959194509250565b60008060006060848603121561445c5761445b613d2e565b5b600061446a86828701613fc4565b935050602061447b86828701613fc4565b925050604061448c86828701613e14565b9150509250925092565b6000819050919050565b6144a981614496565b81146144b457600080fd5b50565b6000813590506144c6816144a0565b92915050565b6000602082840312156144e2576144e1613d2e565b5b60006144f0848285016144b7565b91505092915050565b61450281614496565b82525050565b600060208201905061451d60008301846144f9565b92915050565b6000806040838503121561453a57614539613d2e565b5b6000614548858286016144b7565b925050602061455985828601613fc4565b9150509250929050565b60006020828403121561457957614578613d2e565b5b600061458784828501613fc4565b91505092915050565b600080604083850312156145a7576145a6613d2e565b5b60006145b5858286016144b7565b92505060206145c685828601613e14565b9150509250929050565b6145d981613dbd565b81146145e457600080fd5b50565b6000813590506145f6816145d0565b92915050565b6000806040838503121561461357614612613d2e565b5b600061462185828601613fc4565b9250506020614632858286016145e7565b9150509250929050565b600061464782613f51565b9050919050565b6146578161463c565b811461466257600080fd5b50565b6000813590506146748161464e565b92915050565b6000602082840312156146905761468f613d2e565b5b600061469e84828501614665565b91505092915050565b600080600080608085870312156146c1576146c0613d2e565b5b60006146cf87828801613fc4565b94505060206146e087828801613fc4565b93505060406146f187828801613e14565b925050606085013567ffffffffffffffff81111561471257614711613d33565b5b61471e878288016141e2565b91505092959194509250565b6000806040838503121561474157614740613d2e565b5b600061474f85828601613fc4565b925050602061476085828601613fc4565b9150509250929050565b600060408201905061477f6000830185614019565b61478c6020830184614019565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806147da57607f821691505b602082108114156147ee576147ed614793565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000614850602c83613e74565b915061485b826147f4565b604082019050919050565b6000602082019050818103600083015261487f81614843565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006148e2602183613e74565b91506148ed82614886565b604082019050919050565b60006020820190508181036000830152614911816148d5565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b6000614974603883613e74565b915061497f82614918565b604082019050919050565b600060208201905081810360008301526149a381614967565b9050919050565b7f4430000000000000000000000000000000000000000000000000000000000000600082015250565b60006149e0600283613e74565b91506149eb826149aa565b602082019050919050565b60006020820190508181036000830152614a0f816149d3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050614a5481613fad565b92915050565b600060208284031215614a7057614a6f613d2e565b5b6000614a7e84828501614a45565b91505092915050565b7f4531000000000000000000000000000000000000000000000000000000000000600082015250565b6000614abd600283613e74565b9150614ac882614a87565b602082019050919050565b60006020820190508181036000830152614aec81614ab0565b9050919050565b7f4532000000000000000000000000000000000000000000000000000000000000600082015250565b6000614b29600283613e74565b9150614b3482614af3565b602082019050919050565b60006020820190508181036000830152614b5881614b1c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614b9982613df3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614bcc57614bcb614b5f565b5b600182019050919050565b6000614be282614043565b9150614bed83614043565b925082821015614c0057614bff614b5f565b5b828203905092915050565b6000614c1682613df3565b9150614c2183613df3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614c5657614c55614b5f565b5b828201905092915050565b7f4d41580000000000000000000000000000000000000000000000000000000000600082015250565b6000614c97600383613e74565b9150614ca282614c61565b602082019050919050565b60006020820190508181036000830152614cc681614c8a565b9050919050565b6000614cd882613df3565b9150614ce383613df3565b925082821015614cf657614cf5614b5f565b5b828203905092915050565b6000614d0c82613df3565b9150614d1783613df3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614d5057614d4f614b5f565b5b828202905092915050565b7f2400000000000000000000000000000000000000000000000000000000000000600082015250565b6000614d91600183613e74565b9150614d9c82614d5b565b602082019050919050565b60006020820190508181036000830152614dc081614d84565b9050919050565b7f4944000000000000000000000000000000000000000000000000000000000000600082015250565b6000614dfd600283613e74565b9150614e0882614dc7565b602082019050919050565b60006020820190508181036000830152614e2c81614df0565b9050919050565b60008160601b9050919050565b6000614e4b82614e33565b9050919050565b6000614e5d82614e40565b9050919050565b614e75614e7082613f71565b614e52565b82525050565b6000819050919050565b614e96614e9182613df3565b614e7b565b82525050565b6000614ea88286614e64565b601482019150614eb88285614e85565b602082019150614ec88284614e64565b601482019150819050949350505050565b7f5349474e00000000000000000000000000000000000000000000000000000000600082015250565b6000614f0f600483613e74565b9150614f1a82614ed9565b602082019050919050565b60006020820190508181036000830152614f3e81614f02565b9050919050565b6000608082019050614f5a6000830187613f83565b614f676020830186614019565b614f746040830185614019565b614f816060830184614019565b95945050505050565b6000819050919050565b6000819050919050565b6000614fb9614fb4614faf84614f8a565b614f94565b613df3565b9050919050565b614fc981614f9e565b82525050565b6000608082019050614fe46000830187613f83565b614ff16020830186614019565b614ffe6040830185614019565b61500b6060830184614fc0565b95945050505050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b6000615070603183613e74565b915061507b82615014565b604082019050919050565b6000602082019050818103600083015261509f81615063565b9050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b6000615102602b83613e74565b915061510d826150a6565b604082019050919050565b60006020820190508181036000830152615131816150f5565b9050919050565b7f494e56414c49445f524f4c450000000000000000000000000000000000000000600082015250565b600061516e600c83613e74565b915061517982615138565b602082019050919050565b6000602082019050818103600083015261519d81615161565b9050919050565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b6000615200602c83613e74565b915061520b826151a4565b604082019050919050565b6000602082019050818103600083015261522f816151f3565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b6000615292602983613e74565b915061529d82615236565b604082019050919050565b600060208201905081810360008301526152c181615285565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000615324602a83613e74565b915061532f826152c8565b604082019050919050565b6000602082019050818103600083015261535381615317565b9050919050565b61536381613d38565b82525050565b600060208201905061537e600083018461535a565b92915050565b600081519050615393816145d0565b92915050565b6000602082840312156153af576153ae613d2e565b5b60006153bd84828501615384565b91505092915050565b7f4531300000000000000000000000000000000000000000000000000000000000600082015250565b60006153fc600383613e74565b9150615407826153c6565b602082019050919050565b6000602082019050818103600083015261542b816153ef565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000615468601983613e74565b915061547382615432565b602082019050919050565b600060208201905081810360008301526154978161545b565b9050919050565b600081905092915050565b7f697066733a2f2f516d615834484b33366d5932656778504a757a746e5a6a785060008201527f5647346a4d4d5a394138616d597a58797331726f712f00000000000000000000602082015250565b600061550560368361549e565b9150615510826154a9565b603682019050919050565b600061552682613e69565b615530818561549e565b9350615540818560208601613e85565b80840191505092915050565b6000615557826154f8565b9150615563828461551b565b915081905092915050565b600081905092915050565b50565b600061558960008361556e565b915061559482615579565b600082019050919050565b60006155aa8261557c565b9150819050919050565b600060ff82169050919050565b6155ca816155b4565b82525050565b60006080820190506155e560008301876144f9565b6155f260208301866155c1565b6155ff60408301856144f9565b61560c60608301846144f9565b95945050505050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000615671602c83613e74565b915061567c82615615565b604082019050919050565b600060208201905081810360008301526156a081615664565b9050919050565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b6000615703602983613e74565b915061570e826156a7565b604082019050919050565b60006020820190508181036000830152615732816156f6565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000615795602483613e74565b91506157a082615739565b604082019050919050565b600060208201905081810360008301526157c481615788565b9050919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000615827602f83613e74565b9150615832826157cb565b604082019050919050565b600060208201905081810360008301526158568161581a565b9050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000615893601483613e74565b915061589e8261585d565b602082019050919050565b600060208201905081810360008301526158c281615886565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b60006158ff601083613e74565b915061590a826158c9565b602082019050919050565b6000602082019050818103600083015261592e816158f2565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000615991603283613e74565b915061599c82615935565b604082019050919050565b600060208201905081810360008301526159c081615984565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000615a0182613df3565b9150615a0c83613df3565b925082615a1c57615a1b6159c7565b5b828204905092915050565b6000615a3282613df3565b9150615a3d83613df3565b925082615a4d57615a4c6159c7565b5b828206905092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000615a8e602083613e74565b9150615a9982615a58565b602082019050919050565b60006020820190508181036000830152615abd81615a81565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000615afa601c83613e74565b9150615b0582615ac4565b602082019050919050565b60006020820190508181036000830152615b2981615aed565b9050919050565b7f4155435f41444452000000000000000000000000000000000000000000000000600082015250565b6000615b66600883613e74565b9150615b7182615b30565b602082019050919050565b60006020820190508181036000830152615b9581615b59565b9050919050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000615bd260178361549e565b9150615bdd82615b9c565b601782019050919050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000615c1e60118361549e565b9150615c2982615be8565b601182019050919050565b6000615c3f82615bc5565b9150615c4b828561551b565b9150615c5682615c11565b9150615c62828461551b565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60008201527f6473000000000000000000000000000000000000000000000000000000000000602082015250565b6000615cf9602283613e74565b9150615d0482615c9d565b604082019050919050565b60006020820190508181036000830152615d2881615cec565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000615d5682615d2f565b615d608185615d3a565b9350615d70818560208601613e85565b615d7981613eb8565b840191505092915050565b6000608082019050615d996000830187613f83565b615da66020830186613f83565b615db36040830185614019565b8181036060830152615dc58184615d4b565b905095945050505050565b600081519050615ddf81613d64565b92915050565b600060208284031215615dfb57615dfa613d2e565b5b6000615e0984828501615dd0565b91505092915050565b6000615e1d82613df3565b91506000821415615e3157615e30614b5f565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000615e72602083613e74565b9150615e7d82615e3c565b602082019050919050565b60006020820190508181036000830152615ea181615e65565b9050919050565b7f4552433732315061757361626c653a20746f6b656e207472616e73666572207760008201527f68696c6520706175736564000000000000000000000000000000000000000000602082015250565b6000615f04602b83613e74565b9150615f0f82615ea8565b604082019050919050565b60006020820190508181036000830152615f3381615ef7565b905091905056fe697066733a2f2f516d537656484c544c5877366371467347354131593546633364597346327356637574396d45415578505474486f68747470733a2f2f6d61727367656e657369732d776562332e6865726f6b756170702e636f6d2f6d657461646174612f4d61727347656e657369734d61727469616e732e6a736f6ea2646970667358221220df6399788f074b87a38ebcba604b0cc9c5203c1d8ad529b9372de079206a9f6f64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000010235f2d820bdac032fdeea25f9a57eb0890c3e0000000000000000000000000e6ddbea6749cc793ba12ac22bca03c3f1fcf3a80
-----Decoded View---------------
Arg [0] : _walletAddress (address): 0x10235f2d820bdaC032fDeEA25f9A57EB0890c3E0
Arg [1] : _marsCoreAddress (address): 0xe6DDbEa6749Cc793bA12Ac22BcA03c3f1Fcf3A80
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000010235f2d820bdac032fdeea25f9a57eb0890c3e0
Arg [1] : 000000000000000000000000e6ddbea6749cc793ba12ac22bca03c3f1fcf3a80
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.