Skip to content

Why you use Addr as keys in Maps? #295

@pronvis

Description

@pronvis

Hey guys, thanks for your work!
Have a little question :)
Why you use Addr(which is a String actually) as a key in Maps? Here for example?

Here CosmWasm docs saying (and I agree):

This means that if message.signer is always the string address that signed
 the transaction and I use it to look up your account balance, if this encoding
 ever changed, then you lose access to your account. We clearly need
 a stable identifier to work with internally.

It is possible for address string representation to change, so ideally we all (smart contracts dev) should use CanonicalAddr as a key for Maps.

So, Why?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions