ERC-721
NFT
Overview
Max Total Supply
9,998 Blvck
Holders
4,838
Market
Volume (24H)
0.0046 ETH
Min Price (24H)
$16.09 @ 0.004600 ETH
Max Price (24H)
$16.09 @ 0.004600 ETH
Other Info
Token Contract
Balance
1 BlvckLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
BLVCKNFT
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 1300 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; /** @notice IMPORTANT NOTICE: This smart contract was written and deployed by the software engineers at https://horagames.com in a contractor capacity. HoraGames is not responsible for any malicious use or losses arising from using or interacting with this smart contract. THIS CONTRACT IS PROVIDED ON AN “AS IS” BASIS. USE THIS SOFTWARE AT YOUR OWN RISK. THERE IS NO WARRANTY, EXPRESSED OR IMPLIED, THAT DESCRIBED FUNCTIONALITY WILL FUNCTION AS EXPECTED OR INTENDED. PRODUCT MAY CEASE TO EXIST. NOT AN INVESTMENT, SECURITY OR A SWAP. TOKENS HAVE NO RIGHTS, USES, PURPOSE, ATTRIBUTES, FUNCTIONALITIES OR FEATURES, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY USES, PURPOSE OR ATTRIBUTES. TOKENS MAY HAVE NO VALUE. PRODUCT MAY CONTAIN BUGS AND SERIOUS BREACHES IN THE SECURITY THAT MAY RESULT IN LOSS OF YOUR ASSETS OR THEIR IMPLIED VALUE. ALL THE CRYPTOCURRENCY TRANSFERRED TO THIS SMART CONTRACT MAY BE LOST. THE CONTRACT DEVELOPERS ARE NOT RESPONSIBLE FOR ANY MONETARY LOSS, PROFIT LOSS OR ANY OTHER LOSSES DUE TO USE OF DESCRIBED PRODUCT. CHANGES COULD BE MADE BEFORE AND AFTER THE RELEASE OF THE PRODUCT. NO PRIOR NOTICE MAY BE GIVEN. ALL TRANSACTION ON THE BLOCKCHAIN ARE FINAL, NO REFUND, COMPENSATION OR REIMBURSEMENT POSSIBLE. YOU MAY LOOSE ALL THE CRYPTOCURRENCY USED TO INTERACT WITH THIS CONTRACT. IT IS YOUR RESPONSIBILITY TO REVIEW THE PROJECT, TEAM, TERMS & CONDITIONS BEFORE USING THE PRODUCT. **/ import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; /** @title BLVCK NFT Contract * @author Dr. Siniša * @notice This contract follows ERC721 standard. It's extended with OpenZeppelin's 'Ownable' library * which controls what methods can be called exclusively by contract's owner and eventually allows the current owner * to transfer ownership to someone else. see https://docs.openzeppelin.com/contracts/2.x/access-control for details. * It also includes 'PaymentSplitter' functions which enables the shareholders to withdraw funds from this contract, * also including any tokens received. see https://docs.openzeppelin.com/contracts/2.x/api/payment for more. * Token IDs are always ordered from 0 to totalSupply(). No 'gaps' and no 'Burned' tokens are possible. * The contract Owner can enable and disable Public Sale which, when enabled, allows tokens to be minted by * everyone if the right amount of funds is provided to 'safeMint' method. * Price for minting a token can be changed at any time by the Owner, but there is only one price for all tokens * at a time. Server base url can be changed if someday maybe NFT metadata will migrate to IPFS or another server/domain. * An address can be assigned by Owner to be 'minter'. That account would normally be controlled * by backend to allow more control over minting process, whitelisting, raffle, and would make significant reduction * in gas costs. When a user is added to whitelist by raffle or operators, he can then deposit funds to this * contract and then wait to be verified by minter service, which will eventually mint NFT(s) to user. Each user has * total deposit value stored in this contract, and after received a certain amount of NFTs, that value resets to zero. */ contract BLVCKNFT is ERC721, Ownable, PaymentSplitter { using Counters for Counters.Counter; /** * @notice constant limit for tokens total supply. cannot be changed by anyone */ uint256 private constant MAX_SUPPLY = 9999; uint256 private constant RESERVED_AMOUNT = 300; /** * @notice switch on/off public sale */ bool private publicSaleIsActive = false; /** * @notice address assigned to control minting */ address private minterAddress; bool private minterEnabled; /** * @notice universal url prefix for all NFTs in this contract, so the final url is like baseUri + '/' + token id */ string private baseUri; /** * @notice current price to mint single NFT */ uint256 private currentPrice = 0.2 ether; /** * @notice counter to assign next token id (this equals totalSupply) */ Counters.Counter private _tokenIdCounter; /** * @notice list of addresses that deposited funds, waiting to receive tokens. when zero or less than current price, no minting will happen. */ mapping(address => uint256) private pendingMintBalances; /** * @notice initialization of contract * @dev checkout https://docs.openzeppelin.com/contracts/2.x/api/payment on how to configure _payees and _shares * @param payeesList is a list of shareholders * @param sharesList is a list of shares belonging to shareholders at corresponding index in _payees list */ constructor(address[] memory payeesList, uint256[] memory sharesList) ERC721("Blvck Genesis", "Blvck") PaymentSplitter(payeesList, sharesList) { } function setBaseUri(string calldata newBaseURI) external onlyOwner { baseUri = newBaseURI; } function setPublicSale(bool setPublicSaleIsActive) external onlyOwner { publicSaleIsActive = setPublicSaleIsActive; } function setMinterAddress(address newMinterAddress) external onlyOwner{ minterAddress = newMinterAddress; } function setCurrentPrice(uint256 newPrice) external onlyOwner { currentPrice = newPrice; } function setMinterEnabled(bool enabled) external onlyOwner { minterEnabled = enabled; } /** * @notice functions with this modifier are only allowed to be executed by minter account */ modifier onlyMinter() { require(minterAddress == _msgSender() && minterAddress != address (0), "not a minter"); _; } modifier onlyMinterAndEnabled() { require(minterAddress == _msgSender() && minterAddress != address (0), "not a minter"); require(minterEnabled, "enable minter first"); _; } /** * @notice functions with this modifier work when public sale is active */ modifier onlyOnPublicSale() { require(publicSaleIsActive, "public sale is not active"); _; } /** * @notice checking for price match and that total supply would be reached * @param value is a total amount user is trying to send * @param amount is how many tokens user wants to mint * @return uint256 tokenId */ function checkPriceAndAmount(uint256 value, uint256 amount) private view returns (uint256) { require(amount > 0 && value == currentPrice * amount, "invalid price"); return checkTotalSupply(amount); } /** * @notice check if total supply would overflow for amount of new tokens * @param amount is how many tokens user wants to mint * @return uint256 tokenId */ function checkTotalSupply(uint256 amount) private view returns (uint256) { uint256 tokenId = _tokenIdCounter.current(); require(tokenId + amount < MAX_SUPPLY - RESERVED_AMOUNT, "no more tokens available for minting"); return tokenId; } function checkTotalSupply(uint256 amount, bool useReservedAmount) private view returns (uint256) { if (!useReservedAmount) { return checkTotalSupply(amount); } uint256 tokenId = _tokenIdCounter.current(); require(tokenId + amount < MAX_SUPPLY, "total supply reached"); return tokenId; } ////////////////////////////////////////// Mint Functions ////////////////////////////////////////////////////// /** * @notice ERC721 compatible mint method. exact amount of funds must be sent when calling this function (currentPrice * amount) * @notice everyone can execute but only if public sale is active * @param amount is how much NFTs is expected to mint. will fail if amount is zero or does not match with currentPrice total */ function safeMint(uint256 amount) external payable onlyOnPublicSale { uint256 tokenId = checkPriceAndAmount(msg.value, amount); safeMintMany(_msgSender(), tokenId, amount); } /** * @notice mint amount of tokens * @param to is the address to receive tokens * @param tokenId is the starting id of token * @param amount is how many tokens to mint */ function safeMintMany(address to, uint256 tokenId, uint256 amount) private { for (uint i = 0; i < amount; ++i) { _tokenIdCounter.increment(); _safeMint(to, tokenId); tokenId = _tokenIdCounter.current(); } } /** * @notice this allows minter account to mint amount of tokens for addresses * @param amount is number of tokens to mint for address at same index * @param addresses is accounts receiving the tokens */ function minterMintBatch(uint256 amount, address[] calldata addresses) external onlyMinterAndEnabled { uint256 tokenId = checkTotalSupply(amount * addresses.length, true); uint256 i; for (i = 0; i < addresses.length; i++) { uint256 j; address to = addresses[i]; for (j = 0; j < amount; j++) { _tokenIdCounter.increment(); _safeMint(to, tokenId); tokenId = _tokenIdCounter.current(); } } } /** * @notice this allows minter account to mint one token for address to * @param to is account receiving the tokens */ function minterMint(address to) external onlyMinterAndEnabled { uint256 tokenId = checkTotalSupply(1, true); _safeMint(to, tokenId); _tokenIdCounter.increment(); } /** * @notice this is executed by minter to settle balance of user deposited to contract and increase balance of NFTs to user * @param addresses is the account(s) to receive NFTs (if deposited enough funds) */ function minterMintWithPendingBalance(address[] memory addresses) external onlyMinterAndEnabled { uint256 tokenId = checkTotalSupply(addresses.length); uint256 i; for (i = 0; i < addresses.length; i++) { address to = addresses[i]; if (pendingMintBalances[to] >= currentPrice) { _tokenIdCounter.increment(); pendingMintBalances[to] -= currentPrice; _safeMint(to, tokenId); tokenId = _tokenIdCounter.current(); } } } /** * @notice this allows Owner to mint some tokens to himself only paying for gas price * @param amount is number of tokens to mint */ function reserveTokens(address to, uint256 amount) external onlyOwner() { uint256 tokenId = checkTotalSupply(amount, true); safeMintMany(to, tokenId, amount); } /** * Function to clear the Pending balance for some addresses */ function clearPendingBalances(address[] memory addresses) external onlyMinterAndEnabled { uint256 i; for (i = 0; i < addresses.length; i++) { address to = addresses[i]; pendingMintBalances[to] = 0; } } /** * Function to refund pending balance for some address */ function refundPendingBalance(uint256 amount, address payable to) external onlyOwner { require(pendingMintBalances[to] >= amount, "amount > balance"); pendingMintBalances[to] -= amount; to.transfer(amount); } ////////////////////////////////////////// View Functions ////////////////////////////////////////////////////// function _baseURI() internal view override returns (string memory) { return baseUri; } function baseURI() external view returns (string memory) { return baseUri; } function contractURI() public view returns (string memory) { return string(abi.encodePacked(baseUri, "contract")); } /** * @notice query who currently is a minter (public) * @return address of minter */ function getMinterAddress() external view returns (address){ return minterAddress; } /** * @notice query for current mint price (public) * @return uint256 price in wei */ function getCurrentPrice() external view returns (uint256){ return currentPrice; } /** * @notice check how much funds some address has deposited (public) * @param addressToCheck is to specify account * @return uint256 amount of funds deposited by address waiting to receive NFTs. multiple deposits are added. balance can be reset to zero by minter */ function readPendingMintBalance(address addressToCheck) external view returns (uint256) { return pendingMintBalances[addressToCheck]; } /** * @notice batch query to check a list of addresses for deposit balance (public) * @param addresses is a list of addresses to check for balance * @return uint256 amount of funds deposited by address waiting to receive NFTs. multiple deposits are added. balance can be reset to zero by minter */ function readPendingMintBalanceBatch(address[] memory addresses) external view returns (uint256 [] memory) { uint256 [] memory balances = new uint256[](addresses.length); for (uint i = 0; i < addresses.length; ++i) { balances[i] = pendingMintBalances[addresses[i]]; } return balances; } /** * @notice get current amount of tokens minted * @return uint256 amount of tokens */ function totalSupply() external view returns (uint256) { return _tokenIdCounter.current(); } /* just a wrapper to make try/catch block working */ function ownerOfTokenExternal(uint256 tokenId) external view returns (address) { return ownerOf(tokenId); } /** * @notice extension to erc721 ownerOf, to support batch request and lower API calls to blockchain node * @param start is the starting token index * @param count is how many consecutive tokens to return * @return uint256 array of owners of tokens with offset relative to start */ function ownerOfBatch(uint256 start, uint256 count) external view returns (address [] memory) { address [] memory owners = new address[](count); for (uint i = 0; i < count; ++i) { uint256 tokenId = start + i; if (tokenId > _tokenIdCounter.current()) { owners[i] = address (0); } else { try this.ownerOfTokenExternal(tokenId) returns (address tokenOwner) { owners[i] = tokenOwner; } catch Error(string memory /*reason*/) { owners[i] = address (0); } } } return owners; } ////////////////////////////////////////// Whitelist Functions ////////////////////////////////////////////////////// /* this is to control how much some whitelisted address can mint per round in round 1 amount is max 1, round 2 max 1, round 3 is currently unlimited but it's just for testing */ mapping(address => bool) private claimedInRound1; mapping(address => bool) private claimedInRound2; /* this is set when round is set */ bytes32 private merkleRoot = ""; /* everything disabled by default */ uint256 currentRound = 0; /* will be used by backend to start issuing proofs to clients */ function getCurrentRound() external view returns (uint256) { return currentRound; } /* we may show this on frontend mint page ? */ function getClaimedAmounts(address addr) external view returns (bool, bool) { return (claimedInRound1[addr], claimedInRound2[addr]); } /* we will call this from backend, when configuration is changed manually at run time */ function setCurrentRound(uint256 newCurrentRound, bytes32 newMerkleRoot) external onlyMinter { currentRound = newCurrentRound; merkleRoot = newMerkleRoot; } /* main mint function to be called from frontend proof if obtained from backend endpoint if signature is verified and canMint=1 */ function whitelistMint(bytes32[] calldata merkleProof) external payable { require(currentRound > 0 && currentRound < 4, "currentRound must be 1-3"); require(msg.value == currentPrice, "exact amount of ETH must be sent"); uint256 tokenId = checkTotalSupply(1); bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "invalid proof, you are not blvcklisted"); if (currentRound == 1) { require(!claimedInRound1[_msgSender()], "maximum is 1 mint in round 1"); claimedInRound1[_msgSender()] = true; } else if (currentRound == 2) { require(!claimedInRound2[_msgSender()], "maximum is 1 mint in round 2"); claimedInRound2[_msgSender()] = true; } _tokenIdCounter.increment(); _safeMint(_msgSender(), tokenId); } ////////////////////////////////////////// Payment Functions ////////////////////////////////////////////////////// /** * @notice this gets called when whitelisted user sends funds to this contract */ receive() external payable virtual override { // override from PaymentSplitter pendingMintBalances[_msgSender()] += msg.value; // add new funds to users pendingBalance record emit PaymentReceived(_msgSender(), msg.value); } /* because etherscan fails to call overloaded release function */ function release2(address payable addr) external { release(addr); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev 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, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// 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 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// 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 // OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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": 1300 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address[]","name":"payeesList","type":"address[]"},{"internalType":"uint256[]","name":"sharesList","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":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"},{"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":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"clearPendingBalances","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getClaimedAmounts","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"minterMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"minterMintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"minterMintWithPendingBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"ownerOfBatch","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOfTokenExternal","outputs":[{"internalType":"address","name":"","type":"address"}],"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","name":"addressToCheck","type":"address"}],"name":"readPendingMintBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"readPendingMintBalanceBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"to","type":"address"}],"name":"refundPendingBalance","outputs":[],"stateMutability":"nonpayable","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":"address payable","name":"addr","type":"address"}],"name":"release2","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":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"reserveTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"safeMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setCurrentPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newCurrentRound","type":"uint256"},{"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"setCurrentRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newMinterAddress","type":"address"}],"name":"setMinterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setMinterEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"setPublicSaleIsActive","type":"bool"}],"name":"setPublicSale","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":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052600e805460ff191690556702c68af0bb140000601055600060158190556016553480156200003157600080fd5b506040516200489338038062004893833981016040819052620000549162000592565b604080518082018252600d81526c426c76636b2047656e6573697360981b602080830191825283518085019094526005845264426c76636b60d81b90840152815185938593929091620000aa9160009162000475565b508051620000c090600190602084019062000475565b505050620000dd620000d76200023160201b60201c565b62000235565b80518251146200014f5760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001a25760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f20706179656573000000000000604482015260640162000146565b60005b8251811015620002265762000211838281518110620001d457634e487b7160e01b600052603260045260246000fd5b6020026020010151838381518110620001fd57634e487b7160e01b600052603260045260246000fd5b60200260200101516200028760201b60201c565b806200021d8162000720565b915050620001a5565b50505050506200076a565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216620002f45760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b606482015260840162000146565b60008111620003465760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a20736861726573206172652030000000604482015260640162000146565b6001600160a01b03821660009081526009602052604090205415620003c25760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b606482015260840162000146565b600b8054600181019091557f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b0319166001600160a01b03841690811790915560009081526009602052604090208190556007546200042c908290620006c8565b600755604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b8280546200048390620006e3565b90600052602060002090601f016020900481019282620004a75760008555620004f2565b82601f10620004c257805160ff1916838001178555620004f2565b82800160010185558215620004f2579182015b82811115620004f2578251825591602001919060010190620004d5565b506200050092915062000504565b5090565b5b8082111562000500576000815560010162000505565b600082601f8301126200052c578081fd5b81516020620005456200053f83620006a2565b6200066f565b80838252828201915082860187848660051b890101111562000565578586fd5b855b85811015620005855781518452928401929084019060010162000567565b5090979650505050505050565b60008060408385031215620005a5578182fd5b82516001600160401b0380821115620005bc578384fd5b818501915085601f830112620005d0578384fd5b81516020620005e36200053f83620006a2565b8083825282820191508286018a848660051b890101111562000603578889fd5b8896505b848710156200063c5780516001600160a01b03811681146200062757898afd5b83526001969096019591830191830162000607565b509188015191965090935050508082111562000656578283fd5b5062000665858286016200051b565b9150509250929050565b604051601f8201601f191681016001600160401b03811182821017156200069a576200069a62000754565b604052919050565b60006001600160401b03821115620006be57620006be62000754565b5060051b60200190565b60008219821115620006de57620006de6200073e565b500190565b600181811c90821680620006f857607f821691505b602082108114156200071a57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200073757620007376200073e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b614119806200077a6000396000f3fe6080604052600436106103385760003560e01c806371a7f67a116101b0578063abf9e9f9116100ec578063d79779b211610095578063e985e9c51161006f578063e985e9c514610a29578063eb04959514610a72578063eb91d37e14610a92578063f2fde38b14610aa757600080fd5b8063d79779b2146109c9578063e33b7de3146109ff578063e8a3d48514610a1457600080fd5b8063c1833ff8116100c6578063c1833ff814610953578063c87b56dd14610973578063ce7c2ac21461099357600080fd5b8063abf9e9f9146108f3578063b6249ece14610913578063b88d4fde1461093357600080fd5b806395d89b4111610159578063a22cb46511610133578063a22cb4651461087e578063a3106b951461089e578063a32bf597146108be578063a5afe8b9146108d357600080fd5b806395d89b41146108135780639852595c14610828578063a0bcfc7f1461085e57600080fd5b80638c116de91161018a5780638c116de9146107a55780638da5cb5b146107d257806393e5d42a146107f057600080fd5b806371a7f67a1461072f57806378cf19e9146107655780638b83209b1461078557600080fd5b8063372f657c1161027f578063599d10a811610228578063678d84bd11610202578063678d84bd146106845780636c0360eb146106e557806370a08231146106fa578063715018a61461071a57600080fd5b8063599d10a8146106245780635aca1bb6146106445780636352211e1461066457600080fd5b8063406072a911610259578063406072a91461059e57806342842e0e146105e457806348b750441461060457600080fd5b8063372f657c146105565780633a717723146105695780633a98ef391461058957600080fd5b806319165587116102e15780632bdef860116102bb5780632bdef8601461050357806331c864e81461052357806332471d3e1461053657600080fd5b8063191655871461049657806323b872dd146104b657806325c405b0146104d657600080fd5b8063095ea7b311610312578063095ea7b31461043157806318160ddd1461045357806318b200711461047657600080fd5b806301ffc9a7146103a257806306fdde03146103d7578063081812fc146103f957600080fd5b3661039d57336000908152601260205260408120805434929061035c908490613ea1565b90915550506040805133815234602082015281517f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be770929181900390910190a1005b600080fd5b3480156103ae57600080fd5b506103c26103bd366004613b20565b610ac7565b60405190151581526020015b60405180910390f35b3480156103e357600080fd5b506103ec610b64565b6040516103ce9190613e8e565b34801561040557600080fd5b50610419610414366004613bd7565b610bf6565b6040516001600160a01b0390911681526020016103ce565b34801561043d57600080fd5b5061045161044c3660046139c5565b610ca1565b005b34801561045f57600080fd5b50610468610dd3565b6040519081526020016103ce565b34801561048257600080fd5b50610451610491366004613bd7565b610de3565b3480156104a257600080fd5b506104516104b1366004613828565b610e42565b3480156104c257600080fd5b506104516104d1366004613898565b611005565b3480156104e257600080fd5b506104f66104f1366004613c75565b61108c565b6040516103ce9190613e09565b34801561050f57600080fd5b5061045161051e366004613c2b565b6112af565b610451610531366004613bd7565b61141d565b34801561054257600080fd5b50610451610551366004613828565b61148c565b610451610564366004613aa8565b611498565b34801561057557600080fd5b50610419610584366004613bd7565b611785565b34801561059557600080fd5b50600754610468565b3480156105aa57600080fd5b506104686105b9366004613b58565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205490565b3480156105f057600080fd5b506104516105ff366004613898565b611790565b34801561061057600080fd5b5061045161061f366004613b58565b6117ab565b34801561063057600080fd5b5061045161063f3660046139f0565b611a41565b34801561065057600080fd5b5061045161065f366004613ae8565b611bd0565b34801561067057600080fd5b5061041961067f366004613bd7565b611c3d565b34801561069057600080fd5b506106ce61069f366004613828565b6001600160a01b031660009081526013602090815260408083205460149092529091205460ff91821692911690565b6040805192151583529015156020830152016103ce565b3480156106f157600080fd5b506103ec611cc8565b34801561070657600080fd5b50610468610715366004613828565b611cd7565b34801561072657600080fd5b50610451611d71565b34801561073b57600080fd5b5061046861074a366004613828565b6001600160a01b031660009081526012602052604090205490565b34801561077157600080fd5b506104516107803660046139c5565b611dd7565b34801561079157600080fd5b506104196107a0366004613bd7565b611e4b565b3480156107b157600080fd5b506107c56107c03660046139f0565b611e89565b6040516103ce9190613e56565b3480156107de57600080fd5b506006546001600160a01b0316610419565b3480156107fc57600080fd5b50600e5461010090046001600160a01b0316610419565b34801561081f57600080fd5b506103ec611f7c565b34801561083457600080fd5b50610468610843366004613828565b6001600160a01b03166000908152600a602052604090205490565b34801561086a57600080fd5b50610451610879366004613b6a565b611f8b565b34801561088a57600080fd5b50610451610899366004613998565b611ff1565b3480156108aa57600080fd5b506104516108b9366004613828565b611ffc565b3480156108ca57600080fd5b50601654610468565b3480156108df57600080fd5b506104516108ee3660046139f0565b612095565b3480156108ff57600080fd5b5061045161090e366004613c07565b6121b3565b34801561091f57600080fd5b5061045161092e366004613c75565b6122d8565b34801561093f57600080fd5b5061045161094e3660046138d8565b61234d565b34801561095f57600080fd5b5061045161096e366004613ae8565b6123d5565b34801561097f57600080fd5b506103ec61098e366004613bd7565b612468565b34801561099f57600080fd5b506104686109ae366004613828565b6001600160a01b031660009081526009602052604090205490565b3480156109d557600080fd5b506104686109e4366004613828565b6001600160a01b03166000908152600c602052604090205490565b348015610a0b57600080fd5b50600854610468565b348015610a2057600080fd5b506103ec612551565b348015610a3557600080fd5b506103c2610a44366004613860565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a7e57600080fd5b50610451610a8d366004613828565b612579565b348015610a9e57600080fd5b50601054610468565b348015610ab357600080fd5b50610451610ac2366004613828565b612659565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480610b2a57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610b5e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b606060008054610b7390613f2f565b80601f0160208091040260200160405190810160405280929190818152602001828054610b9f90613f2f565b8015610bec5780601f10610bc157610100808354040283529160200191610bec565b820191906000526020600020905b815481529060010190602001808311610bcf57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610c855760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610cac82611c3d565b9050806001600160a01b0316836001600160a01b03161415610d365760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610c7c565b336001600160a01b0382161480610d525750610d528133610a44565b610dc45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c7c565b610dce8383612738565b505050565b6000610dde60115490565b905090565b6006546001600160a01b03163314610e3d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b601055565b6001600160a01b038116600090815260096020526040902054610eb65760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610c7c565b6000610ec160085490565b610ecb9047613ea1565b90506000610ef88383610ef3866001600160a01b03166000908152600a602052604090205490565b6127b3565b905080610f6d5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610c7c565b6001600160a01b0383166000908152600a602052604081208054839290610f95908490613ea1565b925050819055508060086000828254610fae9190613ea1565b90915550610fbe905083826127f9565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b61100f3382612912565b6110815760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c7c565b610dce838383612a19565b606060008267ffffffffffffffff8111156110b757634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156110e0578160200160208202803683370190505b50905060005b838110156112a75760006110fa8287613ea1565b905061110560115490565b81111561115357600083838151811061112e57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b031681525050611296565b6040517f3a717723000000000000000000000000000000000000000000000000000000008152600481018290523090633a7177239060240160206040518083038186803b1580156111a357600080fd5b505afa9250505080156111d3575060408051601f3d908101601f191682019092526111d091810190613844565b60015b611253576111df614008565b806308c379a0141561124757506111f4614020565b806111ff5750611249565b600084848151811061122157634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b03168152505050611296565b505b3d6000803e3d6000fd5b8084848151811061127457634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b031681525050505b506112a081613f97565b90506110e6565b509392505050565b600e546001600160a01b0361010090910416331480156112de5750600e5461010090046001600160a01b031615155b6113195760405162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b4b73a32b960a11b6044820152606401610c7c565b600e54600160a81b900460ff166113685760405162461bcd60e51b8152602060048201526013602482015272195b98589b19481b5a5b9d195c88199a5c9cdd606a1b6044820152606401610c7c565b600061137e6113778386613ecd565b6001612bf3565b905060005b82811015611416576000808585848181106113ae57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906113c39190613828565b9050600091505b86821015611401576113e0601180546001019055565b6113ea8185612c71565b6011549350816113f981613f97565b9250506113ca565b5050808061140e90613f97565b915050611383565b5050505050565b600e5460ff1661146f5760405162461bcd60e51b815260206004820152601960248201527f7075626c69632073616c65206973206e6f7420616374697665000000000000006044820152606401610c7c565b600061147b3483612c8b565b9050611488338284612cfd565b5050565b61149581610e42565b50565b60006016541180156114ac57506004601654105b6114f85760405162461bcd60e51b815260206004820152601860248201527f63757272656e74526f756e64206d75737420626520312d3300000000000000006044820152606401610c7c565b60105434146115495760405162461bcd60e51b815260206004820181905260248201527f657861637420616d6f756e74206f6620455448206d7573742062652073656e746044820152606401610c7c565b60006115556001612d35565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b1660208201529091506000906034016040516020818303038152906040528051906020012090506115e5848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506015549150849050612dcd565b6116575760405162461bcd60e51b815260206004820152602660248201527f696e76616c69642070726f6f662c20796f7520617265206e6f7420626c76636b60448201527f6c697374656400000000000000000000000000000000000000000000000000006064820152608401610c7c565b601654600114156116e1573360009081526013602052604090205460ff16156116c25760405162461bcd60e51b815260206004820152601c60248201527f6d6178696d756d2069732031206d696e7420696e20726f756e642031000000006044820152606401610c7c565b336000908152601360205260409020805460ff19166001179055611767565b60165460021415611767573360009081526014602052604090205460ff161561174c5760405162461bcd60e51b815260206004820152601c60248201527f6d6178696d756d2069732031206d696e7420696e20726f756e642032000000006044820152606401610c7c565b336000908152601460205260409020805460ff191660011790555b611775601180546001019055565b61177f3383612c71565b50505050565b6000610b5e82611c3d565b610dce8383836040518060200160405280600081525061234d565b6001600160a01b03811660009081526009602052604090205461181f5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610c7c565b6001600160a01b0382166000908152600c60205260408120546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038516906370a082319060240160206040518083038186803b15801561189057600080fd5b505afa1580156118a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c89190613bef565b6118d29190613ea1565b9050600061190b8383610ef387876001600160a01b039182166000908152600d6020908152604080832093909416825291909152205490565b9050806119805760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610c7c565b6001600160a01b038085166000908152600d60209081526040808320938716835292905290812080548392906119b7908490613ea1565b90915550506001600160a01b0384166000908152600c6020526040812080548392906119e4908490613ea1565b909155506119f59050848483612de3565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b600e546001600160a01b036101009091041633148015611a705750600e5461010090046001600160a01b031615155b611aab5760405162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b4b73a32b960a11b6044820152606401610c7c565b600e54600160a81b900460ff16611afa5760405162461bcd60e51b8152602060048201526013602482015272195b98589b19481b5a5b9d195c88199a5c9cdd606a1b6044820152606401610c7c565b6000611b068251612d35565b905060005b8251811015610dce576000838281518110611b3657634e487b7160e01b600052603260045260246000fd5b6020026020010151905060105460126000836001600160a01b03166001600160a01b031681526020019081526020016000205410611bbd57611b7c601180546001019055565b6010546001600160a01b03821660009081526012602052604081208054909190611ba7908490613eec565b90915550611bb790508184612c71565b60115492505b5080611bc881613f97565b915050611b0b565b6006546001600160a01b03163314611c2a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b600e805460ff1916911515919091179055565b6000818152600260205260408120546001600160a01b031680610b5e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610c7c565b6060600f8054610b7390613f2f565b60006001600160a01b038216611d555760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610c7c565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314611dcb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b611dd56000612e63565b565b6006546001600160a01b03163314611e315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b6000611e3e826001612bf3565b9050610dce838284612cfd565b6000600b8281548110611e6e57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031692915050565b60606000825167ffffffffffffffff811115611eb557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611ede578160200160208202803683370190505b50905060005b8351811015611f755760126000858381518110611f1157634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054828281518110611f5a57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152611f6e81613f97565b9050611ee4565b5092915050565b606060018054610b7390613f2f565b6006546001600160a01b03163314611fe55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b610dce600f8383613745565b611488338383612ec2565b6006546001600160a01b031633146120565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b600e80546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b600e546001600160a01b0361010090910416331480156120c45750600e5461010090046001600160a01b031615155b6120ff5760405162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b4b73a32b960a11b6044820152606401610c7c565b600e54600160a81b900460ff1661214e5760405162461bcd60e51b8152602060048201526013602482015272195b98589b19481b5a5b9d195c88199a5c9cdd606a1b6044820152606401610c7c565b60005b815181101561148857600082828151811061217c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b031660009081526012909152604081205550806121ab81613f97565b915050612151565b6006546001600160a01b0316331461220d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b6001600160a01b0381166000908152601260205260409020548211156122755760405162461bcd60e51b815260206004820152601060248201527f616d6f756e74203e2062616c616e6365000000000000000000000000000000006044820152606401610c7c565b6001600160a01b0381166000908152601260205260408120805484929061229d908490613eec565b90915550506040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015610dce573d6000803e3d6000fd5b600e546001600160a01b0361010090910416331480156123075750600e5461010090046001600160a01b031615155b6123425760405162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b4b73a32b960a11b6044820152606401610c7c565b601691909155601555565b6123573383612912565b6123c95760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c7c565b61177f84848484612f91565b6006546001600160a01b0316331461242f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b600e8054911515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000818152600260205260409020546060906001600160a01b03166124f55760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610c7c565b60006124ff611cc8565b9050600081511161251f576040518060200160405280600081525061254a565b806125298461301a565b60405160200161253a929190613cde565b6040516020818303038152906040525b9392505050565b6060600f6040516020016125659190613d0d565b604051602081830303815290604052905090565b600e546001600160a01b0361010090910416331480156125a85750600e5461010090046001600160a01b031615155b6125e35760405162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b4b73a32b960a11b6044820152606401610c7c565b600e54600160a81b900460ff166126325760405162461bcd60e51b8152602060048201526013602482015272195b98589b19481b5a5b9d195c88199a5c9cdd606a1b6044820152606401610c7c565b600061263f600180612bf3565b905061264b8282612c71565b611488601180546001019055565b6006546001600160a01b031633146126b35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b6001600160a01b03811661272f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c7c565b61149581612e63565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155819061277a82611c3d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6007546001600160a01b038416600090815260096020526040812054909183916127dd9086613ecd565b6127e79190613eb9565b6127f19190613eec565b949350505050565b804710156128495760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610c7c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612896576040519150601f19603f3d011682016040523d82523d6000602084013e61289b565b606091505b5050905080610dce5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610c7c565b6000818152600260205260408120546001600160a01b031661299c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610c7c565b60006129a783611c3d565b9050806001600160a01b0316846001600160a01b031614806129e25750836001600160a01b03166129d784610bf6565b6001600160a01b0316145b806127f157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff16949350505050565b826001600160a01b0316612a2c82611c3d565b6001600160a01b031614612aa85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610c7c565b6001600160a01b038216612b235760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c7c565b612b2e600082612738565b6001600160a01b0383166000908152600360205260408120805460019290612b57908490613eec565b90915550506001600160a01b0382166000908152600360205260408120805460019290612b85908490613ea1565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081612c0a57612c0383612d35565b9050610b5e565b6000612c1560115490565b905061270f612c248583613ea1565b1061254a5760405162461bcd60e51b815260206004820152601460248201527f746f74616c20737570706c7920726561636865640000000000000000000000006044820152606401610c7c565b611488828260405180602001604052806000815250613168565b60008082118015612ca8575081601054612ca59190613ecd565b83145b612cf45760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964207072696365000000000000000000000000000000000000006044820152606401610c7c565b61254a82612d35565b60005b8181101561177f57612d16601180546001019055565b612d208484612c71565b6011549250612d2e81613f97565b9050612d00565b600080612d4160115490565b9050612d5161012c61270f613eec565b612d5b8483613ea1565b10610b5e5760405162461bcd60e51b8152602060048201526024808201527f6e6f206d6f726520746f6b656e7320617661696c61626c6520666f72206d696e60448201527f74696e67000000000000000000000000000000000000000000000000000000006064820152608401610c7c565b600082612dda85846131f1565b14949350505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610dce9084906132a3565b600680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415612f245760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c7c565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612f9c848484612a19565b612fa884848484613388565b61177f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c7c565b60608161305a57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613084578061306e81613f97565b915061307d9050600a83613eb9565b915061305e565b60008167ffffffffffffffff8111156130ad57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156130d7576020820181803683370190505b5090505b84156127f1576130ec600183613eec565b91506130f9600a86613fb2565b613104906030613ea1565b60f81b81838151811061312757634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613161600a86613eb9565b94506130db565b61317283836134eb565b61317f6000848484613388565b610dce5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c7c565b600081815b84518110156112a757600085828151811061322157634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311613263576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250613290565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061329b81613f97565b9150506131f6565b60006132f8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661363a9092919063ffffffff16565b805190915015610dce57808060200190518101906133169190613b04565b610dce5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610c7c565b60006001600160a01b0384163b156134e057604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906133cc903390899088908890600401613dcd565b602060405180830381600087803b1580156133e657600080fd5b505af1925050508015613416575060408051601f3d908101601f1916820190925261341391810190613b3c565b60015b6134c6573d808015613444576040519150601f19603f3d011682016040523d82523d6000602084013e613449565b606091505b5080516134be5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c7c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506127f1565b506001949350505050565b6001600160a01b0382166135415760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c7c565b6000818152600260205260409020546001600160a01b0316156135a65760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c7c565b6001600160a01b03821660009081526003602052604081208054600192906135cf908490613ea1565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606127f1848460008585843b6136935760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c7c565b600080866001600160a01b031685876040516136af9190613cc2565b60006040518083038185875af1925050503d80600081146136ec576040519150601f19603f3d011682016040523d82523d6000602084013e6136f1565b606091505b509150915061370182828661370c565b979650505050505050565b6060831561371b57508161254a565b82511561372b5782518084602001fd5b8160405162461bcd60e51b8152600401610c7c9190613e8e565b82805461375190613f2f565b90600052602060002090601f01602090048101928261377357600085556137b9565b82601f1061378c5782800160ff198235161785556137b9565b828001600101855582156137b9579182015b828111156137b957823582559160200191906001019061379e565b506137c59291506137c9565b5090565b5b808211156137c557600081556001016137ca565b60008083601f8401126137ef578182fd5b50813567ffffffffffffffff811115613806578182fd5b6020830191508360208260051b850101111561382157600080fd5b9250929050565b600060208284031215613839578081fd5b813561254a816140aa565b600060208284031215613855578081fd5b815161254a816140aa565b60008060408385031215613872578081fd5b823561387d816140aa565b9150602083013561388d816140aa565b809150509250929050565b6000806000606084860312156138ac578081fd5b83356138b7816140aa565b925060208401356138c7816140aa565b929592945050506040919091013590565b600080600080608085870312156138ed578081fd5b84356138f8816140aa565b9350602085810135613909816140aa565b935060408601359250606086013567ffffffffffffffff8082111561392c578384fd5b818801915088601f83011261393f578384fd5b81358181111561395157613951613ff2565b6040519150613969601f8201601f1916850183613f6a565b808252898482850101111561397c578485fd5b8084840185840137810190920192909252939692955090935050565b600080604083850312156139aa578182fd5b82356139b5816140aa565b9150602083013561388d816140bf565b600080604083850312156139d7578182fd5b82356139e2816140aa565b946020939093013593505050565b60006020808385031215613a02578182fd5b823567ffffffffffffffff80821115613a19578384fd5b818501915085601f830112613a2c578384fd5b813581811115613a3e57613a3e613ff2565b8060051b9150604051613a5385840182613f6a565b81815284810184860184860187018a1015613a6c578788fd5b8795505b83861015613a9a5780359450613a85856140aa565b84825260019590950194908601908601613a70565b509098975050505050505050565b60008060208385031215613aba578182fd5b823567ffffffffffffffff811115613ad0578283fd5b613adc858286016137de565b90969095509350505050565b600060208284031215613af9578081fd5b813561254a816140bf565b600060208284031215613b15578081fd5b815161254a816140bf565b600060208284031215613b31578081fd5b813561254a816140cd565b600060208284031215613b4d578081fd5b815161254a816140cd565b60008060408385031215613872578182fd5b60008060208385031215613b7c578182fd5b823567ffffffffffffffff80821115613b93578384fd5b818501915085601f830112613ba6578384fd5b813581811115613bb4578485fd5b866020828501011115613bc5578485fd5b60209290920196919550909350505050565b600060208284031215613be8578081fd5b5035919050565b600060208284031215613c00578081fd5b5051919050565b60008060408385031215613c19578182fd5b82359150602083013561388d816140aa565b600080600060408486031215613c3f578081fd5b83359250602084013567ffffffffffffffff811115613c5c578182fd5b613c68868287016137de565b9497909650939450505050565b60008060408385031215613c87578182fd5b50508035926020909101359150565b60008151808452613cae816020860160208601613f03565b601f01601f19169290920160200192915050565b60008251613cd4818460208701613f03565b9190910192915050565b60008351613cf0818460208801613f03565b835190830190613d04818360208801613f03565b01949350505050565b600080835482600182811c915080831680613d2957607f831692505b6020808410821415613d4957634e487b7160e01b87526022600452602487fd5b818015613d5d5760018114613d6e57613d9a565b60ff19861689528489019650613d9a565b60008a815260209020885b86811015613d925781548b820152908501908301613d79565b505084890196505b5050505050506127f1817f636f6e7472616374000000000000000000000000000000000000000000000000815260080190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613dff6080830184613c96565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613e4a5783516001600160a01b031683529284019291840191600101613e25565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613e4a57835183529284019291840191600101613e72565b60208152600061254a6020830184613c96565b60008219821115613eb457613eb4613fc6565b500190565b600082613ec857613ec8613fdc565b500490565b6000816000190483118215151615613ee757613ee7613fc6565b500290565b600082821015613efe57613efe613fc6565b500390565b60005b83811015613f1e578181015183820152602001613f06565b8381111561177f5750506000910152565b600181811c90821680613f4357607f821691505b60208210811415613f6457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f1916810167ffffffffffffffff81118282101715613f9057613f90613ff2565b6040525050565b6000600019821415613fab57613fab613fc6565b5060010190565b600082613fc157613fc1613fdc565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561401d57600481823e5160e01c5b90565b600060443d101561402e5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561405e57505050505090565b82850191508151818111156140765750505050505090565b843d87010160208285010111156140905750505050505090565b61409f60208286010187613f6a565b509095945050505050565b6001600160a01b038116811461149557600080fd5b801515811461149557600080fd5b6001600160e01b03198116811461149557600080fdfea264697066735822122079e25a8bc3f34e5484ed515b1b8ec785dfe8802003a558558d569abf25697c2064736f6c63430008040033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000414532523db09980854fd3fe47711ee3867ce7e9000000000000000000000000c4d99f4e34cd6dd3afe793be248004282db949270000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000005a000000000000000000000000000000000000000000000000000000000000000a
Deployed Bytecode
0x6080604052600436106103385760003560e01c806371a7f67a116101b0578063abf9e9f9116100ec578063d79779b211610095578063e985e9c51161006f578063e985e9c514610a29578063eb04959514610a72578063eb91d37e14610a92578063f2fde38b14610aa757600080fd5b8063d79779b2146109c9578063e33b7de3146109ff578063e8a3d48514610a1457600080fd5b8063c1833ff8116100c6578063c1833ff814610953578063c87b56dd14610973578063ce7c2ac21461099357600080fd5b8063abf9e9f9146108f3578063b6249ece14610913578063b88d4fde1461093357600080fd5b806395d89b4111610159578063a22cb46511610133578063a22cb4651461087e578063a3106b951461089e578063a32bf597146108be578063a5afe8b9146108d357600080fd5b806395d89b41146108135780639852595c14610828578063a0bcfc7f1461085e57600080fd5b80638c116de91161018a5780638c116de9146107a55780638da5cb5b146107d257806393e5d42a146107f057600080fd5b806371a7f67a1461072f57806378cf19e9146107655780638b83209b1461078557600080fd5b8063372f657c1161027f578063599d10a811610228578063678d84bd11610202578063678d84bd146106845780636c0360eb146106e557806370a08231146106fa578063715018a61461071a57600080fd5b8063599d10a8146106245780635aca1bb6146106445780636352211e1461066457600080fd5b8063406072a911610259578063406072a91461059e57806342842e0e146105e457806348b750441461060457600080fd5b8063372f657c146105565780633a717723146105695780633a98ef391461058957600080fd5b806319165587116102e15780632bdef860116102bb5780632bdef8601461050357806331c864e81461052357806332471d3e1461053657600080fd5b8063191655871461049657806323b872dd146104b657806325c405b0146104d657600080fd5b8063095ea7b311610312578063095ea7b31461043157806318160ddd1461045357806318b200711461047657600080fd5b806301ffc9a7146103a257806306fdde03146103d7578063081812fc146103f957600080fd5b3661039d57336000908152601260205260408120805434929061035c908490613ea1565b90915550506040805133815234602082015281517f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be770929181900390910190a1005b600080fd5b3480156103ae57600080fd5b506103c26103bd366004613b20565b610ac7565b60405190151581526020015b60405180910390f35b3480156103e357600080fd5b506103ec610b64565b6040516103ce9190613e8e565b34801561040557600080fd5b50610419610414366004613bd7565b610bf6565b6040516001600160a01b0390911681526020016103ce565b34801561043d57600080fd5b5061045161044c3660046139c5565b610ca1565b005b34801561045f57600080fd5b50610468610dd3565b6040519081526020016103ce565b34801561048257600080fd5b50610451610491366004613bd7565b610de3565b3480156104a257600080fd5b506104516104b1366004613828565b610e42565b3480156104c257600080fd5b506104516104d1366004613898565b611005565b3480156104e257600080fd5b506104f66104f1366004613c75565b61108c565b6040516103ce9190613e09565b34801561050f57600080fd5b5061045161051e366004613c2b565b6112af565b610451610531366004613bd7565b61141d565b34801561054257600080fd5b50610451610551366004613828565b61148c565b610451610564366004613aa8565b611498565b34801561057557600080fd5b50610419610584366004613bd7565b611785565b34801561059557600080fd5b50600754610468565b3480156105aa57600080fd5b506104686105b9366004613b58565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205490565b3480156105f057600080fd5b506104516105ff366004613898565b611790565b34801561061057600080fd5b5061045161061f366004613b58565b6117ab565b34801561063057600080fd5b5061045161063f3660046139f0565b611a41565b34801561065057600080fd5b5061045161065f366004613ae8565b611bd0565b34801561067057600080fd5b5061041961067f366004613bd7565b611c3d565b34801561069057600080fd5b506106ce61069f366004613828565b6001600160a01b031660009081526013602090815260408083205460149092529091205460ff91821692911690565b6040805192151583529015156020830152016103ce565b3480156106f157600080fd5b506103ec611cc8565b34801561070657600080fd5b50610468610715366004613828565b611cd7565b34801561072657600080fd5b50610451611d71565b34801561073b57600080fd5b5061046861074a366004613828565b6001600160a01b031660009081526012602052604090205490565b34801561077157600080fd5b506104516107803660046139c5565b611dd7565b34801561079157600080fd5b506104196107a0366004613bd7565b611e4b565b3480156107b157600080fd5b506107c56107c03660046139f0565b611e89565b6040516103ce9190613e56565b3480156107de57600080fd5b506006546001600160a01b0316610419565b3480156107fc57600080fd5b50600e5461010090046001600160a01b0316610419565b34801561081f57600080fd5b506103ec611f7c565b34801561083457600080fd5b50610468610843366004613828565b6001600160a01b03166000908152600a602052604090205490565b34801561086a57600080fd5b50610451610879366004613b6a565b611f8b565b34801561088a57600080fd5b50610451610899366004613998565b611ff1565b3480156108aa57600080fd5b506104516108b9366004613828565b611ffc565b3480156108ca57600080fd5b50601654610468565b3480156108df57600080fd5b506104516108ee3660046139f0565b612095565b3480156108ff57600080fd5b5061045161090e366004613c07565b6121b3565b34801561091f57600080fd5b5061045161092e366004613c75565b6122d8565b34801561093f57600080fd5b5061045161094e3660046138d8565b61234d565b34801561095f57600080fd5b5061045161096e366004613ae8565b6123d5565b34801561097f57600080fd5b506103ec61098e366004613bd7565b612468565b34801561099f57600080fd5b506104686109ae366004613828565b6001600160a01b031660009081526009602052604090205490565b3480156109d557600080fd5b506104686109e4366004613828565b6001600160a01b03166000908152600c602052604090205490565b348015610a0b57600080fd5b50600854610468565b348015610a2057600080fd5b506103ec612551565b348015610a3557600080fd5b506103c2610a44366004613860565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a7e57600080fd5b50610451610a8d366004613828565b612579565b348015610a9e57600080fd5b50601054610468565b348015610ab357600080fd5b50610451610ac2366004613828565b612659565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480610b2a57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610b5e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b606060008054610b7390613f2f565b80601f0160208091040260200160405190810160405280929190818152602001828054610b9f90613f2f565b8015610bec5780601f10610bc157610100808354040283529160200191610bec565b820191906000526020600020905b815481529060010190602001808311610bcf57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610c855760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610cac82611c3d565b9050806001600160a01b0316836001600160a01b03161415610d365760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610c7c565b336001600160a01b0382161480610d525750610d528133610a44565b610dc45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c7c565b610dce8383612738565b505050565b6000610dde60115490565b905090565b6006546001600160a01b03163314610e3d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b601055565b6001600160a01b038116600090815260096020526040902054610eb65760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610c7c565b6000610ec160085490565b610ecb9047613ea1565b90506000610ef88383610ef3866001600160a01b03166000908152600a602052604090205490565b6127b3565b905080610f6d5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610c7c565b6001600160a01b0383166000908152600a602052604081208054839290610f95908490613ea1565b925050819055508060086000828254610fae9190613ea1565b90915550610fbe905083826127f9565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b61100f3382612912565b6110815760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c7c565b610dce838383612a19565b606060008267ffffffffffffffff8111156110b757634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156110e0578160200160208202803683370190505b50905060005b838110156112a75760006110fa8287613ea1565b905061110560115490565b81111561115357600083838151811061112e57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b031681525050611296565b6040517f3a717723000000000000000000000000000000000000000000000000000000008152600481018290523090633a7177239060240160206040518083038186803b1580156111a357600080fd5b505afa9250505080156111d3575060408051601f3d908101601f191682019092526111d091810190613844565b60015b611253576111df614008565b806308c379a0141561124757506111f4614020565b806111ff5750611249565b600084848151811061122157634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b03168152505050611296565b505b3d6000803e3d6000fd5b8084848151811061127457634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b031681525050505b506112a081613f97565b90506110e6565b509392505050565b600e546001600160a01b0361010090910416331480156112de5750600e5461010090046001600160a01b031615155b6113195760405162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b4b73a32b960a11b6044820152606401610c7c565b600e54600160a81b900460ff166113685760405162461bcd60e51b8152602060048201526013602482015272195b98589b19481b5a5b9d195c88199a5c9cdd606a1b6044820152606401610c7c565b600061137e6113778386613ecd565b6001612bf3565b905060005b82811015611416576000808585848181106113ae57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906113c39190613828565b9050600091505b86821015611401576113e0601180546001019055565b6113ea8185612c71565b6011549350816113f981613f97565b9250506113ca565b5050808061140e90613f97565b915050611383565b5050505050565b600e5460ff1661146f5760405162461bcd60e51b815260206004820152601960248201527f7075626c69632073616c65206973206e6f7420616374697665000000000000006044820152606401610c7c565b600061147b3483612c8b565b9050611488338284612cfd565b5050565b61149581610e42565b50565b60006016541180156114ac57506004601654105b6114f85760405162461bcd60e51b815260206004820152601860248201527f63757272656e74526f756e64206d75737420626520312d3300000000000000006044820152606401610c7c565b60105434146115495760405162461bcd60e51b815260206004820181905260248201527f657861637420616d6f756e74206f6620455448206d7573742062652073656e746044820152606401610c7c565b60006115556001612d35565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b1660208201529091506000906034016040516020818303038152906040528051906020012090506115e5848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506015549150849050612dcd565b6116575760405162461bcd60e51b815260206004820152602660248201527f696e76616c69642070726f6f662c20796f7520617265206e6f7420626c76636b60448201527f6c697374656400000000000000000000000000000000000000000000000000006064820152608401610c7c565b601654600114156116e1573360009081526013602052604090205460ff16156116c25760405162461bcd60e51b815260206004820152601c60248201527f6d6178696d756d2069732031206d696e7420696e20726f756e642031000000006044820152606401610c7c565b336000908152601360205260409020805460ff19166001179055611767565b60165460021415611767573360009081526014602052604090205460ff161561174c5760405162461bcd60e51b815260206004820152601c60248201527f6d6178696d756d2069732031206d696e7420696e20726f756e642032000000006044820152606401610c7c565b336000908152601460205260409020805460ff191660011790555b611775601180546001019055565b61177f3383612c71565b50505050565b6000610b5e82611c3d565b610dce8383836040518060200160405280600081525061234d565b6001600160a01b03811660009081526009602052604090205461181f5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610c7c565b6001600160a01b0382166000908152600c60205260408120546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038516906370a082319060240160206040518083038186803b15801561189057600080fd5b505afa1580156118a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c89190613bef565b6118d29190613ea1565b9050600061190b8383610ef387876001600160a01b039182166000908152600d6020908152604080832093909416825291909152205490565b9050806119805760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610c7c565b6001600160a01b038085166000908152600d60209081526040808320938716835292905290812080548392906119b7908490613ea1565b90915550506001600160a01b0384166000908152600c6020526040812080548392906119e4908490613ea1565b909155506119f59050848483612de3565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b600e546001600160a01b036101009091041633148015611a705750600e5461010090046001600160a01b031615155b611aab5760405162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b4b73a32b960a11b6044820152606401610c7c565b600e54600160a81b900460ff16611afa5760405162461bcd60e51b8152602060048201526013602482015272195b98589b19481b5a5b9d195c88199a5c9cdd606a1b6044820152606401610c7c565b6000611b068251612d35565b905060005b8251811015610dce576000838281518110611b3657634e487b7160e01b600052603260045260246000fd5b6020026020010151905060105460126000836001600160a01b03166001600160a01b031681526020019081526020016000205410611bbd57611b7c601180546001019055565b6010546001600160a01b03821660009081526012602052604081208054909190611ba7908490613eec565b90915550611bb790508184612c71565b60115492505b5080611bc881613f97565b915050611b0b565b6006546001600160a01b03163314611c2a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b600e805460ff1916911515919091179055565b6000818152600260205260408120546001600160a01b031680610b5e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610c7c565b6060600f8054610b7390613f2f565b60006001600160a01b038216611d555760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610c7c565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314611dcb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b611dd56000612e63565b565b6006546001600160a01b03163314611e315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b6000611e3e826001612bf3565b9050610dce838284612cfd565b6000600b8281548110611e6e57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031692915050565b60606000825167ffffffffffffffff811115611eb557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611ede578160200160208202803683370190505b50905060005b8351811015611f755760126000858381518110611f1157634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054828281518110611f5a57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152611f6e81613f97565b9050611ee4565b5092915050565b606060018054610b7390613f2f565b6006546001600160a01b03163314611fe55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b610dce600f8383613745565b611488338383612ec2565b6006546001600160a01b031633146120565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b600e80546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b600e546001600160a01b0361010090910416331480156120c45750600e5461010090046001600160a01b031615155b6120ff5760405162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b4b73a32b960a11b6044820152606401610c7c565b600e54600160a81b900460ff1661214e5760405162461bcd60e51b8152602060048201526013602482015272195b98589b19481b5a5b9d195c88199a5c9cdd606a1b6044820152606401610c7c565b60005b815181101561148857600082828151811061217c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b031660009081526012909152604081205550806121ab81613f97565b915050612151565b6006546001600160a01b0316331461220d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b6001600160a01b0381166000908152601260205260409020548211156122755760405162461bcd60e51b815260206004820152601060248201527f616d6f756e74203e2062616c616e6365000000000000000000000000000000006044820152606401610c7c565b6001600160a01b0381166000908152601260205260408120805484929061229d908490613eec565b90915550506040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015610dce573d6000803e3d6000fd5b600e546001600160a01b0361010090910416331480156123075750600e5461010090046001600160a01b031615155b6123425760405162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b4b73a32b960a11b6044820152606401610c7c565b601691909155601555565b6123573383612912565b6123c95760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c7c565b61177f84848484612f91565b6006546001600160a01b0316331461242f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b600e8054911515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000818152600260205260409020546060906001600160a01b03166124f55760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610c7c565b60006124ff611cc8565b9050600081511161251f576040518060200160405280600081525061254a565b806125298461301a565b60405160200161253a929190613cde565b6040516020818303038152906040525b9392505050565b6060600f6040516020016125659190613d0d565b604051602081830303815290604052905090565b600e546001600160a01b0361010090910416331480156125a85750600e5461010090046001600160a01b031615155b6125e35760405162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b4b73a32b960a11b6044820152606401610c7c565b600e54600160a81b900460ff166126325760405162461bcd60e51b8152602060048201526013602482015272195b98589b19481b5a5b9d195c88199a5c9cdd606a1b6044820152606401610c7c565b600061263f600180612bf3565b905061264b8282612c71565b611488601180546001019055565b6006546001600160a01b031633146126b35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c7c565b6001600160a01b03811661272f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c7c565b61149581612e63565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155819061277a82611c3d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6007546001600160a01b038416600090815260096020526040812054909183916127dd9086613ecd565b6127e79190613eb9565b6127f19190613eec565b949350505050565b804710156128495760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610c7c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612896576040519150601f19603f3d011682016040523d82523d6000602084013e61289b565b606091505b5050905080610dce5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610c7c565b6000818152600260205260408120546001600160a01b031661299c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610c7c565b60006129a783611c3d565b9050806001600160a01b0316846001600160a01b031614806129e25750836001600160a01b03166129d784610bf6565b6001600160a01b0316145b806127f157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff16949350505050565b826001600160a01b0316612a2c82611c3d565b6001600160a01b031614612aa85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610c7c565b6001600160a01b038216612b235760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c7c565b612b2e600082612738565b6001600160a01b0383166000908152600360205260408120805460019290612b57908490613eec565b90915550506001600160a01b0382166000908152600360205260408120805460019290612b85908490613ea1565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081612c0a57612c0383612d35565b9050610b5e565b6000612c1560115490565b905061270f612c248583613ea1565b1061254a5760405162461bcd60e51b815260206004820152601460248201527f746f74616c20737570706c7920726561636865640000000000000000000000006044820152606401610c7c565b611488828260405180602001604052806000815250613168565b60008082118015612ca8575081601054612ca59190613ecd565b83145b612cf45760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964207072696365000000000000000000000000000000000000006044820152606401610c7c565b61254a82612d35565b60005b8181101561177f57612d16601180546001019055565b612d208484612c71565b6011549250612d2e81613f97565b9050612d00565b600080612d4160115490565b9050612d5161012c61270f613eec565b612d5b8483613ea1565b10610b5e5760405162461bcd60e51b8152602060048201526024808201527f6e6f206d6f726520746f6b656e7320617661696c61626c6520666f72206d696e60448201527f74696e67000000000000000000000000000000000000000000000000000000006064820152608401610c7c565b600082612dda85846131f1565b14949350505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610dce9084906132a3565b600680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415612f245760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c7c565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612f9c848484612a19565b612fa884848484613388565b61177f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c7c565b60608161305a57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613084578061306e81613f97565b915061307d9050600a83613eb9565b915061305e565b60008167ffffffffffffffff8111156130ad57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156130d7576020820181803683370190505b5090505b84156127f1576130ec600183613eec565b91506130f9600a86613fb2565b613104906030613ea1565b60f81b81838151811061312757634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613161600a86613eb9565b94506130db565b61317283836134eb565b61317f6000848484613388565b610dce5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c7c565b600081815b84518110156112a757600085828151811061322157634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311613263576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250613290565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061329b81613f97565b9150506131f6565b60006132f8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661363a9092919063ffffffff16565b805190915015610dce57808060200190518101906133169190613b04565b610dce5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610c7c565b60006001600160a01b0384163b156134e057604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906133cc903390899088908890600401613dcd565b602060405180830381600087803b1580156133e657600080fd5b505af1925050508015613416575060408051601f3d908101601f1916820190925261341391810190613b3c565b60015b6134c6573d808015613444576040519150601f19603f3d011682016040523d82523d6000602084013e613449565b606091505b5080516134be5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c7c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506127f1565b506001949350505050565b6001600160a01b0382166135415760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c7c565b6000818152600260205260409020546001600160a01b0316156135a65760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c7c565b6001600160a01b03821660009081526003602052604081208054600192906135cf908490613ea1565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606127f1848460008585843b6136935760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c7c565b600080866001600160a01b031685876040516136af9190613cc2565b60006040518083038185875af1925050503d80600081146136ec576040519150601f19603f3d011682016040523d82523d6000602084013e6136f1565b606091505b509150915061370182828661370c565b979650505050505050565b6060831561371b57508161254a565b82511561372b5782518084602001fd5b8160405162461bcd60e51b8152600401610c7c9190613e8e565b82805461375190613f2f565b90600052602060002090601f01602090048101928261377357600085556137b9565b82601f1061378c5782800160ff198235161785556137b9565b828001600101855582156137b9579182015b828111156137b957823582559160200191906001019061379e565b506137c59291506137c9565b5090565b5b808211156137c557600081556001016137ca565b60008083601f8401126137ef578182fd5b50813567ffffffffffffffff811115613806578182fd5b6020830191508360208260051b850101111561382157600080fd5b9250929050565b600060208284031215613839578081fd5b813561254a816140aa565b600060208284031215613855578081fd5b815161254a816140aa565b60008060408385031215613872578081fd5b823561387d816140aa565b9150602083013561388d816140aa565b809150509250929050565b6000806000606084860312156138ac578081fd5b83356138b7816140aa565b925060208401356138c7816140aa565b929592945050506040919091013590565b600080600080608085870312156138ed578081fd5b84356138f8816140aa565b9350602085810135613909816140aa565b935060408601359250606086013567ffffffffffffffff8082111561392c578384fd5b818801915088601f83011261393f578384fd5b81358181111561395157613951613ff2565b6040519150613969601f8201601f1916850183613f6a565b808252898482850101111561397c578485fd5b8084840185840137810190920192909252939692955090935050565b600080604083850312156139aa578182fd5b82356139b5816140aa565b9150602083013561388d816140bf565b600080604083850312156139d7578182fd5b82356139e2816140aa565b946020939093013593505050565b60006020808385031215613a02578182fd5b823567ffffffffffffffff80821115613a19578384fd5b818501915085601f830112613a2c578384fd5b813581811115613a3e57613a3e613ff2565b8060051b9150604051613a5385840182613f6a565b81815284810184860184860187018a1015613a6c578788fd5b8795505b83861015613a9a5780359450613a85856140aa565b84825260019590950194908601908601613a70565b509098975050505050505050565b60008060208385031215613aba578182fd5b823567ffffffffffffffff811115613ad0578283fd5b613adc858286016137de565b90969095509350505050565b600060208284031215613af9578081fd5b813561254a816140bf565b600060208284031215613b15578081fd5b815161254a816140bf565b600060208284031215613b31578081fd5b813561254a816140cd565b600060208284031215613b4d578081fd5b815161254a816140cd565b60008060408385031215613872578182fd5b60008060208385031215613b7c578182fd5b823567ffffffffffffffff80821115613b93578384fd5b818501915085601f830112613ba6578384fd5b813581811115613bb4578485fd5b866020828501011115613bc5578485fd5b60209290920196919550909350505050565b600060208284031215613be8578081fd5b5035919050565b600060208284031215613c00578081fd5b5051919050565b60008060408385031215613c19578182fd5b82359150602083013561388d816140aa565b600080600060408486031215613c3f578081fd5b83359250602084013567ffffffffffffffff811115613c5c578182fd5b613c68868287016137de565b9497909650939450505050565b60008060408385031215613c87578182fd5b50508035926020909101359150565b60008151808452613cae816020860160208601613f03565b601f01601f19169290920160200192915050565b60008251613cd4818460208701613f03565b9190910192915050565b60008351613cf0818460208801613f03565b835190830190613d04818360208801613f03565b01949350505050565b600080835482600182811c915080831680613d2957607f831692505b6020808410821415613d4957634e487b7160e01b87526022600452602487fd5b818015613d5d5760018114613d6e57613d9a565b60ff19861689528489019650613d9a565b60008a815260209020885b86811015613d925781548b820152908501908301613d79565b505084890196505b5050505050506127f1817f636f6e7472616374000000000000000000000000000000000000000000000000815260080190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613dff6080830184613c96565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613e4a5783516001600160a01b031683529284019291840191600101613e25565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613e4a57835183529284019291840191600101613e72565b60208152600061254a6020830184613c96565b60008219821115613eb457613eb4613fc6565b500190565b600082613ec857613ec8613fdc565b500490565b6000816000190483118215151615613ee757613ee7613fc6565b500290565b600082821015613efe57613efe613fc6565b500390565b60005b83811015613f1e578181015183820152602001613f06565b8381111561177f5750506000910152565b600181811c90821680613f4357607f821691505b60208210811415613f6457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f1916810167ffffffffffffffff81118282101715613f9057613f90613ff2565b6040525050565b6000600019821415613fab57613fab613fc6565b5060010190565b600082613fc157613fc1613fdc565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561401d57600481823e5160e01c5b90565b600060443d101561402e5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561405e57505050505090565b82850191508151818111156140765750505050505090565b843d87010160208285010111156140905750505050505090565b61409f60208286010187613f6a565b509095945050505050565b6001600160a01b038116811461149557600080fd5b801515811461149557600080fd5b6001600160e01b03198116811461149557600080fdfea264697066735822122079e25a8bc3f34e5484ed515b1b8ec785dfe8802003a558558d569abf25697c2064736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000414532523db09980854fd3fe47711ee3867ce7e9000000000000000000000000c4d99f4e34cd6dd3afe793be248004282db949270000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000005a000000000000000000000000000000000000000000000000000000000000000a
-----Decoded View---------------
Arg [0] : payeesList (address[]): 0x414532523db09980854FD3Fe47711eE3867ce7e9,0xC4D99F4e34cD6dD3AFe793Be248004282DB94927
Arg [1] : sharesList (uint256[]): 90,10
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [3] : 000000000000000000000000414532523db09980854fd3fe47711ee3867ce7e9
Arg [4] : 000000000000000000000000c4d99f4e34cd6dd3afe793be248004282db94927
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [6] : 000000000000000000000000000000000000000000000000000000000000005a
Arg [7] : 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.