3 ms·
web3 dev here. nft contracts are turing complete. you can put whatever code you want in them. usually people inherit the openzeppelen base nft contract which do
by wegfawefgawefg 4y ago
web3 dev here.
nft contracts are turing complete. you can put whatever code you want in them. usually people inherit the openzeppelen base nft contract which doesnt have royalties turned on by default (perhaps new version has the functionality already implemented. but you can (and its not that uncommon) to go in the ownership transfer function and add a fractional fee that either goes to the contract host or a creators address. its very very trivial to do. and ive seen it a zilion times.
3 lines of code.
if ur a coder go check out the openzeppelin nft contract and find the function used for transfer of ownership. and look up the "payable" and payment functionality in solidity. if not then youll never understand what im saying anyways hahahaha. base concept though is correct. royalties are contractual, settable, and enforced by the contract. no way around them when theyre there