ERC-721 3% fee to founder with every sale

Hello everyone,

I'm thinking how I can add a fee of 3% of the transfer cost that should been added to been send to a static wallet address.
So that the founder earns x percent on every sale.

Is something possible like this?

Thanks in advance.

Hi.

Yes, you are talking about royalties. The new version of the contracts library includes ERC721 royalties managements, you could inherit from it on your NFT contract and use it to store and retrieve the information of who the royalties should be send to.

Hope this helps!