Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 227 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 17527687 | 559 days ago | IN | 0.02 ETH | 0.0064513 | ||||
Mint | 17526113 | 559 days ago | IN | 0.01 ETH | 0.00269971 | ||||
Mint | 17507801 | 562 days ago | IN | 0.01 ETH | 0.00357124 | ||||
Mint | 17441193 | 571 days ago | IN | 0.01 ETH | 0.00433436 | ||||
Mint | 17438299 | 572 days ago | IN | 0.05 ETH | 0.019944 | ||||
Mint | 17438167 | 572 days ago | IN | 0.01 ETH | 0.00499988 | ||||
Mint | 17438144 | 572 days ago | IN | 0.01 ETH | 0.00497353 | ||||
Mint | 17437985 | 572 days ago | IN | 0.01 ETH | 0.00463477 | ||||
Mint | 17436986 | 572 days ago | IN | 0.01 ETH | 0.00794066 | ||||
Mint | 17436983 | 572 days ago | IN | 0.02 ETH | 0.01308784 | ||||
Mint | 17422450 | 574 days ago | IN | 0.01 ETH | 0.0066428 | ||||
Mint | 17421347 | 574 days ago | IN | 0.01 ETH | 0.00731119 | ||||
Mint | 17421339 | 574 days ago | IN | 0.01 ETH | 0.00599122 | ||||
Mint | 17421334 | 574 days ago | IN | 0.01 ETH | 0.00535184 | ||||
Mint | 17421326 | 574 days ago | IN | 0.01 ETH | 0.00487053 | ||||
Mint | 17412022 | 576 days ago | IN | 0.01 ETH | 0.00443731 | ||||
Mint | 17412011 | 576 days ago | IN | 0.01 ETH | 0.00430218 | ||||
Mint | 17400608 | 577 days ago | IN | 0.01 ETH | 0.00611852 | ||||
Mint | 17400508 | 577 days ago | IN | 0.01 ETH | 0.00625507 | ||||
Mint | 17400500 | 577 days ago | IN | 0.01 ETH | 0.00602934 | ||||
Mint | 17385170 | 579 days ago | IN | 0.01 ETH | 0.00600975 | ||||
Mint | 17385162 | 579 days ago | IN | 0.01 ETH | 0.006327 | ||||
Mint | 17356398 | 583 days ago | IN | 0.01 ETH | 0.00530401 | ||||
Mint | 17356388 | 583 days ago | IN | 0.01 ETH | 0.00525351 | ||||
Mint | 17354635 | 584 days ago | IN | 0.01 ETH | 0.00574285 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
17527687 | 559 days ago | 0.02 ETH | ||||
17526113 | 559 days ago | 0.01 ETH | ||||
17507801 | 562 days ago | 0.01 ETH | ||||
17441193 | 571 days ago | 0.01 ETH | ||||
17438299 | 572 days ago | 0.05 ETH | ||||
17438167 | 572 days ago | 0.01 ETH | ||||
17438144 | 572 days ago | 0.01 ETH | ||||
17437985 | 572 days ago | 0.01 ETH | ||||
17436986 | 572 days ago | 0.01 ETH | ||||
17436983 | 572 days ago | 0.02 ETH | ||||
17422450 | 574 days ago | 0.01 ETH | ||||
17421347 | 574 days ago | 0.01 ETH | ||||
17421339 | 574 days ago | 0.01 ETH | ||||
17421334 | 574 days ago | 0.01 ETH | ||||
17421326 | 574 days ago | 0.01 ETH | ||||
17412022 | 576 days ago | 0.01 ETH | ||||
17412011 | 576 days ago | 0.01 ETH | ||||
17400608 | 577 days ago | 0.01 ETH | ||||
17400508 | 577 days ago | 0.01 ETH | ||||
17400500 | 577 days ago | 0.01 ETH | ||||
17385170 | 579 days ago | 0.01 ETH | ||||
17385162 | 579 days ago | 0.01 ETH | ||||
17356398 | 583 days ago | 0.01 ETH | ||||
17356388 | 583 days ago | 0.01 ETH | ||||
17354635 | 584 days ago | 0.01 ETH |
Loading...
Loading
Contract Name:
KEYSFactory
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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"); } }
// 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); }
// 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: 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); }
{ "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
[{"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"}]
Contract Creation Code
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
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.