Similar to set_approval_for_all, implement another storage entry as set_approval_for_transfer.
This is necessary for the auction house, since we don't want to change the ownership of the NFT while allowing the auction house to transfer the token after the auction is done.
Add extra field: sender
The way it should work - first you check if sender is the owner, then if he's approved for all and then if he's approved for the transfer. If any of those is true, call sender.require_auth() and follow with the transaction (notice that from should always point to the main account you are transferring from - if owner transfers it, from and sender will contain the same data).
Similar to
set_approval_for_all
, implement another storage entry asset_approval_for_transfer
. This is necessary for the auction house, since we don't want to change the ownership of the NFT while allowing the auction house to transfer the token after the auction is done.After that, modify
safe_transfer_from
signatureAdd extra field:
sender
The way it should work - first you check if sender is the owner, then if he's approved for all and then if he's approved for the transfer. If any of those is true, callsender.require_auth()
and follow with the transaction (notice thatfrom
should always point to the main account you are transferring from - if owner transfers it,from
andsender
will contain the same data).