types.gno
1.63 Kb ยท 55 lines
1package protocol_fee
2
3import "gno.land/p/nt/avl"
4
5type IProtocolFee interface {
6 IProtocolFeeManager
7 IProtocolFeeGetter
8}
9
10type IProtocolFeeManager interface {
11 DistributeProtocolFee() map[string]int64
12 SetDevOpsPct(pct int64)
13 SetGovStakerPct(pct int64)
14 AddToProtocolFee(tokenPath string, amount int64)
15 ClearTokenListWithAmount()
16 ClearAccuTransferToGovStaker()
17}
18
19type IProtocolFeeGetter interface {
20 GetDevOpsPct() int64
21 GetGovStakerPct() int64
22 GetTokenListWithAmount() map[string]int64
23 GetTokenList() []string
24 GetAmountOfToken(tokenPath string) int64
25 GetAccuTransfersToGovStaker() map[string]int64
26 GetAccuTransfersToDevOps() map[string]int64
27 GetAccuTransferToGovStakerByTokenPath(path string) int64
28 GetAccuTransferToDevOpsByTokenPath(path string) int64
29}
30
31type IProtocolFeeStore interface {
32 HasDevOpsPctStoreKey() bool
33 InitializeDevOpsPct() error
34 GetDevOpsPct() int64
35 SetDevOpsPct(pct int64) error
36
37 HasAccuToGovStakerStoreKey() bool
38 InitializeAccuToGovStaker() error
39 GetAccuToGovStaker() *avl.Tree
40 GetAccuToGovStakerItem(tokenPath string) (int64, bool)
41 SetAccuToGovStakerItem(tokenPath string, amount int64) error
42
43 HasAccuToDevOpsStoreKey() bool
44 InitializeAccuToDevOps() error
45 GetAccuToDevOps() *avl.Tree
46 GetAccuToDevOpsItem(tokenPath string) (int64, bool)
47 SetAccuToDevOpsItem(tokenPath string, amount int64) error
48
49 HasTokenListWithAmountsStoreKey() bool
50 InitializeTokenListWithAmount() error
51 GetTokenListWithAmounts() map[string]int64
52 SetTokenListWithAmounts(tokenListWithAmounts map[string]int64) error
53 GetTokenListWithAmountItem(tokenPath string) (int64, bool)
54 SetTokenListWithAmountItem(tokenPath string, amount int64) error
55}