Discover more of Etherscan's tools and services in one place.
Sponsored
Contract Source Code:
File 1 of 1 : ERC721BatchTransfer.sol<i class='far fa-question-circle text-muted ms-2' data-bs-trigger='hover' data-bs-toggle='tooltip' data-bs-html='true' data-bs-title='Click on the check box to select individual contract to compare. Only 1 contract can be selected from each side.'></i>
// ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── // ─██████──────────██████─██████████████─██████████─██████████████████────────██████████████─██████████████─██████──██████─ // ─██░░██──────────██░░██─██░░░░░░░░░░██─██░░░░░░██─██░░░░░░░░░░░░░░██────────██░░░░░░░░░░██─██░░░░░░░░░░██─██░░██──██░░██─ // ─██░░██──────────██░░██─██░░██████████─████░░████─████████████░░░░██────────██░░██████████─██████░░██████─██░░██──██░░██─ // ─██░░██──────────██░░██─██░░██───────────██░░██───────────████░░████────────██░░██─────────────██░░██─────██░░██──██░░██─ // ─██░░██──██████──██░░██─██░░██████████───██░░██─────────████░░████──────────██░░██████████─────██░░██─────██░░██████░░██─ // ─██░░██──██░░██──██░░██─██░░░░░░░░░░██───██░░██───────████░░████────────────██░░░░░░░░░░██─────██░░██─────██░░░░░░░░░░██─ // ─██░░██──██░░██──██░░██─██░░██████████───██░░██─────████░░████──────────────██░░██████████─────██░░██─────██░░██████░░██─ // ─██░░██████░░██████░░██─██░░██───────────██░░██───████░░████────────────────██░░██─────────────██░░██─────██░░██──██░░██─ // ─██░░░░░░░░░░░░░░░░░░██─██░░██████████─████░░████─██░░░░████████████─██████─██░░██████████─────██░░██─────██░░██──██░░██─ // ─██░░██████░░██████░░██─██░░░░░░░░░░██─██░░░░░░██─██░░░░░░░░░░░░░░██─██░░██─██░░░░░░░░░░██─────██░░██─────██░░██──██░░██─ // ─██████──██████──██████─██████████████─██████████─██████████████████─██████─██████████████─────██████─────██████──██████─ // ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; interface ERC721Partial { function transferFrom(address from, address to, uint256 tokenId) external; function safeTransferFrom(address from, address to, uint256 tokenId) external; } contract BatchTransfer { /// @notice Tokens on the given ERC-721 contract are transferred from you to a list of recipients. /// Don't forget to execute setApprovalForAll first to authorize this contract. /// @param tokenContract An ERC-721 contract /// @param recipients Who gets the tokens? /// @param tokenIds Which token IDs are transferred? function batchTransfer(ERC721Partial tokenContract, address[] calldata recipients, uint256[] calldata tokenIds) external { for (uint256 index; index < tokenIds.length; index++) { tokenContract.transferFrom(msg.sender, recipients[index], tokenIds[index]); } } /// @notice Tokens on the given ERC-721 contract are transferred from you to a list of recipients. /// Don't forget to execute setApprovalForAll first to authorize this contract. /// @param tokenContract An ERC-721 contract /// @param recipients Who gets the tokens? /// @param tokenIds Which token IDs are transferred? function batchSafeTransfer(ERC721Partial tokenContract, address[] calldata recipients, uint256[] calldata tokenIds) external { for (uint256 index; index < tokenIds.length; index++) { tokenContract.safeTransferFrom(msg.sender, recipients[index], tokenIds[index]); } } }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
My Name Tag:
Private Note:
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.