Hello! I have a quick question about sell_nft from the send API. To be used, the smart contract needs to own the amount of toke we're trying to send right? There is no way to have the buyer send a payment to the smart contract with also the approval (signature) of the owner so the sale happen in one step?
Don't really get your question tbh ????
Starting Point:
User has egld (or an esdt) to pay the token
SmartContract has the nft to sell
Nft Creator has nothing
Start of the contract execution:
User "lost" his egld. (he sent them to the sc).
SmartContract has now egld and the nft.
Nft Creator has still nothing
You call the sell_nft method:
User has now the nft.
SmartContract has egld - royalties.
NftCreator has the royalties.
You can then proceed to send the egld - royalties to the seller (or you store them until he claims them, etc.)
Don't really get your question tbh ???? Starting Point: User has egld (or an esdt) to pay the token SmartContract has the nft to sell Nft Creator has nothing Start of the contract execution: User "lost" his egld. (he sent them to the sc). SmartContract has now egld and the nft. Nft Creator has still nothing You call the sell_nft method: User has now the nft. SmartContract has egld - royalties. NftCreator has the royalties. You can then proceed to send the egld - royalties to the seller (or you store them until he claims them, etc.)