Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 562 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Mint Primates | 14306479 | 1454 days ago | IN | 0.175 ETH | 0.02390201 | ||||
| Mint Primates | 14301473 | 1455 days ago | IN | 0.035 ETH | 0.00790183 | ||||
| Mint Primates | 14300938 | 1455 days ago | IN | 0.07 ETH | 0.01314281 | ||||
| Mint Primates | 14287334 | 1457 days ago | IN | 0.035 ETH | 0.00416452 | ||||
| Mint Primates | 14175615 | 1474 days ago | IN | 0.175 ETH | 0.04827967 | ||||
| Mint Primates | 14131682 | 1481 days ago | IN | 0.035 ETH | 0.01564709 | ||||
| Mint Primates | 14123608 | 1482 days ago | IN | 0.035 ETH | 0.02208758 | ||||
| Mint Primates | 14123550 | 1482 days ago | IN | 0.035 ETH | 0.02286652 | ||||
| Mint Primates | 14120554 | 1483 days ago | IN | 0.035 ETH | 0.02300844 | ||||
| Mint Primates | 14117744 | 1483 days ago | IN | 0.035 ETH | 0.0281118 | ||||
| Mint Primates | 14117561 | 1483 days ago | IN | 0.035 ETH | 0.02649172 | ||||
| Mint Primates | 14117325 | 1483 days ago | IN | 0.07 ETH | 0.033717 | ||||
| Mint Primates | 14116257 | 1484 days ago | IN | 0.07 ETH | 0.04882587 | ||||
| Mint Primates | 14116231 | 1484 days ago | IN | 0.035 ETH | 0.01886007 | ||||
| Mint Primates | 14115743 | 1484 days ago | IN | 0.035 ETH | 0.03503761 | ||||
| Mint Primates | 14113059 | 1484 days ago | IN | 0.035 ETH | 0.01327828 | ||||
| Mint Primates | 14094366 | 1487 days ago | IN | 0.035 ETH | 0.01587958 | ||||
| Mint Primates | 14082947 | 1489 days ago | IN | 0.035 ETH | 0.02635902 | ||||
| Mint Primates | 14080621 | 1489 days ago | IN | 0.035 ETH | 0.01244376 | ||||
| Mint Primates | 14057271 | 1493 days ago | IN | 0.035 ETH | 0.03206094 | ||||
| Mint Primates | 13990311 | 1503 days ago | IN | 0.035 ETH | 0.02287164 | ||||
| Mint Primates | 13969822 | 1506 days ago | IN | 0.035 ETH | 0.02772573 | ||||
| Mint Primates | 13966088 | 1507 days ago | IN | 0.035 ETH | 0.02545313 | ||||
| Mint Primates | 13965380 | 1507 days ago | IN | 0.035 ETH | 0.01825603 | ||||
| Mint Primates | 13964433 | 1507 days ago | IN | 0.035 ETH | 0.01083865 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| - | 14306479 | 1454 days ago | 0.175 ETH | ||||
| - | 14301473 | 1455 days ago | 0.035 ETH | ||||
| - | 14300938 | 1455 days ago | 0.07 ETH | ||||
| - | 14287334 | 1457 days ago | 0.035 ETH | ||||
| - | 14175615 | 1474 days ago | 0.175 ETH | ||||
| - | 14131682 | 1481 days ago | 0.035 ETH | ||||
| - | 14123608 | 1482 days ago | 0.035 ETH | ||||
| - | 14123550 | 1482 days ago | 0.035 ETH | ||||
| - | 14120554 | 1483 days ago | 0.035 ETH | ||||
| - | 14117744 | 1483 days ago | 0.035 ETH | ||||
| - | 14117561 | 1483 days ago | 0.035 ETH | ||||
| - | 14117325 | 1483 days ago | 0.07 ETH | ||||
| - | 14116257 | 1484 days ago | 0.07 ETH | ||||
| - | 14116231 | 1484 days ago | 0.035 ETH | ||||
| - | 14115743 | 1484 days ago | 0.035 ETH | ||||
| - | 14113059 | 1484 days ago | 0.035 ETH | ||||
| - | 14094366 | 1487 days ago | 0.035 ETH | ||||
| - | 14082947 | 1489 days ago | 0.035 ETH | ||||
| - | 14080621 | 1489 days ago | 0.035 ETH | ||||
| - | 14057271 | 1493 days ago | 0.035 ETH | ||||
| - | 13990311 | 1503 days ago | 0.035 ETH | ||||
| - | 13969822 | 1506 days ago | 0.035 ETH | ||||
| - | 13966088 | 1507 days ago | 0.035 ETH | ||||
| - | 13965380 | 1507 days ago | 0.035 ETH | ||||
| - | 13964433 | 1507 days ago | 0.035 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PixelPrimatesRelay721
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// contracts/PixelPrimates.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./PixelPrimates721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract PixelPrimatesRelay721 is Ownable {
using SafeMath for uint256;
PixelPrimates721 private _contractStorage;
bool private _isInitialized = false;
uint256 public _primateLimit = 9000;
uint256 public _primateCount = 0;
uint256 public itemMintPrice = 5000000000000000; // 0.005 ETH
// just incase. Balance for this relay contract should always be 0
function withdraw() external onlyOwner {
address payable _owner = payable(owner());
_owner.transfer(address(this).balance);
}
function initialize(PixelPrimates721 addr) external onlyOwner {
require(!_isInitialized, "Contract already initialized");
_contractStorage = addr;
_isInitialized = true;
}
function updateItemMintPrice(uint256 itemMintPriceWei) public onlyOwner {
itemMintPrice = itemMintPriceWei;
}
function getMintPrice() public view returns (uint256 price) {
if (_primateCount < 100) {
return 20000000000000000; // 0.02
} else if (_primateCount >= 100 && _primateCount < 1000) {
return 25000000000000000; // 0.025
} else if (_primateCount >= 1000 && _primateCount < 2000) {
return 35000000000000000; // 0.035
} else if (_primateCount >= 2000 && _primateCount < 6000) {
return 45000000000000000; // 0.045
} else if (_primateCount >= 6000 && _primateCount < 7000) {
return 55000000000000000; // 0.055
} else if (_primateCount >= 7000 && _primateCount < 8000) {
return 65000000000000000; // 0.065
} else if (_primateCount >= 8000) {
return 75000000000000000; // 0.075
}
}
function updateLimits(uint256 value) external onlyOwner {
_primateLimit = value;
}
function checkIfPrimatesMintable(uint256 numberOfTokens) private view {
require(numberOfTokens <= 10, "Can only mint up to 10 tokens at a time.");
require(
_primateCount + numberOfTokens <= _primateLimit,
"Cannot mint more than the current limit"
);
require(
getMintPrice().mul(numberOfTokens) <= msg.value,
"Insufficient ether amount was sent"
);
}
function checkIfItemsMintable(uint256 numberOfTokens) private {
require(
itemMintPrice.mul(numberOfTokens) <= msg.value,
"Insufficient ether amount was sent"
);
}
function mintPrimates(uint256 numberOfTokens) external payable {
require(_isInitialized, "Relay contract has not been initialized!");
checkIfPrimatesMintable(numberOfTokens);
address sender = msg.sender;
_primateCount += numberOfTokens;
_contractStorage.mintPrimates{ value: msg.value }(
sender,
numberOfTokens,
"random"
);
}
function mintItems(uint256 numberOfTokens) external payable {
require(_isInitialized, "Relay contract has not been initialized!");
checkIfItemsMintable(numberOfTokens);
address sender = msg.sender;
_contractStorage.mintItems{ value: msg.value }(
sender,
numberOfTokens,
"random"
);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(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");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// contracts/PixelPrimates.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract PixelPrimates721 is ERC721Enumerable, Ownable {
using SafeMath for uint256;
event ItemCreated(
address indexed _owner,
uint256 _setIndex,
uint256 _itemId,
string _primateType,
uint256 _value
);
event PrimateCreated(
address indexed _owner,
uint256 indexed _id,
string _primateType,
uint256 _value
);
string private baseUri;
bool public allowPrimateMinting = false;
bool public allowItemMinting = false;
bool private _isInitialized = false;
mapping(address => bool) private _whitelistAddr;
constructor() ERC721("PixelPrimates", "PXPR") {}
function withdraw() external onlyOwner {
address payable _owner = payable(owner());
_owner.transfer(address(this).balance);
}
function initialize(string memory baseUri_, address relayContractAddr_)
external
onlyOwner
{
require(!_isInitialized, "Contract already initialized");
whitelistAddress(relayContractAddr_);
setBaseUri(baseUri_);
// reserve 10 for giveaways and testing
uint256 mintIndex = totalSupply();
for (uint256 i = 0; i < 10; i++) {
_safeMint(owner(), mintIndex + i);
emit PrimateCreated(owner(), mintIndex + i, "random", 0);
}
_isInitialized = true;
}
function toggleAllowPrimateMinting() public onlyOwner {
allowPrimateMinting = !allowPrimateMinting;
}
function toggleAllowItemMinting() public onlyOwner {
allowItemMinting = !allowItemMinting;
}
function whitelistAddress(address address_) public onlyOwner {
_whitelistAddr[address_] = true;
}
function setBaseUri(string memory baseUri_) public onlyOwner {
baseUri = baseUri_;
}
function _baseURI() internal view override returns (string memory) {
return baseUri;
}
function checkIfRelayContractIsCalling() private view {
require(_whitelistAddr[msg.sender], "Must be called from a relay contract");
}
function mintPrimates(
address sender,
uint256 numberOfTokens,
string memory primateType
) external payable {
checkIfRelayContractIsCalling();
require(
allowPrimateMinting,
"Minting is currently not available at this time!"
);
uint256 mintIndex = totalSupply();
for (uint256 i = 0; i < numberOfTokens; i++) {
_safeMint(sender, mintIndex + i);
emit PrimateCreated(sender, mintIndex + i, primateType, msg.value);
}
}
function mintItems(
address sender,
uint256 numberOfTokens,
string memory primateType
) external payable {
checkIfRelayContractIsCalling();
require(
allowItemMinting,
"Minting is currently not available at this time!"
);
uint256 mintIndex = totalSupply();
uint256 setIndex = totalSupply();
for (uint256 i = 0; i < numberOfTokens; i++) {
_safeMint(sender, mintIndex + i);
emit ItemCreated(sender, setIndex, mintIndex + i, primateType, msg.value);
}
}
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*
* Requirements:
*
* - The caller must own `tokenId` or be an approved operator.
*/
function burnSingle(address sender, uint256 tokenId) public payable {
checkIfRelayContractIsCalling();
require(
_isApprovedOrOwner(sender, tokenId),
"ERC721Burnable: caller is not owner nor approved"
);
_burn(tokenId);
}
function burnBatch(address sender, uint256[] memory tokenIds)
external
payable
{
checkIfRelayContractIsCalling();
for (uint256 i = 0; i < tokenIds.length; i++) {
burnSingle(sender, tokenIds[i]);
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// 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 (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @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) {
return a + b;
}
/**
* @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 a - b;
}
/**
* @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) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting 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 a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting 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) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* 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) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../ERC721.sol";
import "./IERC721Enumerable.sol";
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnumeration(from, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (to != from) {
_addTokenToOwnerEnumeration(to, tokenId);
}
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../ERC721.sol";
import "../../../utils/Context.sol";
/**
* @title ERC721 Burnable Token
* @dev ERC721 Token that can be irreversibly burned (destroyed).
*/
abstract contract ERC721Burnable is Context, ERC721 {
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*
* Requirements:
*
* - The caller must own `tokenId` or be an approved operator.
*/
function burn(uint256 tokenId) public virtual {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
_burn(tokenId);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}// SPDX-License-Identifier: MIT
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 "../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;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
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;
/**
* @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": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"_primateCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_primateLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintPrice","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract PixelPrimates721","name":"addr","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"itemMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"mintItems","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"mintPrimates","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemMintPriceWei","type":"uint256"}],"name":"updateItemMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"updateLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040526000600160146101000a81548160ff02191690831515021790555061232860025560006003556611c37937e0800060045534801561004157600080fd5b5061005e61005361006360201b60201c565b61006b60201b60201c565b61012f565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6113ba8061013e6000396000f3fe6080604052600436106100c25760003560e01c8063a113482c1161007f578063c4d66de811610059578063c4d66de814610202578063cdac07ac1461022b578063e099412014610256578063f2fde38b1461027f576100c2565b8063a113482c14610190578063a6118753146101ac578063a7f93ebd146101d7576100c2565b80633ccfd60b146100c75780635367de6a146100de578063548d5e06146100fa578063715018a61461012557806376dad81c1461013c5780638da5cb5b14610165575b600080fd5b3480156100d357600080fd5b506100dc6102a8565b005b6100f860048036038101906100f39190610d41565b61037a565b005b34801561010657600080fd5b5061010f61046b565b60405161011c9190610fdb565b60405180910390f35b34801561013157600080fd5b5061013a610471565b005b34801561014857600080fd5b50610163600480360381019061015e9190610d41565b6104f9565b005b34801561017157600080fd5b5061017a61057f565b6040516101879190610ea4565b60405180910390f35b6101aa60048036038101906101a59190610d41565b6105a8565b005b3480156101b857600080fd5b506101c16106b2565b6040516101ce9190610fdb565b60405180910390f35b3480156101e357600080fd5b506101ec6106b8565b6040516101f99190610fdb565b60405180910390f35b34801561020e57600080fd5b5061022960048036038101906102249190610d14565b6107c9565b005b34801561023757600080fd5b506102406108f3565b60405161024d9190610fdb565b60405180910390f35b34801561026257600080fd5b5061027d60048036038101906102789190610d41565b6108f9565b005b34801561028b57600080fd5b506102a660048036038101906102a19190610ce7565b61097f565b005b6102b0610a77565b73ffffffffffffffffffffffffffffffffffffffff166102ce61057f565b73ffffffffffffffffffffffffffffffffffffffff1614610324576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031b90610f5b565b60405180910390fd5b600061032e61057f565b90508073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610376573d6000803e3d6000fd5b5050565b600160149054906101000a900460ff166103c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103c090610f9b565b60405180910390fd5b6103d281610a7f565b6000339050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166330cab0af3483856040518463ffffffff1660e01b8152600401610435929190610ebf565b6000604051808303818588803b15801561044e57600080fd5b505af1158015610462573d6000803e3d6000fd5b50505050505050565b60045481565b610479610a77565b73ffffffffffffffffffffffffffffffffffffffff1661049761057f565b73ffffffffffffffffffffffffffffffffffffffff16146104ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e490610f5b565b60405180910390fd5b6104f76000610ad9565b565b610501610a77565b73ffffffffffffffffffffffffffffffffffffffff1661051f61057f565b73ffffffffffffffffffffffffffffffffffffffff1614610575576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056c90610f5b565b60405180910390fd5b8060048190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160149054906101000a900460ff166105f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ee90610f9b565b60405180910390fd5b61060081610b9d565b600033905081600360008282546106179190611007565b92505081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663522ca9f23483856040518463ffffffff1660e01b815260040161067c929190610ebf565b6000604051808303818588803b15801561069557600080fd5b505af11580156106a9573d6000803e3d6000fd5b50505050505050565b60035481565b6000606460035410156106d45766470de4df82000090506107c6565b6064600354101580156106ea57506103e8600354105b156106fe576658d15e1762800090506107c6565b6103e86003541015801561071557506107d0600354105b1561072957667c58508723800090506107c6565b6107d0600354101580156107405750611770600354105b1561075457669fdf42f6e4800090506107c6565b6117706003541015801561076b5750611b58600354105b1561077f5766c3663566a5800090506107c6565b611b58600354101580156107965750611f40600354105b156107aa5766e6ed27d666800090506107c6565b611f40600354106107c55767010a741a4627800090506107c6565b5b90565b6107d1610a77565b73ffffffffffffffffffffffffffffffffffffffff166107ef61057f565b73ffffffffffffffffffffffffffffffffffffffff1614610845576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083c90610f5b565b60405180910390fd5b600160149054906101000a900460ff1615610895576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088c90610f7b565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060146101000a81548160ff02191690831515021790555050565b60025481565b610901610a77565b73ffffffffffffffffffffffffffffffffffffffff1661091f61057f565b73ffffffffffffffffffffffffffffffffffffffff1614610975576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096c90610f5b565b60405180910390fd5b8060028190555050565b610987610a77565b73ffffffffffffffffffffffffffffffffffffffff166109a561057f565b73ffffffffffffffffffffffffffffffffffffffff16146109fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f290610f5b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610a6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6290610efb565b60405180910390fd5b610a7481610ad9565b50565b600033905090565b34610a9582600454610c9290919063ffffffff16565b1115610ad6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610acd90610f1b565b60405180910390fd5b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600a811115610be1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bd890610f3b565b60405180910390fd5b60025481600354610bf29190611007565b1115610c33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2a90610fbb565b60405180910390fd5b34610c4e82610c406106b8565b610c9290919063ffffffff16565b1115610c8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8690610f1b565b60405180910390fd5b50565b60008183610ca0919061105d565b905092915050565b600081359050610cb78161133f565b92915050565b600081359050610ccc81611356565b92915050565b600081359050610ce18161136d565b92915050565b600060208284031215610cfd57610cfc611134565b5b6000610d0b84828501610ca8565b91505092915050565b600060208284031215610d2a57610d29611134565b5b6000610d3884828501610cbd565b91505092915050565b600060208284031215610d5757610d56611134565b5b6000610d6584828501610cd2565b91505092915050565b610d77816110b7565b82525050565b6000610d8a602683610ff6565b9150610d9582611139565b604082019050919050565b6000610dad602283610ff6565b9150610db882611188565b604082019050919050565b6000610dd0602883610ff6565b9150610ddb826111d7565b604082019050919050565b6000610df3602083610ff6565b9150610dfe82611226565b602082019050919050565b6000610e16601c83610ff6565b9150610e218261124f565b602082019050919050565b6000610e39602883610ff6565b9150610e4482611278565b604082019050919050565b6000610e5c600683610ff6565b9150610e67826112c7565b602082019050919050565b6000610e7f602783610ff6565b9150610e8a826112f0565b604082019050919050565b610e9e816110fb565b82525050565b6000602082019050610eb96000830184610d6e565b92915050565b6000606082019050610ed46000830185610d6e565b610ee16020830184610e95565b8181036040830152610ef281610e4f565b90509392505050565b60006020820190508181036000830152610f1481610d7d565b9050919050565b60006020820190508181036000830152610f3481610da0565b9050919050565b60006020820190508181036000830152610f5481610dc3565b9050919050565b60006020820190508181036000830152610f7481610de6565b9050919050565b60006020820190508181036000830152610f9481610e09565b9050919050565b60006020820190508181036000830152610fb481610e2c565b9050919050565b60006020820190508181036000830152610fd481610e72565b9050919050565b6000602082019050610ff06000830184610e95565b92915050565b600082825260208201905092915050565b6000611012826110fb565b915061101d836110fb565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561105257611051611105565b5b828201905092915050565b6000611068826110fb565b9150611073836110fb565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156110ac576110ab611105565b5b828202905092915050565b60006110c2826110db565b9050919050565b60006110d4826110b7565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f496e73756666696369656e7420657468657220616d6f756e742077617320736560008201527f6e74000000000000000000000000000000000000000000000000000000000000602082015250565b7f43616e206f6e6c79206d696e7420757020746f20313020746f6b656e7320617460008201527f20612074696d652e000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f436f6e747261637420616c726561647920696e697469616c697a656400000000600082015250565b7f52656c617920636f6e747261637420686173206e6f74206265656e20696e697460008201527f69616c697a656421000000000000000000000000000000000000000000000000602082015250565b7f72616e646f6d0000000000000000000000000000000000000000000000000000600082015250565b7f43616e6e6f74206d696e74206d6f7265207468616e207468652063757272656e60008201527f74206c696d697400000000000000000000000000000000000000000000000000602082015250565b611348816110b7565b811461135357600080fd5b50565b61135f816110c9565b811461136a57600080fd5b50565b611376816110fb565b811461138157600080fd5b5056fea2646970667358221220565180c8071e1d59a8d54c62ba2c04b0eb53fc2c3901b0a13c41caa8c5dd169364736f6c63430008070033
Deployed Bytecode
0x6080604052600436106100c25760003560e01c8063a113482c1161007f578063c4d66de811610059578063c4d66de814610202578063cdac07ac1461022b578063e099412014610256578063f2fde38b1461027f576100c2565b8063a113482c14610190578063a6118753146101ac578063a7f93ebd146101d7576100c2565b80633ccfd60b146100c75780635367de6a146100de578063548d5e06146100fa578063715018a61461012557806376dad81c1461013c5780638da5cb5b14610165575b600080fd5b3480156100d357600080fd5b506100dc6102a8565b005b6100f860048036038101906100f39190610d41565b61037a565b005b34801561010657600080fd5b5061010f61046b565b60405161011c9190610fdb565b60405180910390f35b34801561013157600080fd5b5061013a610471565b005b34801561014857600080fd5b50610163600480360381019061015e9190610d41565b6104f9565b005b34801561017157600080fd5b5061017a61057f565b6040516101879190610ea4565b60405180910390f35b6101aa60048036038101906101a59190610d41565b6105a8565b005b3480156101b857600080fd5b506101c16106b2565b6040516101ce9190610fdb565b60405180910390f35b3480156101e357600080fd5b506101ec6106b8565b6040516101f99190610fdb565b60405180910390f35b34801561020e57600080fd5b5061022960048036038101906102249190610d14565b6107c9565b005b34801561023757600080fd5b506102406108f3565b60405161024d9190610fdb565b60405180910390f35b34801561026257600080fd5b5061027d60048036038101906102789190610d41565b6108f9565b005b34801561028b57600080fd5b506102a660048036038101906102a19190610ce7565b61097f565b005b6102b0610a77565b73ffffffffffffffffffffffffffffffffffffffff166102ce61057f565b73ffffffffffffffffffffffffffffffffffffffff1614610324576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031b90610f5b565b60405180910390fd5b600061032e61057f565b90508073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610376573d6000803e3d6000fd5b5050565b600160149054906101000a900460ff166103c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103c090610f9b565b60405180910390fd5b6103d281610a7f565b6000339050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166330cab0af3483856040518463ffffffff1660e01b8152600401610435929190610ebf565b6000604051808303818588803b15801561044e57600080fd5b505af1158015610462573d6000803e3d6000fd5b50505050505050565b60045481565b610479610a77565b73ffffffffffffffffffffffffffffffffffffffff1661049761057f565b73ffffffffffffffffffffffffffffffffffffffff16146104ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e490610f5b565b60405180910390fd5b6104f76000610ad9565b565b610501610a77565b73ffffffffffffffffffffffffffffffffffffffff1661051f61057f565b73ffffffffffffffffffffffffffffffffffffffff1614610575576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056c90610f5b565b60405180910390fd5b8060048190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160149054906101000a900460ff166105f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ee90610f9b565b60405180910390fd5b61060081610b9d565b600033905081600360008282546106179190611007565b92505081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663522ca9f23483856040518463ffffffff1660e01b815260040161067c929190610ebf565b6000604051808303818588803b15801561069557600080fd5b505af11580156106a9573d6000803e3d6000fd5b50505050505050565b60035481565b6000606460035410156106d45766470de4df82000090506107c6565b6064600354101580156106ea57506103e8600354105b156106fe576658d15e1762800090506107c6565b6103e86003541015801561071557506107d0600354105b1561072957667c58508723800090506107c6565b6107d0600354101580156107405750611770600354105b1561075457669fdf42f6e4800090506107c6565b6117706003541015801561076b5750611b58600354105b1561077f5766c3663566a5800090506107c6565b611b58600354101580156107965750611f40600354105b156107aa5766e6ed27d666800090506107c6565b611f40600354106107c55767010a741a4627800090506107c6565b5b90565b6107d1610a77565b73ffffffffffffffffffffffffffffffffffffffff166107ef61057f565b73ffffffffffffffffffffffffffffffffffffffff1614610845576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083c90610f5b565b60405180910390fd5b600160149054906101000a900460ff1615610895576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088c90610f7b565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060146101000a81548160ff02191690831515021790555050565b60025481565b610901610a77565b73ffffffffffffffffffffffffffffffffffffffff1661091f61057f565b73ffffffffffffffffffffffffffffffffffffffff1614610975576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096c90610f5b565b60405180910390fd5b8060028190555050565b610987610a77565b73ffffffffffffffffffffffffffffffffffffffff166109a561057f565b73ffffffffffffffffffffffffffffffffffffffff16146109fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f290610f5b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610a6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6290610efb565b60405180910390fd5b610a7481610ad9565b50565b600033905090565b34610a9582600454610c9290919063ffffffff16565b1115610ad6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610acd90610f1b565b60405180910390fd5b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600a811115610be1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bd890610f3b565b60405180910390fd5b60025481600354610bf29190611007565b1115610c33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2a90610fbb565b60405180910390fd5b34610c4e82610c406106b8565b610c9290919063ffffffff16565b1115610c8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8690610f1b565b60405180910390fd5b50565b60008183610ca0919061105d565b905092915050565b600081359050610cb78161133f565b92915050565b600081359050610ccc81611356565b92915050565b600081359050610ce18161136d565b92915050565b600060208284031215610cfd57610cfc611134565b5b6000610d0b84828501610ca8565b91505092915050565b600060208284031215610d2a57610d29611134565b5b6000610d3884828501610cbd565b91505092915050565b600060208284031215610d5757610d56611134565b5b6000610d6584828501610cd2565b91505092915050565b610d77816110b7565b82525050565b6000610d8a602683610ff6565b9150610d9582611139565b604082019050919050565b6000610dad602283610ff6565b9150610db882611188565b604082019050919050565b6000610dd0602883610ff6565b9150610ddb826111d7565b604082019050919050565b6000610df3602083610ff6565b9150610dfe82611226565b602082019050919050565b6000610e16601c83610ff6565b9150610e218261124f565b602082019050919050565b6000610e39602883610ff6565b9150610e4482611278565b604082019050919050565b6000610e5c600683610ff6565b9150610e67826112c7565b602082019050919050565b6000610e7f602783610ff6565b9150610e8a826112f0565b604082019050919050565b610e9e816110fb565b82525050565b6000602082019050610eb96000830184610d6e565b92915050565b6000606082019050610ed46000830185610d6e565b610ee16020830184610e95565b8181036040830152610ef281610e4f565b90509392505050565b60006020820190508181036000830152610f1481610d7d565b9050919050565b60006020820190508181036000830152610f3481610da0565b9050919050565b60006020820190508181036000830152610f5481610dc3565b9050919050565b60006020820190508181036000830152610f7481610de6565b9050919050565b60006020820190508181036000830152610f9481610e09565b9050919050565b60006020820190508181036000830152610fb481610e2c565b9050919050565b60006020820190508181036000830152610fd481610e72565b9050919050565b6000602082019050610ff06000830184610e95565b92915050565b600082825260208201905092915050565b6000611012826110fb565b915061101d836110fb565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561105257611051611105565b5b828201905092915050565b6000611068826110fb565b9150611073836110fb565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156110ac576110ab611105565b5b828202905092915050565b60006110c2826110db565b9050919050565b60006110d4826110b7565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f496e73756666696369656e7420657468657220616d6f756e742077617320736560008201527f6e74000000000000000000000000000000000000000000000000000000000000602082015250565b7f43616e206f6e6c79206d696e7420757020746f20313020746f6b656e7320617460008201527f20612074696d652e000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f436f6e747261637420616c726561647920696e697469616c697a656400000000600082015250565b7f52656c617920636f6e747261637420686173206e6f74206265656e20696e697460008201527f69616c697a656421000000000000000000000000000000000000000000000000602082015250565b7f72616e646f6d0000000000000000000000000000000000000000000000000000600082015250565b7f43616e6e6f74206d696e74206d6f7265207468616e207468652063757272656e60008201527f74206c696d697400000000000000000000000000000000000000000000000000602082015250565b611348816110b7565b811461135357600080fd5b50565b61135f816110c9565b811461136a57600080fd5b50565b611376816110fb565b811461138157600080fd5b5056fea2646970667358221220565180c8071e1d59a8d54c62ba2c04b0eb53fc2c3901b0a13c41caa8c5dd169364736f6c63430008070033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.04
Net Worth in ETH
0.000024
Token Allocations
POL
100.00%
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| POL | 100.00% | $0.107066 | 0.42 | $0.044968 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.