Questions tagged [mapping]
The mapping tag has no usage guidance.
2
questions
0
votes
1
answer
66
views
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 ...
4
votes
0
answers
42
views
Migration from legacy HashMap to Mapping
I have following code where I want to use with new Mapping (now it works but with legacy HashMap). I think that the source code below is self-explanatory:
self.balances
.entry(caller)
...