proxy.gno
3.35 Kb · 91 lines
1package protocol_fee
2
3// DistributeProtocolFee distributes accumulated protocol fees to DevOps and GovStaker.
4func DistributeProtocolFee(cur realm) {
5 getImplementation().DistributeProtocolFee(0, cur)
6}
7
8// DistributeProtocolFeeByTokenPath distributes accumulated protocol fees for a single token path.
9func DistributeProtocolFeeByTokenPath(cur realm, tokenPath string) {
10 getImplementation().DistributeProtocolFeeByTokenPath(0, cur, tokenPath)
11}
12
13// SetDevOpsPct sets the percentage of protocol fees allocated to DevOps.
14//
15// Parameters:
16// - pct: percentage (0-100)
17func SetDevOpsPct(cur realm, pct int64) {
18 getImplementation().SetDevOpsPct(0, cur, pct)
19}
20
21// SetGovStakerPct sets the percentage of protocol fees allocated to GovStaker.
22//
23// Parameters:
24// - pct: percentage (0-100)
25func SetGovStakerPct(cur realm, pct int64) {
26 getImplementation().SetGovStakerPct(0, cur, pct)
27}
28
29// AddToProtocolFee adds tokens to the protocol fee pool.
30//
31// Parameters:
32// - tokenPath: path of the token
33// - amount: amount to add
34func AddToProtocolFee(cur realm, tokenPath string, amount int64) error {
35 return getImplementation().AddToProtocolFee(0, cur, tokenPath, amount)
36}
37
38// GetDevOpsPct returns the DevOps fee percentage.
39func GetDevOpsPct() int64 {
40 return getImplementation().GetDevOpsPct()
41}
42
43// GetGovStakerPct returns the GovStaker fee percentage.
44func GetGovStakerPct() int64 {
45 return getImplementation().GetGovStakerPct()
46}
47
48// GetReservedTokens returns token paths reserved for distribution.
49func GetReservedTokens() []string {
50 return cloneStringSlice(getImplementation().GetReservedTokens())
51}
52
53// GetAccuTransfersToGovStaker returns accumulated transfers to GovStaker.
54func GetAccuTransfersToGovStaker() map[string]int64 {
55 return cloneStringInt64Map(getImplementation().GetAccuTransfersToGovStaker())
56}
57
58// GetAccuTransfersToDevOps returns accumulated transfers to DevOps.
59func GetAccuTransfersToDevOps() map[string]int64 {
60 return cloneStringInt64Map(getImplementation().GetAccuTransfersToDevOps())
61}
62
63// GetAccuTransferToGovStakerByTokenPath returns accumulated GovStaker transfer for a token.
64func GetAccuTransferToGovStakerByTokenPath(tokenPath string) int64 {
65 return getImplementation().GetAccuTransferToGovStakerByTokenPath(tokenPath)
66}
67
68// GetAccuTransferToDevOpsByTokenPath returns accumulated DevOps transfer for a token.
69func GetAccuTransferToDevOpsByTokenPath(tokenPath string) int64 {
70 return getImplementation().GetAccuTransferToDevOpsByTokenPath(tokenPath)
71}
72
73// GetActualDistributedToGovStaker returns actual transfers completed to GovStaker.
74func GetActualDistributedToGovStaker() map[string]int64 {
75 return cloneStringInt64Map(getImplementation().GetActualDistributedToGovStaker())
76}
77
78// GetActualDistributedToDevOps returns actual transfers completed to DevOps.
79func GetActualDistributedToDevOps() map[string]int64 {
80 return cloneStringInt64Map(getImplementation().GetActualDistributedToDevOps())
81}
82
83// GetActualDistributedToGovStakerByTokenPath returns actual GovStaker transfer for a token.
84func GetActualDistributedToGovStakerByTokenPath(tokenPath string) int64 {
85 return getImplementation().GetActualDistributedToGovStakerByTokenPath(tokenPath)
86}
87
88// GetActualDistributedToDevOpsByTokenPath returns actual DevOps transfer for a token.
89func GetActualDistributedToDevOpsByTokenPath(tokenPath string) int64 {
90 return getImplementation().GetActualDistributedToDevOpsByTokenPath(tokenPath)
91}