ante

package
v2.11.8 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateFee

func CalculateFee(fees sdk.Coins, devShares sdk.Dec, numOfdevs int, allowedDenoms []string) sdk.Coins

CalculateFee takes the total fees paid for a transaction and split these fees equaly between all number of pairs considering allwoedDenoms

func GetWithdrawalAddressFromContract

func GetWithdrawalAddressFromContract(ctx sdk.Context, contractAddresses []string, fsk FeeShareKeeper) ([]sdk.AccAddress, error)

Iterate the contract addresses and get the withdrawer address from the module store

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
}

func (FeeSharePayoutDecorator) FeeSharePayout

func (fsd FeeSharePayoutDecorator) FeeSharePayout(ctx sdk.Context, txFees sdk.Coins, devShares sdk.Dec, allowedDenoms []string) (err error)

FeeSharePayout takes the total fees paid for a transaction and split these fees equally between all the contacts involved in the transaction based on the module params.

func (FeeSharePayoutDecorator) PostHandle

func (fsd FeeSharePayoutDecorator) PostHandle(
	ctx sdk.Context,
	tx sdk.Tx,
	simulate bool,
	success bool,
	next sdk.PostHandler,
) (newCtx sdk.Context, err error)

FeeSharePostHandler if the feeshare module is enabled takes the total fees paid for each transaction and split these fees equally between all the contacts involved in the transaction based on the module params.

Jump to

Keyboard shortcuts

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