Documentation ¶
Index ¶
- Constants
- Variables
- func GenesisStateWithValSet(app *SettlusApp, genesisState simapp.GenesisState, ...) simapp.GenesisState
- func MakeEncodingConfig() simappparams.EncodingConfig
- func NewDefaultGenesisState() simapp.GenesisState
- func ObservabilityViews() (views []*view.View)
- type AppKeepers
- func (appKeepers *AppKeepers) GenerateKeys()
- func (appKeepers *AppKeepers) GetKVStoreKey() map[string]*storetypes.KVStoreKey
- func (appKeepers *AppKeepers) GetKey(storeKey string) *storetypes.KVStoreKey
- func (appKeepers *AppKeepers) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (appKeepers *AppKeepers) GetMemoryStoreKey() map[string]*storetypes.MemoryStoreKey
- func (appKeepers *AppKeepers) GetSubspace(moduleName string) paramstypes.Subspace
- func (appKeepers *AppKeepers) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (appKeepers *AppKeepers) GetTransientStoreKey() map[string]*storetypes.TransientStoreKey
- type SettlusApp
- func (app *SettlusApp) AppCodec() codec.Codec
- func (app *SettlusApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *SettlusApp) BlockedModuleAccountAddrs() map[string]bool
- func (app *SettlusApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
- func (app *SettlusApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *SettlusApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *SettlusApp) GetBaseApp() *baseapp.BaseApp
- func (app *SettlusApp) GetIBCKeeper() *ibckeeper.Keeper
- func (app *SettlusApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *SettlusApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *SettlusApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *SettlusApp) GetStakingKeeper() ibctestingtypes.StakingKeeper
- func (app *SettlusApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *SettlusApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *SettlusApp) GetTxConfig() client.TxConfig
- func (app *SettlusApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *SettlusApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *SettlusApp) LegacyAmino() *codec.LegacyAmino
- func (app *SettlusApp) LoadHeight(height int64) error
- func (app *SettlusApp) ModuleAccountAddrs() map[string]bool
- func (app *SettlusApp) Name() string
- func (app *SettlusApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *SettlusApp) RegisterNodeService(clientCtx client.Context)
- func (app *SettlusApp) RegisterTendermintService(clientCtx client.Context)
- func (app *SettlusApp) RegisterTxService(clientCtx client.Context)
- func (app *SettlusApp) SimulationManager() *module.SimulationManager
Constants ¶
const (
Name = "settlus"
)
Variables ¶
var DefaultConsensusParams = &tmproto.ConsensusParams{ Block: &tmproto.BlockParams{ MaxBytes: 200000, MaxGas: -1, }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ tmtypes.ABCIPubKeyTypeEd25519, }, }, }
DefaultConsensusParams defines the default Tendermint consensus params used in Settlus testing.
var DefaultNodeHome string
DefaultNodeHome default home directories for the application daemon
var ( // ModuleBasics defines the module BasicManager is in charge of setting up basic, // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, authzmodule.AppModuleBasic{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, erc20client.RegisterERC20ProposalHandler, erc20client.ToggleTokenConversionProposalHandler, }, ), sdkparams.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, ibctm.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{AppModuleBasic: &ibctransfer.AppModuleBasic{}}, consensus.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, erc20.AppModuleBasic{}, settlementmodule.AppModuleBasic{}, oraclemodule.AppModuleBasic{}, ) )
module account permissions
Functions ¶
func GenesisStateWithValSet ¶
func GenesisStateWithValSet(app *SettlusApp, genesisState simapp.GenesisState, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance, ) simapp.GenesisState
func MakeEncodingConfig ¶
func MakeEncodingConfig() simappparams.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() simapp.GenesisState
NewDefaultGenesisState generates the default state for the application.
func ObservabilityViews ¶
Types ¶
type AppKeepers ¶
type AppKeepers struct { // SDK Keepers AccountKeeper authkeeper.AccountKeeper AuthzKeeper authzkeeper.Keeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper CrisisKeeper *crisiskeeper.Keeper DistrKeeper distrkeeper.Keeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper GovKeeper *govkeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper TransferKeeper transferkeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper // IBC Keepers IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper // this line is used by starport scaffolding # stargate/app/keeperDeclaration // Evmos keepers EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper Erc20Keeper erc20keeper.Keeper // Settlus keepers SettlementKeeper *settlementmodulekeeper.SettlementKeeper OracleKeeper *oraclemodulekeeper.Keeper // contains filtered or unexported fields }
func NewAppKeeper ¶
func NewAppKeeper( appCodec codec.Codec, bApp *baseapp.BaseApp, legacyAmino *codec.LegacyAmino, maccPerms map[string][]string, blockedAddress map[string]bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, logger log.Logger, appOpts servertypes.AppOptions, ) AppKeepers
func (*AppKeepers) GenerateKeys ¶
func (appKeepers *AppKeepers) GenerateKeys()
func (*AppKeepers) GetKVStoreKey ¶
func (appKeepers *AppKeepers) GetKVStoreKey() map[string]*storetypes.KVStoreKey
func (*AppKeepers) GetKey ¶
func (appKeepers *AppKeepers) GetKey(storeKey string) *storetypes.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*AppKeepers) GetMemKey ¶
func (appKeepers *AppKeepers) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*AppKeepers) GetMemoryStoreKey ¶
func (appKeepers *AppKeepers) GetMemoryStoreKey() map[string]*storetypes.MemoryStoreKey
func (*AppKeepers) GetSubspace ¶
func (appKeepers *AppKeepers) GetSubspace(moduleName string) paramstypes.Subspace
GetSubspace returns a param subspace for a given module name.
func (*AppKeepers) GetTKey ¶
func (appKeepers *AppKeepers) GetTKey(storeKey string) *storetypes.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*AppKeepers) GetTransientStoreKey ¶
func (appKeepers *AppKeepers) GetTransientStoreKey() map[string]*storetypes.TransientStoreKey
type SettlusApp ¶
type SettlusApp struct { *baseapp.BaseApp AppKeepers // contains filtered or unexported fields }
SettlusApp extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.
func NewSettlus ¶
func NewSettlus( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *SettlusApp
NewSettlus returns a reference to an initialized blockchain app
func Setup ¶
func Setup( isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, chainID string, ) *SettlusApp
Setup initializes a new App. A Nop logger is set in App.
func (*SettlusApp) AppCodec ¶
func (app *SettlusApp) AppCodec() codec.Codec
AppCodec returns Settlus's app codec.
NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.
func (*SettlusApp) BeginBlocker ¶
func (app *SettlusApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker runs the Tendermint ABCI BeginBlock logic. It executes state changes at the beginning of the new block for every registered module. If there is a registered fork at the current height, BeginBlocker will schedule the upgrade plan and perform the state migration (if any).
func (*SettlusApp) BlockedModuleAccountAddrs ¶
func (app *SettlusApp) BlockedModuleAccountAddrs() map[string]bool
BlockedModuleAccountAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*SettlusApp) DeliverTx ¶
func (app *SettlusApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
The DeliverTx method is intentionally decomposed to calculate the transactions per second.
func (*SettlusApp) EndBlocker ¶
func (app *SettlusApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block
func (*SettlusApp) ExportAppStateAndValidators ¶
func (app *SettlusApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*SettlusApp) GetBaseApp ¶
func (app *SettlusApp) GetBaseApp() *baseapp.BaseApp
GetBaseApp implements the TestingApp interface.
func (*SettlusApp) GetIBCKeeper ¶
func (app *SettlusApp) GetIBCKeeper() *ibckeeper.Keeper
GetIBCKeeper implements the TestingApp interface.
func (*SettlusApp) GetKey ¶
func (app *SettlusApp) GetKey(storeKey string) *storetypes.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*SettlusApp) GetMemKey ¶
func (app *SettlusApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*SettlusApp) GetScopedIBCKeeper ¶
func (app *SettlusApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
GetScopedIBCKeeper implements the TestingApp interface.
func (*SettlusApp) GetStakingKeeper ¶
func (app *SettlusApp) GetStakingKeeper() ibctestingtypes.StakingKeeper
GetStakingKeeper implements the TestingApp interface.
func (*SettlusApp) GetSubspace ¶
func (app *SettlusApp) GetSubspace(moduleName string) paramstypes.Subspace
GetSubspace returns a param subspace for a given module name.
NOTE: This is solely to be used for testing purposes.
func (*SettlusApp) GetTKey ¶
func (app *SettlusApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*SettlusApp) GetTxConfig ¶
func (app *SettlusApp) GetTxConfig() client.TxConfig
GetTxConfig implements the TestingApp interface.
func (*SettlusApp) InitChainer ¶
func (app *SettlusApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization
func (*SettlusApp) InterfaceRegistry ¶
func (app *SettlusApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Settlus's InterfaceRegistry
func (*SettlusApp) LegacyAmino ¶
func (app *SettlusApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns Settlus's amino codec.
NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.
func (*SettlusApp) LoadHeight ¶
func (app *SettlusApp) LoadHeight(height int64) error
LoadHeight loads state at a particular height
func (*SettlusApp) ModuleAccountAddrs ¶
func (app *SettlusApp) ModuleAccountAddrs() map[string]bool
ModuleAccountAddrs returns all the app's module account addresses.
func (*SettlusApp) RegisterAPIRoutes ¶
func (app *SettlusApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*SettlusApp) RegisterNodeService ¶
func (app *SettlusApp) RegisterNodeService(clientCtx client.Context)
RegisterNodeService registers the node gRPC service on the provided application gRPC query router.
func (*SettlusApp) RegisterTendermintService ¶
func (app *SettlusApp) RegisterTendermintService(clientCtx client.Context)
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*SettlusApp) RegisterTxService ¶
func (app *SettlusApp) RegisterTxService(clientCtx client.Context)
func (*SettlusApp) SimulationManager ¶
func (app *SettlusApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface