Documentation ¶
Index ¶
- Constants
- Variables
- func AddCoinsToAcc(app *SimApp, ctx sdk.Context, addr sdk.AccAddress, toAdd sdk.Coins)
- func AddTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress
- func MakeCodec() *codec.Codec
- type SimApp
- func (app *SimApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *SimApp) BlacklistedAccAddrs() map[string]bool
- func (app *SimApp) Codec() *codec.Codec
- func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *SimApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
- func (app *SimApp) GetAppModuleGenesis(ctx sdk.Context, moduleName string) module.AppModule
- func (app *SimApp) GetKey(storeKey string) types.StoreKey
- func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *SimApp) LoadHeight(height int64) error
- func (app *SimApp) ModuleAccountAddrs() map[string]bool
- func (app *SimApp) SimulationManager() *module.SimulationManager
Constants ¶
const ( // AppName specifies the global application name. AppName = "CertiK" // DefaultKeyPass for certikd node daemon. DefaultKeyPass = "12345678" )
Variables ¶
var ( // DefaultCLIHome specifies where the node client data is stored. DefaultCLIHome = os.ExpandEnv("$HOME/.certikcli") // DefaultNodeHome specifies where the node daemon data is stored. DefaultNodeHome = os.ExpandEnv("$HOME/.certikd") // ModuleBasics is in charge of setting up basic, non-dependant module // elements, such as codec registration and genesis verification. ModuleBasics = module.NewBasicManager( genutil.AppModuleBasic{}, auth.AppModuleBasic{}, bank.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( distr.ProposalHandler, upgrade.ProposalHandler, cert.ProposalHandler, paramsclient.ProposalHandler, shield.ProposalHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, supply.AppModuleBasic{}, upgrade.AppModuleBasic{}, cvm.NewAppModuleBasic(), cert.NewAppModuleBasic(), oracle.NewAppModuleBasic(), shield.NewAppModuleBasic(), ) )
Functions ¶
func AddCoinsToAcc ¶
AddCoins adds coins to an account and increments the total supply accordingly.
func AddTestAddrs ¶
AddTestAddrs constructs and returns accNum amount of accounts with an initial balance of accAmt
Types ¶
type SimApp ¶
type SimApp struct { *bam.BaseApp AccountKeeper auth.AccountKeeper BankKeeper bank.Keeper StakingKeeper staking.Keeper SlashingKeeper slashing.Keeper MintKeeper mint.Keeper DistrKeeper distr.Keeper CrisisKeeper crisis.Keeper SupplyKeeper supply.Keeper ParamsKeeper params.Keeper UpgradeKeeper upgrade.Keeper GovKeeper gov.Keeper CertKeeper cert.Keeper CvmKeeper cvm.Keeper AuthKeeper auth.Keeper OracleKeeper oracle.Keeper ShieldKeeper shield.Keeper // contains filtered or unexported fields }
SimApp is the simulated CertiK Chain application type.
func NewSimApp ¶
func NewSimApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, invCheckPeriod uint, baseAppOptions ...func(*bam.BaseApp)) *SimApp
NewSimApp returns a reference to an initialized SimApp.
func (*SimApp) BeginBlocker ¶
func (app *SimApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker processes application updates at the beginning of each block.
func (*SimApp) BlacklistedAccAddrs ¶
BlacklistedAccAddrs returns all the app's module account addresses black listed for receiving tokens.
func (*SimApp) EndBlocker ¶
func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker processes application updates at the end of each block.
func (*SimApp) ExportAppStateAndValidators ¶
func (app *SimApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) ( appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
ExportAppStateAndValidators exports the application state for a genesis file.
func (*SimApp) GetAppModuleGenesis ¶ added in v1.3.0
func (*SimApp) InitChainer ¶
func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer defines application update at chain initialization
func (*SimApp) LoadHeight ¶
LoadHeight loads a particular height
func (*SimApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*SimApp) SimulationManager ¶
func (app *SimApp) SimulationManager() *module.SimulationManager
SimulationManager returns app.sm.