Address Contract Verified
Address
0x05Be534AfEfFDe5ff66e44696b35C2dC0fCDfF90
Balance
0 ETH
Nonce
1
Code Size
2587 bytes
Creator
0x64bF066b...36e2 at tx 0xc2f8c3a5...ddaf2b
Indexed Transactions
0
Contract Bytecode
2587 bytes
0x608060405260043610610071575f3560e01c80638da5cb5b1161004c5780638da5cb5b1461011b578063bb0fcaac14610145578063e4fb794214610164578063f2fde38b14610183575f80fd5b806305806a2c146100c757806336c80ab0146100e8578063715018a614610107575f80fd5b366100c35760405162461bcd60e51b815260206004820152601960248201527f4163636964656e74616c2073656e642070726576656e7465640000000000000060448201526064015b60405180910390fd5b5f80fd5b3480156100d2575f80fd5b506100e66100e13660046107b7565b6101a2565b005b3480156100f3575f80fd5b506100e661010236600461085d565b6102cb565b348015610112575f80fd5b506100e66103c7565b348015610126575f80fd5b505f54604080516001600160a01b039092168252519081900360200190f35b348015610150575f80fd5b506100e661015f366004610895565b6103da565b34801561016f575f80fd5b506100e661017e3660046108f4565b610476565b34801561018e575f80fd5b506100e661019d36600461093a565b61054c565b6101aa6105c5565b825184511480156101bc575081518351145b80156101c9575080518251145b6101e55760405162461bcd60e51b81526004016100ba9061095a565b5f5b81518110156102c45784818151811061020257610202610989565b60200260200101516001600160a01b03166323b872dd85838151811061022a5761022a610989565b602002602001015185848151811061024457610244610989565b602002602001015185858151811061025e5761025e610989565b60200260200101516040518463ffffffff1660e01b81526004016102849392919061099d565b5f604051808303815f87803b15801561029b575f80fd5b505af11580156102ad573d5f803e3d5ffd5b5050505080806102bc906109c1565b9150506101e7565b5050505050565b6102d36105c5565b815183511480156102e5575080518251145b6103015760405162461bcd60e51b81526004016100ba9061095a565b5f5b81518110156102c457846001600160a01b03166323b872dd85838151811061032d5761032d610989565b602002602001015185848151811061034757610347610989565b602002602001015185858151811061036157610361610989565b60200260200101516040518463ffffffff1660e01b81526004016103879392919061099d565b5f604051808303815f87803b15801561039e575f80fd5b505af11580156103b0573d5f803e3d5ffd5b5050505080806103bf906109c1565b915050610303565b6103cf6105c5565b6103d85f61061e565b565b6103e26105c5565b5f5b81518110156102c457846001600160a01b03166323b872dd858585858151811061041057610410610989565b60200260200101516040518463ffffffff1660e01b81526004016104369392919061099d565b5f604051808303815f87803b15801561044d575f80fd5b505af115801561045f573d5f803e3d5ffd5b50505050808061046e906109c1565b9150506103e4565b61047e6105c5565b805182511461049f5760405162461bcd60e51b81526004016100ba9061095a565b5f5b81518110156102c457846001600160a01b03166323b872dd858584815181106104cc576104cc610989565b60200260200101518585815181106104e6576104e6610989565b60200260200101516040518463ffffffff1660e01b815260040161050c9392919061099d565b5f604051808303815f87803b158015610523575f80fd5b505af1158015610535573d5f803e3d5ffd5b505050508080610544906109c1565b9150506104a1565b6105546105c5565b6001600160a01b0381166105b95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016100ba565b6105c28161061e565b50565b5f546001600160a01b031633146103d85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100ba565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106aa576106aa61066d565b604052919050565b5f67ffffffffffffffff8211156106cb576106cb61066d565b5060051b60200190565b80356001600160a01b03811681146106eb575f80fd5b919050565b5f82601f8301126106ff575f80fd5b8135602061071461070f836106b2565b610681565b82815260059290921b84018101918181019086841115610732575f80fd5b8286015b8481101561075457610747816106d5565b8352918301918301610736565b509695505050505050565b5f82601f83011261076e575f80fd5b8135602061077e61070f836106b2565b82815260059290921b8401810191818101908684111561079c575f80fd5b8286015b8481101561075457803583529183019183016107a0565b5f805f80608085870312156107ca575f80fd5b843567ffffffffffffffff808211156107e1575f80fd5b6107ed888389016106f0565b95506020870135915080821115610802575f80fd5b61080e888389016106f0565b94506040870135915080821115610823575f80fd5b61082f888389016106f0565b93506060870135915080821115610844575f80fd5b506108518782880161075f565b91505092959194509250565b5f805f8060808587031215610870575f80fd5b610879856106d5565b9350602085013567ffffffffffffffff80821115610802575f80fd5b5f805f80608085870312156108a8575f80fd5b6108b1856106d5565b93506108bf602086016106d5565b92506108cd604086016106d5565b9150606085013567ffffffffffffffff8111156108e8575f80fd5b6108518782880161075f565b5f805f8060808587031215610907575f80fd5b610910856106d5565b935061091e602086016106d5565b9250604085013567ffffffffffffffff80821115610823575f80fd5b5f6020828403121561094a575f80fd5b610953826106d5565b9392505050565b602080825260159082015274082e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f600182016109de57634e487b7160e01b5f52601160045260245ffd5b506001019056fea2646970667358221220b5233695a3645de142eb462e78797367b0b221193066453da425627a43bea86f64736f6c63430008140033
Verified Source Code Full Match
Compiler: v0.8.20+commit.a1b79de6
EVM: shanghai
Optimization: Yes (200 runs)
Simple721Distro.sol 67 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Simple721Distro is Ownable {
receive() external payable {
revert("Accidental send prevented");
}
function distribute(
address _token,
address _from,
address _to,
uint256[] memory _tokenIds
) public onlyOwner {
for (uint256 i = 0; i < _tokenIds.length; i++) {
IERC721(_token).transferFrom(_from, _to, _tokenIds[i]);
}
}
function distributeBatch(
address _token,
address _from,
address[] memory _to,
uint256[] memory _tokenIds
) public onlyOwner {
require(_to.length == _tokenIds.length, "Array length mismatch");
for (uint256 i = 0; i < _tokenIds.length; i++) {
IERC721(_token).transferFrom(_from, _to[i], _tokenIds[i]);
}
}
function distributeMultiHolderBatch(
address _token,
address[] memory _from,
address[] memory _to,
uint256[] memory _tokenIds
) public onlyOwner {
require(
_from.length == _to.length && _to.length == _tokenIds.length,
"Array length mismatch"
);
for (uint256 i = 0; i < _tokenIds.length; i++) {
IERC721(_token).transferFrom(_from[i], _to[i], _tokenIds[i]);
}
}
function distributeMultiTokenBatch(
address[] memory _token,
address[] memory _from,
address[] memory _to,
uint256[] memory _tokenIds
) public onlyOwner {
require(
_token.length == _from.length &&
_from.length == _to.length &&
_to.length == _tokenIds.length,
"Array length mismatch"
);
for (uint256 i = 0; i < _tokenIds.length; i++) {
IERC721(_token[i]).transferFrom(_from[i], _to[i], _tokenIds[i]);
}
}
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
IERC721.sol 145 lines
// 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);
}
IERC165.sol 25 lines
// 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);
}
Read Contract
owner 0x8da5cb5b → address
Write Contract 6 functions
These functions modify contract state and require a wallet transaction to execute.
distribute 0xbb0fcaac
address _token
address _from
address _to
uint256[] _tokenIds
distributeBatch 0xe4fb7942
address _token
address _from
address[] _to
uint256[] _tokenIds
distributeMultiHolderBatch 0x36c80ab0
address _token
address[] _from
address[] _to
uint256[] _tokenIds
distributeMultiTokenBatch 0x05806a2c
address[] _token
address[] _from
address[] _to
uint256[] _tokenIds
renounceOwnership 0x715018a6
No parameters
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address