Documentation ¶
Index ¶
- Constants
- Variables
- func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simtypes.AppStateFn
- func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile string) (tmtypes.GenesisDoc, []simtypes.Account)
- func AppStateRandomizedFn(simManager *module.SimulationManager, r *rand.Rand, cdc codec.JSONCodec, ...) (json.RawMessage, []simtypes.Account)
- func ConsumeMultisignatureVerificationGas(meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, ...) error
- func GenAndDeliverTx(txCtx simulation.OperationInput, fees sdk.Coins) (simtypes.OperationMsg, []simtypes.FutureOperation, error)
- func GenAndDeliverTxWithRandFees(txCtx simulation.OperationInput) (simtypes.OperationMsg, []simtypes.FutureOperation, error)
- func GetMaccPerms() map[string][]string
- func NewDefaultGenesisState() simapp.GenesisState
- func ObservabilityViews() (views []*view.View)
- func RandomAccounts(r *rand.Rand, n int) []simtypes.Account
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func SigVerificationGasConsumer(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
- type Canto
- func (app *Canto) AppCodec() codec.Codec
- func (app *Canto) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *Canto) BlockedAddrs() map[string]bool
- func (app *Canto) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
- func (app *Canto) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *Canto) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *Canto) GetBaseApp() *baseapp.BaseApp
- func (app *Canto) GetCoinswapKeeper() coinswapkeeper.Keeper
- func (app *Canto) GetErc20Keeper() erc20keeper.Keeper
- func (app *Canto) GetIBCKeeper() *ibckeeper.Keeper
- func (app *Canto) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *Canto) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *Canto) GetOnboardingKeeper() *onboardingkeeper.Keeper
- func (app *Canto) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *Canto) GetStakingKeeper() stakingkeeper.Keeper
- func (app *Canto) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *Canto) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *Canto) GetTxConfig() client.TxConfig
- func (app *Canto) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *Canto) InterfaceRegistry() types.InterfaceRegistry
- func (app *Canto) LegacyAmino() *codec.LegacyAmino
- func (app *Canto) LoadHeight(height int64) error
- func (app *Canto) ModuleAccountAddrs() map[string]bool
- func (app *Canto) Name() string
- func (app *Canto) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *Canto) RegisterTendermintService(clientCtx client.Context)
- func (app *Canto) RegisterTxService(clientCtx client.Context)
- func (app *Canto) SimulationManager() *module.SimulationManager
- type GenesisState
Constants ¶
const Name = "cantod"
Name defines the application binary name
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{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, erc20client.RegisterCoinProposalHandler, erc20client.RegisterERC20ProposalHandler, erc20client.ToggleTokenConversionProposalHandler, govshuttleclient.LendingMarketProposalHandler, govshuttleclient.TreasuryProposalHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, authzmodule.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, inflation.AppModuleBasic{}, erc20.AppModuleBasic{}, govshuttle.AppModuleBasic{}, csr.AppModuleBasic{}, epochs.AppModuleBasic{}, onboarding.AppModuleBasic{}, coinswap.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 canto testing.
var FlagGenesisTimeValue = int64(1640995200)
Functions ¶
func AppStateFn ¶
func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simtypes.AppStateFn
AppStateFn returns the initial application state using a genesis or the simulation parameters. It panics if the user provides files for both of them. If a file is not given for the genesis or the sim params, it creates a randomized one.
func AppStateFromGenesisFileFn ¶
func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile string) (tmtypes.GenesisDoc, []simtypes.Account)
AppStateFromGenesisFileFn util function to generate the genesis AppState from a genesis.json file.
func AppStateRandomizedFn ¶
func AppStateRandomizedFn( simManager *module.SimulationManager, r *rand.Rand, cdc codec.JSONCodec, accs []simtypes.Account, genesisTimestamp time.Time, appParams simtypes.AppParams, ) (json.RawMessage, []simtypes.Account)
AppStateRandomizedFn creates calls each module's GenesisState generator function and creates the simulation params
func ConsumeMultisignatureVerificationGas ¶
func ConsumeMultisignatureVerificationGas( meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, params authtypes.Params, accSeq uint64, ) error
ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature
func GenAndDeliverTx ¶
func GenAndDeliverTx(txCtx simulation.OperationInput, fees sdk.Coins) (simtypes.OperationMsg, []simtypes.FutureOperation, error)
GenAndDeliverTx generates a transactions and delivers it.
func GenAndDeliverTxWithRandFees ¶
func GenAndDeliverTxWithRandFees(txCtx simulation.OperationInput) (simtypes.OperationMsg, []simtypes.FutureOperation, error)
GenAndDeliverTxWithRandFees generates a transaction with a random fee and delivers it.
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 ObservabilityViews ¶
func RandomAccounts ¶
RandomAccounts generates n random accounts
func RegisterSwaggerAPI ¶
RegisterSwaggerAPI registers swagger route with API Server
func SigVerificationGasConsumer ¶
func SigVerificationGasConsumer( meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params, ) error
SigVerificationGasConsumer is the canto implementation of SignatureVerificationGasConsumer. It consumes gas for signature verification based upon the public key type. The cost is fetched from the given params and is matched by the concrete type. The types of keys supported are:
- ethsecp256k1 (Ethereum keys)
- ed25519 (Validators)
- multisig (Cosmos SDK multisigs)
Types ¶
type Canto ¶
type Canto struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper stakingkeeper.Keeper SlashingKeeper slashingkeeper.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 // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper // Ethermint keepers EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper // Canto keepers InflationKeeper inflationkeeper.Keeper Erc20Keeper erc20keeper.Keeper EpochsKeeper epochskeeper.Keeper OnboardingKeeper *onboardingkeeper.Keeper GovshuttleKeeper govshuttlekeeper.Keeper CSRKeeper csrkeeper.Keeper // Coinswap keeper CoinswapKeeper coinswapkeeper.Keeper // contains filtered or unexported fields }
Canto implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.
func NewCanto ¶
func NewCanto( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, simulation bool, encodingConfig simappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *Canto
NewCanto returns a reference to a new initialized Ethermint application.
func Setup ¶
func Setup( isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, ) *Canto
Setup initializes a new canto. A Nop logger is set in canto.
func SetupWithGenesisAccounts ¶
func SetupWithGenesisAccounts(genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *Canto
func (*Canto) AppCodec ¶
AppCodec returns Canto'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 (*Canto) BeginBlocker ¶
func (app *Canto) 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 (*Canto) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*Canto) DeliverTx ¶
func (app *Canto) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
We are intentionally decomposing the DeliverTx method so as to calculate the transactions per second.
func (*Canto) EndBlocker ¶
func (app *Canto) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block
func (*Canto) ExportAppStateAndValidators ¶
func (app *Canto) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*Canto) GetBaseApp ¶
GetBaseApp implements the TestingApp interface.
func (*Canto) GetCoinswapKeeper ¶
func (app *Canto) GetCoinswapKeeper() coinswapkeeper.Keeper
func (*Canto) GetErc20Keeper ¶
func (app *Canto) GetErc20Keeper() erc20keeper.Keeper
func (*Canto) GetIBCKeeper ¶
GetIBCKeeper implements the TestingApp interface.
func (*Canto) GetKey ¶
func (app *Canto) 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 (*Canto) GetMemKey ¶
func (app *Canto) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*Canto) GetOnboardingKeeper ¶
func (app *Canto) GetOnboardingKeeper() *onboardingkeeper.Keeper
func (*Canto) GetScopedIBCKeeper ¶
func (app *Canto) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
GetScopedIBCKeeper implements the TestingApp interface.
func (*Canto) GetStakingKeeper ¶
func (app *Canto) GetStakingKeeper() stakingkeeper.Keeper
GetStakingKeeper implements the TestingApp interface.
func (*Canto) GetSubspace ¶
func (app *Canto) 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 (*Canto) GetTKey ¶
func (app *Canto) 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 (*Canto) GetTxConfig ¶
GetTxConfig implements the TestingApp interface.
func (*Canto) InitChainer ¶
func (app *Canto) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization
func (*Canto) InterfaceRegistry ¶
func (app *Canto) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Canto's InterfaceRegistry
func (*Canto) LegacyAmino ¶
func (app *Canto) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns Canto'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 (*Canto) LoadHeight ¶
LoadHeight loads state at a particular height
func (*Canto) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*Canto) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*Canto) RegisterTendermintService ¶
func (*Canto) RegisterTxService ¶
func (*Canto) SimulationManager ¶
func (app *Canto) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
type GenesisState ¶
type GenesisState map[string]json.RawMessage
The genesis state of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.
Source Files ¶
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). |
upgrades
|
|