CosmWasm / CosmWasm/cw-storage-plus

Add soft delete to Deque

Open
#57 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
51
Forks
36
PR merge metrics
No merged PRs in 30d

Description

Problem

We have a lot of records in ### Deque. We want to clear all records from Deque
In our cases we don't need to clear the data on the blockchain, we can overwrite it

Solution

I suggest adding a method clear for soft delete that sets Tail to 0.

OR

Change visibility methods from private to public

tail
head
set_tail
set_head
Temporary Solution

Now, I need to do it manually through the code

let full_key = namespaces_with_key(&["players".as_bytes()], b"t");
ctx.deps.storage.set(&full_key, &(0 as u32).to_be_bytes());

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Deque implementation and examining the existing tail, head, set_tail, and set_head methods. Clarify whether the intended API is a clear method or public visibility changes, then define how soft deletion should behave and how completion will be verified against the manual storage update shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.