Hi,
I built an ERC-1155 smart contract using OpenZeppelin libraries and I cannot perform two transfers of a token with the same ID using the same origin and destination address. The error that happens is "a transfer with that token id was already performed to the address"
Can you please explain me why I cannot make two transfers of a specific token ID using the same participants?
First transfer executes ok:
- _to: address1
- _from: address2
- _ids: [1]
- _amount: [500]
- _data: ['0x']
Second transfer throws the error:
- _to: address1
- _from: address2
- _ids: [1]
- _amount: [500]
- _data: ['0x']
Below is an extract of my smart contract and the method I am calling. The safeBatchTransferFrom method is throwing the error.
Thanks in advance
Guzmán
pragma solidity 0.8.28;
import '@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol';
contract SincroniaRegistry is ERC1155SupplyUpgradeable, ERC1888Extension {
function batchTransfer(
address _to,
address _from,
uint256[] calldata _ids,
uint256[] calldata _amount,
bytes[] calldata _data
) external override returns (uint256[] memory ids) {
safeBatchTransferFrom(_from, _to, _ids, _amount, new bytes(0));
emit TransferBatch(_from, _to, _ids, _amount, _data);
}
}