NFT icon indicating copy to clipboard operation
NFT copied to clipboard

Bug by reusing Set with the same prefix

Open evgenykuzyakov opened this issue 4 years ago • 1 comments

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>

evgenykuzyakov avatar Jun 01 '20 16:06 evgenykuzyakov

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

evgenykuzyakov avatar Jun 01 '20 17:06 evgenykuzyakov

fixed since implementation has changed

gagdiez avatar Oct 21 '23 14:10 gagdiez