Address Contract Verified
Address
0x3Adf63dd52E187D068813f5e935AD4BE65BC397d
Balance
0 ETH
Nonce
1
Code Size
3117 bytes
Creator
0x8A777356...cAd9 at tx 0xdf274e4b...be52a0
Indexed Transactions
0
Contract Bytecode
3117 bytes
0x6080604052600436106100f25760003560e01c8063a4de304f1161008a578063d56d229d11610059578063d56d229d14610252578063e6798baa14610272578063ed338ff114610288578063f2fde38b1461029e57600080fd5b8063a4de304f146101e1578063ba1c3b92146101fc578063cd52d7c91461021c578063d1a26ed31461023c57600080fd5b8063715018a6116100c6578063715018a6146101725780638da5cb5b1461018757806390857283146101b95780639401083b146101cc57600080fd5b80629a9b7b146100f75780631cbaee2d146101205780633ccfd60b14610136578063564566a81461014d575b600080fd5b34801561010357600080fd5b5061010d60055481565b6040519081526020015b60405180910390f35b34801561012c57600080fd5b5061010d60065481565b34801561014257600080fd5b5061014b6102be565b005b34801561015957600080fd5b506101626103fe565b6040519015158152602001610117565b34801561017e57600080fd5b5061014b61041d565b34801561019357600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610117565b61014b6101c7366004610af8565b610431565b3480156101d857600080fd5b5061010d610869565b3480156101ed57600080fd5b5061010d662aa1efb94e000081565b34801561020857600080fd5b5061014b610217366004610b11565b61089d565b34801561022857600080fd5b5061014b610237366004610b11565b610947565b34801561024857600080fd5b5061010d60045481565b34801561025e57600080fd5b506002546101a1906001600160a01b031681565b34801561027e57600080fd5b5061010d60035481565b34801561029457600080fd5b5061010d60075481565b3480156102aa57600080fd5b5061014b6102b9366004610b33565b610a16565b6102c6610a51565b47806103105760405162461bcd60e51b81526020600482015260146024820152734e6f2066756e647320746f20776974686472617760601b60448201526064015b60405180910390fd5b600080546040516001600160a01b039091169190829084908381818185875af1925050503d8060008114610360576040519150601f19603f3d011682016040523d82523d6000602084013e610365565b606091505b50509050806103b65760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f2077697468647261772066756e647300000000000000006044820152606401610307565b816001600160a01b03167feaff4b37086828766ad3268786972c0cd24259d4c87a80f9d3963a3c3d999b0d846040516103f191815260200190565b60405180910390a2505050565b6006546000904290811080159061041757506007548111155b91505090565b610425610a51565b61042f6000610a7e565b565b610439610ace565b6104416103fe565b6104825760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610307565b600081116104d25760405162461bcd60e51b815260206004820152601f60248201527f5175616e74697479206d7573742062652067726561746572207468616e2030006044820152606401610307565b6004546001826005546104e59190610b79565b6104ef9190610b92565b111561053d5760405162461bcd60e51b815260206004820152601960248201527f4e6f7420656e6f756768204e66747320617661696c61626c65000000000000006044820152606401610307565b61054e81662aa1efb94e0000610ba5565b34101561059d5760405162461bcd60e51b815260206004820152601760248201527f496e73756666696369656e742066756e64732073656e740000000000000000006044820152606401610307565b6002546001600160a01b031663e985e9c56105c06000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa15801561060a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062e9190610bbc565b6106895760405162461bcd60e51b815260206004820152602660248201527f436f6e7472616374206e6f7420617070726f76656420746f207472616e73666560448201526572204e66747360d01b6064820152608401610307565b60005b81811015610784576000816005546106a49190610b79565b6002549091506001600160a01b03166323b872dd6106ca6000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015233602482015260448101849052606401600060405180830381600087803b15801561071857600080fd5b505af115801561072c573d6000803e3d6000fd5b505060408051848152662aa1efb94e000060208201523393507ff761777482b4b40d2bcc0d050cfba6829900a2d8b3484bd0244ec0feeb3db50492500160405180910390a2508061077c81610bde565b91505061068c565b5080600560008282546107979190610b79565b90915550600090506107b082662aa1efb94e0000610ba5565b6107ba9034610b92565b9050801561085c57604051600090339083908381818185875af1925050503d8060008114610804576040519150601f19603f3d011682016040523d82523d6000602084013e610809565b606091505b505090508061085a5760405162461bcd60e51b815260206004820152601f60248201527f4661696c656420746f20726566756e6420657863657373207061796d656e74006044820152606401610307565b505b5061086660018055565b50565b6000600454600554111561087d5750600090565b60055460045461088d9190610b92565b610898906001610b79565b905090565b6108a5610a51565b8082106108ff5760405162461bcd60e51b815260206004820152602260248201527f53746172742074696d65206d757374206265206265666f726520656e642074696044820152616d6560f01b6064820152608401610307565b6006829055600781905560408051838152602081018390527f91b2ce2ba9ca5f5a480d60873a5b2d13fef514bec318d2cd2daee4c50d36ec8e91015b60405180910390a15050565b61094f610a51565b808211156109c55760405162461bcd60e51b815260206004820152603960248201527f537461727420746f6b656e204944206d757374206265206c657373207468616e60448201527f206f7220657175616c20746f20656e6420746f6b656e204944000000000000006064820152608401610307565b600382905560048190556005548211156109e0576003546005555b60408051838152602081018390527ff04193bab46a0e27bd10fdc13a3a2d375760fcd003f75e8da6b49b75ff221f0e910161093b565b610a1e610a51565b6001600160a01b038116610a4857604051631e4fbdf760e01b815260006004820152602401610307565b61086681610a7e565b6000546001600160a01b0316331461042f5760405163118cdaa760e01b8152336004820152602401610307565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600260015403610af157604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b600060208284031215610b0a57600080fd5b5035919050565b60008060408385031215610b2457600080fd5b50508035926020909101359150565b600060208284031215610b4557600080fd5b81356001600160a01b0381168114610b5c57600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b8c57610b8c610b63565b92915050565b81810381811115610b8c57610b8c610b63565b8082028115828204841417610b8c57610b8c610b63565b600060208284031215610bce57600080fd5b81518015158114610b5c57600080fd5b600060018201610bf057610bf0610b63565b506001019056fea2646970667358221220de03515515f5d012f6241b37e6e7f47ed6504965e47ec50490fb9cfd719bce2e64736f6c63430008140033
Verified Source Code Full Match
Compiler: v0.8.20+commit.a1b79de6
EVM: paris
Optimization: Yes (200 runs)
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../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.
*
* The initial owner is set to the address provided by the deployer. 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;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling 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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_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);
}
}
IERC721.sol 135 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC-721 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 ERC-721 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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* 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 address zero.
*
* 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);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* 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[ERC 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);
}
ReentrancyGuard.sol 87 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @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 EIP-1153 (transient storage) is available on the chain you're deploying at,
* consider using {ReentrancyGuardTransient} instead.
*
* 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;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
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() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}
ExodusReGenerative.sol 107 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
contract ExodusReGenerative is Ownable, ReentrancyGuard {
IERC721 public nftContract;
uint256 public constant PRICE_PER_NFT = 12000000000000000;
uint256 public startTokenId = 829;
uint256 public endTokenId = 888;
uint256 public currentTokenId = 829;
uint256 public saleStartTime = 1749556800;
uint256 public saleEndTime = 1749988800;
event Purchased(address indexed buyer, uint256 tokenId, uint256 price);
event FundsWithdrawn(address indexed owner, uint256 amount);
event TokenIdRangeChanged(uint256 newStartTokenId, uint256 newEndTokenId);
event SalePeriodChanged(uint256 startTime, uint256 endTime);
constructor(address _nftContract) Ownable(msg.sender) {
require(_nftContract != address(0), "Invalid NFT contract address");
nftContract = IERC721(_nftContract);
}
function setTokenIdRange(
uint256 _startTokenId,
uint256 _endTokenId
) external onlyOwner {
require(
_startTokenId <= _endTokenId,
"Start token ID must be less than or equal to end token ID"
);
startTokenId = _startTokenId;
endTokenId = _endTokenId;
if (currentTokenId < startTokenId) {
currentTokenId = startTokenId;
}
emit TokenIdRangeChanged(_startTokenId, _endTokenId);
}
function setSalePeriod(
uint256 _startTime,
uint256 _endTime
) external onlyOwner {
require(_startTime < _endTime, "Start time must be before end time");
saleStartTime = _startTime;
saleEndTime = _endTime;
emit SalePeriodChanged(_startTime, _endTime);
}
function isSaleActive() public view returns (bool) {
uint256 currentTime = block.timestamp;
return currentTime >= saleStartTime && currentTime <= saleEndTime;
}
function remainingNfts() public view returns (uint256) {
if (currentTokenId > endTokenId) {
return 0;
}
return endTokenId - currentTokenId + 1;
}
function purchaseNfts(uint256 _quantity) external payable nonReentrant {
require(isSaleActive(), "Sale is not active");
require(_quantity > 0, "Quantity must be greater than 0");
require(
currentTokenId + _quantity - 1 <= endTokenId,
"Not enough Nfts available"
);
require(
msg.value >= PRICE_PER_NFT * _quantity,
"Insufficient funds sent"
);
require(
nftContract.isApprovedForAll(owner(), address(this)),
"Contract not approved to transfer Nfts"
);
for (uint256 i = 0; i < _quantity; i++) {
uint256 tokenId = currentTokenId + i;
nftContract.transferFrom(owner(), msg.sender, tokenId);
emit Purchased(msg.sender, tokenId, PRICE_PER_NFT);
}
currentTokenId += _quantity;
uint256 excess = msg.value - (PRICE_PER_NFT * _quantity);
if (excess > 0) {
(bool success, ) = payable(msg.sender).call{value: excess}("");
require(success, "Failed to refund excess payment");
}
}
function withdraw() external onlyOwner {
uint256 balance = address(this).balance;
require(balance > 0, "No funds to withdraw");
address payable recipient = payable(owner());
(bool success, ) = recipient.call{value: balance}("");
require(success, "Failed to withdraw funds");
emit FundsWithdrawn(recipient, balance);
}
}
Read Contract
PRICE_PER_NFT 0xa4de304f → uint256
currentTokenId 0x009a9b7b → uint256
endTokenId 0xd1a26ed3 → uint256
isSaleActive 0x564566a8 → bool
nftContract 0xd56d229d → address
owner 0x8da5cb5b → address
remainingNfts 0x9401083b → uint256
saleEndTime 0xed338ff1 → uint256
saleStartTime 0x1cbaee2d → uint256
startTokenId 0xe6798baa → uint256
Write Contract 6 functions
These functions modify contract state and require a wallet transaction to execute.
purchaseNfts 0x90857283
uint256 _quantity
renounceOwnership 0x715018a6
No parameters
setSalePeriod 0xba1c3b92
uint256 _startTime
uint256 _endTime
setTokenIdRange 0xcd52d7c9
uint256 _startTokenId
uint256 _endTokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters
Recent Transactions
No transactions found for this address