Documentation
¶
Index ¶
- Variables
- func AddTestAddrs(app *DSC, ctx sdk.Context, accNum int, accAmt sdk.Coins) []sdk.AccAddress
- func AddTestAddrsIncremental(app *DSC, ctx sdk.Context, accNum int, accAmt sdk.Coins) []sdk.AccAddress
- func ConsumeMultisignatureVerificationGas(meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, ...) error
- func ConvertAddrsToValAddrs(addrs []sdk.AccAddress) []sdk.ValAddress
- func CreateAddr() sdk.AccAddress
- func GetAddrs(dsc *DSC, ctx sdk.Context, number int) []sdk.AccAddress
- func GetMaccPerms() map[string][]string
- func NewDefaultGenesisState() simapp.GenesisState
- func ObservabilityViews() (views []*view.View)
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func SigVerificationGasConsumer(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
- func TestAddr(addr string, bech string) (sdk.AccAddress, error)
- type DSC
- func (app *DSC) AppCodec() codec.Codec
- func (app *DSC) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *DSC) BlockedAddrs() map[string]bool
- func (app *DSC) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
- func (app *DSC) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *DSC) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *DSC) GetBaseApp() *baseapp.BaseApp
- func (app *DSC) GetIBCKeeper() *ibckeeper.Keeper
- func (app *DSC) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *DSC) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *DSC) GetStakingKeeper() stakingkeeper.Keeper
- func (app *DSC) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *DSC) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *DSC) GetTxConfig() client.TxConfig
- func (app *DSC) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *DSC) InterfaceRegistry() types.InterfaceRegistry
- func (app *DSC) LegacyAmino() *codec.LegacyAmino
- func (app *DSC) LoadHeight(height int64) error
- func (app *DSC) ModuleAccountAddrs() map[string]bool
- func (app *DSC) Name() string
- func (app *DSC) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *DSC) RegisterTendermintService(clientCtx client.Context)
- func (app *DSC) RegisterTxService(clientCtx client.Context)
- func (app *DSC) SimulationManager() *module.SimulationManager
- type GenerateAccountStrategy
Constants ¶
This section is empty.
Variables ¶
var ( // MainnetChainIDPrefix defines the EVM EIP155 chain ID prefix for Decimal mainnet. MainnetChainIDPrefix = fmt.Sprintf("%s_%d", cmdcfg.AppName, cmdcfg.MainnetChainID) // TestnetChainIDPrefix defines the EVM EIP155 chain ID prefix for Decimal testnet. TestnetChainIDPrefix = fmt.Sprintf("%s_%d", cmdcfg.AppName, cmdcfg.TestnetChainID) )
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 DSC testing.
var ( // DefaultNodeHome defines default home directory for the application daemon. DefaultNodeHome = os.ExpandEnv(fmt.Sprintf("$HOME/.%s/daemon", cmdcfg.AppName)) )
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{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler, erc20client.RegisterCoinProposalHandler, erc20client.RegisterERC20ProposalHandler, erc20client.ToggleTokenRelayProposalHandler, erc20client.UpdateTokenPairERC20ProposalHandler, incentivesclient.RegisterIncentiveProposalHandler, incentivesclient.CancelIncentiveProposalHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, authzmodule.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, vesting.AppModuleBasic{}, inflation.AppModuleBasic{}, erc20.AppModuleBasic{}, incentives.AppModuleBasic{}, epochs.AppModuleBasic{}, nft.AppModuleBasic{}, multisig.AppModuleBasic{}, coin.AppModuleBasic{}, multisig.AppModuleBasic{}, nft.AppModuleBasic{}, ) )
Functions ¶
func AddTestAddrs ¶
AddTestAddrs constructs and returns accNum amount of accounts with an initial balance of accAmt in random order
func AddTestAddrsIncremental ¶
func AddTestAddrsIncremental(app *DSC, ctx sdk.Context, accNum int, accAmt sdk.Coins) []sdk.AccAddress
AddTestAddrsIncremental constructs and returns accNum amount of accounts with an initial balance of accAmt in random order
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 ConvertAddrsToValAddrs ¶
func ConvertAddrsToValAddrs(addrs []sdk.AccAddress) []sdk.ValAddress
ConvertAddrsToValAddrs converts the provided addresses to ValAddress.
func CreateAddr ¶
func CreateAddr() sdk.AccAddress
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 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 Decimal 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:
- ed25519 (Validators)
- secp256k1 (Cosmos SDK keys)
- ethsecp256k1 (Ethereum keys)
- multisig (Cosmos SDK multisigs)
Types ¶
type DSC ¶
type DSC struct { *baseapp.BaseApp // SDK 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 EvidenceKeeper evidencekeeper.Keeper // Ethermint keepers EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper // Evmos keepers InflationKeeper inflationkeeper.Keeper //ClaimsKeeper *claimskeeper.Keeper Erc20Keeper erc20keeper.Keeper IncentivesKeeper incentiveskeeper.Keeper EpochsKeeper epochskeeper.Keeper VestingKeeper vestingkeeper.Keeper // Decimal keepers CoinKeeper coinkeeper.Keeper MultisigKeeper multisigkeeper.Keeper NFTKeeper nftkeeper.Keeper // contains filtered or unexported fields }
DSC implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.
func NewDSC ¶
func NewDSC( 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), ) *DSC
NewDSC returns a reference to a new initialized Ethermint application.
func Setup ¶
func Setup( isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, ) *DSC
Setup initializes a new DSC. A Nop logger is set in DSC.
func (*DSC) AppCodec ¶
AppCodec returns DSC'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 (*DSC) BeginBlocker ¶
func (app *DSC) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker updates every begin block.
func (*DSC) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*DSC) DeliverTx ¶
func (app *DSC) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
We are intentionally decomposing the DeliverTx method so as to calculate the transactions per second.
func (*DSC) EndBlocker ¶
func (app *DSC) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block.
func (*DSC) ExportAppStateAndValidators ¶
func (app *DSC) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*DSC) GetBaseApp ¶
GetBaseApp implements the TestingApp interface.
func (*DSC) GetIBCKeeper ¶
GetIBCKeeper implements the TestingApp interface.
func (*DSC) GetKey ¶
func (app *DSC) 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 (*DSC) GetMemKey ¶
func (app *DSC) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*DSC) GetStakingKeeper ¶
func (app *DSC) GetStakingKeeper() stakingkeeper.Keeper
GetStakingKeeper implements the TestingApp interface.
func (*DSC) GetSubspace ¶
func (app *DSC) 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 (*DSC) GetTKey ¶
func (app *DSC) 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 (*DSC) GetTxConfig ¶
GetTxConfig implements the TestingApp interface.
func (*DSC) InitChainer ¶
func (app *DSC) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization.
func (*DSC) InterfaceRegistry ¶
func (app *DSC) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns DSC's InterfaceRegistry
func (*DSC) LegacyAmino ¶
func (app *DSC) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns DSC'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 (*DSC) LoadHeight ¶
LoadHeight loads state at a particular height.
func (*DSC) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*DSC) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*DSC) RegisterTendermintService ¶
func (*DSC) RegisterTxService ¶
func (*DSC) SimulationManager ¶
func (app *DSC) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
type GenerateAccountStrategy ¶
type GenerateAccountStrategy func(int) []sdk.AccAddress
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). |