ante

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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