modulecreate

package
v0.0.0-...-7149754 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGenesisTest

func AddGenesisTest(appPath, appName, modulePath, moduleName string, isIBC bool) (*genny.Generator, error)

AddGenesisTest returns the generator to generate genesis_test.go files

func AddMsgServerConventionToLegacyModule

func AddMsgServerConventionToLegacyModule(replacer placeholder.Replacer, opts *MsgServerOptions) (*genny.Generator, error)

AddMsgServerConventionToLegacyModule add the files and the necessary modifications to an existing module that doesn't support MsgServer convention https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-031-msg-service.md

func AddSimulation

func AddSimulation(appPath, modulePath, moduleName string, params ...field.Field) (*genny.Generator, error)

AddSimulation returns the generator to generate module_simulation.go file

func NewIBC

func NewIBC(replacer placeholder.Replacer, opts *CreateOptions) (*genny.Generator, error)

NewIBC returns the generator to scaffold the implementation of the IBCModule interface inside a module

func NewStargate

func NewStargate(opts *CreateOptions) (*genny.Generator, error)

NewStargate returns the generator to scaffold a module inside a Stargate app

func NewStargateAppModify

func NewStargateAppModify(replacer placeholder.Replacer, opts *CreateOptions) *genny.Generator

NewStargateAppModify returns generator with modifications required to register a module in the app.

Types

type CreateOptions

type CreateOptions struct {
	ModuleName string
	ModulePath string
	AppName    string
	AppPath    string
	Params     field.Fields

	// True if the module should implement the IBC module interface
	IsIBC bool

	// Channel ordering of the IBC module: ordered, unordered or none
	IBCOrdering string

	// Dependencies of the module
	Dependencies []Dependency
}

CreateOptions represents the options to scaffold a Cosmos SDK module

func (*CreateOptions) Validate

func (opts *CreateOptions) Validate() error

Validate that options are usable

type Dependency

type Dependency struct {
	Name       string
	KeeperName string // KeeperName represents the name of the keeper for the module in app.go
}

Dependency represents a module dependency of a module

func NewDependency

func NewDependency(name, keeperName string) Dependency

NewDependency returns a new dependency object

type MsgServerOptions

type MsgServerOptions struct {
	ModuleName string
	ModulePath string
	AppName    string
	AppPath    string
}

MsgServerOptions defines options to add MsgServer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL