NFT
NFT copied to clipboard
Bug by reusing Set with the same prefix
In the following line the contract reuses the Set, by using the same prefix for all users https://github.com/near-examples/NFT/blob/bbafd2195d4f6253d84a8cced560fda10fd51d35/contracts/rust/src/lib.rs#L81
The prefix should uniquely identify the collection. Right now it uses the same prefix for access for all users.
One option is to use prefix like like access-<account_id_hash>
In the near-sdk
FT implementation the contract uses the account-id-hash
without prefix:
https://github.com/near/near-sdk-rs/blob/b8277e009e1d7d8a95faa0b77d99ded0b8afc81d/examples/fungible-token/src/lib.rs#L36
fixed since implementation has changed