2021-07-01 06:33:32 -07:00
|
|
|
package rpc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
)
|
|
|
|
|
2021-07-19 12:57:25 -07:00
|
|
|
// 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)
|
2021-07-19 12:57:25 -07:00
|
|
|
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 {
|
2021-07-19 12:57:25 -07:00
|
|
|
// Percentage of fees collected to be destroyed.
|
|
|
|
BurnPercent uint8 `json:"burnPercent"`
|
2021-07-01 06:33:32 -07:00
|
|
|
|
2021-07-19 12:57:25 -07:00
|
|
|
// Largest value lamportsPerSignature can attain for the next slot.
|
2021-07-27 09:25:16 -07:00
|
|
|
MaxLamportsPerSignature uint64 `json:"maxLamportsPerSignature"`
|
2021-07-19 12:57:25 -07:00
|
|
|
|
|
|
|
// Smallest value lamportsPerSignature can attain for the next slot.
|
2021-07-27 09:25:16 -07:00
|
|
|
MinLamportsPerSignature uint64 `json:"minLamportsPerSignature"`
|
2021-07-19 12:57:25 -07:00
|
|
|
|
|
|
|
// Desired fee rate for the cluster.
|
2021-07-27 09:25:16 -07:00
|
|
|
TargetLamportsPerSignature uint64 `json:"targetLamportsPerSignature"`
|
2021-07-19 12:57:25 -07:00
|
|
|
|
|
|
|
// Desired signature rate for the cluster.
|
2021-07-27 09:25:16 -07:00
|
|
|
TargetSignaturesPerSlot uint64 `json:"targetSignaturesPerSlot"`
|
2021-07-01 06:33:32 -07:00
|
|
|
}
|