Hello. I’m a little confused about implementing the approveTransfer functionality in a extension contract.
First, I’m only interested in having the extension approve transfers for a specific token (set using tokenID)
Second, I’m not sure I understand how to implement these functions properly. I looked at the SoulBound token contract, but that looks like it’s for the creator contract, not a specific token ID.
Here’s some sample code I’m playing with.
function approveTokenTransfer(uint256 _tokenID) external adminRequired {
IERC1155CreatorExtensionApproveTransfer(_core).approveTransfer(operator, from, to, tokenIds, amounts);
//Not sure how these params are set? Is this call coming from the core contract? How is a tokenID identified?
}
function setApproveTokenTransfer(bool _enabled) external adminRequired {
address creator = _core;
bool enabled = _enabled;
Docs say this is called by a creator contract, but not sure how a specific token ID is specified.
IERC1155CreatorExtensionApproveTransfer().setApproveTransfer(creator, enabled);
}
Thanks.