solana-go/rpc/getFeeRateGovernor.go

36 lines
1.1 KiB
Go
Raw Normal View History

2021-07-01 06:33:32 -07:00
package rpc
import (
"context"
)
// GetFeeRateGovernor returns the fee rate governor information from the root bank.
func (cl *Client) GetFeeRateGovernor(ctx context.Context) (out *GetFeeRateGovernorResult, err error) {
2021-07-20 12:29:06 -07:00
err = cl.rpcClient.CallForInto(ctx, &out, "getFeeRateGovernor", nil)
return
}
2021-07-01 06:33:32 -07:00
type GetFeeRateGovernorResult struct {
RPCContext
Value FeeRateGovernorResult `json:"value"`
}
type FeeRateGovernorResult struct {
FeeRateGovernor FeeRateGovernor `json:"feeRateGovernor"`
}
type FeeRateGovernor struct {
// Percentage of fees collected to be destroyed.
BurnPercent uint8 `json:"burnPercent"`
2021-07-01 06:33:32 -07:00
// Largest value lamportsPerSignature can attain for the next slot.
MaxLamportsPerSignature uint64 `json:"maxLamportsPerSignature"`
// Smallest value lamportsPerSignature can attain for the next slot.
MinLamportsPerSignature uint64 `json:"minLamportsPerSignature"`
// Desired fee rate for the cluster.
TargetLamportsPerSignature uint64 `json:"targetLamportsPerSignature"`
// Desired signature rate for the cluster.
TargetSignaturesPerSlot uint64 `json:"targetSignaturesPerSlot"`
2021-07-01 06:33:32 -07:00
}