Skip to content

rename associated type "Config" in the module trait to something that better illustrates its use #544

Open
@dubbelosix

Description

@dubbelosix

Summary

Currently the Module trait requires has the following structure:

pub trait Module {
    type Context;
    type Config;
    type CallMessage;

    fn genesis()
    fn call()
}

all the names are intuitive except "Config". it would be nicer and more informative if Config is renamed to something like GenesisConfig or Genesis or InitConfig. Realized this when i was explaining the demo-rollup and had to clarify what Config meant because it was not immediately clear.

For example, for the module SimpleToken, we create a struct SimpleToken and the SimpleTokenConfig and its not very clear to the user that SimpleTokenConfig is meant for storing the genesis info. Would suggest using Genesis for the associated type and for the examples to use SimpleTokenGenesis, BankGenesis etc.

Open to other names as well :)

Metadata

Metadata

Labels

SmallUse this label for quick cleanup and maintenance tasksusabilitySomething that makes it easier to use or operate Sovereign SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions