Documentation ¶
Index ¶
- func DeductFees(supplyKeeper supply.Keeper, ctx sdk.Context, acc exported.Account, ...) error
- func GetSignerAcc(ctx sdk.Context, ak keeper.AccountKeeper, addr sdk.AccAddress) (exported.Account, error)
- func NewAnteHandler(ak keeper.AccountKeeper, vk validator.Keeper, ck coin.Keeper, sk supply.Keeper, ...) sdk.AnteHandler
- func NewGasMeter(limit sdk.Gas) sdk.GasMeter
- func SetGasMeter(simulate bool, ctx sdk.Context, gasLimit uint64) sdk.Context
- type CountMsgDecorator
- type FeeDecorator
- type FeeTx
- type GasTx
- type PostCreateAccountDecorator
- type PreCreateAccountDecorator
- type SetUpContextDecorator
- type SigVerificationDecorator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeductFees ¶
func DeductFees(supplyKeeper supply.Keeper, ctx sdk.Context, acc exported.Account, coinKeeper coin.Keeper, fee sdk.Coin, feeInBaseCoin sdk.Int) error
DeductFees deducts fees from the given account.
NOTE: We could use the BankKeeper (in addition to the AccountKeeper, because the BankKeeper doesn't give us accounts), but it seems easier to do this.
func GetSignerAcc ¶ added in v1.2.12
func GetSignerAcc(ctx sdk.Context, ak keeper.AccountKeeper, addr sdk.AccAddress) (exported.Account, error)
GetSignerAcc returns an account for a given address that is expected to sign a transaction.
func NewAnteHandler ¶
func NewAnteHandler(ak keeper.AccountKeeper, vk validator.Keeper, ck coin.Keeper, sk supply.Keeper, consumer ante.SignatureVerificationGasConsumer) sdk.AnteHandler
Ante
func NewGasMeter ¶
NewGasMeter returns a reference to a new gasMeter.
Types ¶
type CountMsgDecorator ¶
type CountMsgDecorator struct { }
func NewCountMsgDecorator ¶
func NewCountMsgDecorator() CountMsgDecorator
func (CountMsgDecorator) AnteHandle ¶
type FeeDecorator ¶
type FeeDecorator struct {
// contains filtered or unexported fields
}
func NewFeeDecorator ¶
func NewFeeDecorator(ck coin.Keeper, sk supply.Keeper, ak auth.AccountKeeper, vk validator.Keeper) FeeDecorator
NewSetUpContextDecorator creates new SetUpContextDecorator.
func (FeeDecorator) AnteHandle ¶
func (fd FeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
AnteHandle implements sdk.AnteHandler function.
type PostCreateAccountDecorator ¶
type PostCreateAccountDecorator struct {
// contains filtered or unexported fields
}
PostCreateAccountDecorator restores account number in case of check redeeming from account unknown for the blockchain.
func NewPostCreateAccountDecorator ¶
func NewPostCreateAccountDecorator(ak auth.AccountKeeper) PostCreateAccountDecorator
NewPostCreateAccountDecorator creates new PostCreateAccountDecorator.
func (PostCreateAccountDecorator) AnteHandle ¶
func (cad PostCreateAccountDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
AnteHandle implements sdk.AnteHandler function.
type PreCreateAccountDecorator ¶
type PreCreateAccountDecorator struct {
// contains filtered or unexported fields
}
PreCreateAccountDecorator creates account in case of check redeeming from account unknown in the blockchain. Such accounts sign their first transaction with account number equal to 0. This is the reason why creating account is divided in two parts (PreCreateAccountDecorator and PostCreateAccountDecorator): it is necessary to create account in the beginning of the Ante chain with account number 0, but just before the end of the Ante chain it is necessary to restore correct account number.
func NewPreCreateAccountDecorator ¶
func NewPreCreateAccountDecorator(ak auth.AccountKeeper) PreCreateAccountDecorator
NewPreCreateAccountDecorator creates new PreCreateAccountDecorator.
func (PreCreateAccountDecorator) AnteHandle ¶
func (cad PreCreateAccountDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
AnteHandle implements sdk.AnteHandler function.
type SetUpContextDecorator ¶
type SetUpContextDecorator struct{}
SetUpContextDecorator sets the GasMeter in the Context and wraps the next AnteHandler with a defer clause to recover from any downstream OutOfGas panics in the AnteHandler chain to return an error with information on gas provided and gas used. CONTRACT: Must be first decorator in the chain CONTRACT: Tx must implement GasTx interface
func NewSetUpContextDecorator ¶
func NewSetUpContextDecorator() SetUpContextDecorator
NewSetUpContextDecorator creates new SetUpContextDecorator.
func (SetUpContextDecorator) AnteHandle ¶
func (sud SetUpContextDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
AnteHandle implements sdk.AnteHandler function.
type SigVerificationDecorator ¶ added in v1.2.12
type SigVerificationDecorator struct {
// contains filtered or unexported fields
}
Verify all signatures for a tx and return an error if any are invalid. Note, the SigVerificationDecorator decorator will not get executed on ReCheck.
CONTRACT: Pubkeys are set in context for all signers before this decorator runs CONTRACT: Tx must implement SigVerifiableTx interface
func NewSigVerificationDecorator ¶ added in v1.2.12
func NewSigVerificationDecorator(ak keeper.AccountKeeper) SigVerificationDecorator