Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsafe storage key in near_contract_standards #1141

Open
hanakannzashi opened this issue Feb 9, 2024 · 0 comments
Open

Unsafe storage key in near_contract_standards #1141

hanakannzashi opened this issue Feb 9, 2024 · 0 comments
Labels

Comments

@hanakannzashi
Copy link
Contributor

Storage key for non-fungible token is unsafe, this may be conflict with user's custom storage key if user define the same first storage key variant.
e.g.

#[derive(BorshSerialize, BorshStorageKey)]
enum StorageKey {
    MyKey {
        account_hash: Vec<u8>
    },
    // other variants
}

https://github.com/near/near-sdk-rs/blob/master/near-contract-standards/src/non_fungible_token/core/core_impl.rs#L54:L58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants