Overview
Max Total Supply
837 LEPTON
Holders
202
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 LEPTONLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Lepton
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // Lepton.sol -- Part of the Charged Particles Protocol // Copyright (c) 2021 Firma Lux, Inc. <https://charged.fi> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. pragma solidity 0.6.12; import "../lib/ERC721.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "../interfaces/ILepton.sol"; import "../lib/BlackholePrevention.sol"; contract Lepton is ILepton, ERC721, Ownable, ReentrancyGuard, BlackholePrevention { using SafeMath for uint256; using Address for address payable; using Counters for Counters.Counter; Counters.Counter internal _tokenIds; Classification[] internal _leptonTypes; mapping (uint256 => Classification) internal _leptonData; uint256 internal _typeIndex; uint256 internal _maxSupply; uint256 internal _maxMintPerTx; bool internal _paused; /***********************************| | Initialization | |__________________________________*/ constructor() public ERC721("Charged Particles - Lepton", "LEPTON") { _paused = true; } /***********************************| | Public | |__________________________________*/ function mintLepton() external payable virtual override nonReentrant whenNotPaused returns (uint256 newTokenId) { newTokenId = _mintLepton(msg.sender); } function batchMintLepton(uint256 count) external payable virtual override nonReentrant whenNotPaused { _batchMintLepton(msg.sender, count); } function getNextType() external view virtual override returns (uint256) { if (_typeIndex >= _leptonTypes.length) { return 0; } return _typeIndex; } function getNextPrice() external view virtual override returns (uint256) { if (_typeIndex >= _leptonTypes.length) { return 0; } return _leptonTypes[_typeIndex].price; } function getMultiplier(uint256 tokenId) external view virtual override returns (uint256) { return _leptonData[tokenId].multiplier; } function getBonus(uint256 tokenId) external view virtual override returns (uint256) { return _leptonData[tokenId].bonus; } /***********************************| | Only Admin/DAO | |__________________________________*/ function addLeptonType( string calldata tokenUri, uint256 price, uint32 supply, uint32 multiplier, uint32 bonus ) external virtual onlyOwner { _maxSupply = _maxSupply.add(uint256(supply)); Classification memory lepton = Classification({ tokenUri: tokenUri, price: price, supply: supply, multiplier: multiplier, bonus: bonus, _upperBounds: uint128(_maxSupply) }); _leptonTypes.push(lepton); emit LeptonTypeAdded(tokenUri, price, supply, multiplier, bonus, _maxSupply); } function updateLeptonType( uint256 leptonIndex, string calldata tokenUri, uint256 price, uint32 supply, uint32 multiplier, uint32 bonus ) external virtual onlyOwner { _leptonTypes[leptonIndex].tokenUri = tokenUri; _leptonTypes[leptonIndex].price = price; _leptonTypes[leptonIndex].supply = supply; _leptonTypes[leptonIndex].multiplier = multiplier; _leptonTypes[leptonIndex].bonus = bonus; emit LeptonTypeUpdated(leptonIndex, tokenUri, price, supply, multiplier, bonus, _maxSupply); } function setMaxMintPerTx(uint256 maxAmount) external virtual onlyOwner { _maxMintPerTx = maxAmount; emit MaxMintPerTxSet(maxAmount); } function setPausedState(bool state) external virtual onlyOwner { _paused = state; emit PausedStateSet(state); } /***********************************| | Only Admin/DAO | | (blackhole prevention) | |__________________________________*/ function withdrawEther(address payable receiver, uint256 amount) external virtual onlyOwner { _withdrawEther(receiver, amount); } function withdrawErc20(address payable receiver, address tokenAddress, uint256 amount) external virtual onlyOwner { _withdrawERC20(receiver, tokenAddress, amount); } function withdrawERC721(address payable receiver, address tokenAddress, uint256 tokenId) external virtual onlyOwner { _withdrawERC721(receiver, tokenAddress, tokenId); } /***********************************| | Private Functions | |__________________________________*/ function _mintLepton(address receiver) internal virtual returns (uint256 newTokenId) { require(_typeIndex < _leptonTypes.length, "LPT:E-408"); Classification memory lepton = _leptonTypes[_typeIndex]; require(msg.value >= lepton.price, "LPT:E-414"); _tokenIds.increment(); newTokenId = _tokenIds.current(); _leptonData[newTokenId] = lepton; _safeMint(receiver, newTokenId, ""); _setTokenURI(newTokenId, lepton.tokenUri); // Distribute Next Type if (newTokenId == lepton._upperBounds) { _typeIndex = _typeIndex.add(1); } emit LeptonMinted(receiver, newTokenId, lepton.price, lepton.multiplier); _refundOverpayment(lepton.price); } function _batchMintLepton(address receiver, uint256 count) internal virtual { require(_typeIndex < _leptonTypes.length, "LPT:E-408"); require(_maxMintPerTx == 0 || count <= _maxMintPerTx, "LPT:E-429"); Classification memory lepton = _leptonTypes[_typeIndex]; uint256 startTokenId = _tokenIds.current(); uint256 endTokenId = startTokenId.add(count); if (endTokenId > lepton._upperBounds) { count = count.sub(endTokenId.sub(lepton._upperBounds)); } uint256 salePrice = lepton.price.mul(count); require(msg.value >= salePrice, "LPT:E-414"); _safeMintBatch(receiver, startTokenId.add(1), count, ""); for (uint i = 0; i < count; i++) { _tokenIds.increment(); startTokenId = _tokenIds.current(); _leptonData[startTokenId] = lepton; _setTokenURI(startTokenId, lepton.tokenUri); } // Distribute Next Type if (startTokenId == lepton._upperBounds) { _typeIndex = _typeIndex.add(1); } emit LeptonBatchMinted(receiver, startTokenId, count, lepton.price, lepton.multiplier); _refundOverpayment(salePrice); } function _refundOverpayment(uint256 threshold) internal virtual { uint256 overage = msg.value.sub(threshold); if (overage > 0) { payable(_msgSender()).sendValue(overage); } } /***********************************| | Modifiers | |__________________________________*/ modifier whenNotPaused() { require(!_paused, "LPT:E-101"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "@openzeppelin/contracts/GSN/Context.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/introspection/ERC165.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/EnumerableSet.sol"; import "@openzeppelin/contracts/utils/EnumerableMap.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; /** * @dev Emitted when `tokenId` token is transfered from `from` to `to`. */ event TransferBatch(address indexed from, address indexed to, uint256 startTokenId, uint256 count); // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // Mapping from holder address to their (enumerable) set of owned tokens mapping (address => EnumerableSet.UintSet) private _holderTokens; // Enumerable mapping from token ids to their owners EnumerableMap.UintToAddressMap private _tokenOwners; // 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; // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /* * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde * * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ * 0xa22cb465 ^ 0xe985e9c ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd */ bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; /* * bytes4(keccak256('name()')) == 0x06fdde03 * bytes4(keccak256('symbol()')) == 0x95d89b41 * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd * * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f */ bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /* * bytes4(keccak256('totalSupply()')) == 0x18160ddd * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59 * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7 * * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63 */ bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor (string memory name, string memory symbol) public { _name = name; _symbol = symbol; // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_INTERFACE_ID_ERC721); _registerInterface(_INTERFACE_ID_ERC721_METADATA); _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { require(owner != address(0), "ERC721:E-403"); return _holderTokens[owner].length(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _tokenOwners.get(tokenId, "ERC721:E-405"); } /** * @dev See {IERC721Metadata-name}. */ function name() public view override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "ERC721:E-405"); return _tokenURIs[tokenId]; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { return _holderTokens[owner].at(index); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds return _tokenOwners.length(); } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { (uint256 tokenId, ) = _tokenOwners.at(index); return tokenId; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ownerOf(tokenId); require(to != owner, "ERC721:E-111"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721:E-105"); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { require(_exists(tokenId), "ERC721:E-405"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721:E-111"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view 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:E-105"); _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:E-105"); _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 mecanisms 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:E-402"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view returns (bool) { return _tokenOwners.contains(tokenId); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { require(_exists(tokenId), "ERC721:E-405"); address owner = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @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:E-402"); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMintBatch(address to, uint256 startTokenId, uint256 count, bytes memory _data) internal virtual { _mintBatch(to, startTokenId, count); require(_checkOnERC721Received(address(0), to, startTokenId, _data), "ERC721:E-402"); } /** * @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:E-403"); require(!_exists(tokenId), "ERC721:E-407"); _holderTokens[to].add(tokenId); _tokenOwners.set(tokenId, to); emit Transfer(address(0), to, tokenId); } /** * @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 _mintBatch(address to, uint256 startTokenId, uint256 count) internal virtual { require(to != address(0), "ERC721:E-403"); require(!_exists(startTokenId), "ERC721:E-407"); for (uint i = 0; i < count; i++) { uint256 tokenId = startTokenId.add(i); _holderTokens[to].add(tokenId); _tokenOwners.set(tokenId, to); } emit TransferBatch(address(0), to, startTokenId, count); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ownerOf(tokenId) == from, "ERC721:E-102"); require(to != address(0), "ERC721:E-403"); // Clear approvals from the previous owner _approve(address(0), tokenId); _holderTokens[from].remove(tokenId); _holderTokens[to].add(tokenId); _tokenOwners.set(tokenId, to); emit Transfer(from, to, tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721:E-405"); _tokenURIs[tokenId] = _tokenURI; } /** * @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()) { return true; } bytes memory returndata = to.functionCall(abi.encodeWithSelector( IERC721Receiver(to).onERC721Received.selector, _msgSender(), from, tokenId, _data ), "ERC721:E-402"); bytes4 retval = abi.decode(returndata, (bytes4)); return (retval == _ERC721_RECEIVED); } function _approve(address to, uint256 tokenId) private { _tokenApprovals[tokenId] = to; emit Approval(ownerOf(tokenId), to, tokenId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "../GSN/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. */ 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 () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "../math/SafeMath.sol"; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath} * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never * directly accessed. */ library Counters { using SafeMath for uint256; 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 { // The {SafeMath} overflow check can be skipped here, see the comment at the top counter._value += 1; } function decrement(Counter storage counter) internal { counter._value = counter._value.sub(1); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @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) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () internal { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // ILepton.sol -- Part of the Charged Particles Protocol // Copyright (c) 2021 Firma Lux, Inc. <https://charged.fi> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. pragma solidity >=0.6.0; /** * @title Charged Particles Lepton Interface * @dev ... */ interface ILepton { struct Classification { string tokenUri; uint256 price; uint128 _upperBounds; uint32 supply; uint32 multiplier; uint32 bonus; } function mintLepton() external payable returns (uint256 newTokenId); function batchMintLepton(uint256 count) external payable; function getNextType() external view returns (uint256); function getNextPrice() external view returns (uint256); function getMultiplier(uint256 tokenId) external view returns (uint256); function getBonus(uint256 tokenId) external view returns (uint256); event MaxMintPerTxSet(uint256 maxAmount); event LeptonTypeAdded(string tokenUri, uint256 price, uint32 supply, uint32 multiplier, uint32 bonus, uint256 upperBounds); event LeptonTypeUpdated(uint256 leptonIndex, string tokenUri, uint256 price, uint32 supply, uint32 multiplier, uint32 bonus, uint256 upperBounds); event LeptonMinted(address indexed receiver, uint256 indexed tokenId, uint256 price, uint32 multiplier); event LeptonBatchMinted(address indexed receiver, uint256 indexed tokenId, uint256 count, uint256 price, uint32 multiplier); event PausedStateSet(bool isPaused); }
// SPDX-License-Identifier: MIT // BlackholePrevention.sol -- Part of the Charged Particles Protocol // Copyright (c) 2021 Firma Lux, Inc. <https://charged.fi> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. pragma solidity >=0.6.0; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; /** * @notice Prevents ETH or Tokens from getting stuck in a contract by allowing * the Owner/DAO to pull them out on behalf of a user * This is only meant to contracts that are not expected to hold tokens, but do handle transferring them. */ contract BlackholePrevention { using Address for address payable; using SafeERC20 for IERC20; event WithdrawStuckEther(address indexed receiver, uint256 amount); event WithdrawStuckERC20(address indexed receiver, address indexed tokenAddress, uint256 amount); event WithdrawStuckERC721(address indexed receiver, address indexed tokenAddress, uint256 indexed tokenId); function _withdrawEther(address payable receiver, uint256 amount) internal virtual { require(receiver != address(0x0), "BHP:E-403"); if (address(this).balance >= amount) { receiver.sendValue(amount); emit WithdrawStuckEther(receiver, amount); } } function _withdrawERC20(address payable receiver, address tokenAddress, uint256 amount) internal virtual { require(receiver != address(0x0), "BHP:E-403"); if (IERC20(tokenAddress).balanceOf(address(this)) >= amount) { IERC20(tokenAddress).safeTransfer(receiver, amount); emit WithdrawStuckERC20(receiver, tokenAddress, amount); } } function _withdrawERC721(address payable receiver, address tokenAddress, uint256 tokenId) internal virtual { require(receiver != address(0x0), "BHP:E-403"); if (IERC721(tokenAddress).ownerOf(tokenId) == address(this)) { IERC721(tokenAddress).transferFrom(address(this), receiver, tokenId); emit WithdrawStuckERC721(receiver, tokenAddress, tokenId); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; import "../../introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transfered from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; import "./IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; import "./IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ contract ERC165 is IERC165 { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; constructor () internal { // Derived contracts need only register support for their own interfaces, // we register support for ERC165 itself here _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev See {IERC165-supportsInterface}. * * Time complexity O(1), guaranteed to always use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) public view override returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` * (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Library for managing an enumerable variant of Solidity's * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] * type. * * Maps have the following properties: * * - Entries are added, removed, and checked for existence in constant time * (O(1)). * - Entries are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableMap for EnumerableMap.UintToAddressMap; * * // Declare a set state variable * EnumerableMap.UintToAddressMap private myMap; * } * ``` * * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are * supported. */ library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint256ToAddressMap) are just wrappers around // the underlying Map. // This means that we can only create new EnumerableMaps for types that fit // in bytes32. struct MapEntry { bytes32 _key; bytes32 _value; } struct Map { // Storage of map keys and values MapEntry[] _entries; // Position of the entry defined by a key in the `entries` array, plus 1 // because index 0 means a key is not in the map. mapping (bytes32 => uint256) _indexes; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex == 0) { // Equivalent to !contains(map, key) map._entries.push(MapEntry({ _key: key, _value: value })); // The entry is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value map._indexes[key] = map._entries.length; return true; } else { map._entries[keyIndex - 1]._value = value; return false; } } /** * @dev Removes a key-value pair from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function _remove(Map storage map, bytes32 key) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex != 0) { // Equivalent to contains(map, key) // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one // in the array, and then remove the last entry (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = keyIndex - 1; uint256 lastIndex = map._entries.length - 1; // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. MapEntry storage lastEntry = map._entries[lastIndex]; // Move the last entry to the index where the entry to delete is map._entries[toDeleteIndex] = lastEntry; // Update the index for the moved entry map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved entry was stored map._entries.pop(); // Delete the index for the deleted slot delete map._indexes[key]; return true; } else { return false; } } /** * @dev Returns true if the key is in the map. O(1). */ function _contains(Map storage map, bytes32 key) private view returns (bool) { return map._indexes[key] != 0; } /** * @dev Returns the number of key-value pairs in the map. O(1). */ function _length(Map storage map) private view returns (uint256) { return map._entries.length; } /** * @dev Returns the key-value pair stored at position `index` in the map. O(1). * * Note that there are no guarantees on the ordering of entries inside the * array, and it may change when more entries are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { require(map._entries.length > index, "EnumerableMap: index out of bounds"); MapEntry storage entry = map._entries[index]; return (entry._key, entry._value); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function _get(Map storage map, bytes32 key) private view returns (bytes32) { return _get(map, key, "EnumerableMap: nonexistent key"); } /** * @dev Same as {_get}, with a custom error message when `key` is not in the map. */ function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) { uint256 keyIndex = map._indexes[key]; require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) return map._entries[keyIndex - 1]._value; // All indexes are 1-based } // UintToAddressMap struct UintToAddressMap { Map _inner; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { return _set(map._inner, bytes32(key), bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { return _remove(map._inner, bytes32(key)); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { return _contains(map._inner, bytes32(key)); } /** * @dev Returns the number of elements in the map. O(1). */ function length(UintToAddressMap storage map) internal view returns (uint256) { return _length(map._inner); } /** * @dev Returns the element stored at position `index` in the set. O(1). * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { (bytes32 key, bytes32 value) = _at(map._inner, index); return (uint256(key), address(uint256(value))); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { return address(uint256(_get(map._inner, bytes32(key)))); } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. */ function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) { return address(uint256(_get(map._inner, bytes32(key), errorMessage))); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev String operations. */ library Strings { /** * @dev Converts a `uint256` to its ASCII `string` representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); uint256 index = digits - 1; temp = value; while (temp != 0) { buffer[index--] = byte(uint8(48 + temp % 10)); temp /= 10; } return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "./IERC20.sol"; import "../../math/SafeMath.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 SafeMath for uint256; 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' // solhint-disable-next-line max-line-length 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).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _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 // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"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":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"count","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"multiplier","type":"uint32"}],"name":"LeptonBatchMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"multiplier","type":"uint32"}],"name":"LeptonMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"tokenUri","type":"string"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"supply","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"multiplier","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"bonus","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"upperBounds","type":"uint256"}],"name":"LeptonTypeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"leptonIndex","type":"uint256"},{"indexed":false,"internalType":"string","name":"tokenUri","type":"string"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"supply","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"multiplier","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"bonus","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"upperBounds","type":"uint256"}],"name":"LeptonTypeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"MaxMintPerTxSet","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":"bool","name":"isPaused","type":"bool"}],"name":"PausedStateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"startTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"count","type":"uint256"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawStuckERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"WithdrawStuckERC721","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawStuckEther","type":"event"},{"inputs":[{"internalType":"string","name":"tokenUri","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint32","name":"supply","type":"uint32"},{"internalType":"uint32","name":"multiplier","type":"uint32"},{"internalType":"uint32","name":"bonus","type":"uint32"}],"name":"addLeptonType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"batchMintLepton","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBonus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintLepton","outputs":[{"internalType":"uint256","name":"newTokenId","type":"uint256"}],"stateMutability":"payable","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":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"setMaxMintPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setPausedState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"leptonIndex","type":"uint256"},{"internalType":"string","name":"tokenUri","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint32","name":"supply","type":"uint32"},{"internalType":"uint32","name":"multiplier","type":"uint32"},{"internalType":"uint32","name":"bonus","type":"uint32"}],"name":"updateLeptonType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawErc20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604080518082018252601a81527f43686172676564205061727469636c6573202d204c6570746f6e000000000000602080830191909152825180840190935260068352652622a82a27a760d11b9083015290620000766301ffc9a760e01b6200014f565b81516200008b906006906020850190620001d8565b508051620000a1906007906020840190620001d8565b50620000b46380ac58cd60e01b6200014f565b620000c6635b5e139f60e01b6200014f565b620000d863780e9d6360e01b6200014f565b5060009050620000e7620001d4565b600980546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600a8190556011805460ff1916909117905562000274565b6001600160e01b03198082161415620001af576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200021b57805160ff19168380011785556200024b565b828001600101855582156200024b579182015b828111156200024b5782518255916020019190600101906200022e565b50620002599291506200025d565b5090565b5b808211156200025957600081556001016200025e565b6137b580620002846000396000f3fe6080604052600436106101e35760003560e01c80636352211e11610102578063b0fde8cf11610095578063db9f60ff11610064578063db9f60ff146108d3578063e6089023146108ff578063e985e9c514610914578063f2fde38b1461094f576101e3565b8063b0fde8cf14610699578063b88d4fde1461073b578063c87b56dd1461080e578063da47bb2614610838576101e3565b80638da5cb5b116100d15780638da5cb5b1461060a57806395d89b411461061f578063a22cb46514610634578063adf8252d1461066f576101e3565b80636352211e14610583578063681ce98a146105ad57806370a08231146105c2578063715018a6146105f5576101e3565b80632f745c591161017a5780634f6ccce7116101495780634f6ccce7146104ee578063522f6815146105185780635fc194ed14610551578063616cdb1e14610559576101e3565b80632f745c59146104055780634025feb21461043e57806342842e0e146104815780634aa66b28146104c4576101e3565b80630afd902b116101b65780630afd902b1461033b5780631593dee11461035857806318160ddd1461039b57806323b872dd146103c2576101e3565b806301ffc9a7146101e857806306fdde0314610230578063081812fc146102ba578063095ea7b314610300575b600080fd5b3480156101f457600080fd5b5061021c6004803603602081101561020b57600080fd5b50356001600160e01b031916610982565b604080519115158252519081900360200190f35b34801561023c57600080fd5b506102456109a1565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027f578181015183820152602001610267565b50505050905090810190601f1680156102ac5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102c657600080fd5b506102e4600480360360208110156102dd57600080fd5b5035610a38565b604080516001600160a01b039092168252519081900360200190f35b34801561030c57600080fd5b506103396004803603604081101561032357600080fd5b506001600160a01b038135169060200135610a9f565b005b6103396004803603602081101561035157600080fd5b5035610b84565b34801561036457600080fd5b506103396004803603606081101561037b57600080fd5b506001600160a01b03813581169160208101359091169060400135610c37565b3480156103a757600080fd5b506103b0610c9a565b60408051918252519081900360200190f35b3480156103ce57600080fd5b50610339600480360360608110156103e557600080fd5b506001600160a01b03813581169160208101359091169060400135610cab565b34801561041157600080fd5b506103b06004803603604081101561042857600080fd5b506001600160a01b038135169060200135610d07565b34801561044a57600080fd5b506103396004803603606081101561046157600080fd5b506001600160a01b03813581169160208101359091169060400135610d32565b34801561048d57600080fd5b50610339600480360360608110156104a457600080fd5b506001600160a01b03813581169160208101359091169060400135610d95565b3480156104d057600080fd5b506103b0600480360360208110156104e757600080fd5b5035610db0565b3480156104fa57600080fd5b506103b06004803603602081101561051157600080fd5b5035610dd2565b34801561052457600080fd5b506103396004803603604081101561053b57600080fd5b506001600160a01b038135169060200135610de8565b6103b0610e4e565b34801561056557600080fd5b506103396004803603602081101561057c57600080fd5b5035610f04565b34801561058f57600080fd5b506102e4600480360360208110156105a657600080fd5b5035610f97565b3480156105b957600080fd5b506103b0610fd3565b3480156105ce57600080fd5b506103b0600480360360208110156105e557600080fd5b50356001600160a01b031661100f565b34801561060157600080fd5b5061033961107c565b34801561061657600080fd5b506102e461111e565b34801561062b57600080fd5b5061024561112d565b34801561064057600080fd5b506103396004803603604081101561065757600080fd5b506001600160a01b038135169060200135151561118e565b34801561067b57600080fd5b506103b06004803603602081101561069257600080fd5b5035611282565b3480156106a557600080fd5b50610339600480360360c08110156106bc57600080fd5b813591908101906040810160208201356401000000008111156106de57600080fd5b8201836020820111156106f057600080fd5b8035906020019184600183028401116401000000008311171561071257600080fd5b919350915080359063ffffffff60208201358116916040810135821691606090910135166112a4565b34801561074757600080fd5b506103396004803603608081101561075e57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561079957600080fd5b8201836020820111156107ab57600080fd5b803590602001918460018302840111640100000000831117156107cd57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506114ad945050505050565b34801561081a57600080fd5b506102456004803603602081101561083157600080fd5b5035611510565b34801561084457600080fd5b50610339600480360360a081101561085b57600080fd5b81019060208101813564010000000081111561087657600080fd5b82018360208201111561088857600080fd5b803590602001918460018302840111640100000000831117156108aa57600080fd5b919350915080359063ffffffff60208201358116916040810135821691606090910135166115fa565b3480156108df57600080fd5b50610339600480360360208110156108f657600080fd5b50351515611871565b34801561090b57600080fd5b506103b0611910565b34801561092057600080fd5b5061021c6004803603604081101561093757600080fd5b506001600160a01b038135811691602001351661192d565b34801561095b57600080fd5b506103396004803603602081101561097257600080fd5b50356001600160a01b031661195b565b6001600160e01b03191660009081526020819052604090205460ff1690565b60068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a2d5780601f10610a0257610100808354040283529160200191610a2d565b820191906000526020600020905b815481529060010190602001808311610a1057829003601f168201915b505050505090505b90565b6000610a4382611a54565b610a83576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303560a01b604482015290519081900360640190fd5b506000908152600460205260409020546001600160a01b031690565b6000610aaa82610f97565b9050806001600160a01b0316836001600160a01b03161415610b02576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d31313160a01b604482015290519081900360640190fd5b806001600160a01b0316610b14611a61565b6001600160a01b03161480610b355750610b3581610b30611a61565b61192d565b610b75576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d31303560a01b604482015290519081900360640190fd5b610b7f8383611a65565b505050565b6002600a541415610bdc576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600a5560115460ff1615610c25576040805162461bcd60e51b81526020600482015260096024820152684c50543a452d31303160b81b604482015290519081900360640190fd5b610c2f3382611ad3565b506001600a55565b610c3f611a61565b6009546001600160a01b03908116911614610c8f576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b610b7f838383611ed5565b6000610ca66002611fff565b905090565b610cbc610cb6611a61565b8261200a565b610cfc576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d31303560a01b604482015290519081900360640190fd5b610b7f8383836120b3565b6001600160a01b0382166000908152600160205260408120610d2990836121fe565b90505b92915050565b610d3a611a61565b6009546001600160a01b03908116911614610d8a576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b610b7f83838361220a565b610b7f838383604051806020016040528060008152506114ad565b6000908152600d6020526040902060020154600160c01b900463ffffffff1690565b600080610de0600284612390565b509392505050565b610df0611a61565b6009546001600160a01b03908116911614610e40576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b610e4a82826123ac565b5050565b60006002600a541415610ea8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600a5560115460ff1615610ef1576040805162461bcd60e51b81526020600482015260096024820152684c50543a452d31303160b81b604482015290519081900360640190fd5b610efa3361244f565b6001600a55919050565b610f0c611a61565b6009546001600160a01b03908116911614610f5c576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b60108190556040805182815290517f409ba051a4c57ed282ca3d937444126381926068149b2ceb9dcff792655a9b039181900360200190a150565b6000610d2c826040518060400160405280600c81526020016b4552433732313a452d34303560a01b815250600261277e9092919063ffffffff16565b600c54600e5460009111610fe957506000610a35565b600c600e5481548110610ff857fe5b906000526020600020906003020160010154905090565b60006001600160a01b03821661105b576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303360a01b604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020610d2c90611fff565b611084611a61565b6009546001600160a01b039081169116146110d4576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b6009546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600980546001600160a01b0319169055565b6009546001600160a01b031690565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a2d5780601f10610a0257610100808354040283529160200191610a2d565b611196611a61565b6001600160a01b0316826001600160a01b031614156111eb576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d31313160a01b604482015290519081900360640190fd5b80600560006111f8611a61565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561123c611a61565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b6000908152600d6020526040902060020154600160a01b900463ffffffff1690565b6112ac611a61565b6009546001600160a01b039081169116146112fc576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b8585600c898154811061130b57fe5b60009182526020909120611325936003909202019161353a565b5083600c888154811061133457fe5b90600052602060002090600302016001018190555082600c888154811061135757fe5b906000526020600020906003020160020160106101000a81548163ffffffff021916908363ffffffff16021790555081600c888154811061139457fe5b906000526020600020906003020160020160146101000a81548163ffffffff021916908363ffffffff16021790555080600c88815481106113d157fe5b906000526020600020906003020160020160186101000a81548163ffffffff021916908363ffffffff1602179055507fc29eb52b178d59612a9ec3dbfed2e3054ea12f735bff5d06a799a4b06cd47c5287878787878787600f5460405180898152602001806020018781526020018663ffffffff1681526020018563ffffffff1681526020018463ffffffff1681526020018381526020018281038252898982818152602001925080828437600083820152604051601f909101601f19169092018290039b50909950505050505050505050a150505050505050565b6114be6114b8611a61565b8361200a565b6114fe576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d31303560a01b604482015290519081900360640190fd5b61150a84848484612795565b50505050565b606061151b82611a54565b61155b576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303560a01b604482015290519081900360640190fd5b60008281526008602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156115ee5780601f106115c3576101008083540402835291602001916115ee565b820191906000526020600020905b8154815290600101906020018083116115d157829003601f168201915b50505050509050919050565b611602611a61565b6009546001600160a01b03908116911614611652576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b600f546116689063ffffffff808616906127ec16565b600f556116736135b8565b6040518060c0016040528088888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509385525050506020808301899052600f546001600160801b0316604084015263ffffffff80891660608501528781166080850152861660a090930192909252600c8054600181018255915282518051939450849360039092027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7019261173b928492909101906135ed565b5060208281015160018301556040808401516002909301805460608087015160808089015160a0998a01516001600160801b03199095166001600160801b039099169890981763ffffffff60801b1916600160801b63ffffffff938416021763ffffffff60a01b1916600160a01b988316989098029790971763ffffffff60c01b1916600160c01b9382169390930292909217909255600f5483519485018c90528a8216938501939093528881169184019190915286169282019290925291820181905260c080835282018890527f03a96a3a809ae0740a794cb4d254030e999b01bb9985f4b0b5f5e524dc8e0667918991899189918991899189918060e08101898980828437600083820152604051601f909101601f19169092018290039a509098505050505050505050a150505050505050565b611879611a61565b6009546001600160a01b039081169116146118c9576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b6011805482151560ff19909116811790915560408051918252517fa9bfed3d98385b3777389e321dbde773cf7d335fa604fefbae3dca93564f55869181900360200190a150565b600c54600e546000911161192657506000610a35565b50600e5490565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b611963611a61565b6009546001600160a01b039081169116146119b3576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b6001600160a01b0381166119f85760405162461bcd60e51b81526004018080602001828103825260268152602001806136936026913960400191505060405180910390fd5b6009546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600980546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d2c600283612846565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611a9a82610f97565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600c54600e5410611b17576040805162461bcd60e51b8152602060048201526009602482015268098a0a8748a5a6860760bb1b604482015290519081900360640190fd5b6010541580611b2857506010548111155b611b65576040805162461bcd60e51b81526020600482015260096024820152684c50543a452d34323960b81b604482015290519081900360640190fd5b611b6d6135b8565b600c600e5481548110611b7c57fe5b600091825260209182902060408051600393909302909101805460026001821615610100026000190190911604601f8101859004909402830160e090810190925260c0830184815292939092849290918491840182828015611c1f5780601f10611bf457610100808354040283529160200191611c1f565b820191906000526020600020905b815481529060010190602001808311611c0257829003601f168201915b5050509183525050600182015460208201526002909101546001600160801b038116604083015263ffffffff600160801b820481166060840152600160a01b820481166080840152600160c01b9091041660a09091015290506000611c84600b612852565b90506000611c9282856127ec565b905082604001516001600160801b0316811115611cd657611cd3611ccc84604001516001600160801b03168361285690919063ffffffff16565b8590612856565b93505b6020830151600090611ce89086612898565b905080341015611d2b576040805162461bcd60e51b81526020600482015260096024820152681314150e914b4d0c4d60ba1b604482015290519081900360640190fd5b611d5086611d3a8560016127ec565b87604051806020016040528060008152506128f1565b60005b85811015611e4157611d65600b612909565b611d6f600b612852565b6000818152600d602090815260409091208751805193975088939192611d9a928492909101906135ed565b50602082015160018201556040820151600290910180546060840151608085015160a09095015163ffffffff908116600160c01b0263ffffffff60c01b19968216600160a01b0263ffffffff60a01b1992909316600160801b0263ffffffff60801b196001600160801b039097166001600160801b03199095169490941795909516929092179190911617929092161790558451611e39908590612912565b600101611d53565b5083604001516001600160801b0316831415611e6957600e54611e659060016127ec565b600e555b6020808501516080860151604080518981529384019290925263ffffffff16828201525184916001600160a01b038916917f6a76383af863bc5212d6edf6fd3f739f099a5c0e4cd46bdd8764d41040c2f16d9181900360600190a3611ecd8161297a565b505050505050565b6001600160a01b038316611f1c576040805162461bcd60e51b81526020600482015260096024820152684248503a452d34303360b81b604482015290519081900360640190fd5b80826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611f6a57600080fd5b505afa158015611f7e573d6000803e3d6000fd5b505050506040513d6020811015611f9457600080fd5b505110610b7f57611faf6001600160a01b03831684836129a9565b816001600160a01b0316836001600160a01b03167f6c9d637297625e945b296ff73a71fcfbd0a9e062652b6491a921c4c60194176b836040518082815260200191505060405180910390a3505050565b6000610d2c82612852565b600061201582611a54565b612055576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303560a01b604482015290519081900360640190fd5b600061206083610f97565b9050806001600160a01b0316846001600160a01b0316148061209b5750836001600160a01b031661209084610a38565b6001600160a01b0316145b806120ab57506120ab818561192d565b949350505050565b826001600160a01b03166120c682610f97565b6001600160a01b031614612110576040805162461bcd60e51b815260206004820152600c60248201526b22a9219b99189d229698981960a11b604482015290519081900360640190fd5b6001600160a01b03821661215a576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303360a01b604482015290519081900360640190fd5b612165600082611a65565b6001600160a01b038316600090815260016020526040902061218790826129fb565b506001600160a01b03821660009081526001602052604090206121aa9082612a07565b506121b760028284612a13565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000610d298383612a29565b6001600160a01b038316612251576040805162461bcd60e51b81526020600482015260096024820152684248503a452d34303360b81b604482015290519081900360640190fd5b306001600160a01b0316826001600160a01b0316636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561229f57600080fd5b505afa1580156122b3573d6000803e3d6000fd5b505050506040513d60208110156122c957600080fd5b50516001600160a01b03161415610b7f57604080516323b872dd60e01b81523060048201526001600160a01b038581166024830152604482018490529151918416916323b872dd9160648082019260009290919082900301818387803b15801561233257600080fd5b505af1158015612346573d6000803e3d6000fd5b5050505080826001600160a01b0316846001600160a01b03167ffefe036cac4ee3a4aca074a81cbcc4376e1484693289078dbec149c890101d5b60405160405180910390a4505050565b600080808061239f8686612a8d565b9097909650945050505050565b6001600160a01b0382166123f3576040805162461bcd60e51b81526020600482015260096024820152684248503a452d34303360b81b604482015290519081900360640190fd5b804710610e4a5761240d6001600160a01b03831682612b08565b6040805182815290516001600160a01b038416917eddb683bb45cd5d0ad8a200c6fae7152b1c236ee90a4a37db692407f5cc38bd919081900360200190a25050565b600c54600e5460009111612496576040805162461bcd60e51b8152602060048201526009602482015268098a0a8748a5a6860760bb1b604482015290519081900360640190fd5b61249e6135b8565b600c600e54815481106124ad57fe5b600091825260209182902060408051600393909302909101805460026001821615610100026000190190911604601f8101859004909402830160e090810190925260c08301848152929390928492909184918401828280156125505780601f1061252557610100808354040283529160200191612550565b820191906000526020600020905b81548152906001019060200180831161253357829003601f168201915b505050918352505060018201546020808301919091526002909201546001600160801b038116604083015263ffffffff600160801b820481166060840152600160a01b820481166080840152600160c01b9091041660a0909101528101519091503410156125f1576040805162461bcd60e51b81526020600482015260096024820152681314150e914b4d0c4d60ba1b604482015290519081900360640190fd5b6125fb600b612909565b612605600b612852565b6000818152600d602090815260409091208351805193955084939192612630928492909101906135ed565b506020828101516001830155604080840151600290930180546060860151608087015160a0909701516001600160801b03199092166001600160801b039096169590951763ffffffff60801b1916600160801b63ffffffff968716021763ffffffff60a01b1916600160a01b968616969096029590951763ffffffff60c01b1916600160c01b9490951693909302939093179091558151908101909152600081526126de9084908490612bed565b6126ec828260000151612912565b80604001516001600160801b031682141561271357600e5461270f9060016127ec565b600e555b81836001600160a01b03167f55e53fe987974979658fa32e0f988cddc0e6c145b95d38c26a212f57ae3f462083602001518460800151604051808381526020018263ffffffff1681526020019250505060405180910390a3612778816020015161297a565b50919050565b600061278b848484612c44565b90505b9392505050565b6127a08484846120b3565b6127ac84848484612d0e565b61150a576040805162461bcd60e51b815260206004820152600c60248201526b22a9219b99189d22969a181960a11b604482015290519081900360640190fd5b600082820183811015610d29576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000610d298383612e8a565b5490565b6000610d2983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612ea2565b6000826128a757506000610d2c565b828202828482816128b457fe5b0414610d295760405162461bcd60e51b81526004018080602001828103825260218152602001806137156021913960400191505060405180910390fd5b6128fc848484612efc565b6127ac6000858584612d0e565b80546001019055565b61291b82611a54565b61295b576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303560a01b604482015290519081900360640190fd5b60008281526008602090815260409091208251610b7f928401906135ed565b60006129863483612856565b90508015610e4a57610e4a8161299a611a61565b6001600160a01b031690612b08565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b7f908490613032565b6000610d2983836130e3565b6000610d2983836131a9565b600061278b84846001600160a01b0385166131f3565b81546000908210612a6b5760405162461bcd60e51b81526004018080602001828103825260228152602001806136716022913960400191505060405180910390fd5b826000018281548110612a7a57fe5b9060005260206000200154905092915050565b815460009081908310612ad15760405162461bcd60e51b81526004018080602001828103825260228152602001806136f36022913960400191505060405180910390fd5b6000846000018481548110612ae257fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b80471015612b5d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114612ba8576040519150601f19603f3d011682016040523d82523d6000602084013e612bad565b606091505b5050905080610b7f5760405162461bcd60e51b815260040180806020018281038252603a8152602001806136b9603a913960400191505060405180910390fd5b612bf7838361328a565b612c046000848484612d0e565b610b7f576040805162461bcd60e51b815260206004820152600c60248201526b22a9219b99189d22969a181960a11b604482015290519081900360640190fd5b60008281526001840160205260408120548281612cdf5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612ca4578181015183820152602001612c8c565b50505050905090810190601f168015612cd15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110612cf257fe5b9060005260206000209060020201600101549150509392505050565b6000612d22846001600160a01b031661338a565b612d2e575060016120ab565b6060612e50630a85bd0160e11b612d43611a61565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612daa578181015183820152602001612d92565b50505050905090810190601f168015612dd75780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050506040518060400160405280600c81526020016b22a9219b99189d22969a181960a11b815250876001600160a01b03166133c39092919063ffffffff16565b90506000818060200190516020811015612e6957600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b60008184841115612ef45760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612ca4578181015183820152602001612c8c565b505050900390565b6001600160a01b038316612f46576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303360a01b604482015290519081900360640190fd5b612f4f82611a54565b15612f90576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303760a01b604482015290519081900360640190fd5b60005b81811015612fe3576000612fa784836127ec565b6001600160a01b0386166000908152600160205260409020909150612fcc9082612a07565b50612fd960028287612a13565b5050600101612f93565b50604080518381526020810183905281516001600160a01b038616926000927f2b917b642d733ae56b43a6d33bf92c148cdf5e7c0dcc433a785aed1513c7357e929081900390910190a3505050565b6060613087826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133c39092919063ffffffff16565b805190915015610b7f578080602001905160208110156130a657600080fd5b5051610b7f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613756602a913960400191505060405180910390fd5b6000818152600183016020526040812054801561319f578354600019808301919081019060009087908390811061311657fe5b906000526020600020015490508087600001848154811061313357fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061316357fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610d2c565b6000915050610d2c565b60006131b58383612e8a565b6131eb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d2c565b506000610d2c565b60008281526001840160205260408120548061325857505060408051808201825283815260208082018481528654600181810189556000898152848120955160029093029095019182559151908201558654868452818801909252929091205561278e565b8285600001600183038154811061326b57fe5b906000526020600020906002020160010181905550600091505061278e565b6001600160a01b0382166132d4576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303360a01b604482015290519081900360640190fd5b6132dd81611a54565b1561331e576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303760a01b604482015290519081900360640190fd5b6001600160a01b03821660009081526001602052604090206133409082612a07565b5061334d60028284612a13565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906120ab575050151592915050565b606061278b848460008560606133d88561338a565b613429576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106134685780518252601f199092019160209182019101613449565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146134ca576040519150601f19603f3d011682016040523d82523d6000602084013e6134cf565b606091505b509150915081156134e35791506120ab9050565b8051156134f35780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315612ca4578181015183820152602001612c8c565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061357b5782800160ff198235161785556135a8565b828001600101855582156135a8579182015b828111156135a857823582559160200191906001019061358d565b506135b492915061365b565b5090565b6040805160c081018252606080825260006020830181905292820183905281018290526080810182905260a081019190915290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061362e57805160ff19168380011785556135a8565b828001600101855582156135a8579182015b828111156135a8578251825591602001919060010190613640565b5b808211156135b4576000815560010161365c56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122066663034832eb83c4b1e4d3b5b640698c2997361d7be4f0b47e9e53023d1e2e364736f6c634300060c0033
Deployed Bytecode
0x6080604052600436106101e35760003560e01c80636352211e11610102578063b0fde8cf11610095578063db9f60ff11610064578063db9f60ff146108d3578063e6089023146108ff578063e985e9c514610914578063f2fde38b1461094f576101e3565b8063b0fde8cf14610699578063b88d4fde1461073b578063c87b56dd1461080e578063da47bb2614610838576101e3565b80638da5cb5b116100d15780638da5cb5b1461060a57806395d89b411461061f578063a22cb46514610634578063adf8252d1461066f576101e3565b80636352211e14610583578063681ce98a146105ad57806370a08231146105c2578063715018a6146105f5576101e3565b80632f745c591161017a5780634f6ccce7116101495780634f6ccce7146104ee578063522f6815146105185780635fc194ed14610551578063616cdb1e14610559576101e3565b80632f745c59146104055780634025feb21461043e57806342842e0e146104815780634aa66b28146104c4576101e3565b80630afd902b116101b65780630afd902b1461033b5780631593dee11461035857806318160ddd1461039b57806323b872dd146103c2576101e3565b806301ffc9a7146101e857806306fdde0314610230578063081812fc146102ba578063095ea7b314610300575b600080fd5b3480156101f457600080fd5b5061021c6004803603602081101561020b57600080fd5b50356001600160e01b031916610982565b604080519115158252519081900360200190f35b34801561023c57600080fd5b506102456109a1565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027f578181015183820152602001610267565b50505050905090810190601f1680156102ac5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102c657600080fd5b506102e4600480360360208110156102dd57600080fd5b5035610a38565b604080516001600160a01b039092168252519081900360200190f35b34801561030c57600080fd5b506103396004803603604081101561032357600080fd5b506001600160a01b038135169060200135610a9f565b005b6103396004803603602081101561035157600080fd5b5035610b84565b34801561036457600080fd5b506103396004803603606081101561037b57600080fd5b506001600160a01b03813581169160208101359091169060400135610c37565b3480156103a757600080fd5b506103b0610c9a565b60408051918252519081900360200190f35b3480156103ce57600080fd5b50610339600480360360608110156103e557600080fd5b506001600160a01b03813581169160208101359091169060400135610cab565b34801561041157600080fd5b506103b06004803603604081101561042857600080fd5b506001600160a01b038135169060200135610d07565b34801561044a57600080fd5b506103396004803603606081101561046157600080fd5b506001600160a01b03813581169160208101359091169060400135610d32565b34801561048d57600080fd5b50610339600480360360608110156104a457600080fd5b506001600160a01b03813581169160208101359091169060400135610d95565b3480156104d057600080fd5b506103b0600480360360208110156104e757600080fd5b5035610db0565b3480156104fa57600080fd5b506103b06004803603602081101561051157600080fd5b5035610dd2565b34801561052457600080fd5b506103396004803603604081101561053b57600080fd5b506001600160a01b038135169060200135610de8565b6103b0610e4e565b34801561056557600080fd5b506103396004803603602081101561057c57600080fd5b5035610f04565b34801561058f57600080fd5b506102e4600480360360208110156105a657600080fd5b5035610f97565b3480156105b957600080fd5b506103b0610fd3565b3480156105ce57600080fd5b506103b0600480360360208110156105e557600080fd5b50356001600160a01b031661100f565b34801561060157600080fd5b5061033961107c565b34801561061657600080fd5b506102e461111e565b34801561062b57600080fd5b5061024561112d565b34801561064057600080fd5b506103396004803603604081101561065757600080fd5b506001600160a01b038135169060200135151561118e565b34801561067b57600080fd5b506103b06004803603602081101561069257600080fd5b5035611282565b3480156106a557600080fd5b50610339600480360360c08110156106bc57600080fd5b813591908101906040810160208201356401000000008111156106de57600080fd5b8201836020820111156106f057600080fd5b8035906020019184600183028401116401000000008311171561071257600080fd5b919350915080359063ffffffff60208201358116916040810135821691606090910135166112a4565b34801561074757600080fd5b506103396004803603608081101561075e57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561079957600080fd5b8201836020820111156107ab57600080fd5b803590602001918460018302840111640100000000831117156107cd57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506114ad945050505050565b34801561081a57600080fd5b506102456004803603602081101561083157600080fd5b5035611510565b34801561084457600080fd5b50610339600480360360a081101561085b57600080fd5b81019060208101813564010000000081111561087657600080fd5b82018360208201111561088857600080fd5b803590602001918460018302840111640100000000831117156108aa57600080fd5b919350915080359063ffffffff60208201358116916040810135821691606090910135166115fa565b3480156108df57600080fd5b50610339600480360360208110156108f657600080fd5b50351515611871565b34801561090b57600080fd5b506103b0611910565b34801561092057600080fd5b5061021c6004803603604081101561093757600080fd5b506001600160a01b038135811691602001351661192d565b34801561095b57600080fd5b506103396004803603602081101561097257600080fd5b50356001600160a01b031661195b565b6001600160e01b03191660009081526020819052604090205460ff1690565b60068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a2d5780601f10610a0257610100808354040283529160200191610a2d565b820191906000526020600020905b815481529060010190602001808311610a1057829003601f168201915b505050505090505b90565b6000610a4382611a54565b610a83576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303560a01b604482015290519081900360640190fd5b506000908152600460205260409020546001600160a01b031690565b6000610aaa82610f97565b9050806001600160a01b0316836001600160a01b03161415610b02576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d31313160a01b604482015290519081900360640190fd5b806001600160a01b0316610b14611a61565b6001600160a01b03161480610b355750610b3581610b30611a61565b61192d565b610b75576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d31303560a01b604482015290519081900360640190fd5b610b7f8383611a65565b505050565b6002600a541415610bdc576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600a5560115460ff1615610c25576040805162461bcd60e51b81526020600482015260096024820152684c50543a452d31303160b81b604482015290519081900360640190fd5b610c2f3382611ad3565b506001600a55565b610c3f611a61565b6009546001600160a01b03908116911614610c8f576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b610b7f838383611ed5565b6000610ca66002611fff565b905090565b610cbc610cb6611a61565b8261200a565b610cfc576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d31303560a01b604482015290519081900360640190fd5b610b7f8383836120b3565b6001600160a01b0382166000908152600160205260408120610d2990836121fe565b90505b92915050565b610d3a611a61565b6009546001600160a01b03908116911614610d8a576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b610b7f83838361220a565b610b7f838383604051806020016040528060008152506114ad565b6000908152600d6020526040902060020154600160c01b900463ffffffff1690565b600080610de0600284612390565b509392505050565b610df0611a61565b6009546001600160a01b03908116911614610e40576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b610e4a82826123ac565b5050565b60006002600a541415610ea8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600a5560115460ff1615610ef1576040805162461bcd60e51b81526020600482015260096024820152684c50543a452d31303160b81b604482015290519081900360640190fd5b610efa3361244f565b6001600a55919050565b610f0c611a61565b6009546001600160a01b03908116911614610f5c576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b60108190556040805182815290517f409ba051a4c57ed282ca3d937444126381926068149b2ceb9dcff792655a9b039181900360200190a150565b6000610d2c826040518060400160405280600c81526020016b4552433732313a452d34303560a01b815250600261277e9092919063ffffffff16565b600c54600e5460009111610fe957506000610a35565b600c600e5481548110610ff857fe5b906000526020600020906003020160010154905090565b60006001600160a01b03821661105b576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303360a01b604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020610d2c90611fff565b611084611a61565b6009546001600160a01b039081169116146110d4576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b6009546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600980546001600160a01b0319169055565b6009546001600160a01b031690565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a2d5780601f10610a0257610100808354040283529160200191610a2d565b611196611a61565b6001600160a01b0316826001600160a01b031614156111eb576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d31313160a01b604482015290519081900360640190fd5b80600560006111f8611a61565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561123c611a61565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b6000908152600d6020526040902060020154600160a01b900463ffffffff1690565b6112ac611a61565b6009546001600160a01b039081169116146112fc576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b8585600c898154811061130b57fe5b60009182526020909120611325936003909202019161353a565b5083600c888154811061133457fe5b90600052602060002090600302016001018190555082600c888154811061135757fe5b906000526020600020906003020160020160106101000a81548163ffffffff021916908363ffffffff16021790555081600c888154811061139457fe5b906000526020600020906003020160020160146101000a81548163ffffffff021916908363ffffffff16021790555080600c88815481106113d157fe5b906000526020600020906003020160020160186101000a81548163ffffffff021916908363ffffffff1602179055507fc29eb52b178d59612a9ec3dbfed2e3054ea12f735bff5d06a799a4b06cd47c5287878787878787600f5460405180898152602001806020018781526020018663ffffffff1681526020018563ffffffff1681526020018463ffffffff1681526020018381526020018281038252898982818152602001925080828437600083820152604051601f909101601f19169092018290039b50909950505050505050505050a150505050505050565b6114be6114b8611a61565b8361200a565b6114fe576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d31303560a01b604482015290519081900360640190fd5b61150a84848484612795565b50505050565b606061151b82611a54565b61155b576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303560a01b604482015290519081900360640190fd5b60008281526008602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156115ee5780601f106115c3576101008083540402835291602001916115ee565b820191906000526020600020905b8154815290600101906020018083116115d157829003601f168201915b50505050509050919050565b611602611a61565b6009546001600160a01b03908116911614611652576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b600f546116689063ffffffff808616906127ec16565b600f556116736135b8565b6040518060c0016040528088888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509385525050506020808301899052600f546001600160801b0316604084015263ffffffff80891660608501528781166080850152861660a090930192909252600c8054600181018255915282518051939450849360039092027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7019261173b928492909101906135ed565b5060208281015160018301556040808401516002909301805460608087015160808089015160a0998a01516001600160801b03199095166001600160801b039099169890981763ffffffff60801b1916600160801b63ffffffff938416021763ffffffff60a01b1916600160a01b988316989098029790971763ffffffff60c01b1916600160c01b9382169390930292909217909255600f5483519485018c90528a8216938501939093528881169184019190915286169282019290925291820181905260c080835282018890527f03a96a3a809ae0740a794cb4d254030e999b01bb9985f4b0b5f5e524dc8e0667918991899189918991899189918060e08101898980828437600083820152604051601f909101601f19169092018290039a509098505050505050505050a150505050505050565b611879611a61565b6009546001600160a01b039081169116146118c9576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b6011805482151560ff19909116811790915560408051918252517fa9bfed3d98385b3777389e321dbde773cf7d335fa604fefbae3dca93564f55869181900360200190a150565b600c54600e546000911161192657506000610a35565b50600e5490565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b611963611a61565b6009546001600160a01b039081169116146119b3576040805162461bcd60e51b81526020600482018190526024820152600080516020613736833981519152604482015290519081900360640190fd5b6001600160a01b0381166119f85760405162461bcd60e51b81526004018080602001828103825260268152602001806136936026913960400191505060405180910390fd5b6009546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600980546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d2c600283612846565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611a9a82610f97565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600c54600e5410611b17576040805162461bcd60e51b8152602060048201526009602482015268098a0a8748a5a6860760bb1b604482015290519081900360640190fd5b6010541580611b2857506010548111155b611b65576040805162461bcd60e51b81526020600482015260096024820152684c50543a452d34323960b81b604482015290519081900360640190fd5b611b6d6135b8565b600c600e5481548110611b7c57fe5b600091825260209182902060408051600393909302909101805460026001821615610100026000190190911604601f8101859004909402830160e090810190925260c0830184815292939092849290918491840182828015611c1f5780601f10611bf457610100808354040283529160200191611c1f565b820191906000526020600020905b815481529060010190602001808311611c0257829003601f168201915b5050509183525050600182015460208201526002909101546001600160801b038116604083015263ffffffff600160801b820481166060840152600160a01b820481166080840152600160c01b9091041660a09091015290506000611c84600b612852565b90506000611c9282856127ec565b905082604001516001600160801b0316811115611cd657611cd3611ccc84604001516001600160801b03168361285690919063ffffffff16565b8590612856565b93505b6020830151600090611ce89086612898565b905080341015611d2b576040805162461bcd60e51b81526020600482015260096024820152681314150e914b4d0c4d60ba1b604482015290519081900360640190fd5b611d5086611d3a8560016127ec565b87604051806020016040528060008152506128f1565b60005b85811015611e4157611d65600b612909565b611d6f600b612852565b6000818152600d602090815260409091208751805193975088939192611d9a928492909101906135ed565b50602082015160018201556040820151600290910180546060840151608085015160a09095015163ffffffff908116600160c01b0263ffffffff60c01b19968216600160a01b0263ffffffff60a01b1992909316600160801b0263ffffffff60801b196001600160801b039097166001600160801b03199095169490941795909516929092179190911617929092161790558451611e39908590612912565b600101611d53565b5083604001516001600160801b0316831415611e6957600e54611e659060016127ec565b600e555b6020808501516080860151604080518981529384019290925263ffffffff16828201525184916001600160a01b038916917f6a76383af863bc5212d6edf6fd3f739f099a5c0e4cd46bdd8764d41040c2f16d9181900360600190a3611ecd8161297a565b505050505050565b6001600160a01b038316611f1c576040805162461bcd60e51b81526020600482015260096024820152684248503a452d34303360b81b604482015290519081900360640190fd5b80826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611f6a57600080fd5b505afa158015611f7e573d6000803e3d6000fd5b505050506040513d6020811015611f9457600080fd5b505110610b7f57611faf6001600160a01b03831684836129a9565b816001600160a01b0316836001600160a01b03167f6c9d637297625e945b296ff73a71fcfbd0a9e062652b6491a921c4c60194176b836040518082815260200191505060405180910390a3505050565b6000610d2c82612852565b600061201582611a54565b612055576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303560a01b604482015290519081900360640190fd5b600061206083610f97565b9050806001600160a01b0316846001600160a01b0316148061209b5750836001600160a01b031661209084610a38565b6001600160a01b0316145b806120ab57506120ab818561192d565b949350505050565b826001600160a01b03166120c682610f97565b6001600160a01b031614612110576040805162461bcd60e51b815260206004820152600c60248201526b22a9219b99189d229698981960a11b604482015290519081900360640190fd5b6001600160a01b03821661215a576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303360a01b604482015290519081900360640190fd5b612165600082611a65565b6001600160a01b038316600090815260016020526040902061218790826129fb565b506001600160a01b03821660009081526001602052604090206121aa9082612a07565b506121b760028284612a13565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000610d298383612a29565b6001600160a01b038316612251576040805162461bcd60e51b81526020600482015260096024820152684248503a452d34303360b81b604482015290519081900360640190fd5b306001600160a01b0316826001600160a01b0316636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561229f57600080fd5b505afa1580156122b3573d6000803e3d6000fd5b505050506040513d60208110156122c957600080fd5b50516001600160a01b03161415610b7f57604080516323b872dd60e01b81523060048201526001600160a01b038581166024830152604482018490529151918416916323b872dd9160648082019260009290919082900301818387803b15801561233257600080fd5b505af1158015612346573d6000803e3d6000fd5b5050505080826001600160a01b0316846001600160a01b03167ffefe036cac4ee3a4aca074a81cbcc4376e1484693289078dbec149c890101d5b60405160405180910390a4505050565b600080808061239f8686612a8d565b9097909650945050505050565b6001600160a01b0382166123f3576040805162461bcd60e51b81526020600482015260096024820152684248503a452d34303360b81b604482015290519081900360640190fd5b804710610e4a5761240d6001600160a01b03831682612b08565b6040805182815290516001600160a01b038416917eddb683bb45cd5d0ad8a200c6fae7152b1c236ee90a4a37db692407f5cc38bd919081900360200190a25050565b600c54600e5460009111612496576040805162461bcd60e51b8152602060048201526009602482015268098a0a8748a5a6860760bb1b604482015290519081900360640190fd5b61249e6135b8565b600c600e54815481106124ad57fe5b600091825260209182902060408051600393909302909101805460026001821615610100026000190190911604601f8101859004909402830160e090810190925260c08301848152929390928492909184918401828280156125505780601f1061252557610100808354040283529160200191612550565b820191906000526020600020905b81548152906001019060200180831161253357829003601f168201915b505050918352505060018201546020808301919091526002909201546001600160801b038116604083015263ffffffff600160801b820481166060840152600160a01b820481166080840152600160c01b9091041660a0909101528101519091503410156125f1576040805162461bcd60e51b81526020600482015260096024820152681314150e914b4d0c4d60ba1b604482015290519081900360640190fd5b6125fb600b612909565b612605600b612852565b6000818152600d602090815260409091208351805193955084939192612630928492909101906135ed565b506020828101516001830155604080840151600290930180546060860151608087015160a0909701516001600160801b03199092166001600160801b039096169590951763ffffffff60801b1916600160801b63ffffffff968716021763ffffffff60a01b1916600160a01b968616969096029590951763ffffffff60c01b1916600160c01b9490951693909302939093179091558151908101909152600081526126de9084908490612bed565b6126ec828260000151612912565b80604001516001600160801b031682141561271357600e5461270f9060016127ec565b600e555b81836001600160a01b03167f55e53fe987974979658fa32e0f988cddc0e6c145b95d38c26a212f57ae3f462083602001518460800151604051808381526020018263ffffffff1681526020019250505060405180910390a3612778816020015161297a565b50919050565b600061278b848484612c44565b90505b9392505050565b6127a08484846120b3565b6127ac84848484612d0e565b61150a576040805162461bcd60e51b815260206004820152600c60248201526b22a9219b99189d22969a181960a11b604482015290519081900360640190fd5b600082820183811015610d29576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000610d298383612e8a565b5490565b6000610d2983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612ea2565b6000826128a757506000610d2c565b828202828482816128b457fe5b0414610d295760405162461bcd60e51b81526004018080602001828103825260218152602001806137156021913960400191505060405180910390fd5b6128fc848484612efc565b6127ac6000858584612d0e565b80546001019055565b61291b82611a54565b61295b576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303560a01b604482015290519081900360640190fd5b60008281526008602090815260409091208251610b7f928401906135ed565b60006129863483612856565b90508015610e4a57610e4a8161299a611a61565b6001600160a01b031690612b08565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b7f908490613032565b6000610d2983836130e3565b6000610d2983836131a9565b600061278b84846001600160a01b0385166131f3565b81546000908210612a6b5760405162461bcd60e51b81526004018080602001828103825260228152602001806136716022913960400191505060405180910390fd5b826000018281548110612a7a57fe5b9060005260206000200154905092915050565b815460009081908310612ad15760405162461bcd60e51b81526004018080602001828103825260228152602001806136f36022913960400191505060405180910390fd5b6000846000018481548110612ae257fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b80471015612b5d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114612ba8576040519150601f19603f3d011682016040523d82523d6000602084013e612bad565b606091505b5050905080610b7f5760405162461bcd60e51b815260040180806020018281038252603a8152602001806136b9603a913960400191505060405180910390fd5b612bf7838361328a565b612c046000848484612d0e565b610b7f576040805162461bcd60e51b815260206004820152600c60248201526b22a9219b99189d22969a181960a11b604482015290519081900360640190fd5b60008281526001840160205260408120548281612cdf5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612ca4578181015183820152602001612c8c565b50505050905090810190601f168015612cd15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110612cf257fe5b9060005260206000209060020201600101549150509392505050565b6000612d22846001600160a01b031661338a565b612d2e575060016120ab565b6060612e50630a85bd0160e11b612d43611a61565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612daa578181015183820152602001612d92565b50505050905090810190601f168015612dd75780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050506040518060400160405280600c81526020016b22a9219b99189d22969a181960a11b815250876001600160a01b03166133c39092919063ffffffff16565b90506000818060200190516020811015612e6957600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b60008184841115612ef45760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612ca4578181015183820152602001612c8c565b505050900390565b6001600160a01b038316612f46576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303360a01b604482015290519081900360640190fd5b612f4f82611a54565b15612f90576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303760a01b604482015290519081900360640190fd5b60005b81811015612fe3576000612fa784836127ec565b6001600160a01b0386166000908152600160205260409020909150612fcc9082612a07565b50612fd960028287612a13565b5050600101612f93565b50604080518381526020810183905281516001600160a01b038616926000927f2b917b642d733ae56b43a6d33bf92c148cdf5e7c0dcc433a785aed1513c7357e929081900390910190a3505050565b6060613087826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133c39092919063ffffffff16565b805190915015610b7f578080602001905160208110156130a657600080fd5b5051610b7f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613756602a913960400191505060405180910390fd5b6000818152600183016020526040812054801561319f578354600019808301919081019060009087908390811061311657fe5b906000526020600020015490508087600001848154811061313357fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061316357fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610d2c565b6000915050610d2c565b60006131b58383612e8a565b6131eb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d2c565b506000610d2c565b60008281526001840160205260408120548061325857505060408051808201825283815260208082018481528654600181810189556000898152848120955160029093029095019182559151908201558654868452818801909252929091205561278e565b8285600001600183038154811061326b57fe5b906000526020600020906002020160010181905550600091505061278e565b6001600160a01b0382166132d4576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303360a01b604482015290519081900360640190fd5b6132dd81611a54565b1561331e576040805162461bcd60e51b815260206004820152600c60248201526b4552433732313a452d34303760a01b604482015290519081900360640190fd5b6001600160a01b03821660009081526001602052604090206133409082612a07565b5061334d60028284612a13565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906120ab575050151592915050565b606061278b848460008560606133d88561338a565b613429576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106134685780518252601f199092019160209182019101613449565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146134ca576040519150601f19603f3d011682016040523d82523d6000602084013e6134cf565b606091505b509150915081156134e35791506120ab9050565b8051156134f35780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315612ca4578181015183820152602001612c8c565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061357b5782800160ff198235161785556135a8565b828001600101855582156135a8579182015b828111156135a857823582559160200191906001019061358d565b506135b492915061365b565b5090565b6040805160c081018252606080825260006020830181905292820183905281018290526080810182905260a081019190915290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061362e57805160ff19168380011785556135a8565b828001600101855582156135a8579182015b828111156135a8578251825591602001919060010190613640565b5b808211156135b4576000815560010161365c56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122066663034832eb83c4b1e4d3b5b640698c2997361d7be4f0b47e9e53023d1e2e364736f6c634300060c0033
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.