Hello, I have a little question. If I create NFT from a SC contract with 10% royalties for example. Then the nft is sold on a marketplace, the royalties come automatically on the SC if it is payable, right ? So If I want to get the royalties, I need to write a function in the smartcontract to send the balance of the SC to the owner of the SC. But what if the royalties are not in EGLD, how do I get rhe royalties, are they "blocked" on the smart-contrat ?
Nope. You have to claim them through this endpoint: https://github.com/ElrondNetwork/sc-nft-marketplace/blob/abb5ee95e8ea9485cc837f0613d2b98a575321f9/esdt-nft-marketplace/src/marketplace_main.rs#L356
If you deployed your sc as payable it can receive any payments egld or esdt :)
Yes such a function would probably be a good idea. But I think some marketplaces are already switching to another approach where the sc has to actively claim the royalties, so you can be sure that there is no payable flag problem.
Not sure if thats still that way :)
Nope. You have to claim them through this endpoint: https://github.com/ElrondNetwork/sc-nft-marketplace/blob/abb5ee95e8ea9485cc837f0613d2b98a575321f9/esdt-nft-marketplace/src/marketplace_main.rs#L356
If you deployed your sc as payable it can receive any payments egld or esdt :) Yes such a function would probably be a good idea. But I think some marketplaces are already switching to another approach where the sc has to actively claim the royalties, so you can be sure that there is no payable flag problem. Not sure if thats still that way :)