ERC-20
Overview
Max Total Supply
3,660,000 SGLD
Holders
97
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
AdventureGold
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; /// @title Adventure Gold for Loot holders! /// @author Will Papper <https://twitter.com/WillPapper> /// @notice This contract mints Adventure Gold for Loot holders. It allows: /// * Loot holders to claim Adventure Gold /// @custom:unaudited This contract has not been audited. Use at your own risk. contract AdventureGold is Context, ERC20 { // Loot contract is available at https://etherscan.io/address/0xD987C5800EF371844CEaC3D0Ee29E4ff29162d7C address public lootContractAddress = 0xD987C5800EF371844CEaC3D0Ee29E4ff29162d7C; IERC721Enumerable public lootContract; // Give out 10,000 Adventure Gold for every Loot Bag that a user holds uint256 public adventureGoldPerTokenId = 10000 * (10**decimals()); // tokenIdStart of 1 is based on the following lines in the Loot contract: /** function claim(uint256 tokenId) public nonReentrant { require(tokenId > 0 && tokenId < 7778, "Token ID invalid"); _safeMint(_msgSender(), tokenId); } */ uint256 public tokenIdStart = 1; // tokenIdEnd of 8000 is based on the following lines in the Loot contract: /** function ownerClaim(uint256 tokenId) public nonReentrant onlyOwner { require(tokenId > 7777 && tokenId < 8001, "Token ID invalid"); _safeMint(owner(), tokenId); } */ uint256 public tokenIdEnd = 8000; // Track claimed tokens // IMPORTANT: The format of the mapping is: // claimedByTokenId[tokenId][claimed] mapping(uint256 => bool) public claimedByTokenId; constructor() ERC20("Space Gold", "SGLD") { lootContract = IERC721Enumerable(lootContractAddress); } /// @notice Claim Adventure Gold for a given Loot ID /// @param tokenId The tokenId of the Loot NFT function claimById(uint256 tokenId) external { // Follow the Checks-Effects-Interactions pattern to prevent reentrancy // attacks // Checks // Check that the msgSender owns the token that is being claimed require( _msgSender() == lootContract.ownerOf(tokenId), "MUST_OWN_TOKEN_ID" ); // Further Checks, Effects, and Interactions are contained within the // _claim() function _claim(tokenId, _msgSender()); } /// @notice Claim Adventure Gold for all tokens owned by the sender /// @notice This function will run out of gas if you have too much loot! If /// this is a concern, you should use claimRangeForOwner and claim Adventure /// Gold in batches. function claimAllForOwner() external { uint256 tokenBalanceOwner = lootContract.balanceOf(_msgSender()); // Checks require(tokenBalanceOwner > 0, "NO_TOKENS_OWNED"); // i < tokenBalanceOwner because tokenBalanceOwner is 1-indexed for (uint256 i = 0; i < tokenBalanceOwner; i++) { // Further Checks, Effects, and Interactions are contained within // the _claim() function _claim( lootContract.tokenOfOwnerByIndex(_msgSender(), i), _msgSender() ); } } /// @notice Claim Adventure Gold for all tokens owned by the sender within a /// given range /// @notice This function is useful if you own too much Loot to claim all at /// once or if you want to leave some Loot unclaimed. function claimRangeForOwner(uint256 ownerIndexStart, uint256 ownerIndexEnd) external { uint256 tokenBalanceOwner = lootContract.balanceOf(_msgSender()); // Checks require(tokenBalanceOwner > 0, "NO_TOKENS_OWNED"); // We use < for ownerIndexEnd and tokenBalanceOwner because // tokenOfOwnerByIndex is 0-indexed while the token balance is 1-indexed require( ownerIndexStart >= 0 && ownerIndexEnd < tokenBalanceOwner, "INDEX_OUT_OF_RANGE" ); // i <= ownerIndexEnd because ownerIndexEnd is 0-indexed for (uint256 i = ownerIndexStart; i <= ownerIndexEnd; i++) { // Further Checks, Effects, and Interactions are contained within // the _claim() function _claim( lootContract.tokenOfOwnerByIndex(_msgSender(), i), _msgSender() ); } } /// @dev Internal function to mint Loot upon claiming function _claim(uint256 tokenId, address tokenOwner) internal { // Checks // Check that the token ID is in range // We use >= and <= to here because all of the token IDs are 0-indexed require( tokenId >= tokenIdStart && tokenId <= tokenIdEnd, "TOKEN_ID_OUT_OF_RANGE" ); // Check that Adventure Gold have not already been claimed // for a given tokenId require(!claimedByTokenId[tokenId], "GOLD_CLAIMED_FOR_TOKEN_ID"); // Effects // Mark that Adventure Gold has been claimed for the // given tokenId claimedByTokenId[tokenId] = true; // Interactions // Send Adventure Gold to the owner of the token ID _mint(tokenOwner, adventureGoldPerTokenId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
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":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","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":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"adventureGoldPerTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimAllForOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claimById","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ownerIndexStart","type":"uint256"},{"internalType":"uint256","name":"ownerIndexEnd","type":"uint256"}],"name":"claimRangeForOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedByTokenId","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lootContract","outputs":[{"internalType":"contract IERC721Enumerable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lootContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenIdEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenIdStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600580546001600160a01b03191673d987c5800ef371844ceac3d0ee29e4ff29162d7c17905562000033601290565b6200004090600a620001e8565b6200004e90612710620002b6565b6007556001600855611f406009553480156200006957600080fd5b50604080518082018252600a81526914dc1858d94811dbdb1960b21b60208083019182528351808501909452600484526314d1d31160e21b908401528151919291620000b891600391620000f9565b508051620000ce906004906020840190620000f9565b5050600554600680546001600160a01b0319166001600160a01b03909216919091179055506200032b565b8280546200010790620002d8565b90600052602060002090601f0160209004810192826200012b576000855562000176565b82601f106200014657805160ff191683800117855562000176565b8280016001018555821562000176579182015b828111156200017657825182559160200191906001019062000159565b506200018492915062000188565b5090565b5b8082111562000184576000815560010162000189565b600181815b80851115620001e0578160001904821115620001c457620001c462000315565b80851615620001d257918102915b93841c9390800290620001a4565b509250929050565b6000620001f960ff84168362000200565b9392505050565b6000826200021157506001620002b0565b816200022057506000620002b0565b8160018114620002395760028114620002445762000264565b6001915050620002b0565b60ff84111562000258576200025862000315565b50506001821b620002b0565b5060208310610133831016604e8410600b841016171562000289575081810a620002b0565b6200029583836200019f565b8060001904821115620002ac57620002ac62000315565b0290505b92915050565b6000816000190483118215151615620002d357620002d362000315565b500290565b600181811c90821680620002ed57607f821691505b602082108114156200030f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b610fff806200033b6000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c8063845f290d116100ad578063a8af32e911610071578063a8af32e91461027b578063a9059cbb1461028e578063becf7741146102a1578063cbf0b276146102b4578063dd62ed3e146102bc57600080fd5b8063845f290d1461021f578063878e7ea514610228578063896265b31461023d57806395d89b4114610260578063a457c2d71461026857600080fd5b8063313ce567116100f4578063313ce567146101a057806335b48afd146101af57806339509351146101da57806343f42802146101ed57806370a08231146101f657600080fd5b806306fdde0314610131578063095ea7b31461014f57806318160ddd1461017257806323b872dd146101845780632a38906214610197575b600080fd5b6101396102f5565b6040516101469190610edb565b60405180910390f35b61016261015d366004610e5b565b610387565b6040519015158152602001610146565b6002545b604051908152602001610146565b610162610192366004610e1a565b61039d565b61017660085481565b60405160128152602001610146565b6006546101c2906001600160a01b031681565b6040516001600160a01b039091168152602001610146565b6101626101e8366004610e5b565b61044c565b61017660095481565b610176610204366004610da0565b6001600160a01b031660009081526020819052604090205490565b61017660075481565b61023b610236366004610eb9565b610488565b005b61016261024b366004610e87565b600a6020526000908152604090205460ff1681565b610139610658565b610162610276366004610e5b565b610667565b6005546101c2906001600160a01b031681565b61016261029c366004610e5b565b610700565b61023b6102af366004610e87565b61070d565b61023b6107ea565b6101766102ca366004610de1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461030490610f48565b80601f016020809104026020016040519081016040528092919081815260200182805461033090610f48565b801561037d5780601f106103525761010080835404028352916020019161037d565b820191906000526020600020905b81548152906001019060200180831161036057829003601f168201915b5050505050905090565b60006103943384846108f6565b50600192915050565b60006103aa848484610a1a565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156104345760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61044185338584036108f6565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610394918590610483908690610f30565b6108f6565b6006546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156104dc57600080fd5b505afa1580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610ea0565b9050600081116105585760405162461bcd60e51b815260206004820152600f60248201526e1393d7d513d2d15394d7d3d5d39151608a1b604482015260640161042b565b80821061059c5760405162461bcd60e51b8152602060048201526012602482015271494e4445585f4f55545f4f465f52414e474560701b604482015260640161042b565b825b82811161065257600654610640906001600160a01b0316632f745c59335b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b15801561060257600080fd5b505afa158015610616573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063a9190610ea0565b33610be8565b8061064a81610f83565b91505061059e565b50505050565b60606004805461030490610f48565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156106e95760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161042b565b6106f633858584036108f6565b5060019392505050565b6000610394338484610a1a565b6006546040516331a9108f60e11b8152600481018390526001600160a01b0390911690636352211e9060240160206040518083038186803b15801561075157600080fd5b505afa158015610765573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107899190610dc4565b6001600160a01b0316336001600160a01b0316146107dd5760405162461bcd60e51b8152602060048201526011602482015270135554d517d3d5d397d513d2d15397d251607a1b604482015260640161042b565b6107e78133610be8565b50565b6006546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561083e57600080fd5b505afa158015610852573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108769190610ea0565b9050600081116108ba5760405162461bcd60e51b815260206004820152600f60248201526e1393d7d513d2d15394d7d3d5d39151608a1b604482015260640161042b565b60005b818110156108f2576006546108e0906001600160a01b0316632f745c59336105bc565b806108ea81610f83565b9150506108bd565b5050565b6001600160a01b0383166109585760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161042b565b6001600160a01b0382166109b95760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161042b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610a7e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161042b565b6001600160a01b038216610ae05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161042b565b6001600160a01b03831660009081526020819052604090205481811015610b585760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161042b565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610b8f908490610f30565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610bdb91815260200190565b60405180910390a3610652565b6008548210158015610bfc57506009548211155b610c405760405162461bcd60e51b8152602060048201526015602482015274544f4b454e5f49445f4f55545f4f465f52414e474560581b604482015260640161042b565b6000828152600a602052604090205460ff1615610c9f5760405162461bcd60e51b815260206004820152601960248201527f474f4c445f434c41494d45445f464f525f544f4b454e5f494400000000000000604482015260640161042b565b6000828152600a60205260409020805460ff191660011790556007546108f29082906001600160a01b038216610d175760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161042b565b8060026000828254610d299190610f30565b90915550506001600160a01b03821660009081526020819052604081208054839290610d56908490610f30565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208284031215610db257600080fd5b8135610dbd81610fb4565b9392505050565b600060208284031215610dd657600080fd5b8151610dbd81610fb4565b60008060408385031215610df457600080fd5b8235610dff81610fb4565b91506020830135610e0f81610fb4565b809150509250929050565b600080600060608486031215610e2f57600080fd5b8335610e3a81610fb4565b92506020840135610e4a81610fb4565b929592945050506040919091013590565b60008060408385031215610e6e57600080fd5b8235610e7981610fb4565b946020939093013593505050565b600060208284031215610e9957600080fd5b5035919050565b600060208284031215610eb257600080fd5b5051919050565b60008060408385031215610ecc57600080fd5b50508035926020909101359150565b600060208083528351808285015260005b81811015610f0857858101830151858201604001528201610eec565b81811115610f1a576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610f4357610f43610f9e565b500190565b600181811c90821680610f5c57607f821691505b60208210811415610f7d57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415610f9757610f97610f9e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146107e757600080fdfea2646970667358221220a6dd35160cf016583d174b326b4477b61f296e9c6d84cba9864027505041869964736f6c63430008070033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063845f290d116100ad578063a8af32e911610071578063a8af32e91461027b578063a9059cbb1461028e578063becf7741146102a1578063cbf0b276146102b4578063dd62ed3e146102bc57600080fd5b8063845f290d1461021f578063878e7ea514610228578063896265b31461023d57806395d89b4114610260578063a457c2d71461026857600080fd5b8063313ce567116100f4578063313ce567146101a057806335b48afd146101af57806339509351146101da57806343f42802146101ed57806370a08231146101f657600080fd5b806306fdde0314610131578063095ea7b31461014f57806318160ddd1461017257806323b872dd146101845780632a38906214610197575b600080fd5b6101396102f5565b6040516101469190610edb565b60405180910390f35b61016261015d366004610e5b565b610387565b6040519015158152602001610146565b6002545b604051908152602001610146565b610162610192366004610e1a565b61039d565b61017660085481565b60405160128152602001610146565b6006546101c2906001600160a01b031681565b6040516001600160a01b039091168152602001610146565b6101626101e8366004610e5b565b61044c565b61017660095481565b610176610204366004610da0565b6001600160a01b031660009081526020819052604090205490565b61017660075481565b61023b610236366004610eb9565b610488565b005b61016261024b366004610e87565b600a6020526000908152604090205460ff1681565b610139610658565b610162610276366004610e5b565b610667565b6005546101c2906001600160a01b031681565b61016261029c366004610e5b565b610700565b61023b6102af366004610e87565b61070d565b61023b6107ea565b6101766102ca366004610de1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461030490610f48565b80601f016020809104026020016040519081016040528092919081815260200182805461033090610f48565b801561037d5780601f106103525761010080835404028352916020019161037d565b820191906000526020600020905b81548152906001019060200180831161036057829003601f168201915b5050505050905090565b60006103943384846108f6565b50600192915050565b60006103aa848484610a1a565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156104345760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61044185338584036108f6565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610394918590610483908690610f30565b6108f6565b6006546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156104dc57600080fd5b505afa1580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610ea0565b9050600081116105585760405162461bcd60e51b815260206004820152600f60248201526e1393d7d513d2d15394d7d3d5d39151608a1b604482015260640161042b565b80821061059c5760405162461bcd60e51b8152602060048201526012602482015271494e4445585f4f55545f4f465f52414e474560701b604482015260640161042b565b825b82811161065257600654610640906001600160a01b0316632f745c59335b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b15801561060257600080fd5b505afa158015610616573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063a9190610ea0565b33610be8565b8061064a81610f83565b91505061059e565b50505050565b60606004805461030490610f48565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156106e95760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161042b565b6106f633858584036108f6565b5060019392505050565b6000610394338484610a1a565b6006546040516331a9108f60e11b8152600481018390526001600160a01b0390911690636352211e9060240160206040518083038186803b15801561075157600080fd5b505afa158015610765573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107899190610dc4565b6001600160a01b0316336001600160a01b0316146107dd5760405162461bcd60e51b8152602060048201526011602482015270135554d517d3d5d397d513d2d15397d251607a1b604482015260640161042b565b6107e78133610be8565b50565b6006546000906001600160a01b03166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561083e57600080fd5b505afa158015610852573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108769190610ea0565b9050600081116108ba5760405162461bcd60e51b815260206004820152600f60248201526e1393d7d513d2d15394d7d3d5d39151608a1b604482015260640161042b565b60005b818110156108f2576006546108e0906001600160a01b0316632f745c59336105bc565b806108ea81610f83565b9150506108bd565b5050565b6001600160a01b0383166109585760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161042b565b6001600160a01b0382166109b95760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161042b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610a7e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161042b565b6001600160a01b038216610ae05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161042b565b6001600160a01b03831660009081526020819052604090205481811015610b585760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161042b565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610b8f908490610f30565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610bdb91815260200190565b60405180910390a3610652565b6008548210158015610bfc57506009548211155b610c405760405162461bcd60e51b8152602060048201526015602482015274544f4b454e5f49445f4f55545f4f465f52414e474560581b604482015260640161042b565b6000828152600a602052604090205460ff1615610c9f5760405162461bcd60e51b815260206004820152601960248201527f474f4c445f434c41494d45445f464f525f544f4b454e5f494400000000000000604482015260640161042b565b6000828152600a60205260409020805460ff191660011790556007546108f29082906001600160a01b038216610d175760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161042b565b8060026000828254610d299190610f30565b90915550506001600160a01b03821660009081526020819052604081208054839290610d56908490610f30565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208284031215610db257600080fd5b8135610dbd81610fb4565b9392505050565b600060208284031215610dd657600080fd5b8151610dbd81610fb4565b60008060408385031215610df457600080fd5b8235610dff81610fb4565b91506020830135610e0f81610fb4565b809150509250929050565b600080600060608486031215610e2f57600080fd5b8335610e3a81610fb4565b92506020840135610e4a81610fb4565b929592945050506040919091013590565b60008060408385031215610e6e57600080fd5b8235610e7981610fb4565b946020939093013593505050565b600060208284031215610e9957600080fd5b5035919050565b600060208284031215610eb257600080fd5b5051919050565b60008060408385031215610ecc57600080fd5b50508035926020909101359150565b600060208083528351808285015260005b81811015610f0857858101830151858201604001528201610eec565b81811115610f1a576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610f4357610f43610f9e565b500190565b600181811c90821680610f5c57607f821691505b60208210811415610f7d57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415610f9757610f97610f9e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146107e757600080fdfea2646970667358221220a6dd35160cf016583d174b326b4477b61f296e9c6d84cba9864027505041869964736f6c63430008070033
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.