forked from blocto/solana-go-sdk
/
get_fee_rate_governor.go
37 lines (30 loc) · 1.29 KB
/
get_fee_rate_governor.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package rpc
import "context"
// GetFeeRateGovernorResponse is a full raw rpc response of `getFeeRateGovernor`
type GetFeeRateGovernorResponse struct {
GeneralResponse
Result GetFeeRateGovernorResponseResult `json:"result"`
}
type GetFeeRateGovernorResponseResult struct {
Context Context `json:"context"`
Value GetFeeRateGovernorResponseResultValue `json:"value"`
}
type GetFeeRateGovernorResponseResultValue struct {
FeeRateGovernor FeeRateGovernor `json:"feeRateGovernor"`
}
type FeeRateGovernor struct {
MaxLamportsPerSignature uint64 `json:"maxLamportsPerSignature"`
MinLamportsPerSignature uint64 `json:"minLamportsPerSignature"`
TargetLamportsPerSignature uint64 `json:"targetLamportsPerSignature"`
TargetSignaturesPerSlot uint64 `json:"targetSignaturesPerSlot"`
BurnPercent uint8 `json:"burnPercent"`
}
// DEPRECATED
// GetFeeRateGovernor returns the fee rate governor information from the root bank
func (c *RpcClient) GetFeeRateGovernor(ctx context.Context) (GetFeeRateGovernorResponse, error) {
return c.processGetFeeRateGovernor(c.Call(ctx, "getFeeRateGovernor"))
}
func (c *RpcClient) processGetFeeRateGovernor(body []byte, rpcErr error) (res GetFeeRateGovernorResponse, err error) {
err = c.processRpcCall(body, rpcErr, &res)
return
}