Documentation ¶
Index ¶
- Constants
- func BeginBlocker(ctx sdk.Context, k abciKeeper, b abci.RequestBeginBlock)
- func BootstrapPoEContracts(ctx sdk.Context, k wasmtypes.ContractOpsKeeper, tk twasmKeeper, ...) error
- func ClearEmbeddedContracts()
- func EndBlocker(parentCtx sdk.Context, k endBlockKeeper) []abci.ValidatorUpdate
- func NewHandler(k keeper.PoEKeeper, contractKeeper wasmtypes.ContractOpsKeeper, ...) sdk.Handler
- func VerifyPoEContracts(ctx sdk.Context, tk twasmKeeper, poeKeeper keeper.ContractSource) error
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, block abci.RequestBeginBlock)
- func (am AppModule) ConsensusVersion() uint64
- func (am AppModule) EndBlock(ctx sdk.Context, block abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage
- func (AppModule) GenerateGenesisState(simState *module.SimulationState)
- func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate
- func (am AppModule) LegacyQuerierHandler(amino *codec.LegacyAmino) sdk.Querier
- func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent
- func (am AppModule) QuerierRoute() string
- func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange
- func (am AppModule) RegisterInvariants(registry sdk.InvariantRegistry)
- func (am AppModule) RegisterServices(cfg module.Configurator)
- func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
- func (am AppModule) Route() sdk.Route
- func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation
- type AppModuleBasic
- func (b AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
- func (AppModuleBasic) GetQueryCmd() *cobra.Command
- func (AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (b AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, serveMux *runtime.ServeMux)
- func (b AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(amino *codec.LegacyAmino)
- func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router)
- func (b AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, txEncodingConfig client.TxEncodingConfig, ...) error
- type DeductFeeDecorator
- type DeliverTxfn
Constants ¶
const ( ModuleName = types.ModuleName StoreKey = types.StoreKey RouterKey = types.RouterKey )
Variables ¶
This section is empty.
Functions ¶
func BeginBlocker ¶
func BeginBlocker(ctx sdk.Context, k abciKeeper, b abci.RequestBeginBlock)
BeginBlocker ABCI begin block callback
func BootstrapPoEContracts ¶
func BootstrapPoEContracts(ctx sdk.Context, k wasmtypes.ContractOpsKeeper, tk twasmKeeper, poeKeeper poeKeeper, gs types.SeedContracts) error
BootstrapPoEContracts stores and instantiates all PoE contracts: See https://github.com/furyanrasta/furya-contracts/blob/main/docs/Architecture.md#multi-level-governance for an overview
func EndBlocker ¶
func EndBlocker(parentCtx sdk.Context, k endBlockKeeper) []abci.ValidatorUpdate
EndBlocker calls the Valset contract for the validator diff.
func NewHandler ¶
func NewHandler(k keeper.PoEKeeper, contractKeeper wasmtypes.ContractOpsKeeper, tk types.TWasmKeeper) sdk.Handler
NewHandler constructor
func VerifyPoEContracts ¶
func VerifyPoEContracts(ctx sdk.Context, tk twasmKeeper, poeKeeper keeper.ContractSource) error
VerifyPoEContracts sanity check that verifies all PoE contracts are set up as expected
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule implements an application module for the genutil module.
func NewAppModule ¶
func NewAppModule(poeKeeper *keeper.Keeper, twasmKeeper twasmKeeper, bankKeeper simulation.BankKeeper, accountKeeper types.AccountKeeper, deliverTx DeliverTxfn, txEncodingConfig client.TxEncodingConfig, contractKeeper wasmtypes.ContractOpsKeeper) AppModule
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Context, block abci.RequestBeginBlock)
func (AppModule) ConsensusVersion ¶
ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1.
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Context, block abci.RequestEndBlock) []abci.ValidatorUpdate
func (AppModule) ExportGenesis ¶
ExportGenesis returns the exported genesis state as raw bytes for the genutil module.
func (AppModule) GenerateGenesisState ¶
func (AppModule) GenerateGenesisState(simState *module.SimulationState)
GenerateGenesisState creates a randomized GenState of the PoE module.
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis performs genesis initialization for the genutil module. It returns no validator updates.
func (AppModule) LegacyQuerierHandler ¶
func (am AppModule) LegacyQuerierHandler(amino *codec.LegacyAmino) sdk.Querier
func (AppModule) ProposalContents ¶
func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent
ProposalContents doesn't return any content functions for governance proposals.
func (AppModule) QuerierRoute ¶
func (AppModule) RandomizedParams ¶
func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange
RandomizedParams creates randomized PoE param changes for the simulator.
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(registry sdk.InvariantRegistry)
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg module.Configurator)
func (AppModule) RegisterStoreDecoder ¶
func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
RegisterStoreDecoder registers a decoder for PoE module's types
func (AppModule) WeightedOperations ¶
func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation
WeightedOperations returns the all the PoE module operations with their respective weights.
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic defines the basic application module used by the genutil module.
func (AppModuleBasic) DefaultGenesis ¶
func (b AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns default genesis state as raw bytes for the genutil module.
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd() *cobra.Command
GetQueryCmd returns no root query command for the genutil module.
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd() *cobra.Command
GetTxCmd returns no root tx command for the genutil module.
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
Name returns the genutil module's name.
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (b AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, serveMux *runtime.ServeMux)
RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the genutil module.
func (AppModuleBasic) RegisterInterfaces ¶
func (b AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry)
RegisterInterfaces registers the module's interface types
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(amino *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the genutil module's types on the given LegacyAmino codec.
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router)
RegisterRESTRoutes registers the REST routes for the genutil module.
func (AppModuleBasic) ValidateGenesis ¶
func (b AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, txEncodingConfig client.TxEncodingConfig, bz json.RawMessage) error
ValidateGenesis performs genesis state validation for the genutil module.
type DeductFeeDecorator ¶
type DeductFeeDecorator struct {
// contains filtered or unexported fields
}
DeductFeeDecorator deducts fees from the first signer of the tx If the first signer does not have the funds to pay for the fees, return with InsufficientFunds error Call next AnteHandler if fees successfully deducted CONTRACT: Tx must implement FeeTx interface to use DeductFeeDecorator
func NewDeductFeeDecorator ¶
func NewDeductFeeDecorator(ak types.AccountKeeper, bk types.BankKeeper, fk ante.FeegrantKeeper, cs keeper.ContractSource) DeductFeeDecorator
func (DeductFeeDecorator) AnteHandle ¶
func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
AnteHandle has the same logic as ante.DeductFeeDecorator except that the fees are transferred to a PoE VALSET contract
func (DeductFeeDecorator) DeductFees ¶
func (dfd DeductFeeDecorator) DeductFees(ctx sdk.Context, acc authtypes.AccountI, fees sdk.Coins) error
DeductFees deducts fees from the given account.
type DeliverTxfn ¶
type DeliverTxfn = keeper.DeliverTxFn