Closed hu55a1n1 closed 2 years ago
Regarding Path
as a trait, I think it's more intuitive to have a concrete type (i.e. store::Path
) that is used as a key
for the KV store. Each module may then define its own Path
type (expected to be an enum) with all possible paths accessed by the module represented as enum variants. Each module may additionally define conversion methods to/from store::Path
.
Description
Identifier
is and validate it in accordance with ICS024.Path
should ideally be a trait. Must provide methods for splitting into componentIdentifiers
, append, etc.basecoin-rs/src/app/store.rs:Identifier::is_valid()
withibc-rs/modules/src/ics24_host/validate.rs:validate_identifier()
.ibc-rs/modules/src/ics24_host/identifier.rs:{ChainId, ClientId, *}
inbasecoin-rs/src/app/modules/ibc.rs
.ibc-rs/modules/src/ics24_host/path.rs:29
.