Add RPC/getFeeRateGovernor
This commit is contained in:
parent
70ce94c209
commit
d46cafb7e0
|
@ -0,0 +1,29 @@
|
|||
package rpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
bin "github.com/dfuse-io/binary"
|
||||
)
|
||||
|
||||
type GetFeeRateGovernorResult struct {
|
||||
RPCContext
|
||||
Value FeeRateGovernorResult `json:"value"`
|
||||
}
|
||||
type FeeRateGovernorResult struct {
|
||||
FeeRateGovernor FeeRateGovernor `json:"feeRateGovernor"`
|
||||
}
|
||||
type FeeRateGovernor struct {
|
||||
BurnPercent uint8 `json:"burnPercent"` // Percentage of fees collected to be destroyed
|
||||
MaxLamportsPerSignature bin.Uint64 `json:"maxLamportsPerSignature"` // Largest value lamportsPerSignature can attain for the next slot
|
||||
MinLamportsPerSignature bin.Uint64 `json:"minLamportsPerSignature"` // Smallest value lamportsPerSignature can attain for the next slot
|
||||
TargetLamportsPerSignature bin.Uint64 `json:"targetLamportsPerSignature"` // Desired fee rate for the cluster
|
||||
TargetSignaturesPerSlot bin.Uint64 `json:"targetSignaturesPerSlot"` // Desired signature rate for the cluster
|
||||
}
|
||||
|
||||
// GetFeeRateGovernor returns the fee rate governor information from the root bank.
|
||||
func (cl *Client) GetFeeRateGovernor(ctx context.Context) (out *GetFeeRateGovernorResult, err error) {
|
||||
params := []interface{}{}
|
||||
err = cl.rpcClient.CallFor(&out, "getFeeRateGovernor", params...)
|
||||
return
|
||||
}
|
Loading…
Reference in New Issue