Genesis state defines the initial state of the module to be used to setup the module.
// GenesisState defines the permissions module's genesis state.typeGenesisStatestruct {// params defines the parameters of the module. Params Params`protobuf:"bytes,1,opt,name=params,proto3" json:"params"` Namespaces []Namespace`protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces"`}
Params
The permissions module doesn't use any params.
// Params defines the parameters for the permissions module.typeParamsstruct { WasmHookQueryMaxGas uint64 `protobuf:"varint,1,opt,name=wasm_hook_query_max_gas,json=wasmHookQueryMaxGas,proto3" json:"wasm_hook_query_max_gas,omitempty"`
}
Namespaces
Addresses can create permissioned namespaces with new denoms. Namespaces define roles and actions that users in the namespace are allowed or disallowed to perform or be.
Within a namespace, MintsPaused, SendsPaused and BurnsPaused determine whether new tokens can minted, sent or burnt. They can be updated only by the Denom admin.
Roles
Roles are strings in a namespace where each role has specific permissions.
Actions are powers of two used to denote different types of actions, Action_UNSPECIFIED = 0, Action_MINT = 1, Action_RECEIVE = 2 and Action_BURN = 4.
// each Action enum value should be a power of twotypeActionint32
Role
Role stores the name of the role and actions allowed to the role.
// Role is only used for storagetypeRolestruct { Name string`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Permissions uint32`protobuf:"varint,2,opt,name=permissions,proto3" json:"permissions,omitempty"`}
RoleIDs
RoleIDs stores IDs for the roles.
// used in storagetypeRoleIDsstruct { RoleIds []uint32`protobuf:"varint,1,rep,packed,name=role_ids,json=roleIds,proto3" json:"role_ids,omitempty"`}
Voucher
A Voucher holds tokens from all failed transactions until the original receiver has RECEIVE permissions.