ETH Price: $3,235.56 (-0.58%)
Gas: 1 Gwei

Contract

0xd246bdF46c3A4BB74e80B444d18f0944CDFdB8e7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Mint175276872023-06-21 11:17:47402 days ago1687346267IN
0xd246bdF4...4CDFdB8e7
0.02 ETH0.006451318.2976903
Mint175261132023-06-21 5:59:35402 days ago1687327175IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0026997112.92688064
Mint175078012023-06-18 16:18:35405 days ago1687105115IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0035712416.87376955
Mint174411932023-06-09 7:26:47414 days ago1686295607IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0043343620.75399945
Mint174382992023-06-08 21:40:47415 days ago1686260447IN
0xd246bdF4...4CDFdB8e7
0.05 ETH0.01994425.81531311
Mint174381672023-06-08 21:13:59415 days ago1686258839IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0049998823.6239256
Mint174381442023-06-08 21:09:23415 days ago1686258563IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0049735323.81446449
Mint174379852023-06-08 20:37:11415 days ago1686256631IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0046347722.19241342
Mint174369862023-06-08 17:14:59415 days ago1686244499IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0079406637.52093912
Mint174369832023-06-08 17:14:23415 days ago1686244463IN
0xd246bdF4...4CDFdB8e7
0.02 ETH0.0130878437.12200867
Mint174224502023-06-06 15:59:59417 days ago1686067199IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.006642831.80736658
Mint174213472023-06-06 12:15:59417 days ago1686053759IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0073111934.54463285
Mint174213392023-06-06 12:14:23417 days ago1686053663IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0059912228.30788053
Mint174213342023-06-06 12:13:23417 days ago1686053603IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0053518425.28688871
Mint174213262023-06-06 12:11:47417 days ago1686053507IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0048705323.01277125
Mint174120222023-06-05 4:41:11419 days ago1685940071IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0044373120.96582933
Mint174120112023-06-05 4:38:59419 days ago1685939939IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0043021820.59987994
Mint174006082023-06-03 13:59:47420 days ago1685800787IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0061185228.90936432
Mint174005082023-06-03 13:39:11420 days ago1685799551IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0062550729.55454554
Mint174005002023-06-03 13:37:35420 days ago1685799455IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0060293428.48800928
Mint173851702023-06-01 9:48:11422 days ago1685612891IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0060097528.39543378
Mint173851622023-06-01 9:46:35422 days ago1685612795IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.00632729.89441019
Mint173563982023-05-28 8:41:23426 days ago1685263283IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0053040125.06092737
Mint173563882023-05-28 8:39:23426 days ago1685263163IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0052535125.15508579
Mint173546352023-05-28 2:45:47427 days ago1685241947IN
0xd246bdF4...4CDFdB8e7
0.01 ETH0.0057428527.13435536
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
175276872023-06-21 11:17:47402 days ago1687346267
0xd246bdF4...4CDFdB8e7
0.02 ETH
175261132023-06-21 5:59:35402 days ago1687327175
0xd246bdF4...4CDFdB8e7
0.01 ETH
175078012023-06-18 16:18:35405 days ago1687105115
0xd246bdF4...4CDFdB8e7
0.01 ETH
174411932023-06-09 7:26:47414 days ago1686295607
0xd246bdF4...4CDFdB8e7
0.01 ETH
174382992023-06-08 21:40:47415 days ago1686260447
0xd246bdF4...4CDFdB8e7
0.05 ETH
174381672023-06-08 21:13:59415 days ago1686258839
0xd246bdF4...4CDFdB8e7
0.01 ETH
174381442023-06-08 21:09:23415 days ago1686258563
0xd246bdF4...4CDFdB8e7
0.01 ETH
174379852023-06-08 20:37:11415 days ago1686256631
0xd246bdF4...4CDFdB8e7
0.01 ETH
174369862023-06-08 17:14:59415 days ago1686244499
0xd246bdF4...4CDFdB8e7
0.01 ETH
174369832023-06-08 17:14:23415 days ago1686244463
0xd246bdF4...4CDFdB8e7
0.02 ETH
174224502023-06-06 15:59:59417 days ago1686067199
0xd246bdF4...4CDFdB8e7
0.01 ETH
174213472023-06-06 12:15:59417 days ago1686053759
0xd246bdF4...4CDFdB8e7
0.01 ETH
174213392023-06-06 12:14:23417 days ago1686053663
0xd246bdF4...4CDFdB8e7
0.01 ETH
174213342023-06-06 12:13:23417 days ago1686053603
0xd246bdF4...4CDFdB8e7
0.01 ETH
174213262023-06-06 12:11:47417 days ago1686053507
0xd246bdF4...4CDFdB8e7
0.01 ETH
174120222023-06-05 4:41:11419 days ago1685940071
0xd246bdF4...4CDFdB8e7
0.01 ETH
174120112023-06-05 4:38:59419 days ago1685939939
0xd246bdF4...4CDFdB8e7
0.01 ETH
174006082023-06-03 13:59:47420 days ago1685800787
0xd246bdF4...4CDFdB8e7
0.01 ETH
174005082023-06-03 13:39:11420 days ago1685799551
0xd246bdF4...4CDFdB8e7
0.01 ETH
174005002023-06-03 13:37:35420 days ago1685799455
0xd246bdF4...4CDFdB8e7
0.01 ETH
173851702023-06-01 9:48:11422 days ago1685612891
0xd246bdF4...4CDFdB8e7
0.01 ETH
173851622023-06-01 9:46:35422 days ago1685612795
0xd246bdF4...4CDFdB8e7
0.01 ETH
173563982023-05-28 8:41:23426 days ago1685263283
0xd246bdF4...4CDFdB8e7
0.01 ETH
173563882023-05-28 8:39:23426 days ago1685263163
0xd246bdF4...4CDFdB8e7
0.01 ETH
173546352023-05-28 2:45:47427 days ago1685241947
0xd246bdF4...4CDFdB8e7
0.01 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
KEYSFactory

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : KEYSFactory.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;

import "contracts/lib/IMintableNft.sol";

contract KEYSFactory {
    IMintableNft public nft;
    uint256 public price = 1e16;
    address _rewardAddress;

    constructor(address nftAddress) {
        nft = IMintableNft(nftAddress);
        _rewardAddress = msg.sender;
    }

    function mint(address to, uint256 count) external payable {
        uint256 needEth = this.priceOf(count);
        require(msg.value >= needEth, "not enough eth");
        for (uint256 i = 0; i < count; ++i) nft.mint(to);
        sendEth(_rewardAddress, needEth);
        sendEth(msg.sender, msg.value - needEth);
    }

    function priceOf(uint256 count) external view returns (uint256) {
        return count * price;
    }

    function sendEth(address addr, uint256 ethCount) internal {
        if (ethCount <= 0) return;
        (bool sent, ) = addr.call{value: ethCount}("");
        require(sent, "ethereum is not sent");
    }
}

File 2 of 4 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 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 ERC721
     * 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 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);
}

File 3 of 4 : IERC165.sol
// 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);
}

File 4 of 4 : IMintableNft.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface IMintableNft is IERC721 {
    function mint(address to) external;

    function maxMintCount() external pure returns (uint256);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"nftAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"nft","outputs":[{"internalType":"contract IMintableNft","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"priceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6080604052662386f26fc1000060015534801561001b57600080fd5b5060405161048b38038061048b83398101604081905261003a91610068565b600080546001600160a01b039092166001600160a01b03199283161790556002805490911633179055610098565b60006020828403121561007a57600080fd5b81516001600160a01b038116811461009157600080fd5b9392505050565b6103e4806100a76000396000f3fe60806040526004361061003f5760003560e01c806340c10f191461004457806347ccca0214610059578063a035b1fe14610096578063b9186d7d146100ba575b600080fd5b6100576100523660046102eb565b6100da565b005b34801561006557600080fd5b50600054610079906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a257600080fd5b506100ac60015481565b60405190815260200161008d565b3480156100c657600080fd5b506100ac6100d5366004610323565b61022f565b60405163b9186d7d60e01b815260048101829052600090309063b9186d7d90602401602060405180830381865afa158015610119573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061013d919061033c565b9050803410156101855760405162461bcd60e51b815260206004820152600e60248201526d0dcdee840cadcdeeaced040cae8d60931b60448201526064015b60405180910390fd5b60005b82811015610200576000546040516335313c2160e11b81526001600160a01b03868116600483015290911690636a62784290602401600060405180830381600087803b1580156101d757600080fd5b505af11580156101eb573d6000803e3d6000fd5b50505050806101f99061036b565b9050610188565b50600254610217906001600160a01b031682610245565b61022a336102258334610384565b610245565b505050565b60006001548261023f9190610397565b92915050565b60008111610251575050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461029e576040519150601f19603f3d011682016040523d82523d6000602084013e6102a3565b606091505b505090508061022a5760405162461bcd60e51b8152602060048201526014602482015273195d1a195c995d5b481a5cc81b9bdd081cd95b9d60621b604482015260640161017c565b600080604083850312156102fe57600080fd5b82356001600160a01b038116811461031557600080fd5b946020939093013593505050565b60006020828403121561033557600080fd5b5035919050565b60006020828403121561034e57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60006001820161037d5761037d610355565b5060010190565b8181038181111561023f5761023f610355565b808202811582820484141761023f5761023f61035556fea264697066735822122028739bc3e9bcf52353e7dc28f62ce703429a9022fd35c1d36512440e669da75564736f6c63430008110033000000000000000000000000393170cc267d510eb434836285da981a1f69d78d

Deployed Bytecode

0x60806040526004361061003f5760003560e01c806340c10f191461004457806347ccca0214610059578063a035b1fe14610096578063b9186d7d146100ba575b600080fd5b6100576100523660046102eb565b6100da565b005b34801561006557600080fd5b50600054610079906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a257600080fd5b506100ac60015481565b60405190815260200161008d565b3480156100c657600080fd5b506100ac6100d5366004610323565b61022f565b60405163b9186d7d60e01b815260048101829052600090309063b9186d7d90602401602060405180830381865afa158015610119573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061013d919061033c565b9050803410156101855760405162461bcd60e51b815260206004820152600e60248201526d0dcdee840cadcdeeaced040cae8d60931b60448201526064015b60405180910390fd5b60005b82811015610200576000546040516335313c2160e11b81526001600160a01b03868116600483015290911690636a62784290602401600060405180830381600087803b1580156101d757600080fd5b505af11580156101eb573d6000803e3d6000fd5b50505050806101f99061036b565b9050610188565b50600254610217906001600160a01b031682610245565b61022a336102258334610384565b610245565b505050565b60006001548261023f9190610397565b92915050565b60008111610251575050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461029e576040519150601f19603f3d011682016040523d82523d6000602084013e6102a3565b606091505b505090508061022a5760405162461bcd60e51b8152602060048201526014602482015273195d1a195c995d5b481a5cc81b9bdd081cd95b9d60621b604482015260640161017c565b600080604083850312156102fe57600080fd5b82356001600160a01b038116811461031557600080fd5b946020939093013593505050565b60006020828403121561033557600080fd5b5035919050565b60006020828403121561034e57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60006001820161037d5761037d610355565b5060010190565b8181038181111561023f5761023f610355565b808202811582820484141761023f5761023f61035556fea264697066735822122028739bc3e9bcf52353e7dc28f62ce703429a9022fd35c1d36512440e669da75564736f6c63430008110033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000393170cc267d510eb434836285da981a1f69d78d

-----Decoded View---------------
Arg [0] : nftAddress (address): 0x393170CC267d510Eb434836285DA981A1f69D78D

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000393170cc267d510eb434836285da981a1f69d78d


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.