APE Price: $0.72 (+0.78%)

Contract

0x1B31EDd05ac988C2E1fF6F92d631c186b27256Ce

Overview

APE Balance

Apechain LogoApechain LogoApechain Logo0 APE

APE Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

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 transferFrom(address from, address to, uint256 tokenId) external;
    function ownerOf(uint256 tokenId) external view returns (address);
    function setApprovalForAll(address operator, bool approved) external;
}

contract BatchTransfer {

    address public nftContractAddress;

    // Constructor to initialize the NFT contract address
    constructor(address _nftContractAddress) {
        nftContractAddress = _nftContractAddress;
    }

    // Batch transfer function
    function batchTransfer(address[] calldata to, uint256[] calldata tokenIds) external {
        require(to.length == tokenIds.length, "Arrays must be the same length");

        IERC721 nftContract = IERC721(nftContractAddress);

        for (uint256 i = 0; i < tokenIds.length; i++) {
            address tokenOwner = nftContract.ownerOf(tokenIds[i]);
            require(tokenOwner == msg.sender, "You do not own this token");

            nftContract.transferFrom(msg.sender, to[i], 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":"_nftContractAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"batchTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nftContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6080604052348015600f57600080fd5b50604051610489380380610489833981016040819052602c916050565b600080546001600160a01b0319166001600160a01b0392909216919091179055607e565b600060208284031215606157600080fd5b81516001600160a01b0381168114607757600080fd5b9392505050565b6103fc8061008d6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806388d695b21461003b578063aae282e114610050575b600080fd5b61004e6100493660046102e6565b61007f565b005b600054610063906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b8281146100d35760405162461bcd60e51b815260206004820152601e60248201527f417272617973206d757374206265207468652073616d65206c656e677468000060448201526064015b60405180910390fd5b600080546001600160a01b0316905b82811015610292576000826001600160a01b0316636352211e86868581811061010d5761010d610357565b905060200201356040518263ffffffff1660e01b815260040161013291815260200190565b602060405180830381865afa15801561014f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101739190610385565b90506001600160a01b03811633146101cd5760405162461bcd60e51b815260206004820152601960248201527f596f7520646f206e6f74206f776e207468697320746f6b656e0000000000000060448201526064016100ca565b826001600160a01b03166323b872dd338989868181106101ef576101ef610357565b905060200201602081019061020491906103a9565b88888781811061021657610216610357565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561026d57600080fd5b505af1158015610281573d6000803e3d6000fd5b5050600190930192506100e2915050565b505050505050565b60008083601f8401126102ac57600080fd5b50813567ffffffffffffffff8111156102c457600080fd5b6020830191508360208260051b85010111156102df57600080fd5b9250929050565b600080600080604085870312156102fc57600080fd5b843567ffffffffffffffff81111561031357600080fd5b61031f8782880161029a565b909550935050602085013567ffffffffffffffff81111561033f57600080fd5b61034b8782880161029a565b95989497509550505050565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038116811461038257600080fd5b50565b60006020828403121561039757600080fd5b81516103a28161036d565b9392505050565b6000602082840312156103bb57600080fd5b81356103a28161036d56fea264697066735822122007f3d7812382049c949b1766fb1b06f7d4e5ec3811d07d80e27058d53ef0918b64736f6c634300081b003300000000000000000000000022526ada48dd610fb48e7f8b7b496b597c043fc4

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100365760003560e01c806388d695b21461003b578063aae282e114610050575b600080fd5b61004e6100493660046102e6565b61007f565b005b600054610063906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b8281146100d35760405162461bcd60e51b815260206004820152601e60248201527f417272617973206d757374206265207468652073616d65206c656e677468000060448201526064015b60405180910390fd5b600080546001600160a01b0316905b82811015610292576000826001600160a01b0316636352211e86868581811061010d5761010d610357565b905060200201356040518263ffffffff1660e01b815260040161013291815260200190565b602060405180830381865afa15801561014f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101739190610385565b90506001600160a01b03811633146101cd5760405162461bcd60e51b815260206004820152601960248201527f596f7520646f206e6f74206f776e207468697320746f6b656e0000000000000060448201526064016100ca565b826001600160a01b03166323b872dd338989868181106101ef576101ef610357565b905060200201602081019061020491906103a9565b88888781811061021657610216610357565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561026d57600080fd5b505af1158015610281573d6000803e3d6000fd5b5050600190930192506100e2915050565b505050505050565b60008083601f8401126102ac57600080fd5b50813567ffffffffffffffff8111156102c457600080fd5b6020830191508360208260051b85010111156102df57600080fd5b9250929050565b600080600080604085870312156102fc57600080fd5b843567ffffffffffffffff81111561031357600080fd5b61031f8782880161029a565b909550935050602085013567ffffffffffffffff81111561033f57600080fd5b61034b8782880161029a565b95989497509550505050565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038116811461038257600080fd5b50565b60006020828403121561039757600080fd5b81516103a28161036d565b9392505050565b6000602082840312156103bb57600080fd5b81356103a28161036d56fea264697066735822122007f3d7812382049c949b1766fb1b06f7d4e5ec3811d07d80e27058d53ef0918b64736f6c634300081b0033

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

00000000000000000000000022526ada48dd610fb48e7f8b7b496b597c043fc4

-----Decoded View---------------
Arg [0] : _nftContractAddress (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

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.