APE Price: $0.74 (+1.13%)

Contract

0xDe71781ac47F0eb01c9BC24627866002e6b46BF3

Overview

APE Balance

Apechain LogoApechain LogoApechain Logo0 APE

APE Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Approve Batch Tr...41800372024-11-12 22:09:0593 days ago1731449345IN
0xDe71781a...2e6b46BF3
0 APE0.0014406625.42069

Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BatchTransfer

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 1 : Test.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC721 {
    function setApprovalForAll(address operator, bool approved) external;
    function safeTransferFrom(address from, address to, uint256 tokenId) external;
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

contract BatchTransfer {
    address public nftContract;

    // Constructor to set the NFT contract address
    constructor(address _nftContract) {
        nftContract = _nftContract;
    }

    // Function for the owner to set approval for the batch transfer contract on the NFT contract
    function approveBatchTransferContract() external {
        IERC721(nftContract).setApprovalForAll(address(this), true);
    }

    // Function to batch transfer ERC721 tokens from a single owner to a recipient
    function batchTransfer(
        address from,
        address to,
        uint256[] calldata tokenIds
    ) external {
        require(tokenIds.length > 0, "No tokens provided for transfer");

        // Ensure that the contract is approved to transfer tokens
        require(IERC721(nftContract).isApprovedForAll(from, address(this)), "Contract not approved for transfer");

        for (uint256 i = 0; i < tokenIds.length; i++) {
            IERC721(nftContract).safeTransferFrom(from, to, tokenIds[i]);
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_nftContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"approveBatchTransferContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"batchTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nftContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6080604052348015600f57600080fd5b50604051610479380380610479833981016040819052602c916050565b600080546001600160a01b0319166001600160a01b0392909216919091179055607e565b600060208284031215606157600080fd5b81516001600160a01b0381168114607757600080fd5b9392505050565b6103ec8061008d6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80633593cebc14610046578063d56d229d1461005b578063df17c1421461008a575b600080fd5b6100596100543660046102e3565b610092565b005b60005461006e906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b610059610261565b806100e45760405162461bcd60e51b815260206004820152601f60248201527f4e6f20746f6b656e732070726f766964656420666f72207472616e736665720060448201526064015b60405180910390fd5b60005460405163e985e9c560e01b81526001600160a01b0386811660048301523060248301529091169063e985e9c590604401602060405180830381865afa158015610134573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101589190610377565b6101af5760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206e6f7420617070726f76656420666f72207472616e736660448201526132b960f11b60648201526084016100db565b60005b8181101561025a576000546001600160a01b03166342842e0e86868686868181106101df576101df6103a0565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561023657600080fd5b505af115801561024a573d6000803e3d6000fd5b5050600190920191506101b29050565b5050505050565b60005460405163a22cb46560e01b8152306004820152600160248201526001600160a01b039091169063a22cb46590604401600060405180830381600087803b1580156102ad57600080fd5b505af11580156102c1573d6000803e3d6000fd5b50505050565b80356001600160a01b03811681146102de57600080fd5b919050565b600080600080606085870312156102f957600080fd5b610302856102c7565b9350610310602086016102c7565b9250604085013567ffffffffffffffff81111561032c57600080fd5b8501601f8101871361033d57600080fd5b803567ffffffffffffffff81111561035457600080fd5b8760208260051b840101111561036957600080fd5b949793965060200194505050565b60006020828403121561038957600080fd5b8151801515811461039957600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fdfea26469706673582212201326b51eeb961e874724fd2ae4b1100314b67b6ebb22d1c9366130826465f51364736f6c634300081b003300000000000000000000000022526ada48dd610fb48e7f8b7b496b597c043fc4

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c80633593cebc14610046578063d56d229d1461005b578063df17c1421461008a575b600080fd5b6100596100543660046102e3565b610092565b005b60005461006e906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b610059610261565b806100e45760405162461bcd60e51b815260206004820152601f60248201527f4e6f20746f6b656e732070726f766964656420666f72207472616e736665720060448201526064015b60405180910390fd5b60005460405163e985e9c560e01b81526001600160a01b0386811660048301523060248301529091169063e985e9c590604401602060405180830381865afa158015610134573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101589190610377565b6101af5760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206e6f7420617070726f76656420666f72207472616e736660448201526132b960f11b60648201526084016100db565b60005b8181101561025a576000546001600160a01b03166342842e0e86868686868181106101df576101df6103a0565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561023657600080fd5b505af115801561024a573d6000803e3d6000fd5b5050600190920191506101b29050565b5050505050565b60005460405163a22cb46560e01b8152306004820152600160248201526001600160a01b039091169063a22cb46590604401600060405180830381600087803b1580156102ad57600080fd5b505af11580156102c1573d6000803e3d6000fd5b50505050565b80356001600160a01b03811681146102de57600080fd5b919050565b600080600080606085870312156102f957600080fd5b610302856102c7565b9350610310602086016102c7565b9250604085013567ffffffffffffffff81111561032c57600080fd5b8501601f8101871361033d57600080fd5b803567ffffffffffffffff81111561035457600080fd5b8760208260051b840101111561036957600080fd5b949793965060200194505050565b60006020828403121561038957600080fd5b8151801515811461039957600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fdfea26469706673582212201326b51eeb961e874724fd2ae4b1100314b67b6ebb22d1c9366130826465f51364736f6c634300081b0033

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

00000000000000000000000022526ada48dd610fb48e7f8b7b496b597c043fc4

-----Decoded View---------------
Arg [0] : _nftContract (address): 0x22526aDa48Dd610Fb48E7f8b7B496b597C043fC4

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000022526ada48dd610fb48e7f8b7b496b597c043fc4


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
[ 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.