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

Store commitments under a prefixed store #3923

Open
benluelo opened this issue Mar 4, 2025 · 0 comments
Open

Store commitments under a prefixed store #3923

benluelo opened this issue Mar 4, 2025 · 0 comments
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR.

Comments

@benluelo
Copy link
Contributor

benluelo commented Mar 4, 2025

this function:

fn store_commit(deps: DepsMut, key: &H256, value: &H256) -> Result<(), ContractError> {
deps.storage.set(key.as_ref(), value.as_ref());
Ok(())
}

should use a prefixed store, and not commit directly at the root of the contract. this will allow for more easily iterating the store, and remove any potential collisions with other storages in the contract.

this should probably be implemented as part of the migration to depolama (#3919)

@benluelo benluelo added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR.
Projects
None yet
Development

No branches or pull requests

1 participant