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