Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 187 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Air Drop | 15773005 | 1226 days ago | IN | 0 ETH | 0.00967217 | ||||
| Air Drop | 15772970 | 1226 days ago | IN | 0 ETH | 0.00947886 | ||||
| Air Drop | 15772959 | 1226 days ago | IN | 0 ETH | 0.0052254 | ||||
| Withdraw | 15593563 | 1251 days ago | IN | 0 ETH | 0.00023005 | ||||
| Set Beneficiary | 15593524 | 1251 days ago | IN | 0 ETH | 0.00032286 | ||||
| Public Sale | 15566755 | 1255 days ago | IN | 0.0008 ETH | 0.00043304 | ||||
| Public Sale | 15566403 | 1255 days ago | IN | 0.0016 ETH | 0.00061802 | ||||
| Public Sale | 15565930 | 1255 days ago | IN | 0.0008 ETH | 0.00052999 | ||||
| Public Sale | 15565696 | 1255 days ago | IN | 0.0024 ETH | 0.00144451 | ||||
| Public Sale | 15565362 | 1255 days ago | IN | 0.0016 ETH | 0.00039361 | ||||
| Public Sale | 15565205 | 1255 days ago | IN | 0.0008 ETH | 0.00048617 | ||||
| Public Sale | 15565189 | 1255 days ago | IN | 0.0008 ETH | 0.00062672 | ||||
| Public Sale | 15565180 | 1255 days ago | IN | 0.0016 ETH | 0.00093916 | ||||
| Public Sale | 15564853 | 1255 days ago | IN | 0.0008 ETH | 0.00096754 | ||||
| Public Sale | 15564520 | 1255 days ago | IN | 0.0016 ETH | 0.00080218 | ||||
| Public Sale | 15561259 | 1255 days ago | IN | 0.0008 ETH | 0.00118232 | ||||
| Public Sale | 15560710 | 1256 days ago | IN | 0.0016 ETH | 0.0006067 | ||||
| Public Sale | 15560706 | 1256 days ago | IN | 0.0024 ETH | 0.00091708 | ||||
| Public Sale | 15560549 | 1256 days ago | IN | 0.0024 ETH | 0.00113745 | ||||
| Public Sale | 15560430 | 1256 days ago | IN | 0.0008 ETH | 0.00081614 | ||||
| Public Sale | 15560283 | 1256 days ago | IN | 0.0008 ETH | 0.00032983 | ||||
| Public Sale | 15560270 | 1256 days ago | IN | 0.0008 ETH | 0.00043306 | ||||
| Public Sale | 15560002 | 1256 days ago | IN | 0.0008 ETH | 0.00034438 | ||||
| Public Sale | 15560000 | 1256 days ago | IN | 0.0008 ETH | 0.00046833 | ||||
| Presale Buy | 15558766 | 1256 days ago | IN | 0 ETH | 0.00072925 |
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 15593563 | 1251 days ago | 0.024 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Sale
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./ElementaVerse.sol";
contract Sale is ReentrancyGuard, Ownable, Pausable {
using Counters for Counters.Counter;
ElementaVerse public elementaVerse;
Information public InformationSale;
Counters.Counter public mintCount;
struct Information {
uint32 mintMax;
uint32 limitPresalePerAddress;
uint32 limitTotalPerAddress;
uint128 timeStart;
uint128 timeEnd;
uint128 publicSaleTimeEnd;
uint256 pricePresale;
uint256 pricePublicsale;
bytes32 root;
}
mapping (address => uint256) public historyMint;
address public beneficiary;
event Mint(address account, string round, uint256 price, uint256 amount);
modifier isMax(uint amount) {
require(
amount+mintCount.current() <= InformationSale.mintMax,
"Sale: Already sold out"
);
_;
}
modifier publicSaleEnd() {
require(block.timestamp < InformationSale.publicSaleTimeEnd, "Sale: Public sale is over.");
_;
}
modifier isInformationSet() {
require(
InformationSale.limitPresalePerAddress != 0,
"Mint: Information sale has not been set"
);
_;
}
modifier isPresaleStart() {
require(
block.timestamp > InformationSale.timeStart,
"Mint: Presale has not started"
);
_;
}
modifier isValidMerkleProof(bytes32[] calldata _proof) {
require(
MerkleProof.verify(
_proof,
InformationSale.root,
keccak256(abi.encodePacked(_msgSender()))
) == true,
"Mint: You are not in Whitelist"
);
_;
}
modifier isPayEnough(uint256 price, uint256 _amount) {
require(price * _amount <= msg.value, "Mint: Not enough ethers sent");
_;
}
constructor(
ElementaVerse _elementaVerse
) {
elementaVerse = _elementaVerse;
}
function unpause() public onlyOwner {
_unpause();
}
function pause() public onlyOwner {
_pause();
}
function _buy(uint _amount, uint _price) internal whenNotPaused isInformationSet isPresaleStart isPayEnough(_price, _amount) isMax(_amount) nonReentrant publicSaleEnd{
for (uint256 i = 0; i < _amount; i++) {
elementaVerse.mintTo(_msgSender());
}
historyMint[_msgSender()] += _amount;
mintCount.increment();
}
function presaleBuy(uint256 _amount, bytes32[] calldata _proof)
external
payable
isValidMerkleProof(_proof)
{
require(
block.timestamp < InformationSale.timeEnd,
"Mint: Presale is over"
);
require(
historyMint[_msgSender()] + _amount <=
InformationSale.limitPresalePerAddress,
"Mint: Limit presale per address exceeded"
);
_buy(_amount, InformationSale.pricePresale);
emit Mint(_msgSender(), "Private", msg.value, _amount);
}
function publicSale(uint256 _amount)
external
payable
{
require(
block.timestamp > InformationSale.timeEnd,
"Mint: Presale is not over"
);
require(
historyMint[_msgSender()] + _amount <=
InformationSale.limitTotalPerAddress,
"Mint: Limit per address exceeded"
);
_buy(_amount, InformationSale.pricePublicsale);
emit Mint(_msgSender(), "Public", msg.value, _amount);
}
function airDrop(address receiver, uint256 _amount)
external
whenNotPaused
isInformationSet
onlyOwner
{
require(receiver != address(0), "Airdrop: receiver empty");
for (uint256 i = 0; i < _amount; i++) {
elementaVerse.mintTo(receiver);
}
}
function withdraw() external onlyOwner nonReentrant {
require(
beneficiary != address(0),
"Withdraw: Gnosis Wallet has not been set"
);
if (address(this).balance > 0) {
payable(beneficiary).transfer(address(this).balance);
}
}
function setBeneficiary(address _beneficiary) external onlyOwner {
beneficiary = _beneficiary;
}
function setInformation(Information calldata _information)
external
onlyOwner
{
InformationSale = _information;
}
function getInformation() external view returns(uint32, uint32, uint32, uint128,uint128, uint128, uint, uint, bytes32, uint){
return (InformationSale.mintMax,
InformationSale.limitPresalePerAddress,
InformationSale.limitTotalPerAddress,
InformationSale.timeStart,
InformationSale.timeEnd,
InformationSale.publicSaleTimeEnd,
InformationSale.pricePresale,
InformationSale.pricePublicsale,
InformationSale.root,
mintCount.current());
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = _efficientHash(computedHash, proofElement);
} else {
// Hash(current element of the proof + current computed hash)
computedHash = _efficientHash(proofElement, computedHash);
}
}
return computedHash;
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract OwnableDelegateProxy {}
/**
* Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users
*/
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract ElementaVerse is
ERC721,
ReentrancyGuard,
Pausable,
AccessControl,
Ownable
{
using Counters for Counters.Counter;
using Strings for uint256;
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
uint256 public MAX_NFT;
Counters.Counter private _tokenIdCounter;
address public proxyRegistryAddress;
string public baseURI;
string public unrevealURI;
constructor(
string memory name,
string memory symbol,
uint256 _MAX_NFT
) ERC721(name, symbol) {
MAX_NFT = _MAX_NFT;
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(PAUSER_ROLE, msg.sender);
_grantRole(MINTER_ROLE, msg.sender);
}
function pause() public onlyRole(PAUSER_ROLE) {
_pause();
}
function unpause() public onlyRole(PAUSER_ROLE) {
_unpause();
}
function mintTo(address to) public onlyRole(MINTER_ROLE) {
require(
_tokenIdCounter.current() + 1 <= MAX_NFT,
"NFT: Max supply exceeded"
);
uint256 tokenId = _tokenIdCounter.current();
_tokenIdCounter.increment();
_safeMint(to, tokenId);
}
function setBaseURI(string calldata _tokenBaseURI)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
baseURI = _tokenBaseURI;
}
function setProxyAddress(address _proxyAddress)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
proxyRegistryAddress = _proxyAddress;
}
function _baseURI() internal view override returns (string memory) {
return baseURI;
}
function totalSupply() public view returns (uint256) {
return _tokenIdCounter.current();
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
require(
_exists(tokenId),
"ERC721Metadata: URI query for nonexistent token"
);
string memory currentBaseURI = _baseURI();
return
bytes(currentBaseURI).length > 0
? string(abi.encodePacked(currentBaseURI, tokenId.toString()))
: unrevealURI;
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721) whenNotPaused {
super._beforeTokenTransfer(from, to, tokenId);
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
if (operator == address(proxyRegistryAddress)) {
return true;
}
return super.isApprovedForAll(owner, operator);
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, AccessControl)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
function setUnrevealURI(string calldata _unrevealURI ) public onlyRole(DEFAULT_ADMIN_ROLE){
unrevealURI = _unrevealURI;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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);
_afterTokenTransfer(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);
_afterTokenTransfer(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 from incorrect owner");
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);
_afterTokenTransfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @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.
* - `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 tokenId
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `_msgSender()` is missing `role`.
* Overriding this function changes the behavior of the {onlyRole} modifier.
*
* Format of the revert message is described in {_checkRole}.
*
* _Available since v4.6._
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* 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;
/**
* @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 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 the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @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
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract ElementaVerse","name":"_elementaVerse","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"string","name":"round","type":"string"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"InformationSale","outputs":[{"internalType":"uint32","name":"mintMax","type":"uint32"},{"internalType":"uint32","name":"limitPresalePerAddress","type":"uint32"},{"internalType":"uint32","name":"limitTotalPerAddress","type":"uint32"},{"internalType":"uint128","name":"timeStart","type":"uint128"},{"internalType":"uint128","name":"timeEnd","type":"uint128"},{"internalType":"uint128","name":"publicSaleTimeEnd","type":"uint128"},{"internalType":"uint256","name":"pricePresale","type":"uint256"},{"internalType":"uint256","name":"pricePublicsale","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"airDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"beneficiary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"elementaVerse","outputs":[{"internalType":"contract ElementaVerse","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInformation","outputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint128","name":"","type":"uint128"},{"internalType":"uint128","name":"","type":"uint128"},{"internalType":"uint128","name":"","type":"uint128"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"historyMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintCount","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"presaleBuy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"publicSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"setBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"mintMax","type":"uint32"},{"internalType":"uint32","name":"limitPresalePerAddress","type":"uint32"},{"internalType":"uint32","name":"limitTotalPerAddress","type":"uint32"},{"internalType":"uint128","name":"timeStart","type":"uint128"},{"internalType":"uint128","name":"timeEnd","type":"uint128"},{"internalType":"uint128","name":"publicSaleTimeEnd","type":"uint128"},{"internalType":"uint256","name":"pricePresale","type":"uint256"},{"internalType":"uint256","name":"pricePublicsale","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"internalType":"struct Sale.Information","name":"_information","type":"tuple"}],"name":"setInformation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b5060405161163338038061163383398101604081905261002f916100c1565b600160005561003d3361006f565b6001805460ff60a01b19169055600280546001600160a01b0319166001600160a01b03929092169190911790556100ef565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156100d2578081fd5b81516001600160a01b03811681146100e8578182fd5b9392505050565b611535806100fe6000396000f3fe6080604052600436106101095760003560e01c8063715018a611610095578063b287c8ed11610064578063b287c8ed146102bb578063c0da1e68146102ce578063c85ed76314610348578063d9375d741461040b578063f2fde38b1461041e57600080fd5b8063715018a61461025c5780638456cb59146102715780638da5cb5b146102865780639659867e146102a457600080fd5b80633ccfd60b116100dc5780633ccfd60b146101ad5780633f4ba83a146101c257806358e126f0146101d75780635c975abb146102125780636d2bd0fb1461023c57600080fd5b8063045f78501461010e5780631c31f71014610130578063335074411461015057806338af3eed1461018d575b600080fd5b34801561011a57600080fd5b5061012e610129366004611198565b61043e565b005b34801561013c57600080fd5b5061012e61014b366004611177565b6105a0565b34801561015c57600080fd5b50600254610170906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561019957600080fd5b50600a54610170906001600160a01b031681565b3480156101b957600080fd5b5061012e6105ec565b3480156101ce57600080fd5b5061012e61071f565b3480156101e357600080fd5b506102046101f2366004611177565b60096020526000908152604090205481565b604051908152602001610184565b34801561021e57600080fd5b50600154600160a01b900460ff166040519015158152602001610184565b34801561024857600080fd5b5061012e6102573660046111c1565b610753565b34801561026857600080fd5b5061012e61078a565b34801561027d57600080fd5b5061012e6107be565b34801561029257600080fd5b506001546001600160a01b0316610170565b3480156102b057600080fd5b506008546102049081565b61012e6102c93660046111d9565b6107f0565b3480156102da57600080fd5b506102e3610933565b6040805163ffffffff9b8c168152998b1660208b015297909916968801969096526001600160801b0394851660608801529284166080870152921660a085015260c084019190915260e083015261010082015261012081019190915261014001610184565b34801561035457600080fd5b506003546004546005546006546007546103ae9463ffffffff808216956401000000008304821695600160401b8404909216946001600160801b03600160601b90940484169482851694600160801b909304909216929189565b6040805163ffffffff9a8b168152988a1660208a015296909816958701959095526001600160801b039384166060870152918316608086015290911660a084015260c083015260e082015261010081019190915261012001610184565b61012e6104193660046111f1565b6109c5565b34801561042a57600080fd5b5061012e610439366004611177565b610be0565b600154600160a01b900460ff16156104715760405162461bcd60e51b81526004016104689061126b565b60405180910390fd5b600354640100000000900463ffffffff1661049e5760405162461bcd60e51b8152600401610468906112ca565b6001546001600160a01b031633146104c85760405162461bcd60e51b815260040161046890611295565b6001600160a01b03821661051e5760405162461bcd60e51b815260206004820152601760248201527f41697264726f703a20726563656976657220656d7074790000000000000000006044820152606401610468565b60005b8181101561059b5760025460405163755edd1760e01b81526001600160a01b0385811660048301529091169063755edd1790602401600060405180830381600087803b15801561057057600080fd5b505af1158015610584573d6000803e3d6000fd5b50505050808061059390611348565b915050610521565b505050565b6001546001600160a01b031633146105ca5760405162461bcd60e51b815260040161046890611295565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146106165760405162461bcd60e51b815260040161046890611295565b600260005414156106695760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610468565b6002600055600a546001600160a01b03166106d75760405162461bcd60e51b815260206004820152602860248201527f57697468647261773a20476e6f7369732057616c6c657420686173206e6f74206044820152671899595b881cd95d60c21b6064820152608401610468565b471561071857600a546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610716573d6000803e3d6000fd5b505b6001600055565b6001546001600160a01b031633146107495760405162461bcd60e51b815260040161046890611295565b610751610c7b565b565b6001546001600160a01b0316331461077d5760405162461bcd60e51b815260040161046890611295565b80600361059b82826113ac565b6001546001600160a01b031633146107b45760405162461bcd60e51b815260040161046890611295565b6107516000610d18565b6001546001600160a01b031633146107e85760405162461bcd60e51b815260040161046890611295565b610751610d6a565b6004546001600160801b0316421161084a5760405162461bcd60e51b815260206004820152601960248201527f4d696e743a2050726573616c65206973206e6f74206f766572000000000000006044820152606401610468565b60035433600090815260096020526040902054600160401b90910463ffffffff1690610877908390611311565b11156108c55760405162461bcd60e51b815260206004820181905260248201527f4d696e743a204c696d69742070657220616464726573732065786365656465646044820152606401610468565b6108d3816003800154610dcf565b60408051338152608060208201819052600690820152655075626c696360d01b60a082015234818301526060810183905290517f0c4b201a5eb8ab63e539f373c349eafada81e6c7bc25c071fe334c289f17ed7d9181900360c00190a150565b60035460045460055460065460075460009485948594859485948594859485948594859463ffffffff808616956401000000008104821695600160401b8204909216946001600160801b03600160601b90920482169483831694600160801b909404909216929091906109a560085490565b995099509950995099509950995099509950995090919293949596979899565b8181610a3c828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506007546040516bffffffffffffffffffffffff193360601b1660208201529092506034019050604051602081830303815290604052805190602001206110c3565b1515600114610a8d5760405162461bcd60e51b815260206004820152601e60248201527f4d696e743a20596f7520617265206e6f7420696e2057686974656c69737400006044820152606401610468565b6004546001600160801b03164210610adf5760405162461bcd60e51b815260206004820152601560248201527426b4b73a1d10283932b9b0b6329034b99037bb32b960591b6044820152606401610468565b6003543360009081526009602052604090205464010000000090910463ffffffff1690610b0d908790611311565b1115610b6c5760405162461bcd60e51b815260206004820152602860248201527f4d696e743a204c696d69742070726573616c6520706572206164647265737320604482015267195e18d95959195960c21b6064820152608401610468565b610b7b85600360020154610dcf565b60408051338152608060208201819052600790820152665072697661746560c81b60a082015234818301526060810187905290517f0c4b201a5eb8ab63e539f373c349eafada81e6c7bc25c071fe334c289f17ed7d9181900360c00190a15050505050565b6001546001600160a01b03163314610c0a5760405162461bcd60e51b815260040161046890611295565b6001600160a01b038116610c6f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610468565b610c7881610d18565b50565b600154600160a01b900460ff16610ccb5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610468565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600154600160a01b900460ff1615610d945760405162461bcd60e51b81526004016104689061126b565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610cfb3390565b600154600160a01b900460ff1615610df95760405162461bcd60e51b81526004016104689061126b565b600354640100000000900463ffffffff16610e265760405162461bcd60e51b8152600401610468906112ca565b600354600160601b90046001600160801b03164211610e875760405162461bcd60e51b815260206004820152601d60248201527f4d696e743a2050726573616c6520686173206e6f7420737461727465640000006044820152606401610468565b808234610e948284611329565b1115610ee25760405162461bcd60e51b815260206004820152601c60248201527f4d696e743a204e6f7420656e6f756768206574686572732073656e74000000006044820152606401610468565b600354849063ffffffff16610ef660085490565b610f009083611311565b1115610f475760405162461bcd60e51b815260206004820152601660248201527514d85b194e88105b1c9958591e481cdbdb19081bdd5d60521b6044820152606401610468565b60026000541415610f9a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610468565b6002600055600454600160801b90046001600160801b031642106110005760405162461bcd60e51b815260206004820152601a60248201527f53616c653a205075626c69632073616c65206973206f7665722e0000000000006044820152606401610468565b60005b85811015611089576002546001600160a01b031663755edd17336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b15801561105e57600080fd5b505af1158015611072573d6000803e3d6000fd5b50505050808061108190611348565b915050611003565b5033600090815260096020526040812080548792906110a9908490611311565b909155505060088054600101905550506001600055505050565b6000826110d085846110d9565b14949350505050565b600081815b845181101561115357600085828151811061110957634e487b7160e01b600052603260045260246000fd5b6020026020010151905080831161112f5760008381526020829052604090209250611140565b600081815260208490526040902092505b508061114b81611348565b9150506110de565b509392505050565b80356001600160a01b038116811461117257600080fd5b919050565b600060208284031215611188578081fd5b6111918261115b565b9392505050565b600080604083850312156111aa578081fd5b6111b38361115b565b946020939093013593505050565b600061012082840312156111d3578081fd5b50919050565b6000602082840312156111ea578081fd5b5035919050565b600080600060408486031215611205578081fd5b83359250602084013567ffffffffffffffff80821115611223578283fd5b818601915086601f830112611236578283fd5b813581811115611244578384fd5b8760208260051b8501011115611258578384fd5b6020830194508093505050509250925092565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526027908201527f4d696e743a20496e666f726d6174696f6e2073616c6520686173206e6f74206260408201526619595b881cd95d60ca1b606082015260800190565b6000821982111561132457611324611363565b500190565b600081600019048311821515161561134357611343611363565b500290565b600060001982141561135c5761135c611363565b5060010190565b634e487b7160e01b600052601160045260246000fd5b600081356001600160801b0381168114611391578182fd5b92915050565b6000813563ffffffff81168114611391578182fd5b63ffffffff6113ba83611397565b1663ffffffff198254161781556113f86113d660208401611397565b825467ffffffff00000000191660209190911b67ffffffff0000000016178255565b61143161140760408401611397565b82546bffffffff0000000000000000191660409190911b6bffffffff000000000000000016178255565b61147c61144060608401611379565b8280546fffffffffffffffffffffffffffffffff60601b191660609290921b6fffffffffffffffffffffffffffffffff60601b16919091179055565b600181016114ac61148f60808501611379565b82546001600160801b0319166001600160801b0391909116178255565b6114db6114bb60a08501611379565b82546001600160801b031660809190911b6001600160801b031916178255565b5060c0820135600282015560e082013560038201556101008201356004820155505056fea2646970667358221220c317252c98e625a3850af5d106bd022eb26775ff26367cbef4e3d5a9d3d4c8ed64736f6c63430008040033000000000000000000000000399bfa945579bf22c25daedfde78e759b359cf8c
Deployed Bytecode
0x6080604052600436106101095760003560e01c8063715018a611610095578063b287c8ed11610064578063b287c8ed146102bb578063c0da1e68146102ce578063c85ed76314610348578063d9375d741461040b578063f2fde38b1461041e57600080fd5b8063715018a61461025c5780638456cb59146102715780638da5cb5b146102865780639659867e146102a457600080fd5b80633ccfd60b116100dc5780633ccfd60b146101ad5780633f4ba83a146101c257806358e126f0146101d75780635c975abb146102125780636d2bd0fb1461023c57600080fd5b8063045f78501461010e5780631c31f71014610130578063335074411461015057806338af3eed1461018d575b600080fd5b34801561011a57600080fd5b5061012e610129366004611198565b61043e565b005b34801561013c57600080fd5b5061012e61014b366004611177565b6105a0565b34801561015c57600080fd5b50600254610170906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561019957600080fd5b50600a54610170906001600160a01b031681565b3480156101b957600080fd5b5061012e6105ec565b3480156101ce57600080fd5b5061012e61071f565b3480156101e357600080fd5b506102046101f2366004611177565b60096020526000908152604090205481565b604051908152602001610184565b34801561021e57600080fd5b50600154600160a01b900460ff166040519015158152602001610184565b34801561024857600080fd5b5061012e6102573660046111c1565b610753565b34801561026857600080fd5b5061012e61078a565b34801561027d57600080fd5b5061012e6107be565b34801561029257600080fd5b506001546001600160a01b0316610170565b3480156102b057600080fd5b506008546102049081565b61012e6102c93660046111d9565b6107f0565b3480156102da57600080fd5b506102e3610933565b6040805163ffffffff9b8c168152998b1660208b015297909916968801969096526001600160801b0394851660608801529284166080870152921660a085015260c084019190915260e083015261010082015261012081019190915261014001610184565b34801561035457600080fd5b506003546004546005546006546007546103ae9463ffffffff808216956401000000008304821695600160401b8404909216946001600160801b03600160601b90940484169482851694600160801b909304909216929189565b6040805163ffffffff9a8b168152988a1660208a015296909816958701959095526001600160801b039384166060870152918316608086015290911660a084015260c083015260e082015261010081019190915261012001610184565b61012e6104193660046111f1565b6109c5565b34801561042a57600080fd5b5061012e610439366004611177565b610be0565b600154600160a01b900460ff16156104715760405162461bcd60e51b81526004016104689061126b565b60405180910390fd5b600354640100000000900463ffffffff1661049e5760405162461bcd60e51b8152600401610468906112ca565b6001546001600160a01b031633146104c85760405162461bcd60e51b815260040161046890611295565b6001600160a01b03821661051e5760405162461bcd60e51b815260206004820152601760248201527f41697264726f703a20726563656976657220656d7074790000000000000000006044820152606401610468565b60005b8181101561059b5760025460405163755edd1760e01b81526001600160a01b0385811660048301529091169063755edd1790602401600060405180830381600087803b15801561057057600080fd5b505af1158015610584573d6000803e3d6000fd5b50505050808061059390611348565b915050610521565b505050565b6001546001600160a01b031633146105ca5760405162461bcd60e51b815260040161046890611295565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146106165760405162461bcd60e51b815260040161046890611295565b600260005414156106695760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610468565b6002600055600a546001600160a01b03166106d75760405162461bcd60e51b815260206004820152602860248201527f57697468647261773a20476e6f7369732057616c6c657420686173206e6f74206044820152671899595b881cd95d60c21b6064820152608401610468565b471561071857600a546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610716573d6000803e3d6000fd5b505b6001600055565b6001546001600160a01b031633146107495760405162461bcd60e51b815260040161046890611295565b610751610c7b565b565b6001546001600160a01b0316331461077d5760405162461bcd60e51b815260040161046890611295565b80600361059b82826113ac565b6001546001600160a01b031633146107b45760405162461bcd60e51b815260040161046890611295565b6107516000610d18565b6001546001600160a01b031633146107e85760405162461bcd60e51b815260040161046890611295565b610751610d6a565b6004546001600160801b0316421161084a5760405162461bcd60e51b815260206004820152601960248201527f4d696e743a2050726573616c65206973206e6f74206f766572000000000000006044820152606401610468565b60035433600090815260096020526040902054600160401b90910463ffffffff1690610877908390611311565b11156108c55760405162461bcd60e51b815260206004820181905260248201527f4d696e743a204c696d69742070657220616464726573732065786365656465646044820152606401610468565b6108d3816003800154610dcf565b60408051338152608060208201819052600690820152655075626c696360d01b60a082015234818301526060810183905290517f0c4b201a5eb8ab63e539f373c349eafada81e6c7bc25c071fe334c289f17ed7d9181900360c00190a150565b60035460045460055460065460075460009485948594859485948594859485948594859463ffffffff808616956401000000008104821695600160401b8204909216946001600160801b03600160601b90920482169483831694600160801b909404909216929091906109a560085490565b995099509950995099509950995099509950995090919293949596979899565b8181610a3c828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506007546040516bffffffffffffffffffffffff193360601b1660208201529092506034019050604051602081830303815290604052805190602001206110c3565b1515600114610a8d5760405162461bcd60e51b815260206004820152601e60248201527f4d696e743a20596f7520617265206e6f7420696e2057686974656c69737400006044820152606401610468565b6004546001600160801b03164210610adf5760405162461bcd60e51b815260206004820152601560248201527426b4b73a1d10283932b9b0b6329034b99037bb32b960591b6044820152606401610468565b6003543360009081526009602052604090205464010000000090910463ffffffff1690610b0d908790611311565b1115610b6c5760405162461bcd60e51b815260206004820152602860248201527f4d696e743a204c696d69742070726573616c6520706572206164647265737320604482015267195e18d95959195960c21b6064820152608401610468565b610b7b85600360020154610dcf565b60408051338152608060208201819052600790820152665072697661746560c81b60a082015234818301526060810187905290517f0c4b201a5eb8ab63e539f373c349eafada81e6c7bc25c071fe334c289f17ed7d9181900360c00190a15050505050565b6001546001600160a01b03163314610c0a5760405162461bcd60e51b815260040161046890611295565b6001600160a01b038116610c6f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610468565b610c7881610d18565b50565b600154600160a01b900460ff16610ccb5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610468565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600154600160a01b900460ff1615610d945760405162461bcd60e51b81526004016104689061126b565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610cfb3390565b600154600160a01b900460ff1615610df95760405162461bcd60e51b81526004016104689061126b565b600354640100000000900463ffffffff16610e265760405162461bcd60e51b8152600401610468906112ca565b600354600160601b90046001600160801b03164211610e875760405162461bcd60e51b815260206004820152601d60248201527f4d696e743a2050726573616c6520686173206e6f7420737461727465640000006044820152606401610468565b808234610e948284611329565b1115610ee25760405162461bcd60e51b815260206004820152601c60248201527f4d696e743a204e6f7420656e6f756768206574686572732073656e74000000006044820152606401610468565b600354849063ffffffff16610ef660085490565b610f009083611311565b1115610f475760405162461bcd60e51b815260206004820152601660248201527514d85b194e88105b1c9958591e481cdbdb19081bdd5d60521b6044820152606401610468565b60026000541415610f9a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610468565b6002600055600454600160801b90046001600160801b031642106110005760405162461bcd60e51b815260206004820152601a60248201527f53616c653a205075626c69632073616c65206973206f7665722e0000000000006044820152606401610468565b60005b85811015611089576002546001600160a01b031663755edd17336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b15801561105e57600080fd5b505af1158015611072573d6000803e3d6000fd5b50505050808061108190611348565b915050611003565b5033600090815260096020526040812080548792906110a9908490611311565b909155505060088054600101905550506001600055505050565b6000826110d085846110d9565b14949350505050565b600081815b845181101561115357600085828151811061110957634e487b7160e01b600052603260045260246000fd5b6020026020010151905080831161112f5760008381526020829052604090209250611140565b600081815260208490526040902092505b508061114b81611348565b9150506110de565b509392505050565b80356001600160a01b038116811461117257600080fd5b919050565b600060208284031215611188578081fd5b6111918261115b565b9392505050565b600080604083850312156111aa578081fd5b6111b38361115b565b946020939093013593505050565b600061012082840312156111d3578081fd5b50919050565b6000602082840312156111ea578081fd5b5035919050565b600080600060408486031215611205578081fd5b83359250602084013567ffffffffffffffff80821115611223578283fd5b818601915086601f830112611236578283fd5b813581811115611244578384fd5b8760208260051b8501011115611258578384fd5b6020830194508093505050509250925092565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526027908201527f4d696e743a20496e666f726d6174696f6e2073616c6520686173206e6f74206260408201526619595b881cd95d60ca1b606082015260800190565b6000821982111561132457611324611363565b500190565b600081600019048311821515161561134357611343611363565b500290565b600060001982141561135c5761135c611363565b5060010190565b634e487b7160e01b600052601160045260246000fd5b600081356001600160801b0381168114611391578182fd5b92915050565b6000813563ffffffff81168114611391578182fd5b63ffffffff6113ba83611397565b1663ffffffff198254161781556113f86113d660208401611397565b825467ffffffff00000000191660209190911b67ffffffff0000000016178255565b61143161140760408401611397565b82546bffffffff0000000000000000191660409190911b6bffffffff000000000000000016178255565b61147c61144060608401611379565b8280546fffffffffffffffffffffffffffffffff60601b191660609290921b6fffffffffffffffffffffffffffffffff60601b16919091179055565b600181016114ac61148f60808501611379565b82546001600160801b0319166001600160801b0391909116178255565b6114db6114bb60a08501611379565b82546001600160801b031660809190911b6001600160801b031916178255565b5060c0820135600282015560e082013560038201556101008201356004820155505056fea2646970667358221220c317252c98e625a3850af5d106bd022eb26775ff26367cbef4e3d5a9d3d4c8ed64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000399bfa945579bf22c25daedfde78e759b359cf8c
-----Decoded View---------------
Arg [0] : _elementaVerse (address): 0x399bFa945579Bf22c25dAedFDe78e759b359cF8C
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000399bfa945579bf22c25daedfde78e759b359cf8c
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.