More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Restore | 11817708 | 1422 days ago | IN | 151 ETH | 0.10645707 |
Latest 5 internal transactions
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
11817708 | 1422 days ago | 0.49999999 ETH | ||||
11817708 | 1422 days ago | 0.5 ETH | ||||
11817708 | 1422 days ago | 150 ETH | ||||
11815865 | 1422 days ago | Contract Creation | 0 ETH | |||
11815865 | 1422 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
Restorer
Compiler Version
v0.7.3+commit.9bfce1f6
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.6.0 <0.8.0; import "./ArtSteward.sol"; import "./ERC721.sol"; // import "hardhat/console.sol"; /* Symbolic Restoration. - On deploy, creates new canvas (ERC721) + New Steward. - On deploy, takes snapshot of damanged v1. - New Steward is blocked from transferral unless damaged v1 has been joined into the new canvas. - To Restore(): - New TAIAOS can only be bought if Restoration contract is the owner of old v1. - Thus: Buys old v1 at snapshot price and blocks it from being sold with the Restoration contract (effectively forever). - Snapshot owner then buys restored v1 with a deposit of 0.5 eth. - The restoration contract thus irrevocably binds the old artwork into the new one, effectively restoring an artwork that's always on sale. */ interface IOldSteward { // old steward has the buy function with only one parameter function buy(uint256 _newPrice) external payable; function price() external view returns (uint256); // mimics fetching the variable } contract Restorer { // mainnet // oldv1 address: 0x6d7C26F2E77d0cCc200464C8b2040c0B840b28a2 // oldv1Steward address: 0x74E6Ab057f8a9Fd9355398a17579Cd4c90aB2B66 ERC721 oldV1; IOldSteward oldArtSteward; address public snapshotOwner; uint256 public snapshotPrice; uint256 public snapshotBlockNumber; // block checkpoint for transition // artist: 0x0CaCC6104D8Cd9d7b2850b4f35c65C1eCDEECe03; address payable public artist; ERC721 public newV1; ArtSteward public newArtSteward; bool public restored = false; constructor(address _oldV1Address, address _oldStewardAddress, address payable _artist) { oldV1 = ERC721(_oldV1Address); oldArtSteward = IOldSteward(_oldStewardAddress); artist = _artist; snapshotPrice = oldArtSteward.price(); snapshotOwner = oldV1.ownerOf(42); snapshotBlockNumber = block.number; // for record keeping // deploy new canvas newV1 = new ERC721(); // deploy new steward // artist, artwork, snapshotPrice, snapshotOwner, oldV1Address newArtSteward = new ArtSteward(artist, address(newV1), snapshotPrice, snapshotOwner, address(oldV1)); } function restore() public payable virtual { require(msg.sender == snapshotOwner, 'Only snapshot owner may restore artwork'); // 0,00000000001 ETH for old steward deposit. uint256 valueToSend = snapshotPrice + 10000000 wei; // no need to safemath require(msg.value >= (valueToSend + 0.5 ether), 'Not enough ETH for restoration'); require(restored == false, "Can only restore once."); // buy oldV1 // this will block it, effectively forever, due to this contract not being able to receive ETH from a transfer. // Damanged v1 has an open deposit function, so it can effectively be locked in perpetuity. oldArtSteward.buy{value: valueToSend}(100 wei); // NOTE: will last 2 million years with 10000000 wei deposit at 100 wei price. newArtSteward.restore{value: 0.5 ether}(); //send back any excess ETH if(msg.value > (valueToSend + 0.5 ether)) { msg.sender.transfer(msg.value - valueToSend - 0.5 ether); } restored = true; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./interfaces/IERC721.sol"; import "./utils/SafeMath.sol"; // Fixed v1 update (January 2021 update): // - Bumped to 0.7.x sol. // - Changed 'now' to 'block.timestamp'. // - Added in sections related to Restoration. // - > restore() function, // - > extracted buy() to enable once-off transfer // - > extracted foreclosure + transferartwork to enable once-off transfer // What changed for V2 (June 2020 update): // - Medium Severity Fixes: // - Added a check on buy to prevent front-running. Needs to give currentPrice when buying. // - Removed ability for someone to block buying through revert on ETH send. Funds get sent to a pull location. // - Added patron check on depositWei. Since anyone can send, it can be front-run, stealing a deposit by buying before deposit clears. // - Other Minor Changes: // - Added past foreclosureTime() if it happened in the past. // - Moved patron modifier checks to AFTER patronage. Thus, not necessary to have steward state anymore. // - Removed steward state. Only check on price now. If price = zero = foreclosed. // - Removed paid mapping. Wasn't used. // - Moved constructor to a function in case this is used with upgradeable contracts. // - Changed currentCollected into a view function rather than tracking variable. This fixed a bug where CC would keep growing in between ownerships. // - Kept the numerator/denominator code (for reference), but removed to save gas costs for 100% patronage rate. // - Changes for UI: // - Need to have additional current price when buying. // - foreclosureTime() will now backdate if past foreclose time. contract ArtSteward { /* This smart contract collects patronage from current owner through a Harberger tax model and takes stewardship of the artwork if the patron can't pay anymore. Harberger Tax (COST): - Artwork is always on sale. - You have to have a price set. - Tax (Patronage) is paid to maintain ownership. - Steward maints control over ERC721. */ using SafeMath for uint256; uint256 public price; //in wei IERC721 public art; // ERC721 NFT. uint256 public totalCollected; // all patronage ever collected /* In the event that a foreclosure happens AFTER it should have been foreclosed already, this variable is backdated to when it should've occurred. Thus: timeHeld is accurate to actual deposit. */ uint256 public timeLastCollected; // timestamp when last collection occurred uint256 public deposit; // funds for paying patronage address payable public artist; // beneficiary uint256 public artistFund; // what artist has earned and can withdraw /* If for whatever reason the transfer fails when being sold, it's added to a pullFunds such that previous owner can withdraw it. */ mapping (address => uint256) public pullFunds; // storage area in case a sale can't send the funds towards previous owner. mapping (address => bool) public patrons; // list of whom have owned it mapping (address => uint256) public timeHeld; // time held by particular patron uint256 public timeAcquired; // when it is newly bought/sold // percentage patronage rate. eg 5% or 100% // granular to an additionial 10 zeroes. uint256 patronageNumerator; uint256 patronageDenominator; // mainnet address public restorer; uint256 public snapshotV1Price; address public snapshotV1Owner; bool public restored = false; IERC721 public oldV1; // for checking if allowed to transfer constructor(address payable _artist, address _artwork, uint256 _snapshotV1Price, address _snapshotV1Owner, address _oldV1Address) payable { patronageNumerator = 50000000000; // 5% patronageDenominator = 1000000000000; art = IERC721(_artwork); art.setup(); artist = _artist; // Restoration-specific setup. oldV1 = IERC721(_oldV1Address); restorer = msg.sender; // this must be deployed by the Restoration contract. snapshotV1Price = _snapshotV1Price; snapshotV1Owner = _snapshotV1Owner; //sets up initial parameters for foreclosure _initForecloseIfNecessary(); } function restore() public payable { require(restored == false, "RESTORE: Artwork already restored"); require(msg.sender == restorer, "RESTORE: Can only be restored by restoration contract"); // newPrice, oldPrice, owner _buy(snapshotV1Price, 0, snapshotV1Owner); restored = true; } event LogBuy(address indexed owner, uint256 indexed price); event LogPriceChange(uint256 indexed newPrice); event LogForeclosure(address indexed prevOwner); event LogCollection(uint256 indexed collected); modifier onlyPatron() { require(msg.sender == art.ownerOf(42), "Not patron"); _; } modifier collectPatronage() { _collectPatronage(); _; } /* public view functions */ /* used internally in external actions */ // how much is owed from last collection to block.timestamp. function patronageOwed() public view returns (uint256 patronageDue) { return price.mul(block.timestamp.sub(timeLastCollected)).mul(patronageNumerator).div(patronageDenominator).div(365 days); // use in 100% patronage rate //return price.mul(block.timestamp.sub(timeLastCollected)).div(365 days); } /* not used internally in external actions */ function patronageOwedRange(uint256 _time) public view returns (uint256 patronageDue) { return price.mul(_time).mul(patronageNumerator).div(patronageDenominator).div(365 days); // used in 100% patronage rate // return price.mul(_time).div(365 days); } function currentCollected() public view returns (uint256 patronageDue) { if(timeLastCollected > timeAcquired) { return patronageOwedRange(timeLastCollected.sub(timeAcquired)); } else { return 0; } } function patronageOwedWithTimestamp() public view returns (uint256 patronageDue, uint256 timestamp) { return (patronageOwed(), block.timestamp); } function foreclosed() public view returns (bool) { // returns whether it is in foreclosed state or not // depending on whether deposit covers patronage due // useful helper function when price should be zero, but contract doesn't reflect it yet. uint256 collection = patronageOwed(); if(collection >= deposit) { return true; } else { return false; } } // same function as above, basically function depositAbleToWithdraw() public view returns (uint256) { uint256 collection = patronageOwed(); if(collection >= deposit) { return 0; } else { return deposit.sub(collection); } } /* block.timestamp + deposit/patronage per second block.timestamp + depositAbleToWithdraw/(price*nume/denom/365). */ function foreclosureTime() public view returns (uint256) { // patronage per second uint256 pps = price.mul(patronageNumerator).div(patronageDenominator).div(365 days); uint256 daw = depositAbleToWithdraw(); if(daw > 0) { return block.timestamp + depositAbleToWithdraw().div(pps); } else if (pps > 0) { // it is still active, but in foreclosure state // it is block.timestamp or was in the past uint256 collection = patronageOwed(); return timeLastCollected.add((block.timestamp.sub(timeLastCollected)).mul(deposit).div(collection)); } else { // not active and actively foreclosed (price is zero) return timeLastCollected; // it has been foreclosed or in foreclosure. } } /* actions */ // determine patronage to pay function _collectPatronage() public { if (price != 0) { // price > 0 == active owned state uint256 collection = patronageOwed(); if (collection >= deposit) { // foreclosure happened in the past // up to when was it actually paid for? // TLC + (time_elapsed)*deposit/collection timeLastCollected = timeLastCollected.add((block.timestamp.sub(timeLastCollected)).mul(deposit).div(collection)); collection = deposit; // take what's left. } else { timeLastCollected = block.timestamp; } // normal collection deposit = deposit.sub(collection); totalCollected = totalCollected.add(collection); artistFund = artistFund.add(collection); emit LogCollection(collection); _forecloseIfNecessary(); } } function buy(uint256 _newPrice, uint256 _currentPrice) public payable collectPatronage { _buy(_newPrice, _currentPrice, msg.sender); } // extracted out for initial setup function _buy(uint256 _newPrice, uint256 _currentPrice, address _newOwner) internal { /* this is protection against a front-run attack. the person will only buy the artwork if it is what they agreed to. thus: someone can't buy it from under them and change the price, eating into their deposit. */ require(price == _currentPrice, "Current Price incorrect"); require(_newPrice > 0, "Price is zero"); require(msg.value > price, "Not enough"); // >, coz need to have at least something for deposit address currentOwner = art.ownerOf(42); uint256 totalToPayBack = price.add(deposit); if(totalToPayBack > 0) { // this won't execute if steward owns it. price = 0. deposit = 0. // pay previous owner their price + deposit back. address payable payableCurrentOwner = address(uint160(currentOwner)); bool transferSuccess = payableCurrentOwner.send(totalToPayBack); // if the send fails, keep the funds separate for the owner if(!transferSuccess) { pullFunds[currentOwner] = pullFunds[currentOwner].add(totalToPayBack); } } // new purchase timeLastCollected = block.timestamp; deposit = msg.value.sub(price); transferArtworkTo(currentOwner, _newOwner, _newPrice); emit LogBuy(_newOwner, _newPrice); } /* Only Patron Actions */ function depositWei() public payable collectPatronage onlyPatron { deposit = deposit.add(msg.value); } function changePrice(uint256 _newPrice) public collectPatronage onlyPatron { require(_newPrice > 0, 'Price is zero'); price = _newPrice; emit LogPriceChange(price); } function withdrawDeposit(uint256 _wei) public collectPatronage onlyPatron { _withdrawDeposit(_wei); } function exit() public collectPatronage onlyPatron { _withdrawDeposit(deposit); } /* Actions that don't affect state of the artwork */ /* Artist Actions */ function withdrawArtistFunds() public { require(msg.sender == artist, "Not artist"); uint256 toSend = artistFund; artistFund = 0; artist.transfer(toSend); } /* Withdrawing Stuck Deposits */ /* To reduce complexity, pull funds are entirely separate from current deposit */ function withdrawPullFunds() public { require(pullFunds[msg.sender] > 0, "No pull funds available."); uint256 toSend = pullFunds[msg.sender]; pullFunds[msg.sender] = 0; msg.sender.transfer(toSend); } /* internal */ function _withdrawDeposit(uint256 _wei) internal { // note: can withdraw whole deposit, which puts it in immediate to be foreclosed state. require(deposit >= _wei, 'Withdrawing too much'); deposit = deposit.sub(_wei); msg.sender.transfer(_wei); // msg.sender == patron _forecloseIfNecessary(); } function _forecloseIfNecessary() internal { if(deposit == 0) { // become steward of artwork (aka foreclose) address currentOwner = art.ownerOf(42); transferArtworkTo(currentOwner, address(this), 0); emit LogForeclosure(currentOwner); } } // doesn't require v1 owner check to set up. function _initForecloseIfNecessary() internal { if(deposit == 0) { // become steward of artwork (aka foreclose) address currentOwner = art.ownerOf(42); _transferArtworkTo(currentOwner, address(this), 0); emit LogForeclosure(currentOwner); } } function transferArtworkTo(address _currentOwner, address _newOwner, uint256 _newPrice) internal { // a symbolic check to ensure that the old V1 is still blocked and owned by the Restorer // (the old V1 is thus a part of the new v1) // if this bond is broken, both artworks will seize require(oldV1.ownerOf(42) == restorer, "RESTORE: Old V1 is not owned by the Restorer"); _transferArtworkTo(_currentOwner, _newOwner, _newPrice); } function _transferArtworkTo(address _currentOwner, address _newOwner, uint256 _newPrice) internal { // note: it would also tabulate time held in stewardship by smart contract timeHeld[_currentOwner] = timeHeld[_currentOwner].add((timeLastCollected.sub(timeAcquired))); art.transferFrom(_currentOwner, _newOwner, 42); price = _newPrice; timeAcquired = block.timestamp; patrons[_newOwner] = true; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./interfaces/IERC721.sol"; import "./interfaces/IERC721Metadata.sol"; import "./interfaces/IERC721Enumerable.sol"; // import "./interfaces/IERC721Receiver.sol"; import "./ERC165.sol"; import "./utils/SafeMath.sol"; import "./utils/Address.sol"; import "./utils/EnumerableSet.sol"; import "./utils/EnumerableMap.sol"; import "./utils/Strings.sol"; // v1 restoration changes (January 2021): // - bump to 0.7.x solidity // - removed _burn. Never used. // - removed approval code. Never used. Still keeping ERC165 interface as a hack to keep compliance with ERC721 interfaces. /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */ contract ERC721 is ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Mapping from holder address to their (enumerable) set of owned tokens mapping (address => EnumerableSet.UintSet) private _holderTokens; // Enumerable mapping from token ids to their owners EnumerableMap.UintToAddressMap private _tokenOwners; // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping (uint256 => string) private _tokenURIs; // Base URI string private _baseURI; /* * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde * * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd */ bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; /* * bytes4(keccak256('name()')) == 0x06fdde03 * bytes4(keccak256('symbol()')) == 0x95d89b41 * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd * * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f */ bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /* * bytes4(keccak256('totalSupply()')) == 0x18160ddd * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59 * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7 * * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63 */ bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; /* TAIAOS v1 vars */ address public steward; bool public init; /* This artwork is a restoration of the existing V1 contract. */ function setup() public override { require(init == false, "Artwork already initialized."); // non-modified setup code _name = "This Artwork Is Always On Sale"; _symbol = "TAIAOS"; steward = msg.sender; _mint(steward, 42); // mint _setTokenURI(42, "https://thisartworkisalwaysonsale.com/metadata"); // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_INTERFACE_ID_ERC721); _registerInterface(_INTERFACE_ID_ERC721_METADATA); _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE); init=true; } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _holderTokens[owner].length(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token"); } /** * @dev See {IERC721Metadata-name}. */ function name() public view override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; // If there is no base URI, return the token URI. if (bytes(_baseURI).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(_baseURI, _tokenURI)); } // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI. return string(abi.encodePacked(_baseURI, tokenId.toString())); } /** * @dev Returns the base URI set via {_setBaseURI}. This will be * automatically added as a prefix in {tokenURI} to each token's URI, or * to the token ID if no specific URI is set for that token ID. */ function baseURI() public view returns (string memory) { return _baseURI; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { return _holderTokens[owner].at(index); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds return _tokenOwners.length(); } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { (uint256 tokenId, ) = _tokenOwners.at(index); return tokenId; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(msg.sender, tokenId), "ERC721: transfer caller is not steward."); _transfer(from, to, tokenId); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view returns (bool) { return _tokenOwners.contains(tokenId); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); // address owner = ownerOf(tokenId); // return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); // MODIFIED: // Only the steward is allowed to transfer return (spender == steward); } /** * @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"); _holderTokens[to].add(tokenId); _tokenOwners.set(tokenId, to); emit Transfer(address(0), to, 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(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); // Clear approvals from the previous owner // _approve(address(0), tokenId); _holderTokens[from].remove(tokenId); _holderTokens[to].add(tokenId); _tokenOwners.set(tokenId, to); emit Transfer(from, to, tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "./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; function setup() external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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.6.2 <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.6.2 <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.6.0 <0.8.0; import "./interfaces/IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165 is IERC165 { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; constructor () internal { // Derived contracts need only register support for their own interfaces, // we register support for ERC165 itself here _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev See {IERC165-supportsInterface}. * * Time complexity O(1), guaranteed to always use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) public view override returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <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.3._ */ 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.3._ */ 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.6.0 <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] = toDeleteIndex + 1; // All indexes are 1-based // 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(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(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(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(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)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Library for managing an enumerable variant of Solidity's * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] * type. * * Maps have the following properties: * * - Entries are added, removed, and checked for existence in constant time * (O(1)). * - Entries are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableMap for EnumerableMap.UintToAddressMap; * * // Declare a set state variable * EnumerableMap.UintToAddressMap private myMap; * } * ``` * * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are * supported. */ library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint256ToAddressMap) are just wrappers around // the underlying Map. // This means that we can only create new EnumerableMaps for types that fit // in bytes32. struct MapEntry { bytes32 _key; bytes32 _value; } struct Map { // Storage of map keys and values MapEntry[] _entries; // Position of the entry defined by a key in the `entries` array, plus 1 // because index 0 means a key is not in the map. mapping (bytes32 => uint256) _indexes; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex == 0) { // Equivalent to !contains(map, key) map._entries.push(MapEntry({ _key: key, _value: value })); // The entry is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value map._indexes[key] = map._entries.length; return true; } else { map._entries[keyIndex - 1]._value = value; return false; } } /** * @dev Removes a key-value pair from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function _remove(Map storage map, bytes32 key) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex != 0) { // Equivalent to contains(map, key) // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one // in the array, and then remove the last entry (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = keyIndex - 1; uint256 lastIndex = map._entries.length - 1; // When the entry 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. MapEntry storage lastEntry = map._entries[lastIndex]; // Move the last entry to the index where the entry to delete is map._entries[toDeleteIndex] = lastEntry; // Update the index for the moved entry map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved entry was stored map._entries.pop(); // Delete the index for the deleted slot delete map._indexes[key]; return true; } else { return false; } } /** * @dev Returns true if the key is in the map. O(1). */ function _contains(Map storage map, bytes32 key) private view returns (bool) { return map._indexes[key] != 0; } /** * @dev Returns the number of key-value pairs in the map. O(1). */ function _length(Map storage map) private view returns (uint256) { return map._entries.length; } /** * @dev Returns the key-value pair stored at position `index` in the map. O(1). * * Note that there are no guarantees on the ordering of entries inside the * array, and it may change when more entries are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { require(map._entries.length > index, "EnumerableMap: index out of bounds"); MapEntry storage entry = map._entries[index]; return (entry._key, entry._value); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function _get(Map storage map, bytes32 key) private view returns (bytes32) { return _get(map, key, "EnumerableMap: nonexistent key"); } /** * @dev Same as {_get}, with a custom error message when `key` is not in the map. */ function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) { uint256 keyIndex = map._indexes[key]; require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) return map._entries[keyIndex - 1]._value; // All indexes are 1-based } // UintToAddressMap struct UintToAddressMap { Map _inner; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { return _set(map._inner, bytes32(key), bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { return _remove(map._inner, bytes32(key)); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { return _contains(map._inner, bytes32(key)); } /** * @dev Returns the number of elements in the map. O(1). */ function length(UintToAddressMap storage map) internal view returns (uint256) { return _length(map._inner); } /** * @dev Returns the element 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(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { (bytes32 key, bytes32 value) = _at(map._inner, index); return (uint256(key), address(uint256(value))); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { return address(uint256(_get(map._inner, bytes32(key)))); } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. */ function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) { return address(uint256(_get(map._inner, bytes32(key), errorMessage))); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev String operations. */ library Strings { /** * @dev Converts a `uint256` to its ASCII `string` 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); uint256 index = digits - 1; temp = value; while (temp != 0) { buffer[index--] = byte(uint8(48 + temp % 10)); temp /= 10; } return string(buffer); } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_oldV1Address","type":"address"},{"internalType":"address","name":"_oldStewardAddress","type":"address"},{"internalType":"address payable","name":"_artist","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"artist","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newArtSteward","outputs":[{"internalType":"contract ArtSteward","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newV1","outputs":[{"internalType":"contract ERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"restore","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"restored","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"snapshotBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"snapshotOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"snapshotPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526000600760146101000a81548160ff02191690831515021790555034801561002b57600080fd5b506040516157753803806157758339818101604052606081101561004e57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a035b1fe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561019d57600080fd5b505afa1580156101b1573d6000803e3d6000fd5b505050506040513d60208110156101c757600080fd5b810190808051906020019092919050505060038190555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e602a6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561025057600080fd5b505afa158015610264573d6000803e3d6000fd5b505050506040513d602081101561027a57600080fd5b8101908080519060200190929190505050600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550436004819055506040516102de906104b7565b604051809103906000f0801580156102fa573d6000803e3d6000fd5b50600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600354600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516103d4906104c4565b808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200195505050505050604051809103906000f08015801561046e573d6000803e3d6000fd5b50600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050506104d1565b61209280610b5e83390190565b612b8580612bf083390190565b61067e806104e06000396000f3fe60806040526004361061007b5760003560e01c80634d7155241161004e5780634d7155241461013957806365ad34c71461017a578063f25e7108146101bb578063fb76f708146101e65761007b565b80630b44d697146100805780632fda332e146100ad578063387c5e51146100b757806343bc1612146100f8575b600080fd5b34801561008c57600080fd5b50610095610211565b60405180821515815260200191505060405180910390f35b6100b5610224565b005b3480156100c357600080fd5b506100cc61057d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561010457600080fd5b5061010d6105a3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014557600080fd5b5061014e6105c9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561018657600080fd5b5061018f6105ef565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c757600080fd5b506101d0610615565b6040518082815260200191505060405180910390f35b3480156101f257600080fd5b506101fb61061b565b6040518082815260200191505060405180910390f35b600760149054906101000a900460ff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806106226027913960400191505060405180910390fd5b6000629896806003540190506706f05b59d3b200008101341015610356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4e6f7420656e6f7567682045544820666f7220726573746f726174696f6e000081525060200191505060405180910390fd5b60001515600760149054906101000a900460ff161515146103df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f43616e206f6e6c7920726573746f7265206f6e63652e0000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d96a094a8260646040518363ffffffff1660e01b8152600401808281526020019150506000604051808303818588803b15801561045557600080fd5b505af1158015610469573d6000803e3d6000fd5b5050505050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632fda332e6706f05b59d3b200006040518263ffffffff1660e01b81526004016000604051808303818588803b1580156104e057600080fd5b505af11580156104f4573d6000803e3d6000fd5b50505050506706f05b59d3b20000810134111561055f573373ffffffffffffffffffffffffffffffffffffffff166108fc6706f05b59d3b20000833403039081150290604051600060405180830381858888f1935050505015801561055d573d6000803e3d6000fd5b505b6001600760146101000a81548160ff02191690831515021790555050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b6003548156fe4f6e6c7920736e617073686f74206f776e6572206d617920726573746f726520617274776f726ba26469706673582212207deab73022ac25514ce46e975ecb9a74cf0a89bc4808a18e651f440c3a0763da64736f6c63430007030033608060405234801561001057600080fd5b506100276301ffc9a760e01b61002c60201b60201c565b610134565b63ffffffff60e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156100c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4552433136353a20696e76616c696420696e746572666163652069640000000081525060200191505060405180910390fd5b6001600080837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b611f4f806101436000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063637eea191161008c57806395d89b411161006657806395d89b411461046c578063ba0bba40146104ef578063c87b56dd146104f9578063e1c7392a146105a0576100ea565b8063637eea191461035d5780636c0360eb1461039157806370a0823114610414576100ea565b806323b872dd116100c857806323b872dd146101f35780632f745c59146102615780634f6ccce7146102c35780636352211e14610305576100ea565b806301ffc9a7146100ef57806306fdde031461015257806318160ddd146101d5575b600080fd5b61013a6004803603602081101561010557600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506105c0565b60405180821515815260200191505060405180910390f35b61015a610627565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561019a57808201518184015260208101905061017f565b50505050905090810190601f1680156101c75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101dd6106c9565b6040518082815260200191505060405180910390f35b61025f6004803603606081101561020957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106da565b005b6102ad6004803603604081101561027757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610749565b6040518082815260200191505060405180910390f35b6102ef600480360360208110156102d957600080fd5b81019080803590602001909291905050506107a4565b6040518082815260200191505060405180910390f35b6103316004803603602081101561031b57600080fd5b81019080803590602001909291905050506107c7565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103656107fe565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610399610824565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d95780820151818401526020810190506103be565b50505050905090810190601f1680156104065780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104566004803603602081101561042a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c6565b6040518082815260200191505060405180910390f35b61047461099b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104b4578082015181840152602081019050610499565b50505050905090810190601f1680156104e15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104f7610a3d565b005b6105256004803603602081101561050f57600080fd5b8101908080359060200190929190505050610c3c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561056557808201518184015260208101905061054a565b50505050905090810190601f1680156105925780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105a8610f25565b60405180821515815260200191505060405180910390f35b6000806000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff169050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106bf5780601f10610694576101008083540402835291602001916106bf565b820191906000526020600020905b8154815290600101906020018083116106a257829003601f168201915b5050505050905090565b60006106d56002610f38565b905090565b6106e43382610f4d565b610739576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180611ef36027913960400191505060405180910390fd5b610744838383611006565b505050565b600061079c82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061123390919063ffffffff16565b905092915050565b6000806107bb83600261124d90919063ffffffff16565b50905080915050919050565b60006107f782604051806060016040528060298152602001611df66029913960026112799092919063ffffffff16565b9050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108bc5780601f10610891576101008083540402835291602001916108bc565b820191906000526020600020905b81548152906001019060200180831161089f57829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561094d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611dcc602a913960400191505060405180910390fd5b610994600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611298565b9050919050565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a335780601f10610a0857610100808354040283529160200191610a33565b820191906000526020600020905b815481529060010190602001808311610a1657829003601f168201915b5050505050905090565b60001515600860149054906101000a900460ff16151514610ac6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f417274776f726b20616c726561647920696e697469616c697a65642e0000000081525060200191505060405180910390fd5b6040518060400160405280601e81526020017f5468697320417274776f726b20497320416c77617973204f6e2053616c65000081525060049080519060200190610b11929190611cbc565b506040518060400160405280600681526020017f544149414f53000000000000000000000000000000000000000000000000000081525060059080519060200190610b5d929190611cbc565b5033600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610bcc600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16602a6112ad565b610bef602a6040518060600160405280602e8152602001611ec5602e9139611495565b610bff6380ac58cd60e01b61151f565b610c0f635b5e139f60e01b61151f565b610c1f63780e9d6360e01b61151f565b6001600860146101000a81548160ff021916908315150217905550565b6060610c4782611627565b610c9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611e96602f913960400191505060405180910390fd5b6060600660008481526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d455780601f10610d1a57610100808354040283529160200191610d45565b820191906000526020600020905b815481529060010190602001808311610d2857829003601f168201915b50505050509050600060078054600181600116156101000203166002900490501415610d745780915050610f20565b600081511115610e4d576007816040516020018083805460018160011615610100020316600290048015610ddf5780601f10610dbd576101008083540402835291820191610ddf565b820191906000526020600020905b815481529060010190602001808311610dcb575b505082805190602001908083835b60208310610e105780518252602082019150602081019050602083039250610ded565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050610f20565b6007610e5884611644565b6040516020018083805460018160011615610100020316600290048015610eb65780601f10610e94576101008083540402835291820191610eb6565b820191906000526020600020905b815481529060010190602001808311610ea2575b505082805190602001908083835b60208310610ee75780518252602082019150602081019050602083039250610ec4565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529150505b919050565b600860149054906101000a900460ff1681565b6000610f468260000161178b565b9050919050565b6000610f5882611627565b610fad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611da0602c913960400191505060405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614905092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611026826107c7565b73ffffffffffffffffffffffffffffffffffffffff1614611092576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180611e6d6029913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611118576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611d7c6024913960400191505060405180910390fd5b61116981600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061179c90919063ffffffff16565b506111bb81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206117b690919063ffffffff16565b506111d2818360026117d09092919063ffffffff16565b50808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60006112428360000183611805565b60001c905092915050565b6000806000806112608660000186611888565b915091508160001c8160001c9350935050509250929050565b600061128c846000018460001b84611921565b60001c90509392505050565b60006112a682600001611a17565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611350576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4552433732313a206d696e7420746f20746865207a65726f206164647265737381525060200191505060405180910390fd5b61135981611627565b156113cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000081525060200191505060405180910390fd5b61141d81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206117b690919063ffffffff16565b50611434818360026117d09092919063ffffffff16565b50808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b61149e82611627565b6114f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611e41602c913960400191505060405180910390fd5b8060066000848152602001908152602001600020908051906020019061151a929190611cbc565b505050565b63ffffffff60e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156115bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4552433136353a20696e76616c696420696e746572666163652069640000000081525060200191505060405180910390fd5b6001600080837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600061163d826002611a2890919063ffffffff16565b9050919050565b6060600082141561168c576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611786565b600082905060005b600082146116b6578080600101915050600a82816116ae57fe5b049150611694565b60608167ffffffffffffffff811180156116cf57600080fd5b506040519080825280601f01601f1916602001820160405280156117025781602001600182028036833780820191505090505b50905060006001830390508593505b6000841461177e57600a848161172357fe5b0660300160f81b8282806001900393508151811061173d57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a848161177657fe5b049350611711565b819450505050505b919050565b600081600001805490509050919050565b60006117ae836000018360001b611a42565b905092915050565b60006117c8836000018360001b611b2a565b905092915050565b60006117fc846000018460001b8473ffffffffffffffffffffffffffffffffffffffff1660001b611b9a565b90509392505050565b600081836000018054905011611866576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611d5a6022913960400191505060405180910390fd5b82600001828154811061187557fe5b9060005260206000200154905092915050565b600080828460000180549050116118ea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611e1f6022913960400191505060405180910390fd5b60008460000184815481106118fb57fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600080846001016000858152602001908152602001600020549050600081141583906119e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119ad578082015181840152602081019050611992565b50505050905090810190601f1680156119da5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508460000160018203815481106119fb57fe5b9060005260206000209060020201600101549150509392505050565b600081600001805490509050919050565b6000611a3a836000018360001b611c76565b905092915050565b60008083600101600084815260200190815260200160002054905060008114611b1e5760006001820390506000600186600001805490500390506000866000018281548110611a8d57fe5b9060005260206000200154905080876000018481548110611aaa57fe5b9060005260206000200181905550600183018760010160008381526020019081526020016000208190555086600001805480611ae257fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611b24565b60009150505b92915050565b6000611b368383611c99565b611b8f578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050611b94565b600090505b92915050565b6000808460010160008581526020019081526020016000205490506000811415611c4157846000016040518060400160405280868152602001858152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550508460000180549050856001016000868152602001908152602001600020819055506001915050611c6f565b82856000016001830381548110611c5457fe5b90600052602060002090600202016001018190555060009150505b9392505050565b600080836001016000848152602001908152602001600020541415905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611cfd57805160ff1916838001178555611d2b565b82800160010185558215611d2b579182015b82811115611d2a578251825591602001919060010190611d0f565b5b509050611d389190611d3c565b5090565b5b80821115611d55576000816000905550600101611d3d565b509056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e68747470733a2f2f74686973617274776f726b6973616c776179736f6e73616c652e636f6d2f6d657461646174614552433732313a207472616e736665722063616c6c6572206973206e6f7420737465776172642ea26469706673582212206ff3a8b6c7155db8b0cc51caa42dea4d0e2bacc36219bc6bd6884275287e35d464736f6c6343000703003360806040526000600f60146101000a81548160ff02191690831515021790555060405162002b8538038062002b85833981810160405260a08110156200004457600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050640ba43b7400600b8190555064e8d4a51000600c8190555083600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ba0bba406040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200014157600080fd5b505af115801562000156573d6000803e3d6000fd5b5050505084600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600e8190555081600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620002756200028060201b60201c565b50505050506200072c565b600060045414156200039b576000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e602a6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156200030357600080fd5b505afa15801562000318573d6000803e3d6000fd5b505050506040513d60208110156200032f57600080fd5b8101908080519060200190929190505050905062000356813060006200039d60201b60201c565b8073ffffffffffffffffffffffffffffffffffffffff167f6d6bbefef62d4cb6d0e3a4dd306a71d3632319b1e03659513df86b247dd657fe60405160405180910390a2505b565b62000413620003bf600a546003546200058d60201b6200177f1790919060201c565b600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054620005df60201b620017c91790919060201c565b600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd8484602a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b1580156200050957600080fd5b505af11580156200051e573d6000803e3d6000fd5b505050508060008190555042600a819055506001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b6000620005d783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506200066860201b60201c565b905092915050565b6000808284019050838110156200065e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600083831115829062000719576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620006dd578082015181840152602081019050620006c0565b50505050905090810190601f1680156200070b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b612449806200073c6000396000f3fe6080604052600436106101e35760003560e01c80636c7f17fb11610102578063a2b40d1911610095578063d6febde811610064578063d6febde81461078b578063e29eb836146107c3578063e9fad8ee146107ee578063f07af5f714610805576101e3565b8063a2b40d19146106b9578063a97d70b1146106f4578063d0e30db01461071f578063d6f59e6a1461074a576101e3565b80639443c2e3116100d15780639443c2e3146105d35780639a153642146105fe5780639fc7a65b14610629578063a035b1fe1461068e576101e3565b80636c7f17fb146104fc578063879d5aad1461054b5780638bb66d8a14610576578063929417db146105a8576101e3565b806338d792551161017a57806355c3bf101161014957806355c3bf10146104145780635d5a92fb1461043f5780635ded3d4e146104a45780635e67d521146104e5576101e3565b806338d79255146103505780633989e2311461039157806343bc1612146103a85780634bd8aeac146103e9576101e3565b80632fda332e116101b65780632fda332e1461029d578063301bd28e146102a757806332567803146102e857806333289a4614610315576101e3565b80630b44d697146101e85780630ee591ba1461021557806315488b881461022c5780632ef4632014610236575b600080fd5b3480156101f457600080fd5b506101fd610830565b60405180821515815260200191505060405180910390f35b34801561022157600080fd5b5061022a610843565b005b610234610981565b005b34801561024257600080fd5b506102856004803603602081101561025957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610af5565b60405180821515815260200191505060405180910390f35b6102a5610b15565b005b3480156102b357600080fd5b506102bc610c74565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102f457600080fd5b506102fd610c9a565b60405180821515815260200191505060405180910390f35b34801561032157600080fd5b5061034e6004803603602081101561033857600080fd5b8101908080359060200190929190505050610cc3565b005b34801561035c57600080fd5b50610365610e26565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561039d57600080fd5b506103a6610e4c565b005b3480156103b457600080fd5b506103bd610f5b565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103f557600080fd5b506103fe610f81565b6040518082815260200191505060405180910390f35b34801561042057600080fd5b50610429610f87565b6040518082815260200191505060405180910390f35b34801561044b57600080fd5b5061048e6004803603602081101561046257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f8d565b6040518082815260200191505060405180910390f35b3480156104b057600080fd5b506104b9610fa5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104f157600080fd5b506104fa610fcb565b005b34801561050857600080fd5b506105356004803603602081101561051f57600080fd5b8101908080359060200190929190505050611153565b6040518082815260200191505060405180910390f35b34801561055757600080fd5b506105606111af565b6040518082815260200191505060405180910390f35b34801561058257600080fd5b5061058b6112a8565b604051808381526020018281526020019250505060405180910390f35b3480156105b457600080fd5b506105bd6112bc565b6040518082815260200191505060405180910390f35b3480156105df57600080fd5b506105e861132a565b6040518082815260200191505060405180910390f35b34801561060a57600080fd5b50610613611366565b6040518082815260200191505060405180910390f35b34801561063557600080fd5b506106786004803603602081101561064c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061136c565b6040518082815260200191505060405180910390f35b34801561069a57600080fd5b506106a3611384565b6040518082815260200191505060405180910390f35b3480156106c557600080fd5b506106f2600480360360208110156106dc57600080fd5b810190808035906020019092919050505061138a565b005b34801561070057600080fd5b50610709611590565b6040518082815260200191505060405180910390f35b34801561072b57600080fd5b506107346115cc565b6040518082815260200191505060405180910390f35b34801561075657600080fd5b5061075f6115d2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107c1600480360360408110156107a157600080fd5b8101908080359060200190929190803590602001909291905050506115f8565b005b3480156107cf57600080fd5b506107d861160f565b6040518082815260200191505060405180910390f35b3480156107fa57600080fd5b50610803611615565b005b34801561081157600080fd5b5061081a611779565b6040518082815260200191505060405180910390f35b600f60149054906101000a900460ff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610906576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4e6f74206172746973740000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600060065490506000600681905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561097d573d6000803e3d6000fd5b5050565b610989610e4c565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e602a6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156109fd57600080fd5b505afa158015610a11573d6000803e3d6000fd5b505050506040513d6020811015610a2757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ad8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4e6f7420706174726f6e0000000000000000000000000000000000000000000081525060200191505060405180910390fd5b610aed346004546117c990919063ffffffff16565b600481905550565b60086020528060005260406000206000915054906101000a900460ff1681565b60001515600f60149054906101000a900460ff16151514610b81576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806123f36021913960400191505060405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c27576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260358152602001806123716035913960400191505060405180910390fd5b610c57600e546000600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611851565b6001600f60146101000a81548160ff021916908315150217905550565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080610ca56112bc565b90506004548110610cba576001915050610cc0565b60009150505b90565b610ccb610e4c565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e602a6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610d3f57600080fd5b505afa158015610d53573d6000803e3d6000fd5b505050506040513d6020811015610d6957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4e6f7420706174726f6e0000000000000000000000000000000000000000000081525060200191505060405180910390fd5b610e2381611be0565b50565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000805414610f59576000610e5f6112bc565b90506004548110610ec957610eb9610ea882610e9a600454610e8c6003544261177f90919063ffffffff16565b611cc590919063ffffffff16565b611d4b90919063ffffffff16565b6003546117c990919063ffffffff16565b6003819055506004549050610ed1565b426003819055505b610ee68160045461177f90919063ffffffff16565b600481905550610f01816002546117c990919063ffffffff16565b600281905550610f1c816006546117c990919063ffffffff16565b600681905550807f54acb82a9e70d7c289b149758d23167c915428ae854a7aa4abe5bf2f4ef29f3660405160405180910390a2610f57611d95565b505b565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b600a5481565b60076020528060005260406000206000915090505481565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411611080576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4e6f2070756c6c2066756e647320617661696c61626c652e000000000000000081525060200191505060405180910390fd5b6000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561114f573d6000803e3d6000fd5b5050565b60006111a86301e1338061119a600c5461118c600b5461117e88600054611cc590919063ffffffff16565b611cc590919063ffffffff16565b611d4b90919063ffffffff16565b611d4b90919063ffffffff16565b9050919050565b6000806111f36301e133806111e5600c546111d7600b54600054611cc590919063ffffffff16565b611d4b90919063ffffffff16565b611d4b90919063ffffffff16565b905060006111ff61132a565b9050600081111561122f576112248261121661132a565b611d4b90919063ffffffff16565b4201925050506112a5565b600082111561129d5760006112426112bc565b9050611293611282826112746004546112666003544261177f90919063ffffffff16565b611cc590919063ffffffff16565b611d4b90919063ffffffff16565b6003546117c990919063ffffffff16565b93505050506112a5565b600354925050505b90565b6000806112b36112bc565b42915091509091565b60006113256301e13380611317600c54611309600b546112fb6112ea6003544261177f90919063ffffffff16565b600054611cc590919063ffffffff16565b611cc590919063ffffffff16565b611d4b90919063ffffffff16565b611d4b90919063ffffffff16565b905090565b6000806113356112bc565b9050600454811061134a576000915050611363565b61135f8160045461177f90919063ffffffff16565b9150505b90565b600e5481565b60096020528060005260406000206000915090505481565b60005481565b611392610e4c565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e602a6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561140657600080fd5b505afa15801561141a573d6000803e3d6000fd5b505050506040513d602081101561143057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4e6f7420706174726f6e0000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008111611557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f5072696365206973207a65726f0000000000000000000000000000000000000081525060200191505060405180910390fd5b806000819055506000547f854d6511a28585103049c7770618450f7c9aeb580c69db2913d63869663f475160405160405180910390a250565b6000600a5460035411156115c4576115bd6115b8600a5460035461177f90919063ffffffff16565b611153565b90506115c9565b600090505b90565b60045481565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611600610e4c565b61160b828233611851565b5050565b60025481565b61161d610e4c565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e602a6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561169157600080fd5b505afa1580156116a5573d6000803e3d6000fd5b505050506040513d60208110156116bb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461176c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4e6f7420706174726f6e0000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611777600454611be0565b565b60035481565b60006117c183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ea6565b905092915050565b600080828401905083811015611847576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b81600054146118c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43757272656e7420507269636520696e636f727265637400000000000000000081525060200191505060405180910390fd5b6000831161193e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f5072696365206973207a65726f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60005434116119b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4e6f7420656e6f7567680000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e602a6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611a2b57600080fd5b505afa158015611a3f573d6000803e3d6000fd5b505050506040513d6020811015611a5557600080fd5b810190808051906020019092919050505090506000611a816004546000546117c990919063ffffffff16565b90506000811115611b6857600082905060008173ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f19350505050905080611b6557611b2183600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117c990919063ffffffff16565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b50505b42600381905550611b846000543461177f90919063ffffffff16565b600481905550611b95828487611f66565b848373ffffffffffffffffffffffffffffffffffffffff167f4f79409f494e81c38036d80aa8a6507c2cb08d90bfb2fead5519447646b3497e60405160405180910390a35050505050565b806004541015611c58576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5769746864726177696e6720746f6f206d75636800000000000000000000000081525060200191505060405180910390fd5b611c6d8160045461177f90919063ffffffff16565b6004819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611cb9573d6000803e3d6000fd5b50611cc2611d95565b50565b600080831415611cd85760009050611d45565b6000828402905082848281611ce957fe5b0414611d40576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806123a66021913960400191505060405180910390fd5b809150505b92915050565b6000611d8d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120ca565b905092915050565b60006004541415611ea4576000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e602a6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611e1657600080fd5b505afa158015611e2a573d6000803e3d6000fd5b505050506040513d6020811015611e4057600080fd5b81019080805190602001909291905050509050611e5f81306000611f66565b8073ffffffffffffffffffffffffffffffffffffffff167f6d6bbefef62d4cb6d0e3a4dd306a71d3632319b1e03659513df86b247dd657fe60405160405180910390a2505b565b6000838311158290611f53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611f18578082015181840152602081019050611efd565b50505050905090810190601f168015611f455780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e602a6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561201357600080fd5b505afa158015612027573d6000803e3d6000fd5b505050506040513d602081101561203d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146120ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806123c7602c913960400191505060405180910390fd5b6120c5838383612190565b505050565b60008083118290612176576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561213b578082015181840152602081019050612120565b50505050905090810190601f1680156121685780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161218257fe5b049050809150509392505050565b6121f86121aa600a5460035461177f90919063ffffffff16565b600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117c990919063ffffffff16565b600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd8484602a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b1580156122ed57600080fd5b505af1158015612301573d6000803e3d6000fd5b505050508060008190555042600a819055506001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050505056fe524553544f52453a2043616e206f6e6c7920626520726573746f72656420627920726573746f726174696f6e20636f6e7472616374536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77524553544f52453a204f6c64205631206973206e6f74206f776e65642062792074686520526573746f726572524553544f52453a20417274776f726b20616c726561647920726573746f726564a2646970667358221220b6d04d49708c7b6129229b70c63994513f2c4ca1466acdc02c563e0f1aff9b4564736f6c634300070300330000000000000000000000006d7c26f2e77d0ccc200464c8b2040c0b840b28a200000000000000000000000074e6ab057f8a9fd9355398a17579cd4c90ab2b660000000000000000000000000cacc6104d8cd9d7b2850b4f35c65c1ecdeece03
Deployed Bytecode
0x60806040526004361061007b5760003560e01c80634d7155241161004e5780634d7155241461013957806365ad34c71461017a578063f25e7108146101bb578063fb76f708146101e65761007b565b80630b44d697146100805780632fda332e146100ad578063387c5e51146100b757806343bc1612146100f8575b600080fd5b34801561008c57600080fd5b50610095610211565b60405180821515815260200191505060405180910390f35b6100b5610224565b005b3480156100c357600080fd5b506100cc61057d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561010457600080fd5b5061010d6105a3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014557600080fd5b5061014e6105c9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561018657600080fd5b5061018f6105ef565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101c757600080fd5b506101d0610615565b6040518082815260200191505060405180910390f35b3480156101f257600080fd5b506101fb61061b565b6040518082815260200191505060405180910390f35b600760149054906101000a900460ff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806106226027913960400191505060405180910390fd5b6000629896806003540190506706f05b59d3b200008101341015610356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4e6f7420656e6f7567682045544820666f7220726573746f726174696f6e000081525060200191505060405180910390fd5b60001515600760149054906101000a900460ff161515146103df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f43616e206f6e6c7920726573746f7265206f6e63652e0000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d96a094a8260646040518363ffffffff1660e01b8152600401808281526020019150506000604051808303818588803b15801561045557600080fd5b505af1158015610469573d6000803e3d6000fd5b5050505050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632fda332e6706f05b59d3b200006040518263ffffffff1660e01b81526004016000604051808303818588803b1580156104e057600080fd5b505af11580156104f4573d6000803e3d6000fd5b50505050506706f05b59d3b20000810134111561055f573373ffffffffffffffffffffffffffffffffffffffff166108fc6706f05b59d3b20000833403039081150290604051600060405180830381858888f1935050505015801561055d573d6000803e3d6000fd5b505b6001600760146101000a81548160ff02191690831515021790555050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b6003548156fe4f6e6c7920736e617073686f74206f776e6572206d617920726573746f726520617274776f726ba26469706673582212207deab73022ac25514ce46e975ecb9a74cf0a89bc4808a18e651f440c3a0763da64736f6c63430007030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006d7c26f2e77d0ccc200464c8b2040c0b840b28a200000000000000000000000074e6ab057f8a9fd9355398a17579cd4c90ab2b660000000000000000000000000cacc6104d8cd9d7b2850b4f35c65c1ecdeece03
-----Decoded View---------------
Arg [0] : _oldV1Address (address): 0x6d7C26F2E77d0cCc200464C8b2040c0B840b28a2
Arg [1] : _oldStewardAddress (address): 0x74E6Ab057f8a9Fd9355398a17579Cd4c90aB2B66
Arg [2] : _artist (address): 0x0CaCC6104D8Cd9d7b2850b4f35c65C1eCDEECe03
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000006d7c26f2e77d0ccc200464c8b2040c0b840b28a2
Arg [1] : 00000000000000000000000074e6ab057f8a9fd9355398a17579cd4c90ab2b66
Arg [2] : 0000000000000000000000000cacc6104d8cd9d7b2850b4f35c65c1ecdeece03
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.