hey there,
i want to send 4 nfts all by one from a address to a new address with one click.
interface IERC721 {
function safeTransferFrom(address _from, address _to, uint256 _tokenId) external;
}
contract BulkTransferer {
IERC721 collection;
address owner;
constructor() {
owner = msg.sender;
}
modifier isOwner {
require(msg.sender == owner);
_;
}
function bulkTransfer(address _from, address _to, uint256[] memory _tokenIds, address[] memory contracts) external {
for (uint256 i = 0; i < _tokenIds.length; i++) {
collection = IERC721(contracts[i]);
collection.safeTransferFrom(_from, _to, _tokenIds[i]);
}
}
I created this contract. Is it done like so ? I dont wanna waste money without it beeing checked