ante

package
v14.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FeePayLogic

func FeePayLogic(fees sdk.Coins, govPercent sdk.Dec, numPairs int) sdk.Coins

FeePayLogic takes the total fees and splits them based on the governance params and the number of contracts we are executing on. This returns the amount of fees each contract developer should get. tested in ante_test.go

func FeeSharePayout

func FeeSharePayout(ctx sdk.Context, bankKeeper BankKeeper, totalFees sdk.Coins, revKeeper FeeShareKeeper, msgs []sdk.Msg) error

FeeSharePayout takes the total fees and redistributes 50% (or param set) to the contract developers provided they opted-in to payments.

Types

type BankKeeper

type BankKeeper interface {
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
}

type FeeShareKeeper

type FeeShareKeeper interface {
	GetParams(ctx sdk.Context) revtypes.Params
	GetFeeShare(ctx sdk.Context, contract sdk.Address) (revtypes.FeeShare, bool)
}

type FeeSharePayoutDecorator

type FeeSharePayoutDecorator struct {
	// contains filtered or unexported fields
}

FeeSharePayoutDecorator Run his after we already deduct the fee from the account with the ante.NewDeductFeeDecorator() decorator. We pull funds from the FeeCollector ModuleAccount

func NewFeeSharePayoutDecorator

func NewFeeSharePayoutDecorator(bk BankKeeper, fs FeeShareKeeper) FeeSharePayoutDecorator

func (FeeSharePayoutDecorator) AnteHandle

func (fsd FeeSharePayoutDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL