Feature Tip: Add private address tag to any address under My Name Tag !
ERC-1155
Overview
Max Total Supply
571 TINYSEED
Holders
131
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
TinySeed
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; /** * @dev TinySeed ERC-1155 contract: */ contract TinySeed is ERC1155, Ownable, Pausable, ERC1155Burnable, ERC1155Supply, PaymentSplitter { /** * @dev Constants for token types: */ uint256 public constant SERIES1 = 0; uint256 public constant REFILL = 1; uint256 public constant PLATINUM = 2; /** * @dev Constants, token supply bands and associated USD pricing: * =========================================== * MUST BE UPDATED / VALIDATED PRIOR TO DEPLOY * =========================================== */ uint256 public constant SERIES1_SUPPLY1 = 100; uint256 public constant SERIES1_SUPPLY2 = 250; uint256 public constant SERIES1_SUPPLY3 = 500; uint256 public constant SERIES1_USD1 = 220; uint256 public constant SERIES1_USD2 = 230; uint256 public constant SERIES1_USD3 = 240; uint256 public constant SERIES1_USD4 = 250; uint256 public constant REFILL_USD = 250; uint256 public constant PLATINUM_USD = 4600; /** * @dev Add name and symbol for consistency with ERC-721 NFTs. Note that ERC-721 stores * these variables on-chain, but as they can only be set on the constructor we may as well * save the gas and have them as constants in the bytecode. */ string private constant NAME = "TinySeed"; string private constant SYMBOL = "TINYSEED"; AggregatorV3Interface internal priceFeed; /** * @dev saleOpen - when set to false it stays false. This is how the mint * is permanently closed at the end. Pause is different, as it can be set and unset * and also controls token transfer. */ bool public saleOpen; bool public developerAllocationComplete; address private developer; /** * @dev Price buffer above and below the passed amount of ETH that will be accepted. This function * will be used to set the price for items in the UI, but there is always the possibility of price * fluctuations beween the display and the mint. These parameters determine as an amount per thousance * how high above or below the price the passed amount of ETH can be and still make a valid sale. The * stored values are in the following format: * - priceBufferUp: amount as a proportion of 1,000. For example, if you set this to 1005 you allow the * price to be up to 1005 / 1000 of the actual price, i.e. not exceeding 0.5% greater. * - priceBufferDown: amount as a proportion of 1,000. For example, if you set this to 995 you allow the * price to be up to 995 / 1000 of the actual price i.e. not exceeding 0.5% less. */ uint256 private priceBufferUp; uint256 private priceBufferDown; /** * @dev Contract events: */ event SaleClosedSet(address account); event PriceBufferUpSet(uint256 priceBuffer); event PriceBufferDownSet(uint256 priceBuffer); event DeveloperAllocationCompleteSet(address account); event tinySeedMinted( address account, uint256 TiQuantity, uint256 RefillQuantity, uint256 PtQuantity, uint256 TiSupply, uint256 RefillSupply, uint256 PtSupply, uint256 cost ); /** * @dev Constructor must be passed an array of shareholders for the payment splitter, the first * array holding addresses and the second the corresponding shares. For example, you could have the following: * - _payees[beneficiaryAddress, developerAddress] * - _shares[90,10] * In this example the beneficiary address passed in can claim 90% of total ETH, the developer 10% */ constructor( uint256 _priceBufferUp, uint256 _priceBufferDown, address[] memory _payees, uint256[] memory _shares, address _developer ) ERC1155( "https://arweave.net/jGEbN3EEPoKqTwzkPD4rBf7ujmtBFtZIkwD_T9242hQ/{id}.json" ) PaymentSplitter(_payees, _shares) { setPriceBufferUp(_priceBufferUp); setPriceBufferDown(_priceBufferDown); developer = _developer; saleOpen = true; developerAllocationComplete = false; _pause(); /** * @dev Contract address for pricefeed data. * ============================================== * MUST BE SET TO MAINNET ADDRESS PRIOR TO DEPLOY * ============================================== * MAINNET: 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419 * RINKEBY: 0x8A753747A1Fa494EC906cE90E9f37563A8AF630e */ priceFeed = AggregatorV3Interface( 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419 ); } /** * @dev The sale being open depends on the saleOpen bool. This is set to true * in the constructor and can be set to closed by the owner. Once closed it is closed * forever. Minting cannot occur, token transfers are still allows. These can be paused * by using _pause. */ modifier whenSaleOpen() { require(saleOpen, "Sale is closed"); _; } modifier whenSaleClosed() { require(!saleOpen, "Sale is open"); _; } modifier whenDeveloperAllocationAvailable() { require(!developerAllocationComplete, "Developer allocation is complete"); _; } /** * @dev admin functions: */ function setPriceBufferUp(uint256 _priceBufferUpToSet) public onlyOwner returns (bool) { priceBufferUp = _priceBufferUpToSet; emit PriceBufferUpSet(priceBufferUp); return true; } function setPriceBufferDown(uint256 _priceBufferDownToSet) public onlyOwner returns (bool) { priceBufferDown = _priceBufferDownToSet; emit PriceBufferDownSet(priceBufferDown); return true; } function setSaleClosed() external onlyOwner whenSaleOpen { saleOpen = false; emit SaleClosedSet(msg.sender); } function setDeveloperAllocationComplete() external onlyOwner whenSaleClosed { developerAllocationComplete = true; emit DeveloperAllocationCompleteSet(msg.sender); } function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } function getCurrentRate() external view returns (uint256) { return (uint256(getLatestPrice())); } function getDollarValueInWei(uint256 _dollarValue) external view returns (uint256) { uint256 latestPrice = uint256(getLatestPrice()); return (performConversion(latestPrice, _dollarValue)); } function getCurrentETHPriceById(uint256 _id) external view returns (uint256 priceInETH) { uint256 latestPrice = uint256(getLatestPrice()); if (_id == SERIES1) { return (performConversion(latestPrice, getCurrentTitaniumUSD())); } if (_id == REFILL) { return (performConversion(latestPrice, REFILL_USD)); } if (_id == PLATINUM) { return (performConversion(latestPrice, PLATINUM_USD)); } } function getAllCurrentETHPrices() public view returns ( uint256 titanium, uint256 refiller, uint256 platinum ) { uint256 latestPrice = uint256(getLatestPrice()); uint256 seriesOnePrice = performConversion( latestPrice, getCurrentTitaniumUSD() ); uint256 refillPrice = performConversion(latestPrice, REFILL_USD); uint256 platinumPrice = performConversion(latestPrice, PLATINUM_USD); return ((seriesOnePrice), (refillPrice), (platinumPrice)); } function getTotalMinted() external view returns ( uint256 seriesOne, uint256 refiller, uint256 platinum ) { return (totalSupply(SERIES1), totalSupply(REFILL), totalSupply(PLATINUM)); } function getAccountMinted(address _account) external view returns ( uint256 seriesOne, uint256 refiller, uint256 platinum ) { return ( balanceOf(_account, SERIES1), balanceOf(_account, REFILL), balanceOf(_account, PLATINUM) ); } function getBuffers() external view onlyOwner returns (uint256 bufferUp, uint256 bufferDown) { return (priceBufferUp, priceBufferDown); } /** * @dev Add name, symbol and total supply for consistency with ERC-721 NFTs. */ function name() public pure returns (string memory) { return NAME; } function symbol() public pure returns (string memory) { return SYMBOL; } function totalSupply() public view returns (uint256) { return (totalSupply(SERIES1) + totalSupply(REFILL) + totalSupply(PLATINUM)); } /** * Returns the latest USD price to 8DP of 1 ETH */ function getLatestPrice() public view returns (int256) { ( uint80 roundID, int256 price, uint256 startedAt, uint256 timeStamp, uint80 answeredInRound ) = priceFeed.latestRoundData(); return price; } /** * @dev perform price conversion USD to Wei at the prescribed number of significant figures (i.e. DP in ETH) */ function performConversion(uint256 _price, uint256 _value) internal pure returns (uint256 convertedValue) { require(_price > 0 && _price < 9999999999999, "Pricing Error"); // The USD figure from the price feed is one eth in USD to 8 DP. We need the value of one dollar in wei/ // The price feed has 8DP so lets add that exponent to our wei figure to give us the value of $1 in wei uint256 oneUSDInWei = ((10**26) / _price); // 2) Mutiply our dollar value by that to get our value in wei: uint256 valueInWei = oneUSDInWei * _value; // 3) And then roundup that number to 4DP of eth by removing 10**14 digits, adding 1, then multiplying by 10**14: valueInWei = ((valueInWei / (10**14)) + 1) * (10**14); return (valueInWei); } /** * @dev This function is called from the UI to mint NFTs for the user. Can only be called when the sale is open * and the contract isn't paused. It must be passed three quantities, one for each of the token types: */ function buyTinySeed( uint256 _quantitySeriesOne, uint256 _quantityRefiller, uint256 _quantityPlatinum ) external payable whenSaleOpen whenNotPaused { require( _quantitySeriesOne != 0 || _quantityRefiller != 0 || _quantityPlatinum != 0, "Order must be for an item" ); uint256 orderPrice = priceOrder( _quantitySeriesOne, _quantityRefiller, _quantityPlatinum ); checkPaymentToPrice(msg.value, orderPrice); // To reach here the price check must have passed. Mint the items: processMint( msg.sender, _quantitySeriesOne, _quantityRefiller, _quantityPlatinum, msg.value ); // Events are emitted per order in the mint function. } /** * @dev Get the current price of this order in the same way that it will have been assembled in the UI, * i.e. get the current price of each token type in ETH (including the rounding to 4DP of ETH) and then * multiply that by the total quantity ordered. */ function priceOrder( uint256 _quantitySeriesOne, uint256 _quantityRefiller, uint256 _quantityPlatinum ) internal view returns (uint256 price) { uint256 orderCostInETH = 0; ( uint256 seriesOnePrice, uint256 refillPrice, uint256 platinumPrice ) = getAllCurrentETHPrices(); orderCostInETH = ((seriesOnePrice * _quantitySeriesOne) + (refillPrice * _quantityRefiller) + (platinumPrice * _quantityPlatinum)); return (orderCostInETH); } /** * @dev This function allows the developer allocation mint. It is closed when the bool developerAllocationComplete is set to true */ function mintDeveloperAllocation( uint256 _quantitySeriesOne, uint256 _quantityRefiller, uint256 _quantityPlatinum ) external payable onlyOwner whenSaleClosed whenDeveloperAllocationAvailable { processMint( developer, _quantitySeriesOne, _quantityRefiller, _quantityPlatinum, 0 ); } /** * @dev Unified proccessing for mint operation: */ function processMint( address _recipient, uint256 _quantitySeriesOne, uint256 _quantityRefiller, uint256 _quantityPlatinum, uint256 _cost ) internal { // Series one (titanium) items: if (_quantitySeriesOne > 0) { _mint(_recipient, SERIES1, _quantitySeriesOne, ""); } // Refiller items: if (_quantityRefiller > 0) { _mint(_recipient, REFILL, _quantityRefiller, ""); } // Platinum items: if (_quantityPlatinum > 0) { _mint(_recipient, PLATINUM, _quantityPlatinum, ""); } emit tinySeedMinted( _recipient, _quantitySeriesOne, _quantityRefiller, _quantityPlatinum, totalSupply(SERIES1), totalSupply(REFILL), totalSupply(PLATINUM), _cost ); } /** * @dev Get the current series One price. */ function getCurrentTitaniumUSD() internal view returns (uint256 _currentPrice) { uint256 nextTitanium = totalSupply(SERIES1) + 1; // For efficiency first check if we exceed the highest tier, as presumably most // units will be sold at the standard post-tier price: if (nextTitanium > SERIES1_SUPPLY3) { return (SERIES1_USD4); } if (nextTitanium <= SERIES1_SUPPLY1) { return (SERIES1_USD1); } if (nextTitanium <= SERIES1_SUPPLY2) { return (SERIES1_USD2); } if (nextTitanium <= SERIES1_SUPPLY3) { return (SERIES1_USD3); } } /** * @dev Determine if the passed cost is within bounds of current price: */ function checkPaymentToPrice(uint256 _passedETH, uint256 _orderPrice) internal view { // Establish upper and lower bands of price buffer and check uint256 orderPriceLower = (_orderPrice * priceBufferDown) / 1000; require(_passedETH >= orderPriceLower, "Insufficient ETH passed for order"); uint256 orderPriceUpper = (_orderPrice * priceBufferUp) / 1000; require(_passedETH <= orderPriceUpper, "Too much ETH passed for order"); } /** * @dev The fallback function is executed on a call to the contract if * none of the other functions match the given function signature. */ fallback() external payable { revert(); } /** * @dev revert any random ETH: */ receive() external payable override { revert(); } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override(ERC1155, ERC1155Supply) whenNotPaused { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burnBatch(account, ids, values); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] -= amounts[i]; } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "../token/ERC20/utils/SafeERC20.sol"; import "../utils/Address.sol"; import "../utils/Context.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] += payment; _totalReleased += payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); uint256 payment = _pendingPayment(account, totalReceived, released(token, account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _erc20Released[token][account] += payment; _erc20TotalReleased[token] += payment; SafeERC20.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface AggregatorV3Interface { function decimals() external view returns ( uint8 ); function description() external view returns ( string memory ); function version() external view returns ( uint256 ); // getRoundData and latestRoundData should both raise "No data present" // if they do not have data to report, instead of returning unset values // which could be misinterpreted as actual reported values. function getRoundData( uint80 _roundId ) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_priceBufferUp","type":"uint256"},{"internalType":"uint256","name":"_priceBufferDown","type":"uint256"},{"internalType":"address[]","name":"_payees","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"},{"internalType":"address","name":"_developer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"DeveloperAllocationCompleteSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"priceBuffer","type":"uint256"}],"name":"PriceBufferDownSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"priceBuffer","type":"uint256"}],"name":"PriceBufferUpSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"SaleClosedSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"TiQuantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"RefillQuantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"PtQuantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"TiSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"RefillSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"PtSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cost","type":"uint256"}],"name":"tinySeedMinted","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"PLATINUM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PLATINUM_USD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REFILL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REFILL_USD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SERIES1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SERIES1_SUPPLY1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SERIES1_SUPPLY2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SERIES1_SUPPLY3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SERIES1_USD1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SERIES1_USD2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SERIES1_USD3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SERIES1_USD4","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantitySeriesOne","type":"uint256"},{"internalType":"uint256","name":"_quantityRefiller","type":"uint256"},{"internalType":"uint256","name":"_quantityPlatinum","type":"uint256"}],"name":"buyTinySeed","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"developerAllocationComplete","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getAccountMinted","outputs":[{"internalType":"uint256","name":"seriesOne","type":"uint256"},{"internalType":"uint256","name":"refiller","type":"uint256"},{"internalType":"uint256","name":"platinum","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllCurrentETHPrices","outputs":[{"internalType":"uint256","name":"titanium","type":"uint256"},{"internalType":"uint256","name":"refiller","type":"uint256"},{"internalType":"uint256","name":"platinum","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBuffers","outputs":[{"internalType":"uint256","name":"bufferUp","type":"uint256"},{"internalType":"uint256","name":"bufferDown","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"getCurrentETHPriceById","outputs":[{"internalType":"uint256","name":"priceInETH","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dollarValue","type":"uint256"}],"name":"getDollarValueInWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestPrice","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalMinted","outputs":[{"internalType":"uint256","name":"seriesOne","type":"uint256"},{"internalType":"uint256","name":"refiller","type":"uint256"},{"internalType":"uint256","name":"platinum","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantitySeriesOne","type":"uint256"},{"internalType":"uint256","name":"_quantityRefiller","type":"uint256"},{"internalType":"uint256","name":"_quantityPlatinum","type":"uint256"}],"name":"mintDeveloperAllocation","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setDeveloperAllocationComplete","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_priceBufferDownToSet","type":"uint256"}],"name":"setPriceBufferDown","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_priceBufferUpToSet","type":"uint256"}],"name":"setPriceBufferUp","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setSaleClosed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162004417380380620044178339810160408190526200003491620007ef565b8282604051806080016040528060498152602001620043ce604991396200005b8162000233565b5062000067336200024c565b6003805460ff60a01b191690558051825114620000e65760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001395760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606401620000dd565b60005b8251811015620001a557620001908382815181106200015f576200015f620008e7565b60200260200101518383815181106200017c576200017c620008e7565b60200260200101516200029e60201b60201c565b806200019c8162000913565b9150506200013c565b505050620001b9856200048c60201b60201c565b50620001c5846200051c565b50600d80546001600160a01b0383166001600160a01b0319909116179055600c805461ffff60a01b1916600160a01b17905562000201620005a0565b5050600c80546001600160a01b031916735f4ec3df9cbd43714fe2740f5e3616155c5b84191790555062000989915050565b8051620002489060029060208401906200064f565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166200030b5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401620000dd565b600081116200035d5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401620000dd565b6001600160a01b03821660009081526007602052604090205415620003d95760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608401620000dd565b60098054600181019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b0319166001600160a01b03841690811790915560009081526007602052604090208190556005546200044390829062000931565b600555604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b6003546000906001600160a01b03163314620004da5760405162461bcd60e51b81526020600482018190526024820152600080516020620043ae8339815191526044820152606401620000dd565b600e8290556040518281527fd00b5e6e353fecced12d5c6cd88072ca056d6439d28237d88394fce16b008251906020015b60405180910390a15060015b919050565b6003546000906001600160a01b031633146200056a5760405162461bcd60e51b81526020600482018190526024820152600080516020620043ae8339815191526044820152606401620000dd565b600f8290556040518281527f06fe0fd3278e87f46db9f52a32849cbfd5dcefb0d23ea15cd8f7047680ebe11a906020016200050b565b620005b4600354600160a01b900460ff1690565b15620005f65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401620000dd565b6003805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620006323390565b6040516001600160a01b03909116815260200160405180910390a1565b8280546200065d906200094c565b90600052602060002090601f016020900481019282620006815760008555620006cc565b82601f106200069c57805160ff1916838001178555620006cc565b82800160010185558215620006cc579182015b82811115620006cc578251825591602001919060010190620006af565b50620006da929150620006de565b5090565b5b80821115620006da5760008155600101620006df565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620007365762000736620006f5565b604052919050565b60006001600160401b038211156200075a576200075a620006f5565b5060051b60200190565b80516001600160a01b03811681146200051757600080fd5b600082601f8301126200078e57600080fd5b81516020620007a7620007a1836200073e565b6200070b565b82815260059290921b84018101918181019086841115620007c757600080fd5b8286015b84811015620007e45780518352918301918301620007cb565b509695505050505050565b600080600080600060a086880312156200080857600080fd5b855160208088015160408901519297509550906001600160401b03808211156200083157600080fd5b818901915089601f8301126200084657600080fd5b815162000857620007a1826200073e565b81815260059190911b8301840190848101908c8311156200087757600080fd5b938501935b82851015620008a057620008908562000764565b825293850193908501906200087c565b60608c01519098509450505080831115620008ba57600080fd5b5050620008ca888289016200077c565b925050620008db6080870162000764565b90509295509295909350565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156200092a576200092a620008fd565b5060010190565b60008219821115620009475762000947620008fd565b500190565b600181811c908216806200096157607f821691505b602082108114156200098357634e487b7160e01b600052602260045260246000fd5b50919050565b613a1580620009996000396000f3fe6080604052600436106103845760003560e01c806388796ed7116101d1578063c98e3f6e11610102578063e985e9c5116100a0578063f5298aca1161006f578063f5298aca14610aee578063f7393de814610806578063f7fb07b014610b0e578063ff0487fb14610b2357600080fd5b8063e985e9c514610a3b578063f088302e14610a84578063f242432a14610aae578063f2fde38b14610ace57600080fd5b8063d56a7cd6116100dc578063d56a7cd6146109bb578063d79779b2146109db578063de54067314610a11578063e33b7de314610a2657600080fd5b8063c98e3f6e1461095b578063cd183e7114610970578063ce7c2ac21461098557600080fd5b806399288dbb1161016f578063bad90fbf11610149578063bad90fbf146108ed578063bbb05dc414610806578063bd85b0391461090d578063c36e08cb1461093a57600080fd5b806399288dbb14610897578063a22cb465146108b8578063aebc8cf9146108d857600080fd5b80638dca8614116101ab5780638dca8614146108065780638e15f4731461081b57806395d89b41146108305780639852595c1461086157600080fd5b806388796ed7146107905780638b83209b146107b05780638da5cb5b146107e857600080fd5b806348b75044116102b65780636b06c5b411610254578063715018a611610223578063715018a61461073157806379a9207d146107465780638456cb59146107665780638774ece61461077b57600080fd5b80636b06c5b4146106c65780636b20c454146106db5780636c39ee03146106fb5780636fce436c1461071157600080fd5b80634f558e79116102905780634f558e791461064e57806356f0593a1461067d5780635789c5ec146106925780635c975abb146106a757600080fd5b806348b75044146105ee5780634acf615f1461060e5780634e1273f41461062157600080fd5b806319165587116103235780633a98ef39116102fd5780633a98ef39146105685780633f4ba83a1461057d578063406072a91461059257806345d72439146105d857600080fd5b806319165587146105135780632eb2c2d61461053357806333a5de951461055357600080fd5b80630bc88a851161035f5780630bc88a85146104305780630ca1c5c9146104455780630e89341c146104de57806318160ddd146104fe57600080fd5b8062fdd58e1461039357806301ffc9a7146103c657806306fdde03146103f657600080fd5b3661038e57600080fd5b600080fd5b34801561039f57600080fd5b506103b36103ae366004612e1a565b610b38565b6040519081526020015b60405180910390f35b3480156103d257600080fd5b506103e66103e1366004612e5c565b610bcf565b60405190151581526020016103bd565b34801561040257600080fd5b50604080518082019091526008815267151a5b9e54d9595960c21b60208201525b6040516103bd9190612ed1565b61044361043e366004612ee4565b610c21565b005b34801561045157600080fd5b5060046020527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec547fabd6e7cb50984ff9c2f3e18a2660c3353dadf4e3291deeb275dae2cd1e44fe055460026000527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a7545b604080519384526020840192909252908201526060016103bd565b3480156104ea57600080fd5b506104236104f9366004612f10565b610d0d565b34801561050a57600080fd5b506103b3610da1565b34801561051f57600080fd5b5061044361052e366004612f29565b610e2c565b34801561053f57600080fd5b5061044361054e366004613092565b610f5a565b34801561055f57600080fd5b506104c3610ff1565b34801561057457600080fd5b506005546103b3565b34801561058957600080fd5b50610443611041565b34801561059e57600080fd5b506103b36105ad366004613140565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b3480156105e457600080fd5b506103b36101f481565b3480156105fa57600080fd5b50610443610609366004613140565b611075565b61044361061c366004612ee4565b61125d565b34801561062d57600080fd5b5061064161063c366004613179565b611360565b6040516103bd9190613281565b34801561065a57600080fd5b506103e6610669366004612f10565b600090815260046020526040902054151590565b34801561068957600080fd5b506103b3600281565b34801561069e57600080fd5b506103b3606481565b3480156106b357600080fd5b50600354600160a01b900460ff166103e6565b3480156106d257600080fd5b506103b3600081565b3480156106e757600080fd5b506104436106f6366004613294565b61148a565b34801561070757600080fd5b506103b36111f881565b34801561071d57600080fd5b506104c361072c366004612f29565b6114cd565b34801561073d57600080fd5b50610443611500565b34801561075257600080fd5b506103b3610761366004612f10565b611534565b34801561077257600080fd5b50610443611588565b34801561078757600080fd5b506103b3600181565b34801561079c57600080fd5b506103e66107ab366004612f10565b6115ba565b3480156107bc57600080fd5b506107d06107cb366004612f10565b611629565b6040516001600160a01b0390911681526020016103bd565b3480156107f457600080fd5b506003546001600160a01b03166107d0565b34801561081257600080fd5b506103b360fa81565b34801561082757600080fd5b506103b3611659565b34801561083c57600080fd5b506040805180820190915260088152671512539654d1515160c21b6020820152610423565b34801561086d57600080fd5b506103b361087c366004612f29565b6001600160a01b031660009081526008602052604090205490565b3480156108a357600080fd5b50600c546103e690600160a01b900460ff1681565b3480156108c457600080fd5b506104436108d3366004613318565b6116f7565b3480156108e457600080fd5b50610443611706565b3480156108f957600080fd5b506103e6610908366004612f10565b6117c2565b34801561091957600080fd5b506103b3610928366004612f10565b60009081526004602052604090205490565b34801561094657600080fd5b50600c546103e690600160a81b900460ff1681565b34801561096757600080fd5b50610443611824565b34801561097c57600080fd5b506103b360dc81565b34801561099157600080fd5b506103b36109a0366004612f29565b6001600160a01b031660009081526007602052604090205490565b3480156109c757600080fd5b506103b36109d6366004612f10565b6118d5565b3480156109e757600080fd5b506103b36109f6366004612f29565b6001600160a01b03166000908152600a602052604090205490565b348015610a1d57600080fd5b506103b360f081565b348015610a3257600080fd5b506006546103b3565b348015610a4757600080fd5b506103e6610a56366004613140565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b348015610a9057600080fd5b50610a996118ec565b604080519283526020830191909152016103bd565b348015610aba57600080fd5b50610443610ac9366004613346565b61193d565b348015610ada57600080fd5b50610443610ae9366004612f29565b611982565b348015610afa57600080fd5b50610443610b093660046133af565b611a1d565b348015610b1a57600080fd5b506103b3611a60565b348015610b2f57600080fd5b506103b360e681565b60006001600160a01b038316610ba95760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b1480610c0057506001600160e01b031982166303a24d0760e21b145b80610c1b57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6003546001600160a01b03163314610c4b5760405162461bcd60e51b8152600401610ba0906133e4565b600c54600160a01b900460ff1615610c945760405162461bcd60e51b815260206004820152600c60248201526b29b0b6329034b99037b832b760a11b6044820152606401610ba0565b600c54600160a81b900460ff1615610cee5760405162461bcd60e51b815260206004820181905260248201527f446576656c6f70657220616c6c6f636174696f6e20697320636f6d706c6574656044820152606401610ba0565b600d54610d08906001600160a01b03168484846000611a6a565b505050565b606060028054610d1c90613419565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4890613419565b8015610d955780601f10610d6a57610100808354040283529160200191610d95565b820191906000526020600020905b815481529060010190602001808311610d7857829003601f168201915b50505050509050919050565b60046020527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a7547fabd6e7cb50984ff9c2f3e18a2660c3353dadf4e3291deeb275dae2cd1e44fe055460008080527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec54909291610e1d91613464565b610e279190613464565b905090565b6001600160a01b038116600090815260076020526040902054610e615760405162461bcd60e51b8152600401610ba09061347c565b6000610e6c60065490565b610e769047613464565b90506000610ea38383610e9e866001600160a01b031660009081526008602052604090205490565b611bb3565b905080610ec25760405162461bcd60e51b8152600401610ba0906134c2565b6001600160a01b03831660009081526008602052604081208054839290610eea908490613464565b925050819055508060066000828254610f039190613464565b90915550610f1390508382611bf9565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b6001600160a01b038516331480610f765750610f768533610a56565b610fdd5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610ba0565b610fea8585858585611d12565b5050505050565b600080600080610fff611659565b905060006110148261100f611ebc565b611f3e565b905060006110238360fa611f3e565b90506000611033846111f8611f3e565b929791965091945092505050565b6003546001600160a01b0316331461106b5760405162461bcd60e51b8152600401610ba0906133e4565b611073611feb565b565b6001600160a01b0381166000908152600760205260409020546110aa5760405162461bcd60e51b8152600401610ba09061347c565b6001600160a01b0382166000908152600a60205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b15801561110257600080fd5b505afa158015611116573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113a919061350d565b6111449190613464565b9050600061117d8383610e9e87876001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b90508061119c5760405162461bcd60e51b8152600401610ba0906134c2565b6001600160a01b038085166000908152600b60209081526040808320938716835292905290812080548392906111d3908490613464565b90915550506001600160a01b0384166000908152600a602052604081208054839290611200908490613464565b909155506112119050848483612083565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b600c54600160a01b900460ff166112a75760405162461bcd60e51b815260206004820152600e60248201526d14d85b19481a5cc818db1bdcd95960921b6044820152606401610ba0565b600354600160a01b900460ff16156112d15760405162461bcd60e51b8152600401610ba090613526565b821515806112de57508115155b806112e857508015155b6113345760405162461bcd60e51b815260206004820152601960248201527f4f72646572206d75737420626520666f7220616e206974656d000000000000006044820152606401610ba0565b60006113418484846120d5565b905061134d3482612128565b61135a3385858534611a6a565b50505050565b606081518351146113c55760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610ba0565b6000835167ffffffffffffffff8111156113e1576113e1612f46565b60405190808252806020026020018201604052801561140a578160200160208202803683370190505b50905060005b84518110156114825761145585828151811061142e5761142e613550565b602002602001015185838151811061144857611448613550565b6020026020010151610b38565b82828151811061146757611467613550565b602090810291909101015261147b81613566565b9050611410565b509392505050565b6001600160a01b0383163314806114a657506114a68333610a56565b6114c25760405162461bcd60e51b8152600401610ba090613581565b610d08838383612210565b60008060006114dd846000610b38565b6114e8856001610b38565b6114f3866002610b38565b9250925092509193909250565b6003546001600160a01b0316331461152a5760405162461bcd60e51b8152600401610ba0906133e4565b611073600061239e565b60008061153f611659565b905082611559576115528161100f611ebc565b9392505050565b600183141561156d576115528160fa611f3e565b600283141561158257611552816111f8611f3e565b50919050565b6003546001600160a01b031633146115b25760405162461bcd60e51b8152600401610ba0906133e4565b6110736123f0565b6003546000906001600160a01b031633146115e75760405162461bcd60e51b8152600401610ba0906133e4565b600f8290556040518281527f06fe0fd3278e87f46db9f52a32849cbfd5dcefb0d23ea15cd8f7047680ebe11a906020015b60405180910390a15060015b919050565b60006009828154811061163e5761163e613550565b6000918252602090912001546001600160a01b031692915050565b600080600080600080600c60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156116b057600080fd5b505afa1580156116c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e891906135e4565b50919998505050505050505050565b611702338383612455565b5050565b6003546001600160a01b031633146117305760405162461bcd60e51b8152600401610ba0906133e4565b600c54600160a01b900460ff16156117795760405162461bcd60e51b815260206004820152600c60248201526b29b0b6329034b99037b832b760a11b6044820152606401610ba0565b600c805460ff60a81b1916600160a81b1790556040513381527f32c0147a051cb567c1269fd5d3e1506fba1820e0ffb7b51602378a0a397d7ddd906020015b60405180910390a1565b6003546000906001600160a01b031633146117ef5760405162461bcd60e51b8152600401610ba0906133e4565b600e8290556040518281527fd00b5e6e353fecced12d5c6cd88072ca056d6439d28237d88394fce16b00825190602001611618565b6003546001600160a01b0316331461184e5760405162461bcd60e51b8152600401610ba0906133e4565b600c54600160a01b900460ff166118985760405162461bcd60e51b815260206004820152600e60248201526d14d85b19481a5cc818db1bdcd95960921b6044820152606401610ba0565b600c805460ff60a01b191690556040513381527f04d7c886298d6eb5a905ac7fb3af0fcf54f2a37014efa9c3a64dc9efc1b1f528906020016117b8565b6000806118e0611659565b90506115528184611f3e565b600080336001600160a01b031661190b6003546001600160a01b031690565b6001600160a01b0316146119315760405162461bcd60e51b8152600401610ba0906133e4565b5050600e54600f549091565b6001600160a01b03851633148061195957506119598533610a56565b6119755760405162461bcd60e51b8152600401610ba090613581565b610fea8585858585612536565b6003546001600160a01b031633146119ac5760405162461bcd60e51b8152600401610ba0906133e4565b6001600160a01b038116611a115760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ba0565b611a1a8161239e565b50565b6001600160a01b038316331480611a395750611a398333610a56565b611a555760405162461bcd60e51b8152600401610ba090613581565b610d08838383612662565b6000610e27611659565b8315611a8c57611a8c8560008660405180602001604052806000815250612763565b8215611aae57611aae8560018560405180602001604052806000815250612763565b8115611ad057611ad08560028460405180602001604052806000815250612763565b7fe8c22161ad13c1442ab6099a89ee4385f596baf98d3d089f9a6e6874ab21b11585858585611b0a60008081526004602052604090205490565b600160005260046020527fabd6e7cb50984ff9c2f3e18a2660c3353dadf4e3291deeb275dae2cd1e44fe0554600260005260046020527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a754604080516001600160a01b0390981688526020880196909652948601939093526060850191909152608084015260a083015260c082015260e081018390526101000160405180910390a15050505050565b6005546001600160a01b03841660009081526007602052604081205490918391611bdd9086613634565b611be79190613653565b611bf19190613675565b949350505050565b80471015611c495760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610ba0565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611c96576040519150601f19603f3d011682016040523d82523d6000602084013e611c9b565b606091505b5050905080610d085760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610ba0565b8151835114611d335760405162461bcd60e51b8152600401610ba09061368c565b6001600160a01b038416611d595760405162461bcd60e51b8152600401610ba0906136d4565b33611d68818787878787612864565b60005b8451811015611e4e576000858281518110611d8857611d88613550565b602002602001015190506000858381518110611da657611da6613550565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611df65760405162461bcd60e51b8152600401610ba090613719565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611e33908490613464565b9250508190555050505080611e4790613566565b9050611d6b565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611e9e929190613763565b60405180910390a4611eb481878787878761289c565b505050505050565b600080805260046020527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec548190611ef5906001613464565b90506101f4811115611f095760fa91505090565b60648111611f195760dc91505090565b60fa8111611f295760e691505090565b6101f48111611f3a5760f091505090565b5090565b60008083118015611f5457506509184e729fff83105b611f905760405162461bcd60e51b815260206004820152600d60248201526c283934b1b4b7339022b93937b960991b6044820152606401610ba0565b6000611fa7846a52b7d2dcc80cd2e4000000613653565b90506000611fb58483613634565b9050611fc7655af3107a400082613653565b611fd2906001613464565b611fe290655af3107a4000613634565b95945050505050565b600354600160a01b900460ff1661203b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610ba0565b6003805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b0390911681526020016117b8565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d08908490612a07565b6000808080806120e3610ff1565b919450925090506120f48682613634565b6120fe8884613634565b6121088a86613634565b6121129190613464565b61211c9190613464565b98975050505050505050565b60006103e8600f548361213b9190613634565b6121459190613653565b9050808310156121a15760405162461bcd60e51b815260206004820152602160248201527f496e73756666696369656e74204554482070617373656420666f72206f7264656044820152603960f91b6064820152608401610ba0565b60006103e8600e54846121b49190613634565b6121be9190613653565b90508084111561135a5760405162461bcd60e51b815260206004820152601d60248201527f546f6f206d756368204554482070617373656420666f72206f726465720000006044820152606401610ba0565b6001600160a01b0383166122365760405162461bcd60e51b8152600401610ba090613788565b80518251146122575760405162461bcd60e51b8152600401610ba09061368c565b600033905061227a81856000868660405180602001604052806000815250612864565b60005b835181101561233f57600084828151811061229a5761229a613550565b6020026020010151905060008483815181106122b8576122b8613550565b602090810291909101810151600084815280835260408082206001600160a01b038c1683529093529190912054909150818110156123085760405162461bcd60e51b8152600401610ba0906137cb565b6000928352602083815260408085206001600160a01b038b168652909152909220910390558061233781613566565b91505061227d565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612390929190613763565b60405180910390a450505050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600354600160a01b900460ff161561241a5760405162461bcd60e51b8152600401610ba090613526565b6003805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861206b3390565b816001600160a01b0316836001600160a01b031614156124c95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610ba0565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841661255c5760405162461bcd60e51b8152600401610ba0906136d4565b3361257b81878761256c88612ad9565b61257588612ad9565b87612864565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156125bc5760405162461bcd60e51b8152600401610ba090613719565b6000858152602081815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906125f9908490613464565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612659828888888888612b24565b50505050505050565b6001600160a01b0383166126885760405162461bcd60e51b8152600401610ba090613788565b336126b78185600061269987612ad9565b6126a287612ad9565b60405180602001604052806000815250612864565b6000838152602081815260408083206001600160a01b0388168452909152902054828110156126f85760405162461bcd60e51b8152600401610ba0906137cb565b6000848152602081815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b0384166127c35760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610ba0565b336127d48160008761256c88612ad9565b6000848152602081815260408083206001600160a01b038916845290915281208054859290612804908490613464565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610fea81600087878787612b24565b600354600160a01b900460ff161561288e5760405162461bcd60e51b8152600401610ba090613526565b611eb4868686868686612bee565b6001600160a01b0384163b15611eb45760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906128e0908990899088908890889060040161380f565b602060405180830381600087803b1580156128fa57600080fd5b505af192505050801561292a575060408051601f3d908101601f1916820190925261292791810190613861565b60015b6129d75761293661387e565b806308c379a01415612970575061294b61389a565b806129565750612972565b8060405162461bcd60e51b8152600401610ba09190612ed1565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610ba0565b6001600160e01b0319811663bc197c8160e01b146126595760405162461bcd60e51b8152600401610ba090613924565b6000612a5c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612cfa9092919063ffffffff16565b805190915015610d085780806020019051810190612a7a919061396c565b610d085760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ba0565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612b1357612b13613550565b602090810291909101015292915050565b6001600160a01b0384163b15611eb45760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612b689089908990889088908890600401613989565b602060405180830381600087803b158015612b8257600080fd5b505af1925050508015612bb2575060408051601f3d908101601f19168201909252612baf91810190613861565b60015b612bbe5761293661387e565b6001600160e01b0319811663f23a6e6160e01b146126595760405162461bcd60e51b8152600401610ba090613924565b6001600160a01b038516612c755760005b8351811015612c7357828181518110612c1a57612c1a613550565b602002602001015160046000868481518110612c3857612c38613550565b602002602001015181526020019081526020016000206000828254612c5d9190613464565b90915550612c6c905081613566565b9050612bff565b505b6001600160a01b038416611eb45760005b835181101561265957828181518110612ca157612ca1613550565b602002602001015160046000868481518110612cbf57612cbf613550565b602002602001015181526020019081526020016000206000828254612ce49190613675565b90915550612cf3905081613566565b9050612c86565b6060611bf1848460008585843b612d535760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ba0565b600080866001600160a01b03168587604051612d6f91906139c3565b60006040518083038185875af1925050503d8060008114612dac576040519150601f19603f3d011682016040523d82523d6000602084013e612db1565b606091505b5091509150612dc1828286612dcc565b979650505050505050565b60608315612ddb575081611552565b825115612deb5782518084602001fd5b8160405162461bcd60e51b8152600401610ba09190612ed1565b6001600160a01b0381168114611a1a57600080fd5b60008060408385031215612e2d57600080fd5b8235612e3881612e05565b946020939093013593505050565b6001600160e01b031981168114611a1a57600080fd5b600060208284031215612e6e57600080fd5b813561155281612e46565b60005b83811015612e94578181015183820152602001612e7c565b8381111561135a5750506000910152565b60008151808452612ebd816020860160208601612e79565b601f01601f19169290920160200192915050565b6020815260006115526020830184612ea5565b600080600060608486031215612ef957600080fd5b505081359360208301359350604090920135919050565b600060208284031215612f2257600080fd5b5035919050565b600060208284031215612f3b57600080fd5b813561155281612e05565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715612f8257612f82612f46565b6040525050565b600067ffffffffffffffff821115612fa357612fa3612f46565b5060051b60200190565b600082601f830112612fbe57600080fd5b81356020612fcb82612f89565b604051612fd88282612f5c565b83815260059390931b8501820192828101915086841115612ff857600080fd5b8286015b848110156130135780358352918301918301612ffc565b509695505050505050565b600082601f83011261302f57600080fd5b813567ffffffffffffffff81111561304957613049612f46565b604051613060601f8301601f191660200182612f5c565b81815284602083860101111561307557600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156130aa57600080fd5b85356130b581612e05565b945060208601356130c581612e05565b9350604086013567ffffffffffffffff808211156130e257600080fd5b6130ee89838a01612fad565b9450606088013591508082111561310457600080fd5b61311089838a01612fad565b9350608088013591508082111561312657600080fd5b506131338882890161301e565b9150509295509295909350565b6000806040838503121561315357600080fd5b823561315e81612e05565b9150602083013561316e81612e05565b809150509250929050565b6000806040838503121561318c57600080fd5b823567ffffffffffffffff808211156131a457600080fd5b818501915085601f8301126131b857600080fd5b813560206131c582612f89565b6040516131d28282612f5c565b83815260059390931b85018201928281019150898411156131f257600080fd5b948201945b8386101561321957853561320a81612e05565b825294820194908201906131f7565b9650508601359250508082111561322f57600080fd5b5061323c85828601612fad565b9150509250929050565b600081518084526020808501945080840160005b838110156132765781518752958201959082019060010161325a565b509495945050505050565b6020815260006115526020830184613246565b6000806000606084860312156132a957600080fd5b83356132b481612e05565b9250602084013567ffffffffffffffff808211156132d157600080fd5b6132dd87838801612fad565b935060408601359150808211156132f357600080fd5b5061330086828701612fad565b9150509250925092565b8015158114611a1a57600080fd5b6000806040838503121561332b57600080fd5b823561333681612e05565b9150602083013561316e8161330a565b600080600080600060a0868803121561335e57600080fd5b853561336981612e05565b9450602086013561337981612e05565b93506040860135925060608601359150608086013567ffffffffffffffff8111156133a357600080fd5b6131338882890161301e565b6000806000606084860312156133c457600080fd5b83356133cf81612e05565b95602085013595506040909401359392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061342d57607f821691505b6020821081141561158257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156134775761347761344e565b500190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60006020828403121561351f57600080fd5b5051919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561357a5761357a61344e565b5060010190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b805169ffffffffffffffffffff8116811461162457600080fd5b600080600080600060a086880312156135fc57600080fd5b613605866135ca565b9450602086015193506040860151925060608601519150613628608087016135ca565b90509295509295909350565b600081600019048311821515161561364e5761364e61344e565b500290565b60008261367057634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156136875761368761344e565b500390565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006137766040830185613246565b8281036020840152611fe28185613246565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061383b90830186613246565b828103606084015261384d8186613246565b9050828103608084015261211c8185612ea5565b60006020828403121561387357600080fd5b815161155281612e46565b600060033d11156138975760046000803e5060005160e01c5b90565b600060443d10156138a85790565b6040516003193d81016004833e81513d67ffffffffffffffff81602484011181841117156138d857505050505090565b82850191508151818111156138f05750505050505090565b843d870101602082850101111561390a5750505050505090565b61391960208286010187612f5c565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60006020828403121561397e57600080fd5b81516115528161330a565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612dc190830184612ea5565b600082516139d5818460208701612e79565b919091019291505056fea26469706673582212204d712939b10d1542896909ba4ba0033888e37e6b3c9d249008c399480692ac3564736f6c634300080900334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657268747470733a2f2f617277656176652e6e65742f6a4745624e334545506f4b7154777a6b50443472426637756a6d744246745a496b77445f543932343268512f7b69647d2e6a736f6e00000000000000000000000000000000000000000000000000000000000003f200000000000000000000000000000000000000000000000000000000000003de00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bb31ac1eca8e6007775daef2acc433eb0f30454b000000000000000000000000000000000000000000000000000000000000000200000000000000000000000091ca27c4afc03fd61e5de5ab037723497568233b000000000000000000000000bb31ac1eca8e6007775daef2acc433eb0f30454b0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000005a000000000000000000000000000000000000000000000000000000000000000a
Deployed Bytecode
0x6080604052600436106103845760003560e01c806388796ed7116101d1578063c98e3f6e11610102578063e985e9c5116100a0578063f5298aca1161006f578063f5298aca14610aee578063f7393de814610806578063f7fb07b014610b0e578063ff0487fb14610b2357600080fd5b8063e985e9c514610a3b578063f088302e14610a84578063f242432a14610aae578063f2fde38b14610ace57600080fd5b8063d56a7cd6116100dc578063d56a7cd6146109bb578063d79779b2146109db578063de54067314610a11578063e33b7de314610a2657600080fd5b8063c98e3f6e1461095b578063cd183e7114610970578063ce7c2ac21461098557600080fd5b806399288dbb1161016f578063bad90fbf11610149578063bad90fbf146108ed578063bbb05dc414610806578063bd85b0391461090d578063c36e08cb1461093a57600080fd5b806399288dbb14610897578063a22cb465146108b8578063aebc8cf9146108d857600080fd5b80638dca8614116101ab5780638dca8614146108065780638e15f4731461081b57806395d89b41146108305780639852595c1461086157600080fd5b806388796ed7146107905780638b83209b146107b05780638da5cb5b146107e857600080fd5b806348b75044116102b65780636b06c5b411610254578063715018a611610223578063715018a61461073157806379a9207d146107465780638456cb59146107665780638774ece61461077b57600080fd5b80636b06c5b4146106c65780636b20c454146106db5780636c39ee03146106fb5780636fce436c1461071157600080fd5b80634f558e79116102905780634f558e791461064e57806356f0593a1461067d5780635789c5ec146106925780635c975abb146106a757600080fd5b806348b75044146105ee5780634acf615f1461060e5780634e1273f41461062157600080fd5b806319165587116103235780633a98ef39116102fd5780633a98ef39146105685780633f4ba83a1461057d578063406072a91461059257806345d72439146105d857600080fd5b806319165587146105135780632eb2c2d61461053357806333a5de951461055357600080fd5b80630bc88a851161035f5780630bc88a85146104305780630ca1c5c9146104455780630e89341c146104de57806318160ddd146104fe57600080fd5b8062fdd58e1461039357806301ffc9a7146103c657806306fdde03146103f657600080fd5b3661038e57600080fd5b600080fd5b34801561039f57600080fd5b506103b36103ae366004612e1a565b610b38565b6040519081526020015b60405180910390f35b3480156103d257600080fd5b506103e66103e1366004612e5c565b610bcf565b60405190151581526020016103bd565b34801561040257600080fd5b50604080518082019091526008815267151a5b9e54d9595960c21b60208201525b6040516103bd9190612ed1565b61044361043e366004612ee4565b610c21565b005b34801561045157600080fd5b5060046020527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec547fabd6e7cb50984ff9c2f3e18a2660c3353dadf4e3291deeb275dae2cd1e44fe055460026000527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a7545b604080519384526020840192909252908201526060016103bd565b3480156104ea57600080fd5b506104236104f9366004612f10565b610d0d565b34801561050a57600080fd5b506103b3610da1565b34801561051f57600080fd5b5061044361052e366004612f29565b610e2c565b34801561053f57600080fd5b5061044361054e366004613092565b610f5a565b34801561055f57600080fd5b506104c3610ff1565b34801561057457600080fd5b506005546103b3565b34801561058957600080fd5b50610443611041565b34801561059e57600080fd5b506103b36105ad366004613140565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b3480156105e457600080fd5b506103b36101f481565b3480156105fa57600080fd5b50610443610609366004613140565b611075565b61044361061c366004612ee4565b61125d565b34801561062d57600080fd5b5061064161063c366004613179565b611360565b6040516103bd9190613281565b34801561065a57600080fd5b506103e6610669366004612f10565b600090815260046020526040902054151590565b34801561068957600080fd5b506103b3600281565b34801561069e57600080fd5b506103b3606481565b3480156106b357600080fd5b50600354600160a01b900460ff166103e6565b3480156106d257600080fd5b506103b3600081565b3480156106e757600080fd5b506104436106f6366004613294565b61148a565b34801561070757600080fd5b506103b36111f881565b34801561071d57600080fd5b506104c361072c366004612f29565b6114cd565b34801561073d57600080fd5b50610443611500565b34801561075257600080fd5b506103b3610761366004612f10565b611534565b34801561077257600080fd5b50610443611588565b34801561078757600080fd5b506103b3600181565b34801561079c57600080fd5b506103e66107ab366004612f10565b6115ba565b3480156107bc57600080fd5b506107d06107cb366004612f10565b611629565b6040516001600160a01b0390911681526020016103bd565b3480156107f457600080fd5b506003546001600160a01b03166107d0565b34801561081257600080fd5b506103b360fa81565b34801561082757600080fd5b506103b3611659565b34801561083c57600080fd5b506040805180820190915260088152671512539654d1515160c21b6020820152610423565b34801561086d57600080fd5b506103b361087c366004612f29565b6001600160a01b031660009081526008602052604090205490565b3480156108a357600080fd5b50600c546103e690600160a01b900460ff1681565b3480156108c457600080fd5b506104436108d3366004613318565b6116f7565b3480156108e457600080fd5b50610443611706565b3480156108f957600080fd5b506103e6610908366004612f10565b6117c2565b34801561091957600080fd5b506103b3610928366004612f10565b60009081526004602052604090205490565b34801561094657600080fd5b50600c546103e690600160a81b900460ff1681565b34801561096757600080fd5b50610443611824565b34801561097c57600080fd5b506103b360dc81565b34801561099157600080fd5b506103b36109a0366004612f29565b6001600160a01b031660009081526007602052604090205490565b3480156109c757600080fd5b506103b36109d6366004612f10565b6118d5565b3480156109e757600080fd5b506103b36109f6366004612f29565b6001600160a01b03166000908152600a602052604090205490565b348015610a1d57600080fd5b506103b360f081565b348015610a3257600080fd5b506006546103b3565b348015610a4757600080fd5b506103e6610a56366004613140565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b348015610a9057600080fd5b50610a996118ec565b604080519283526020830191909152016103bd565b348015610aba57600080fd5b50610443610ac9366004613346565b61193d565b348015610ada57600080fd5b50610443610ae9366004612f29565b611982565b348015610afa57600080fd5b50610443610b093660046133af565b611a1d565b348015610b1a57600080fd5b506103b3611a60565b348015610b2f57600080fd5b506103b360e681565b60006001600160a01b038316610ba95760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b1480610c0057506001600160e01b031982166303a24d0760e21b145b80610c1b57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6003546001600160a01b03163314610c4b5760405162461bcd60e51b8152600401610ba0906133e4565b600c54600160a01b900460ff1615610c945760405162461bcd60e51b815260206004820152600c60248201526b29b0b6329034b99037b832b760a11b6044820152606401610ba0565b600c54600160a81b900460ff1615610cee5760405162461bcd60e51b815260206004820181905260248201527f446576656c6f70657220616c6c6f636174696f6e20697320636f6d706c6574656044820152606401610ba0565b600d54610d08906001600160a01b03168484846000611a6a565b505050565b606060028054610d1c90613419565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4890613419565b8015610d955780601f10610d6a57610100808354040283529160200191610d95565b820191906000526020600020905b815481529060010190602001808311610d7857829003601f168201915b50505050509050919050565b60046020527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a7547fabd6e7cb50984ff9c2f3e18a2660c3353dadf4e3291deeb275dae2cd1e44fe055460008080527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec54909291610e1d91613464565b610e279190613464565b905090565b6001600160a01b038116600090815260076020526040902054610e615760405162461bcd60e51b8152600401610ba09061347c565b6000610e6c60065490565b610e769047613464565b90506000610ea38383610e9e866001600160a01b031660009081526008602052604090205490565b611bb3565b905080610ec25760405162461bcd60e51b8152600401610ba0906134c2565b6001600160a01b03831660009081526008602052604081208054839290610eea908490613464565b925050819055508060066000828254610f039190613464565b90915550610f1390508382611bf9565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b6001600160a01b038516331480610f765750610f768533610a56565b610fdd5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610ba0565b610fea8585858585611d12565b5050505050565b600080600080610fff611659565b905060006110148261100f611ebc565b611f3e565b905060006110238360fa611f3e565b90506000611033846111f8611f3e565b929791965091945092505050565b6003546001600160a01b0316331461106b5760405162461bcd60e51b8152600401610ba0906133e4565b611073611feb565b565b6001600160a01b0381166000908152600760205260409020546110aa5760405162461bcd60e51b8152600401610ba09061347c565b6001600160a01b0382166000908152600a60205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b15801561110257600080fd5b505afa158015611116573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113a919061350d565b6111449190613464565b9050600061117d8383610e9e87876001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b90508061119c5760405162461bcd60e51b8152600401610ba0906134c2565b6001600160a01b038085166000908152600b60209081526040808320938716835292905290812080548392906111d3908490613464565b90915550506001600160a01b0384166000908152600a602052604081208054839290611200908490613464565b909155506112119050848483612083565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b600c54600160a01b900460ff166112a75760405162461bcd60e51b815260206004820152600e60248201526d14d85b19481a5cc818db1bdcd95960921b6044820152606401610ba0565b600354600160a01b900460ff16156112d15760405162461bcd60e51b8152600401610ba090613526565b821515806112de57508115155b806112e857508015155b6113345760405162461bcd60e51b815260206004820152601960248201527f4f72646572206d75737420626520666f7220616e206974656d000000000000006044820152606401610ba0565b60006113418484846120d5565b905061134d3482612128565b61135a3385858534611a6a565b50505050565b606081518351146113c55760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610ba0565b6000835167ffffffffffffffff8111156113e1576113e1612f46565b60405190808252806020026020018201604052801561140a578160200160208202803683370190505b50905060005b84518110156114825761145585828151811061142e5761142e613550565b602002602001015185838151811061144857611448613550565b6020026020010151610b38565b82828151811061146757611467613550565b602090810291909101015261147b81613566565b9050611410565b509392505050565b6001600160a01b0383163314806114a657506114a68333610a56565b6114c25760405162461bcd60e51b8152600401610ba090613581565b610d08838383612210565b60008060006114dd846000610b38565b6114e8856001610b38565b6114f3866002610b38565b9250925092509193909250565b6003546001600160a01b0316331461152a5760405162461bcd60e51b8152600401610ba0906133e4565b611073600061239e565b60008061153f611659565b905082611559576115528161100f611ebc565b9392505050565b600183141561156d576115528160fa611f3e565b600283141561158257611552816111f8611f3e565b50919050565b6003546001600160a01b031633146115b25760405162461bcd60e51b8152600401610ba0906133e4565b6110736123f0565b6003546000906001600160a01b031633146115e75760405162461bcd60e51b8152600401610ba0906133e4565b600f8290556040518281527f06fe0fd3278e87f46db9f52a32849cbfd5dcefb0d23ea15cd8f7047680ebe11a906020015b60405180910390a15060015b919050565b60006009828154811061163e5761163e613550565b6000918252602090912001546001600160a01b031692915050565b600080600080600080600c60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156116b057600080fd5b505afa1580156116c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e891906135e4565b50919998505050505050505050565b611702338383612455565b5050565b6003546001600160a01b031633146117305760405162461bcd60e51b8152600401610ba0906133e4565b600c54600160a01b900460ff16156117795760405162461bcd60e51b815260206004820152600c60248201526b29b0b6329034b99037b832b760a11b6044820152606401610ba0565b600c805460ff60a81b1916600160a81b1790556040513381527f32c0147a051cb567c1269fd5d3e1506fba1820e0ffb7b51602378a0a397d7ddd906020015b60405180910390a1565b6003546000906001600160a01b031633146117ef5760405162461bcd60e51b8152600401610ba0906133e4565b600e8290556040518281527fd00b5e6e353fecced12d5c6cd88072ca056d6439d28237d88394fce16b00825190602001611618565b6003546001600160a01b0316331461184e5760405162461bcd60e51b8152600401610ba0906133e4565b600c54600160a01b900460ff166118985760405162461bcd60e51b815260206004820152600e60248201526d14d85b19481a5cc818db1bdcd95960921b6044820152606401610ba0565b600c805460ff60a01b191690556040513381527f04d7c886298d6eb5a905ac7fb3af0fcf54f2a37014efa9c3a64dc9efc1b1f528906020016117b8565b6000806118e0611659565b90506115528184611f3e565b600080336001600160a01b031661190b6003546001600160a01b031690565b6001600160a01b0316146119315760405162461bcd60e51b8152600401610ba0906133e4565b5050600e54600f549091565b6001600160a01b03851633148061195957506119598533610a56565b6119755760405162461bcd60e51b8152600401610ba090613581565b610fea8585858585612536565b6003546001600160a01b031633146119ac5760405162461bcd60e51b8152600401610ba0906133e4565b6001600160a01b038116611a115760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ba0565b611a1a8161239e565b50565b6001600160a01b038316331480611a395750611a398333610a56565b611a555760405162461bcd60e51b8152600401610ba090613581565b610d08838383612662565b6000610e27611659565b8315611a8c57611a8c8560008660405180602001604052806000815250612763565b8215611aae57611aae8560018560405180602001604052806000815250612763565b8115611ad057611ad08560028460405180602001604052806000815250612763565b7fe8c22161ad13c1442ab6099a89ee4385f596baf98d3d089f9a6e6874ab21b11585858585611b0a60008081526004602052604090205490565b600160005260046020527fabd6e7cb50984ff9c2f3e18a2660c3353dadf4e3291deeb275dae2cd1e44fe0554600260005260046020527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a754604080516001600160a01b0390981688526020880196909652948601939093526060850191909152608084015260a083015260c082015260e081018390526101000160405180910390a15050505050565b6005546001600160a01b03841660009081526007602052604081205490918391611bdd9086613634565b611be79190613653565b611bf19190613675565b949350505050565b80471015611c495760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610ba0565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611c96576040519150601f19603f3d011682016040523d82523d6000602084013e611c9b565b606091505b5050905080610d085760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610ba0565b8151835114611d335760405162461bcd60e51b8152600401610ba09061368c565b6001600160a01b038416611d595760405162461bcd60e51b8152600401610ba0906136d4565b33611d68818787878787612864565b60005b8451811015611e4e576000858281518110611d8857611d88613550565b602002602001015190506000858381518110611da657611da6613550565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611df65760405162461bcd60e51b8152600401610ba090613719565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611e33908490613464565b9250508190555050505080611e4790613566565b9050611d6b565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611e9e929190613763565b60405180910390a4611eb481878787878761289c565b505050505050565b600080805260046020527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec548190611ef5906001613464565b90506101f4811115611f095760fa91505090565b60648111611f195760dc91505090565b60fa8111611f295760e691505090565b6101f48111611f3a5760f091505090565b5090565b60008083118015611f5457506509184e729fff83105b611f905760405162461bcd60e51b815260206004820152600d60248201526c283934b1b4b7339022b93937b960991b6044820152606401610ba0565b6000611fa7846a52b7d2dcc80cd2e4000000613653565b90506000611fb58483613634565b9050611fc7655af3107a400082613653565b611fd2906001613464565b611fe290655af3107a4000613634565b95945050505050565b600354600160a01b900460ff1661203b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610ba0565b6003805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b0390911681526020016117b8565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d08908490612a07565b6000808080806120e3610ff1565b919450925090506120f48682613634565b6120fe8884613634565b6121088a86613634565b6121129190613464565b61211c9190613464565b98975050505050505050565b60006103e8600f548361213b9190613634565b6121459190613653565b9050808310156121a15760405162461bcd60e51b815260206004820152602160248201527f496e73756666696369656e74204554482070617373656420666f72206f7264656044820152603960f91b6064820152608401610ba0565b60006103e8600e54846121b49190613634565b6121be9190613653565b90508084111561135a5760405162461bcd60e51b815260206004820152601d60248201527f546f6f206d756368204554482070617373656420666f72206f726465720000006044820152606401610ba0565b6001600160a01b0383166122365760405162461bcd60e51b8152600401610ba090613788565b80518251146122575760405162461bcd60e51b8152600401610ba09061368c565b600033905061227a81856000868660405180602001604052806000815250612864565b60005b835181101561233f57600084828151811061229a5761229a613550565b6020026020010151905060008483815181106122b8576122b8613550565b602090810291909101810151600084815280835260408082206001600160a01b038c1683529093529190912054909150818110156123085760405162461bcd60e51b8152600401610ba0906137cb565b6000928352602083815260408085206001600160a01b038b168652909152909220910390558061233781613566565b91505061227d565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612390929190613763565b60405180910390a450505050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600354600160a01b900460ff161561241a5760405162461bcd60e51b8152600401610ba090613526565b6003805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861206b3390565b816001600160a01b0316836001600160a01b031614156124c95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610ba0565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841661255c5760405162461bcd60e51b8152600401610ba0906136d4565b3361257b81878761256c88612ad9565b61257588612ad9565b87612864565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156125bc5760405162461bcd60e51b8152600401610ba090613719565b6000858152602081815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906125f9908490613464565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612659828888888888612b24565b50505050505050565b6001600160a01b0383166126885760405162461bcd60e51b8152600401610ba090613788565b336126b78185600061269987612ad9565b6126a287612ad9565b60405180602001604052806000815250612864565b6000838152602081815260408083206001600160a01b0388168452909152902054828110156126f85760405162461bcd60e51b8152600401610ba0906137cb565b6000848152602081815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b0384166127c35760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610ba0565b336127d48160008761256c88612ad9565b6000848152602081815260408083206001600160a01b038916845290915281208054859290612804908490613464565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610fea81600087878787612b24565b600354600160a01b900460ff161561288e5760405162461bcd60e51b8152600401610ba090613526565b611eb4868686868686612bee565b6001600160a01b0384163b15611eb45760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906128e0908990899088908890889060040161380f565b602060405180830381600087803b1580156128fa57600080fd5b505af192505050801561292a575060408051601f3d908101601f1916820190925261292791810190613861565b60015b6129d75761293661387e565b806308c379a01415612970575061294b61389a565b806129565750612972565b8060405162461bcd60e51b8152600401610ba09190612ed1565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610ba0565b6001600160e01b0319811663bc197c8160e01b146126595760405162461bcd60e51b8152600401610ba090613924565b6000612a5c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612cfa9092919063ffffffff16565b805190915015610d085780806020019051810190612a7a919061396c565b610d085760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ba0565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612b1357612b13613550565b602090810291909101015292915050565b6001600160a01b0384163b15611eb45760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612b689089908990889088908890600401613989565b602060405180830381600087803b158015612b8257600080fd5b505af1925050508015612bb2575060408051601f3d908101601f19168201909252612baf91810190613861565b60015b612bbe5761293661387e565b6001600160e01b0319811663f23a6e6160e01b146126595760405162461bcd60e51b8152600401610ba090613924565b6001600160a01b038516612c755760005b8351811015612c7357828181518110612c1a57612c1a613550565b602002602001015160046000868481518110612c3857612c38613550565b602002602001015181526020019081526020016000206000828254612c5d9190613464565b90915550612c6c905081613566565b9050612bff565b505b6001600160a01b038416611eb45760005b835181101561265957828181518110612ca157612ca1613550565b602002602001015160046000868481518110612cbf57612cbf613550565b602002602001015181526020019081526020016000206000828254612ce49190613675565b90915550612cf3905081613566565b9050612c86565b6060611bf1848460008585843b612d535760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ba0565b600080866001600160a01b03168587604051612d6f91906139c3565b60006040518083038185875af1925050503d8060008114612dac576040519150601f19603f3d011682016040523d82523d6000602084013e612db1565b606091505b5091509150612dc1828286612dcc565b979650505050505050565b60608315612ddb575081611552565b825115612deb5782518084602001fd5b8160405162461bcd60e51b8152600401610ba09190612ed1565b6001600160a01b0381168114611a1a57600080fd5b60008060408385031215612e2d57600080fd5b8235612e3881612e05565b946020939093013593505050565b6001600160e01b031981168114611a1a57600080fd5b600060208284031215612e6e57600080fd5b813561155281612e46565b60005b83811015612e94578181015183820152602001612e7c565b8381111561135a5750506000910152565b60008151808452612ebd816020860160208601612e79565b601f01601f19169290920160200192915050565b6020815260006115526020830184612ea5565b600080600060608486031215612ef957600080fd5b505081359360208301359350604090920135919050565b600060208284031215612f2257600080fd5b5035919050565b600060208284031215612f3b57600080fd5b813561155281612e05565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715612f8257612f82612f46565b6040525050565b600067ffffffffffffffff821115612fa357612fa3612f46565b5060051b60200190565b600082601f830112612fbe57600080fd5b81356020612fcb82612f89565b604051612fd88282612f5c565b83815260059390931b8501820192828101915086841115612ff857600080fd5b8286015b848110156130135780358352918301918301612ffc565b509695505050505050565b600082601f83011261302f57600080fd5b813567ffffffffffffffff81111561304957613049612f46565b604051613060601f8301601f191660200182612f5c565b81815284602083860101111561307557600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156130aa57600080fd5b85356130b581612e05565b945060208601356130c581612e05565b9350604086013567ffffffffffffffff808211156130e257600080fd5b6130ee89838a01612fad565b9450606088013591508082111561310457600080fd5b61311089838a01612fad565b9350608088013591508082111561312657600080fd5b506131338882890161301e565b9150509295509295909350565b6000806040838503121561315357600080fd5b823561315e81612e05565b9150602083013561316e81612e05565b809150509250929050565b6000806040838503121561318c57600080fd5b823567ffffffffffffffff808211156131a457600080fd5b818501915085601f8301126131b857600080fd5b813560206131c582612f89565b6040516131d28282612f5c565b83815260059390931b85018201928281019150898411156131f257600080fd5b948201945b8386101561321957853561320a81612e05565b825294820194908201906131f7565b9650508601359250508082111561322f57600080fd5b5061323c85828601612fad565b9150509250929050565b600081518084526020808501945080840160005b838110156132765781518752958201959082019060010161325a565b509495945050505050565b6020815260006115526020830184613246565b6000806000606084860312156132a957600080fd5b83356132b481612e05565b9250602084013567ffffffffffffffff808211156132d157600080fd5b6132dd87838801612fad565b935060408601359150808211156132f357600080fd5b5061330086828701612fad565b9150509250925092565b8015158114611a1a57600080fd5b6000806040838503121561332b57600080fd5b823561333681612e05565b9150602083013561316e8161330a565b600080600080600060a0868803121561335e57600080fd5b853561336981612e05565b9450602086013561337981612e05565b93506040860135925060608601359150608086013567ffffffffffffffff8111156133a357600080fd5b6131338882890161301e565b6000806000606084860312156133c457600080fd5b83356133cf81612e05565b95602085013595506040909401359392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061342d57607f821691505b6020821081141561158257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156134775761347761344e565b500190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60006020828403121561351f57600080fd5b5051919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561357a5761357a61344e565b5060010190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b805169ffffffffffffffffffff8116811461162457600080fd5b600080600080600060a086880312156135fc57600080fd5b613605866135ca565b9450602086015193506040860151925060608601519150613628608087016135ca565b90509295509295909350565b600081600019048311821515161561364e5761364e61344e565b500290565b60008261367057634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156136875761368761344e565b500390565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006137766040830185613246565b8281036020840152611fe28185613246565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061383b90830186613246565b828103606084015261384d8186613246565b9050828103608084015261211c8185612ea5565b60006020828403121561387357600080fd5b815161155281612e46565b600060033d11156138975760046000803e5060005160e01c5b90565b600060443d10156138a85790565b6040516003193d81016004833e81513d67ffffffffffffffff81602484011181841117156138d857505050505090565b82850191508151818111156138f05750505050505090565b843d870101602082850101111561390a5750505050505090565b61391960208286010187612f5c565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60006020828403121561397e57600080fd5b81516115528161330a565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612dc190830184612ea5565b600082516139d5818460208701612e79565b919091019291505056fea26469706673582212204d712939b10d1542896909ba4ba0033888e37e6b3c9d249008c399480692ac3564736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000003f200000000000000000000000000000000000000000000000000000000000003de00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bb31ac1eca8e6007775daef2acc433eb0f30454b000000000000000000000000000000000000000000000000000000000000000200000000000000000000000091ca27c4afc03fd61e5de5ab037723497568233b000000000000000000000000bb31ac1eca8e6007775daef2acc433eb0f30454b0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000005a000000000000000000000000000000000000000000000000000000000000000a
-----Decoded View---------------
Arg [0] : _priceBufferUp (uint256): 1010
Arg [1] : _priceBufferDown (uint256): 990
Arg [2] : _payees (address[]): 0x91ca27c4afC03FD61e5DE5Ab037723497568233B,0xbb31aC1eca8E6007775DAEF2ACc433EB0f30454B
Arg [3] : _shares (uint256[]): 90,10
Arg [4] : _developer (address): 0xbb31aC1eca8E6007775DAEF2ACc433EB0f30454B
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000003f2
Arg [1] : 00000000000000000000000000000000000000000000000000000000000003de
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [4] : 000000000000000000000000bb31ac1eca8e6007775daef2acc433eb0f30454b
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [6] : 00000000000000000000000091ca27c4afc03fd61e5de5ab037723497568233b
Arg [7] : 000000000000000000000000bb31ac1eca8e6007775daef2acc433eb0f30454b
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [9] : 000000000000000000000000000000000000000000000000000000000000005a
Arg [10] : 000000000000000000000000000000000000000000000000000000000000000a
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.