Documentation
¶
Index ¶
- Constants
- Variables
- func GenesisStateWithValSet(app *BounceBit, genesisState simapp.GenesisState, valSet *tmtypes.ValidatorSet, ...) simapp.GenesisState
- func NewBurnDecorator(feeCollector string, bankKeeper bankkeeper.Keeper) sdk.PostDecorator
- func NewDefaultGenesisState() simapp.GenesisState
- func NewPostHandler(ho HandlerOptions) sdk.PostHandler
- func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
- func ObservabilityViews() (views []*view.View)
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func SetupTestingApp(chainID string) func() (ibctesting.TestingApp, map[string]json.RawMessage)
- func StoreKeys() (map[string]*storetypes.KVStoreKey, map[string]*storetypes.MemoryStoreKey, ...)
- type BounceBit
- func EthSetup(isCheckTx bool, ...) *BounceBit
- func EthSetupWithDB(isCheckTx bool, ...) *BounceBit
- func NewBounceBit(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, ...) *BounceBit
- func Setup(isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, chainID string) *BounceBit
- func (app *BounceBit) AppCodec() codec.Codec
- func (app *BounceBit) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *BounceBit) BlockedAddrs() map[string]bool
- func (app *BounceBit) Close() error
- func (app *BounceBit) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
- func (app *BounceBit) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *BounceBit) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *BounceBit) GetBaseApp() *baseapp.BaseApp
- func (app *BounceBit) GetIBCKeeper() *ibckeeper.Keeper
- func (app *BounceBit) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *BounceBit) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *BounceBit) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *BounceBit) GetStakingKeeper() ibctestingtypes.StakingKeeper
- func (app *BounceBit) GetStakingKeeperSDK() stakingkeeper.Keeper
- func (app *BounceBit) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *BounceBit) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *BounceBit) GetTxConfig() client.TxConfig
- func (app *BounceBit) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *BounceBit) InterfaceRegistry() codectypes.InterfaceRegistry
- func (app *BounceBit) LegacyAmino() *codec.LegacyAmino
- func (app *BounceBit) LoadHeight(height int64) error
- func (app *BounceBit) ModuleAccountAddrs() map[string]bool
- func (app *BounceBit) Name() string
- func (app *BounceBit) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *BounceBit) RegisterNodeService(clientCtx client.Context)
- func (app *BounceBit) RegisterTendermintService(clientCtx client.Context)
- func (app *BounceBit) RegisterTxService(clientCtx client.Context)
- func (*BounceBit) SimulationManager() *module.SimulationManager
- type BurnDecorator
- type HandlerOptions
Constants ¶
const Name = "bbcored"
Name defines the application binary name
Variables ¶
var ( MainnetMinGasPrices = math.LegacyNewDec(20_000_000_000) // MainnetMinGasMultiplier defines the min gas multiplier value on the fee market module. // 50% of the leftover gas will be refunded MainnetMinGasMultiplier = math.LegacyNewDecWithPrec(5, 1) )
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.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, vestingclient.RegisterClawbackProposalHandler, }, ), params.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, ibctm.AppModuleBasic{}, ica.AppModuleBasic{}, authzmodule.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, vesting.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, epochs.AppModuleBasic{}, inflation.AppModuleBasic{}, consensus.AppModuleBasic{}, ) )
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
var DefaultTestingAppInit func(chainID string) func() (ibctesting.TestingApp, map[string]json.RawMessage) = SetupTestingApp
DefaultTestingAppInit defines the IBC application used for testing
var EthDefaultConsensusParams = &tmtypes.ConsensusParams{ Block: &tmtypes.BlockParams{ MaxBytes: 200000, MaxGas: -1, }, Evidence: &tmtypes.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &tmtypes.ValidatorParams{ PubKeyTypes: []string{ cmtypes.ABCIPubKeyTypeEd25519, }, }, }
EthDefaultConsensusParams defines the default Tendermint consensus params used in
Functions ¶
func GenesisStateWithValSet ¶
func GenesisStateWithValSet(app *BounceBit, genesisState simapp.GenesisState, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance, ) simapp.GenesisState
func NewBurnDecorator ¶
func NewBurnDecorator(feeCollector string, bankKeeper bankkeeper.Keeper) sdk.PostDecorator
NewBurnDecorator creates a new instance of the BurnDecorator.
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() simapp.GenesisState
NewDefaultGenesisState generates the default state for the application.
func NewPostHandler ¶
func NewPostHandler(ho HandlerOptions) sdk.PostHandler
NewPostHandler returns a new PostHandler decorators chain.
func NewTestGenesisState ¶
func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
NewTestGenesisState generate genesis state with single validator
func ObservabilityViews ¶
func RegisterSwaggerAPI ¶
RegisterSwaggerAPI registers swagger route with API Server
func SetupTestingApp ¶
func SetupTestingApp(chainID string) func() (ibctesting.TestingApp, map[string]json.RawMessage)
SetupTestingApp initializes the IBC-go testing application need to keep this design to comply with the ibctesting SetupTestingApp func and be able to set the chainID for the tests properly
func StoreKeys ¶
func StoreKeys() ( map[string]*storetypes.KVStoreKey, map[string]*storetypes.MemoryStoreKey, map[string]*storetypes.TransientStoreKey, )
StoreKeys returns the application store keys, the EVM transient store keys and the memory store keys
Types ¶
type BounceBit ¶
type BounceBit 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
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
ICAHostKeeper icahostkeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
ConsensusParamsKeeper consensusparamkeeper.Keeper
// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
EvmKeeper *evmkeeper.Keeper
FeeMarketKeeper feemarketkeeper.Keeper
InflationKeeper inflationkeeper.Keeper
VestingKeeper vestingkeeper.Keeper
EpochsKeeper epochskeeper.Keeper
// contains filtered or unexported fields
}
BounceBit implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.
func EthSetup ¶
func EthSetup(isCheckTx bool, patchGenesis func(*BounceBit, simapp.GenesisState) simapp.GenesisState) *BounceBit
EthSetup initializes a new app
func EthSetupWithDB ¶
func EthSetupWithDB(isCheckTx bool, patchGenesis func(*BounceBit, simapp.GenesisState) simapp.GenesisState, db dbm.DB) *BounceBit
EthSetupWithDB initializes a new app. A Nop logger is set in app.
func NewBounceBit ¶
func NewBounceBit( 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), ) *BounceBit
NewBounceBit returns a reference to a new initialized BounceBit application.
func Setup ¶
func Setup(isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, chainID string) *BounceBit
func (*BounceBit) AppCodec ¶
AppCodec 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 (*BounceBit) BeginBlocker ¶
func (app *BounceBit) 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 (*BounceBit) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*BounceBit) DeliverTx ¶
func (app *BounceBit) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
The DeliverTx method is intentionally decomposed to calculate the transactions per second.
func (*BounceBit) EndBlocker ¶
func (app *BounceBit) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block
func (*BounceBit) ExportAppStateAndValidators ¶
func (app *BounceBit) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*BounceBit) GetBaseApp ¶
GetBaseApp implements the TestingApp interface.
func (*BounceBit) GetIBCKeeper ¶
GetIBCKeeper implements the TestingApp interface.
func (*BounceBit) GetKey ¶
func (app *BounceBit) 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 (*BounceBit) GetMemKey ¶
func (app *BounceBit) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*BounceBit) GetScopedIBCKeeper ¶
func (app *BounceBit) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
GetScopedIBCKeeper implements the TestingApp interface.
func (*BounceBit) GetStakingKeeper ¶
func (app *BounceBit) GetStakingKeeper() ibctestingtypes.StakingKeeper
GetStakingKeeper implements the TestingApp interface.
func (*BounceBit) GetStakingKeeperSDK ¶
func (app *BounceBit) GetStakingKeeperSDK() stakingkeeper.Keeper
GetStakingKeeperSDK implements the TestingApp interface.
func (*BounceBit) GetSubspace ¶
func (app *BounceBit) 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 (*BounceBit) GetTKey ¶
func (app *BounceBit) 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 (*BounceBit) GetTxConfig ¶
GetTxConfig implements the TestingApp interface.
func (*BounceBit) InitChainer ¶
func (app *BounceBit) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization
func (*BounceBit) InterfaceRegistry ¶
func (app *BounceBit) InterfaceRegistry() codectypes.InterfaceRegistry
InterfaceRegistry
func (*BounceBit) LegacyAmino ¶
func (app *BounceBit) LegacyAmino() *codec.LegacyAmino
LegacyAmino 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 (*BounceBit) LoadHeight ¶
LoadHeight loads state at a particular height
func (*BounceBit) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*BounceBit) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*BounceBit) RegisterNodeService ¶
RegisterNodeService registers the node gRPC service on the provided application gRPC query router.
func (*BounceBit) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*BounceBit) RegisterTxService ¶
func (*BounceBit) SimulationManager ¶
func (*BounceBit) SimulationManager() *module.SimulationManager
SimulationManager implements runtime.AppI
type BurnDecorator ¶
type BurnDecorator struct {
// contains filtered or unexported fields
}
BurnDecorator is the decorator that burns all the transaction fees from Cosmos transactions.
func (BurnDecorator) PostHandle ¶
func (bd BurnDecorator) PostHandle(ctx sdk.Context, tx sdk.Tx, simulate, success bool, next sdk.PostHandler) (newCtx sdk.Context, err error)
PostHandle burns all the transaction fees from Cosmos transactions. If an Ethereum transaction is present, this logic is skipped.
type HandlerOptions ¶
type HandlerOptions struct {
FeeCollectorName string
BankKeeper bankkeeper.Keeper
}
HandlerOptions are the options required for constructing a PostHandler.
func (HandlerOptions) Validate ¶
func (h HandlerOptions) Validate() error