Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 1,077 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Request Mint | 17022809 | 1049 days ago | IN | 0 ETH | 0.02508015 | ||||
| Request Mint | 17022809 | 1049 days ago | IN | 0 ETH | 0.0252516 | ||||
| Request Mint | 17022809 | 1049 days ago | IN | 0 ETH | 0.01345561 | ||||
| Request Mint | 17022775 | 1049 days ago | IN | 0 ETH | 0.0605793 | ||||
| Request Mint | 17022755 | 1049 days ago | IN | 0 ETH | 0.31546252 | ||||
| Request Mint | 16921413 | 1063 days ago | IN | 0.005 ETH | 0.00265305 | ||||
| Request Mint | 16921413 | 1063 days ago | IN | 0.005 ETH | 0.00276289 | ||||
| Request Mint | 16921413 | 1063 days ago | IN | 0.005 ETH | 0.00298327 | ||||
| Request Mint | 16921412 | 1063 days ago | IN | 0.005 ETH | 0.0035635 | ||||
| Request Mint | 16904267 | 1066 days ago | IN | 0.005 ETH | 0.00099666 | ||||
| Request Mint | 16904118 | 1066 days ago | IN | 0.005 ETH | 0.00110629 | ||||
| Request Mint | 16902499 | 1066 days ago | IN | 0.004 ETH | 0.00101338 | ||||
| Request Mint | 16902499 | 1066 days ago | IN | 0.004 ETH | 0.00101338 | ||||
| Request Mint | 16900474 | 1066 days ago | IN | 0.005 ETH | 0.00105501 | ||||
| Request Mint | 16900442 | 1066 days ago | IN | 0.002 ETH | 0.00086645 | ||||
| Request Mint | 16900442 | 1066 days ago | IN | 0.002 ETH | 0.00086866 | ||||
| Request Mint | 16897477 | 1067 days ago | IN | 0.005 ETH | 0.00137632 | ||||
| Request Mint | 16897477 | 1067 days ago | IN | 0.005 ETH | 0.00136368 | ||||
| Request Mint | 16897429 | 1067 days ago | IN | 0.005 ETH | 0.00155167 | ||||
| Request Mint | 16897384 | 1067 days ago | IN | 0.005 ETH | 0.0017561 | ||||
| Request Mint | 16897367 | 1067 days ago | IN | 0.005 ETH | 0.00189969 | ||||
| Request Mint | 16897363 | 1067 days ago | IN | 0.005 ETH | 0.00187568 | ||||
| Request Mint | 16897363 | 1067 days ago | IN | 0.005 ETH | 0.00190449 | ||||
| Request Mint | 16897363 | 1067 days ago | IN | 0.005 ETH | 0.02521866 | ||||
| Request Mint | 16897360 | 1067 days ago | IN | 0.004 ETH | 0.02068204 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Mint | 16921413 | 1063 days ago | 0.001 ETH | ||||
| Mint | 16921413 | 1063 days ago | 0.001 ETH | ||||
| Mint | 16921413 | 1063 days ago | 0.001 ETH | ||||
| Mint | 16921412 | 1063 days ago | 0.001 ETH | ||||
| Mint | 16904267 | 1066 days ago | 0.001 ETH | ||||
| Mint | 16904118 | 1066 days ago | 0.001 ETH | ||||
| Mint | 16902499 | 1066 days ago | 0.001 ETH | ||||
| Mint | 16902499 | 1066 days ago | 0.001 ETH | ||||
| Mint | 16900474 | 1066 days ago | 0.001 ETH | ||||
| Mint | 16900442 | 1066 days ago | 0.001 ETH | ||||
| Mint | 16900442 | 1066 days ago | 0.001 ETH | ||||
| Mint | 16897477 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897477 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897429 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897384 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897367 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897363 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897363 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897363 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897363 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897363 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897363 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897363 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897360 | 1067 days ago | 0.001 ETH | ||||
| Mint | 16897360 | 1067 days ago | 0.001 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
SeretanMintRequester
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "./SeretanMinterFix2.sol";
contract SeretanMintRequester {
function requestMint(
uint256 batchSize,
address minter,
uint256 value,
address collection,
address to,
uint256 currentPhaseNumber,
bytes32[] calldata allowlistProof,
uint256 maxNumberOfMintedToDest
)
public
payable
{
for (uint256 i = 0; i < batchSize; i++) {
SeretanMinterFix2(minter).mint{value: value}(collection, to, currentPhaseNumber, allowlistProof, maxNumberOfMintedToDest);
}
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/security/PullPayment.sol";
import "./ISeretanMinter.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./SeretanMintableFix.sol";
contract SeretanMinterFix2 is PullPayment, ISeretanMinter {
mapping(address => Phase[]) private phaseList;
mapping(address => uint256) private numberOfMinted;
mapping(address => mapping(uint256 => mapping(address => uint256))) private numberOfMintedTo;
mapping(address => uint256) private nextTokenId;
function setPhaseList(
address collection,
Phase[] calldata phaseList_
)
public
{
require(msg.sender == collection || msg.sender == SeretanMintableFix(collection).owner());
_setPhaseList(collection, phaseList_);
}
function _setPhaseList(
address collection,
Phase[] calldata phaseList_
)
internal
{
uint256 i;
for (i = 0; i < phaseList[collection].length && i < phaseList_.length; i++) {
phaseList[collection][i] = phaseList_[i];
}
for (uint256 j = i; j < phaseList_.length; j++) {
phaseList[collection].push(phaseList_[j]);
}
for (uint256 j = phaseList[collection].length; j > phaseList_.length; j--) {
phaseList[collection].pop();
}
}
function mint(
address collection,
address to,
uint256 currentPhaseNumber,
bytes32[] calldata allowlistProof,
uint256 maxNumberOfMintedToDest
)
public
payable
{
require(0 <= currentPhaseNumber && currentPhaseNumber < phaseList[collection].length, "Invalid currentPhaseNumber");
require(phaseList[collection][currentPhaseNumber].startTime <= block.timestamp, "Invalid currentPhaseNumber");
require(currentPhaseNumber+1 == phaseList[collection].length || phaseList[collection][currentPhaseNumber+1].startTime > block.timestamp, "Invalid currentPhaseNumber");
if (phaseList[collection][currentPhaseNumber].allowlistRoot != 0) {
bytes32 allowlistLeaf = keccak256(bytes.concat(keccak256(abi.encode(to, maxNumberOfMintedToDest))));
require(MerkleProof.verifyCalldata(allowlistProof, phaseList[collection][currentPhaseNumber].allowlistRoot, allowlistLeaf), "Not listed on allowlist");
}
require(phaseList[collection][currentPhaseNumber].maxNumberOfMinted > numberOfMinted[collection], "Unable to mint anymore");
require(maxNumberOfMintedToDest > numberOfMintedTo[collection][currentPhaseNumber][to], "Unable to mint anymore");
require(msg.value >= phaseList[collection][currentPhaseNumber].price, "Not enough money");
_mint(collection, to, currentPhaseNumber);
}
function _mint(
address collection,
address to,
uint256 currentPhaseNumber
)
internal
{
numberOfMinted[collection]++;
numberOfMintedTo[collection][currentPhaseNumber][to]++;
_asyncTransfer(SeretanMintableFix(collection).owner(), msg.value);
uint256 tokenId = nextTokenId[collection];
nextTokenId[collection]++;
SeretanMintableFix(collection).safeMint(to, tokenId);
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "./ISeretanMinter.sol";
abstract contract SeretanMintableFix {
address private minter;
constructor(
address minter_,
ISeretanMinter.Phase[] memory phaseList_
)
{
minter = minter_;
ISeretanMinter(minter).setPhaseList(address(this), phaseList_);
}
function setMinter(
address minter_
)
public
virtual
{
require(msg.sender == owner());
_setMinter(minter_);
}
function _setMinter(
address minter_
)
internal
virtual
{
minter = minter_;
}
function safeMint(
address to,
uint256 tokenId
)
public
virtual
{
require(msg.sender == minter);
_safeMint(to, tokenId);
}
function _safeMint(address to, uint256 tokenId) internal virtual;
function owner() public view virtual returns (address);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
interface ISeretanMinter {
struct Phase {
uint256 startTime;
bytes32 allowlistRoot;
uint256 maxNumberOfMinted;
uint256 price;
}
function setPhaseList(address collection, Phase[] calldata phaseList) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/escrow/Escrow.sol)
pragma solidity ^0.8.0;
import "../../access/Ownable.sol";
import "../Address.sol";
/**
* @title Escrow
* @dev Base escrow contract, holds funds designated for a payee until they
* withdraw them.
*
* Intended usage: This contract (and derived escrow contracts) should be a
* standalone contract, that only interacts with the contract that instantiated
* it. That way, it is guaranteed that all Ether will be handled according to
* the `Escrow` rules, and there is no need to check for payable functions or
* transfers in the inheritance tree. The contract that uses the escrow as its
* payment method should be its owner, and provide public methods redirecting
* to the escrow's deposit and withdraw.
*/
contract Escrow is Ownable {
using Address for address payable;
event Deposited(address indexed payee, uint256 weiAmount);
event Withdrawn(address indexed payee, uint256 weiAmount);
mapping(address => uint256) private _deposits;
function depositsOf(address payee) public view returns (uint256) {
return _deposits[payee];
}
/**
* @dev Stores the sent amount as credit to be withdrawn.
* @param payee The destination address of the funds.
*
* Emits a {Deposited} event.
*/
function deposit(address payee) public payable virtual onlyOwner {
uint256 amount = msg.value;
_deposits[payee] += amount;
emit Deposited(payee, amount);
}
/**
* @dev Withdraw accumulated balance for a payee, forwarding all gas to the
* recipient.
*
* WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
* Make sure you trust the recipient, or are either following the
* checks-effects-interactions pattern or using {ReentrancyGuard}.
*
* @param payee The address whose funds will be withdrawn and transferred to.
*
* Emits a {Withdrawn} event.
*/
function withdraw(address payable payee) public virtual onlyOwner {
uint256 payment = _deposits[payee];
_deposits[payee] = 0;
payee.sendValue(payment);
emit Withdrawn(payee, payment);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Tree proofs.
*
* The tree and the proofs can be generated using our
* https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
* You will find a quickstart guide in the readme.
*
* 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.
* OpenZeppelin's JavaScript library generates merkle trees that are safe
* against this attack out of the box.
*/
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 Calldata version of {verify}
*
* _Available since v4.7._
*/
function verifyCalldata(
bytes32[] calldata proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProofCalldata(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++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Calldata version of {processProof}
*
* _Available since v4.7._
*/
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
* `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function multiProofVerify(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProof(proof, proofFlags, leaves) == root;
}
/**
* @dev Calldata version of {multiProofVerify}
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function multiProofVerifyCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProofCalldata(proof, proofFlags, leaves) == root;
}
/**
* @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
* proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
* leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
* respectively.
*
* CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
* is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
* tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
*
* _Available since v4.7._
*/
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Calldata version of {processMultiProof}.
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}// 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.8.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 functionCallWithValue(target, data, 0, "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");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or 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 {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/PullPayment.sol)
pragma solidity ^0.8.0;
import "../utils/escrow/Escrow.sol";
/**
* @dev Simple implementation of a
* https://consensys.github.io/smart-contract-best-practices/development-recommendations/general/external-calls/#favor-pull-over-push-for-external-calls[pull-payment]
* strategy, where the paying contract doesn't interact directly with the
* receiver account, which must withdraw its payments itself.
*
* Pull-payments are often considered the best practice when it comes to sending
* Ether, security-wise. It prevents recipients from blocking execution, and
* eliminates reentrancy concerns.
*
* 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].
*
* To use, derive from the `PullPayment` contract, and use {_asyncTransfer}
* instead of Solidity's `transfer` function. Payees can query their due
* payments with {payments}, and retrieve them with {withdrawPayments}.
*/
abstract contract PullPayment {
Escrow private immutable _escrow;
constructor() {
_escrow = new Escrow();
}
/**
* @dev Withdraw accumulated payments, forwarding all gas to the recipient.
*
* Note that _any_ account can call this function, not just the `payee`.
* This means that contracts unaware of the `PullPayment` protocol can still
* receive funds this way, by having a separate account call
* {withdrawPayments}.
*
* WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
* Make sure you trust the recipient, or are either following the
* checks-effects-interactions pattern or using {ReentrancyGuard}.
*
* @param payee Whose payments will be withdrawn.
*
* Causes the `escrow` to emit a {Withdrawn} event.
*/
function withdrawPayments(address payable payee) public virtual {
_escrow.withdraw(payee);
}
/**
* @dev Returns the payments owed to an address.
* @param dest The creditor's address.
*/
function payments(address dest) public view returns (uint256) {
return _escrow.depositsOf(dest);
}
/**
* @dev Called by the payer to store the sent amount as credit to be pulled.
* Funds sent in this way are stored in an intermediate {Escrow} contract, so
* there is no danger of them being spent before withdrawal.
*
* @param dest The destination address of the funds.
* @param amount The amount to transfer.
*
* Causes the `escrow` to emit a {Deposited} event.
*/
function _asyncTransfer(address dest, uint256 amount) internal virtual {
_escrow.deposit{value: amount}(dest);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 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 {
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);
}
}{
"remappings": [],
"optimizer": {
"enabled": false,
"runs": 200
},
"evmVersion": "london",
"libraries": {},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"batchSize","type":"uint256"},{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"currentPhaseNumber","type":"uint256"},{"internalType":"bytes32[]","name":"allowlistProof","type":"bytes32[]"},{"internalType":"uint256","name":"maxNumberOfMintedToDest","type":"uint256"}],"name":"requestMint","outputs":[],"stateMutability":"payable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b5061045a806100206000396000f3fe60806040526004361061001e5760003560e01c8063b490531e14610023575b600080fd5b61003d600480360381019061003891906101e2565b61003f565b005b60005b898110156100d3578873ffffffffffffffffffffffffffffffffffffffff16635ca22b1e898989898989896040518863ffffffff1660e01b815260040161008e96959493929190610351565b6000604051808303818588803b1580156100a757600080fd5b505af11580156100bb573d6000803e3d6000fd5b505050505080806100cb906103dc565b915050610042565b50505050505050505050565b600080fd5b600080fd5b6000819050919050565b6100fc816100e9565b811461010757600080fd5b50565b600081359050610119816100f3565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061014a8261011f565b9050919050565b61015a8161013f565b811461016557600080fd5b50565b60008135905061017781610151565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126101a2576101a161017d565b5b8235905067ffffffffffffffff8111156101bf576101be610182565b5b6020830191508360208202830111156101db576101da610187565b5b9250929050565b60008060008060008060008060006101008a8c031215610205576102046100df565b5b60006102138c828d0161010a565b99505060206102248c828d01610168565b98505060406102358c828d0161010a565b97505060606102468c828d01610168565b96505060806102578c828d01610168565b95505060a06102688c828d0161010a565b94505060c08a013567ffffffffffffffff811115610289576102886100e4565b5b6102958c828d0161018c565b935093505060e06102a88c828d0161010a565b9150509295985092959850929598565b6102c18161013f565b82525050565b6102d0816100e9565b82525050565b600082825260208201905092915050565b600080fd5b82818337505050565b600061030183856102d6565b93507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115610334576103336102e7565b5b6020830292506103458385846102ec565b82840190509392505050565b600060a08201905061036660008301896102b8565b61037360208301886102b8565b61038060408301876102c7565b81810360608301526103938185876102f5565b90506103a260808301846102c7565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006103e7826100e9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610419576104186103ad565b5b60018201905091905056fea264697066735822122045383b753e0616bf70924d3baff6cb5c179e652ca80a2740812e4beab3ae413864736f6c63430008110033
Deployed Bytecode
0x60806040526004361061001e5760003560e01c8063b490531e14610023575b600080fd5b61003d600480360381019061003891906101e2565b61003f565b005b60005b898110156100d3578873ffffffffffffffffffffffffffffffffffffffff16635ca22b1e898989898989896040518863ffffffff1660e01b815260040161008e96959493929190610351565b6000604051808303818588803b1580156100a757600080fd5b505af11580156100bb573d6000803e3d6000fd5b505050505080806100cb906103dc565b915050610042565b50505050505050505050565b600080fd5b600080fd5b6000819050919050565b6100fc816100e9565b811461010757600080fd5b50565b600081359050610119816100f3565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061014a8261011f565b9050919050565b61015a8161013f565b811461016557600080fd5b50565b60008135905061017781610151565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126101a2576101a161017d565b5b8235905067ffffffffffffffff8111156101bf576101be610182565b5b6020830191508360208202830111156101db576101da610187565b5b9250929050565b60008060008060008060008060006101008a8c031215610205576102046100df565b5b60006102138c828d0161010a565b99505060206102248c828d01610168565b98505060406102358c828d0161010a565b97505060606102468c828d01610168565b96505060806102578c828d01610168565b95505060a06102688c828d0161010a565b94505060c08a013567ffffffffffffffff811115610289576102886100e4565b5b6102958c828d0161018c565b935093505060e06102a88c828d0161010a565b9150509295985092959850929598565b6102c18161013f565b82525050565b6102d0816100e9565b82525050565b600082825260208201905092915050565b600080fd5b82818337505050565b600061030183856102d6565b93507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115610334576103336102e7565b5b6020830292506103458385846102ec565b82840190509392505050565b600060a08201905061036660008301896102b8565b61037360208301886102b8565b61038060408301876102c7565b81810360608301526103938185876102f5565b90506103a260808301846102c7565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006103e7826100e9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610419576104186103ad565b5b60018201905091905056fea264697066735822122045383b753e0616bf70924d3baff6cb5c179e652ca80a2740812e4beab3ae413864736f6c63430008110033
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.