Questions tagged [remove-all]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

how to remove Mapping storage when tuple is used as input

Lets assume we have an ink! smart contract On a vanilla Mapping alpha: Mapping<[u8;32], Astruct> we can use self.alpha.remove(&somehash) My question is this: if we have the following ...
Sokrates's user avatar
  • 409
0 votes
1 answer

When to use StorageDoubleMap `clear_prefix` vs `drain_prefix`?

Hey Substrate community, there are two different methods to remove multiple items for one specific first key from a StorageDoubleMap. There is clear_prefix and drain_prefix. clear_prefix provides ...
Chralt's user avatar
  • 523
12 votes
1 answer

Multiple remove_all calls in same block

I stumbled upon an unexpected behavior when doing storage migration. Problem Description I want to clean-up a large DoubleStorageMap in multiple steps. And that works just fine, however I also want to ...
Dinonard's user avatar
  • 562