Documentation ¶
Index ¶
- Variables
- func GetMaccPerms() map[string][]string
- func Int64ToBytes(i int64) []byte
- func NewDefaultGenesisState() simapp.GenesisState
- func RandomAccounts(r *rand.Rand, n int) []simtypes.Account
- func RandomGenesisAccounts(simState *module.SimulationState) authtypes.GenesisAccounts
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func StateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simtypes.AppStateFn
- type EventLog
- type EventLogNew
- type TreasurenetApp
- func (app *TreasurenetApp) AppCodec() codec.Codec
- func (app *TreasurenetApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *TreasurenetApp) BlockedAddrs() map[string]bool
- func (app *TreasurenetApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *TreasurenetApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *TreasurenetApp) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *TreasurenetApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *TreasurenetApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *TreasurenetApp) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *TreasurenetApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *TreasurenetApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *TreasurenetApp) LegacyAmino() *codec.LegacyAmino
- func (app *TreasurenetApp) LoadHeight(height int64) error
- func (app *TreasurenetApp) ModuleAccountAddrs() map[string]bool
- func (app *TreasurenetApp) Name() string
- func (app *TreasurenetApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *TreasurenetApp) RegisterTendermintService(clientCtx client.Context)
- func (app *TreasurenetApp) RegisterTxService(clientCtx client.Context)
- func (app *TreasurenetApp) SimulationManager() *module.SimulationManager
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string // 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{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, authzmodule.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, vesting.AppModuleBasic{}, gravity.AppModuleBasic{}, bech32ibc.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, ) )
var DefaultConsensusParams = &abci.ConsensusParams{ Block: &abci.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 TreasurenetApp testing.
Functions ¶
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() simapp.GenesisState
NewDefaultGenesisState generates the default state for the application.
func RandomAccounts ¶
RandomAccounts creates random accounts with an ethsecp256k1 private key TODO: replace secp256k1.GenPrivKeyFromSecret() with similar function in go-ethereum
func RandomGenesisAccounts ¶
func RandomGenesisAccounts(simState *module.SimulationState) authtypes.GenesisAccounts
RandomGenesisAccounts is used by the auth module to create random genesis accounts in simulation when a genesis.json is not specified. In contrast, the default auth module's RandomGenesisAccounts implementation creates only base accounts and vestings accounts.
func RegisterSwaggerAPI ¶
RegisterSwaggerAPI registers swagger route with API Server
func StateFn ¶
func StateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simtypes.AppStateFn
StateFn returns the initial application state using a genesis or the simulation parameters. It is a wrapper of simapp.AppStateFn to replace evm param EvmDenom with staking param BondDenom.
Types ¶
type EventLog ¶
type EventLog struct { Code int `json:"code"` Msg string `json:"msg"` Data [][]interface{} `json:"data"` // `json:"-"`No serialization }
var Even EventLog
type EventLogNew ¶
type EventLogNew struct { Code int `json:"code"` Msg string `json:"msg"` Data [][]interface{} `json:"data"` // `json:"-"`No serialization }
type EventLog struct { Code int `json:"code"` Msg string `json:"msg"` Data []interface{} `json:"data"` // `json:"-"`No serialization }
var EvenNew EventLogNew
type TreasurenetApp ¶
type TreasurenetApp struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper // BankKeeper bankkeeper.Keeper BankKeeper bankkeeper.BaseKeeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper CrisisKeeper crisiskeeper.Keeper UpgradeKeeper upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper AuthzKeeper authzkeeper.Keeper IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper GravityKeeper keeper.Keeper Bech32IbcKeeper bech32ibckeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper // Treasurenet keepers EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper // contains filtered or unexported fields }
TreasurenetApp implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.
func NewTreasurenetApp ¶
func NewTreasurenetApp( 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), ) *TreasurenetApp
NewTreasurenetApp returns a reference to a new initialized Treasurenet application.
func Setup ¶
func Setup(isCheckTx bool, patchGenesis func(*TreasurenetApp, simapp.GenesisState) simapp.GenesisState) *TreasurenetApp
Setup initializes a new TreasurenetApp. A Nop logger is set in TreasurenetApp.
func (*TreasurenetApp) AppCodec ¶
func (app *TreasurenetApp) AppCodec() codec.Codec
AppCodec returns TreasurenetApp'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 (*TreasurenetApp) BeginBlocker ¶
func (app *TreasurenetApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker updates every begin block
func (*TreasurenetApp) BlockedAddrs ¶
func (app *TreasurenetApp) BlockedAddrs() map[string]bool
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*TreasurenetApp) EndBlocker ¶
func (app *TreasurenetApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
func (*TreasurenetApp) ExportAppStateAndValidators ¶
func (app *TreasurenetApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*TreasurenetApp) GetKey ¶
func (app *TreasurenetApp) GetKey(storeKey string) *sdk.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*TreasurenetApp) GetMemKey ¶
func (app *TreasurenetApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*TreasurenetApp) GetSubspace ¶
func (app *TreasurenetApp) 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 (*TreasurenetApp) GetTKey ¶
func (app *TreasurenetApp) GetTKey(storeKey string) *sdk.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*TreasurenetApp) InitChainer ¶
func (app *TreasurenetApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization
func (*TreasurenetApp) InterfaceRegistry ¶
func (app *TreasurenetApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns TreasurenetApp's InterfaceRegistry
func (*TreasurenetApp) LegacyAmino ¶
func (app *TreasurenetApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns TreasurenetApp'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 (*TreasurenetApp) LoadHeight ¶
func (app *TreasurenetApp) LoadHeight(height int64) error
LoadHeight loads state at a particular height
func (*TreasurenetApp) ModuleAccountAddrs ¶
func (app *TreasurenetApp) ModuleAccountAddrs() map[string]bool
ModuleAccountAddrs returns all the app's module account addresses.
func (*TreasurenetApp) Name ¶
func (app *TreasurenetApp) Name() string
Name returns the name of the App
func (*TreasurenetApp) RegisterAPIRoutes ¶
func (app *TreasurenetApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*TreasurenetApp) RegisterTendermintService ¶
func (app *TreasurenetApp) RegisterTendermintService(clientCtx client.Context)
func (*TreasurenetApp) RegisterTxService ¶
func (app *TreasurenetApp) RegisterTxService(clientCtx client.Context)
func (*TreasurenetApp) SimulationManager ¶
func (app *TreasurenetApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
Directories ¶
Path | Synopsis |
---|---|
Package ante defines the SDK auth module's AnteHandler as well as an internal AnteHandler for an Ethereum transaction (i.e MsgEthereumTx).
|
Package ante defines the SDK auth module's AnteHandler as well as an internal AnteHandler for an Ethereum transaction (i.e MsgEthereumTx). |
Package params defines the simulation parameters in the simapp.
|
Package params defines the simulation parameters in the simapp. |