Documentation ¶
Index ¶
- Constants
- Variables
- func GetMaccPerms() map[string][]string
- func MakeCodec() *codec.Codec
- func SetBech32AddressPrefixesAndBip44CoinType(config *sdk.Config)
- type BandApp
- func (app *BandApp) AddHook(hook Hook)
- func (app *BandApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *BandApp) BlacklistedAccAddrs() map[string]bool
- func (app *BandApp) Codec() *codec.Codec
- func (app *BandApp) Commit() (res abci.ResponseCommit)
- func (app *BandApp) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx
- func (app *BandApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *BandApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
- func (app *BandApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *BandApp) LoadHeight(height int64) error
- func (app *BandApp) ModuleAccountAddrs() map[string]bool
- func (app *BandApp) Name() string
- func (app *BandApp) Query(req abci.RequestQuery) abci.ResponseQuery
- type GenesisState
- type Hook
Constants ¶
const ( Name = "Odin" Bech32MainPrefix = "odin" Bip44CoinType = 494 )
Variables ¶
var ( // DefaultCLIHome is the default home directories for bandcli. DefaultCLIHome = os.ExpandEnv("$HOME/.bandcli") // DefaultNodeHome is the default home directories for bandd. DefaultNodeHome = os.ExpandEnv("$HOME/.bandd") // ModuleBasics is in charge of setting up basic, non-dependant module elements. ModuleBasics = module.NewBasicManager( genutil.AppModuleBasic{}, auth.AppModuleBasic{}, bank.AppModuleBasic{}, supply.AppModuleBasic{}, staking.AppModuleBasic{}, odinmint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic(paramsclient.ProposalHandler, distr.ProposalHandler, upgradeclient.ProposalHandler), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, oracle.AppModuleBasic{}, coinswap.AppModuleBasic{}, ) )
Functions ¶
func GetMaccPerms ¶
GetMaccPerms returns a mapping of the application's module account permissions.
func SetBech32AddressPrefixesAndBip44CoinType ¶
SetBech32AddressPrefixesAndBip44CoinType sets the global Bech32 prefixes and HD wallet coin type.
Types ¶
type BandApp ¶
type BandApp struct { *bam.BaseApp // Module keepers, publicly accessible to facilate testing and extending (see emitter). AccountKeeper auth.AccountKeeper BankKeeper bank.Keeper SupplyKeeper supply.Keeper WrappedSupplyKeeper odinsupply.WrappedSupplyKeeper StakingKeeper staking.Keeper SlashingKeeper slashing.Keeper MintKeeper odinmint.Keeper DistrKeeper distr.Keeper GovKeeper gov.Keeper CrisisKeeper crisis.Keeper ParamsKeeper params.Keeper UpgradeKeeper upgrade.Keeper EvidenceKeeper evidence.Keeper OracleKeeper oracle.Keeper CoinswapKeeper coinswap.Keeper // Deliver context, set during InitGenesis/BeginBlock and cleared during Commit. It allows // anyone with access to BandApp to read/mutate consensus state anytime. USE WITH CARE! DeliverContext sdk.Context // contains filtered or unexported fields }
BandApp is the application of BandChain, extended base ABCI application.
func NewBandApp ¶
func NewBandApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, invCheckPeriod uint, skipUpgradeHeights map[int64]bool, home string, disableFeelessReports bool, baseAppOptions ...func(*bam.BaseApp), ) *BandApp
NewBandApp returns a reference to an initialized BandApp.
func (*BandApp) BeginBlocker ¶
func (app *BandApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block.
func (*BandApp) BlacklistedAccAddrs ¶
BlacklistedAccAddrs returns all the app's module account addresses black listed for receiving tokens.
func (*BandApp) Commit ¶
func (app *BandApp) Commit() (res abci.ResponseCommit)
Commit overrides the default BaseApp's ABCI commit by adding DeliverContext clearing.
func (*BandApp) DeliverTx ¶
func (app *BandApp) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx
DeliverTx overwrite DeliverTx to apply afterDeliverTx hook
func (*BandApp) EndBlocker ¶
func (app *BandApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block.
func (*BandApp) ExportAppStateAndValidators ¶
func (app *BandApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string, ) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
ExportAppStateAndValidators export the state of band for a genesis file
func (*BandApp) InitChainer ¶
func (app *BandApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*BandApp) LoadHeight ¶
LoadHeight loads a particular height
func (*BandApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*BandApp) Query ¶
func (app *BandApp) Query(req abci.RequestQuery) abci.ResponseQuery
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState defines a type alias for the Band genesis application state.
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() GenesisState
NewDefaultGenesisState generates the default state for the application.
type Hook ¶
type Hook interface { AfterInitChain(ctx sdk.Context, req abci.RequestInitChain, res abci.ResponseInitChain) AfterBeginBlock(ctx sdk.Context, req abci.RequestBeginBlock, res abci.ResponseBeginBlock) AfterDeliverTx(ctx sdk.Context, req abci.RequestDeliverTx, res abci.ResponseDeliverTx) AfterEndBlock(ctx sdk.Context, req abci.RequestEndBlock, res abci.ResponseEndBlock) ApplyQuery(req abci.RequestQuery) (res abci.ResponseQuery, stop bool) BeforeCommit() }
Hook is an interface of hook that can process along with abci application