Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateFeeSharePool ¶
CalculateFeeSharePool computes the total developer pool per denom: RoundInt(govPercent * feeAmount). The pool is computed ONCE for the whole tx — never per recipient — so the aggregate paid out can never exceed govPercent of the fee. tested in ante_test.go
func SplitFeeSharePool ¶
SplitFeeSharePool splits the developer pool between numPairs recipients with a running remainder: everyone gets pool/numPairs (truncated) and the LAST recipient additionally receives the leftover. The aggregate always equals the pool exactly — the old per-recipient RoundInt(pool/numPairs) could sum to MORE than the pool and overdraw the escrow, reverting the tx. tested in ante_test.go
Types ¶
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.Keeper, fs keeper.Keeper) FeeSharePayoutDecorator
func (FeeSharePayoutDecorator) AnteHandle ¶
func (FeeSharePayoutDecorator) FeeSharePayout ¶
func (FeeSharePayoutDecorator) FeeSharePayout(ctx sdk.Context, bankKeeper bankkeeper.Keeper, totalFees sdk.Coins, fsk keeper.Keeper, 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.
type FeeSharePayoutEventOutput ¶
type FeeSharePayoutEventOutput struct {
}