Is it possible to have decimals balances in ERC721 ?
I mean is it possible to say i own 50% of an NFT for example ?
Thanks
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityAccording to several formal implementations, ERC721
is not supposed to a divisible token by itself.
Although, you can deploy an ERC721
through an ERC20
and distribute its shares
using the fungible ERC20
tokens.(not my idea, check below link)
Watch this for full explanation: DeFi + NFT Tutorial | Code a Re-Fungible Token (Solidity + Tests)
Check out the ERC1155
contracts designed by Enjin, they provide a way to set up fractional ownership an asset in a single contract.
OpenZeppelin implementation here
That being said, ERC721
can allow for decimals
as stated in its EIP here:
"An implementation may also include a function decimals that returns uint8(0) if its goal is to be more compatible with ERC-20 while supporting this standard."