Overview
APE Balance
APE Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
TransferToNull
Compiler Version
v0.8.27+commit.40a35a09
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC721A { function ownerOf(uint256 tokenId) external view returns (address); function transferFrom(address from, address to, uint256 tokenId) external; } contract TransferToNull { address public nftContractAddress; // Constructor to set the NFT contract address constructor(address _nftContractAddress) { nftContractAddress = _nftContractAddress; } // Function to transfer multiple NFTs to the null address (0x0) function transferToNull(uint256[] calldata tokenIds) external { IERC721A nft = IERC721A(nftContractAddress); for (uint256 i = 0; i < tokenIds.length; i++) { uint256 tokenId = tokenIds[i]; // Ensure the caller owns the token address owner = nft.ownerOf(tokenId); require(owner == msg.sender, "You must own the token to transfer it"); // Transfer the token to the null address (0x0) nft.transferFrom(owner, address(0), tokenId); } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "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":"_nftContractAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"nftContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"transferToNull","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052348015600f57600080fd5b5060405161038d38038061038d833981016040819052602c916050565b600080546001600160a01b0319166001600160a01b0392909216919091179055607e565b600060208284031215606157600080fd5b81516001600160a01b0381168114607757600080fd5b9392505050565b6103008061008d6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063aae282e11461003b578063e44feaf51461006a575b600080fd5b60005461004e906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b61007d61007836600461020d565b61007f565b005b600080546001600160a01b0316905b828110156102075760008484838181106100aa576100aa610284565b9050602002013590506000836001600160a01b0316636352211e836040518263ffffffff1660e01b81526004016100e391815260200190565b602060405180830381865afa158015610100573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610124919061029a565b90506001600160a01b03811633146101905760405162461bcd60e51b815260206004820152602560248201527f596f75206d757374206f776e2074686520746f6b656e20746f207472616e7366604482015264195c881a5d60da1b606482015260840160405180910390fd5b6040516323b872dd60e01b81526001600160a01b03828116600483015260006024830152604482018490528516906323b872dd90606401600060405180830381600087803b1580156101e157600080fd5b505af11580156101f5573d6000803e3d6000fd5b50506001909401935061008e92505050565b50505050565b6000806020838503121561022057600080fd5b823567ffffffffffffffff81111561023757600080fd5b8301601f8101851361024857600080fd5b803567ffffffffffffffff81111561025f57600080fd5b8560208260051b840101111561027457600080fd5b6020919091019590945092505050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156102ac57600080fd5b81516001600160a01b03811681146102c357600080fd5b939250505056fea264697066735822122044128a5adb7dcd778ab6ab3ff737b70b70a20c815af1cd0e55d4db33a95167ab64736f6c634300081b003300000000000000000000000019e79f9db731b92f581d3ef0e6328ae918bb88ce
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063aae282e11461003b578063e44feaf51461006a575b600080fd5b60005461004e906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b61007d61007836600461020d565b61007f565b005b600080546001600160a01b0316905b828110156102075760008484838181106100aa576100aa610284565b9050602002013590506000836001600160a01b0316636352211e836040518263ffffffff1660e01b81526004016100e391815260200190565b602060405180830381865afa158015610100573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610124919061029a565b90506001600160a01b03811633146101905760405162461bcd60e51b815260206004820152602560248201527f596f75206d757374206f776e2074686520746f6b656e20746f207472616e7366604482015264195c881a5d60da1b606482015260840160405180910390fd5b6040516323b872dd60e01b81526001600160a01b03828116600483015260006024830152604482018490528516906323b872dd90606401600060405180830381600087803b1580156101e157600080fd5b505af11580156101f5573d6000803e3d6000fd5b50506001909401935061008e92505050565b50505050565b6000806020838503121561022057600080fd5b823567ffffffffffffffff81111561023757600080fd5b8301601f8101851361024857600080fd5b803567ffffffffffffffff81111561025f57600080fd5b8560208260051b840101111561027457600080fd5b6020919091019590945092505050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156102ac57600080fd5b81516001600160a01b03811681146102c357600080fd5b939250505056fea264697066735822122044128a5adb7dcd778ab6ab3ff737b70b70a20c815af1cd0e55d4db33a95167ab64736f6c634300081b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000019e79f9db731b92f581d3ef0e6328ae918bb88ce
-----Decoded View---------------
Arg [0] : _nftContractAddress (address): 0x19E79f9db731b92f581D3Ef0E6328ae918bb88CE
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000019e79f9db731b92f581d3ef0e6328ae918bb88ce
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.