Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

protocol_fee state

Back to all declarations

GetDomainPath

func() string

GetDomainPath returns the domain path of the protocol fee contract.

Open
OID
0c1c0f…3a8d:3
GetDomainPath details

Inspect func

GetVersionPackagePath

func() string

GetVersionPackagePath returns the current implementation package path.

Open
OID
0c1c0f…3a8d:5
GetVersionPackagePath details

Inspect func

cloneStringInt64Map

func(src map[string]int64) map[string]int64
Open
OID
0c1c0f…3a8d:6
cloneStringInt64Map details

Inspect func

cloneStringSlice

func(src []string) []string
Open
OID
0c1c0f…3a8d:8
cloneStringSlice details

Inspect func

DistributeProtocolFee

func()

DistributeProtocolFee distributes accumulated protocol fees to DevOps and GovStaker.

Open
OID
0c1c0f…3a8d:9
DistributeProtocolFee details

Inspect func

DistributeProtocolFeeByTokenPath

func(tokenPath string)

DistributeProtocolFeeByTokenPath distributes accumulated protocol fees for a single token path.

Open
OID
0c1c0f…3a8d:11
DistributeProtocolFeeByTokenPath details

Inspect func

SetDevOpsPct

func(pct int64)

SetDevOpsPct sets the percentage of protocol fees allocated to DevOps. Parameters: - pct: percentage (0-100)

Open
OID
0c1c0f…3a8d:12
SetDevOpsPct details

Inspect func

SetGovStakerPct

func(pct int64)

SetGovStakerPct sets the percentage of protocol fees allocated to GovStaker. Parameters: - pct: percentage (0-100)

Open
OID
0c1c0f…3a8d:13
SetGovStakerPct details

Inspect func

AddToProtocolFee

func(tokenPath string, amount int64) .uverse.error

AddToProtocolFee adds tokens to the protocol fee pool. Parameters: - tokenPath: path of the token - amount: amount to add

Open
OID
0c1c0f…3a8d:14
AddToProtocolFee details

Inspect func

GetDevOpsPct

func() int64

GetDevOpsPct returns the DevOps fee percentage.

Open
OID
0c1c0f…3a8d:15
GetDevOpsPct details

Inspect func

GetGovStakerPct

func() int64

GetGovStakerPct returns the GovStaker fee percentage.

Open
OID
0c1c0f…3a8d:16
GetGovStakerPct details

Inspect func

GetReservedTokens

func() []string

GetReservedTokens returns token paths reserved for distribution.

Open
OID
0c1c0f…3a8d:17
GetReservedTokens details

Inspect func

GetAccuTransfersToGovStaker

func() map[string]int64

GetAccuTransfersToGovStaker returns accumulated transfers to GovStaker.

Open
OID
0c1c0f…3a8d:18
GetAccuTransfersToGovStaker details

Inspect func

GetAccuTransfersToDevOps

func() map[string]int64

GetAccuTransfersToDevOps returns accumulated transfers to DevOps.

Open
OID
0c1c0f…3a8d:19
GetAccuTransfersToDevOps details

Inspect func

GetAccuTransferToGovStakerByTokenPath

func(tokenPath string) int64

GetAccuTransferToGovStakerByTokenPath returns accumulated GovStaker transfer for a token.

Open
OID
0c1c0f…3a8d:20
GetAccuTransferToGovStakerByTokenPath details

Inspect func

GetAccuTransferToDevOpsByTokenPath

func(tokenPath string) int64

GetAccuTransferToDevOpsByTokenPath returns accumulated DevOps transfer for a token.

Open
OID
0c1c0f…3a8d:21
GetAccuTransferToDevOpsByTokenPath details

Inspect func

GetActualDistributedToGovStaker

func() map[string]int64

GetActualDistributedToGovStaker returns actual transfers completed to GovStaker.

Open
OID
0c1c0f…3a8d:22
GetActualDistributedToGovStaker details

Inspect func

GetActualDistributedToDevOps

func() map[string]int64

GetActualDistributedToDevOps returns actual transfers completed to DevOps.

Open
OID
0c1c0f…3a8d:23
GetActualDistributedToDevOps details

Inspect func

GetActualDistributedToGovStakerByTokenPath

func(tokenPath string) int64

GetActualDistributedToGovStakerByTokenPath returns actual GovStaker transfer for a token.

Open
OID
0c1c0f…3a8d:24
GetActualDistributedToGovStakerByTokenPath details

Inspect func

GetActualDistributedToDevOpsByTokenPath

func(tokenPath string) int64

GetActualDistributedToDevOpsByTokenPath returns actual DevOps transfer for a token.

Open
OID
0c1c0f…3a8d:25
GetActualDistributedToDevOpsByTokenPath details

Inspect func

currentAddress

.uverse.address

Value

<gnolang.StringValue>

domainPath

string

Value

"gno.land/r/gnoswap/protocol_fee"

versionManager

*version_manager.versionManager
Open
OID
0c1c0f…3a8d:49
versionManager details

Inspect pointer

initializeDomainStore

func(int, rlm .uverse.realm, kvStore store.KVStore) interface{...}
Open
OID
0c1c0f…3a8d:33
initializeDomainStore details

Inspect func

getImplementation

func() protocol_fee.IProtocolFee
Open
OID
0c1c0f…3a8d:34
getImplementation details

Inspect func

updateImplementation

func() .uverse.error
Open
OID
0c1c0f…3a8d:35
updateImplementation details

Inspect func

StoreKey

type

Value

protocol_fee.StoreKey

StoreKeyDevOpsPct

protocol_fee.StoreKey

Value

<gnolang.StringValue>

StoreKeyAccuToGovStaker

protocol_fee.StoreKey

// tokenPath -> amount

Value

<gnolang.StringValue>

StoreKeyAccuToDevOps

protocol_fee.StoreKey

// tokenPath -> amount

Value

<gnolang.StringValue>

StoreKeyDistributedToGovStakerHistory

protocol_fee.StoreKey

// tokenPath -> amount

Value

<gnolang.StringValue>

StoreKeyDistributedToDevOpsHistory

protocol_fee.StoreKey

// tokenPath -> amount

Value

<gnolang.StringValue>

StoreKeyReservedTokens

protocol_fee.StoreKey

Value

<gnolang.StringValue>

defaultDevOpsPct

int64

Value

0

errSpoofedRealm

untyped string

Value

"rlm does not match the current crossing frame"

NewBPTreeN

func(fanout int) *v0.BPTree

NewBPTreeN allocates a BP-tree under /r/gnoswap/protocol\_fee's realm context so tree.Set leaf-slot writes clear the readonly-taint gate regardless of which realm (protocol\_fee/v1, mock, tests) calls Set. Callers must allocate protocol\_fee trees through here rather than bptree.NewBPTreeN directly.

Open
OID
0c1c0f…3a8d:36
NewBPTreeN details

Inspect func

protocolFeeStore

type

Value

protocol_fee.protocolFeeStore

NewProtocolFeeStore

func(kvStore store.KVStore) protocol_fee.IProtocolFeeStore

NewprotocolFeeStore creates a new protocol fee store instance with the provided KV store. This function is used by the upgrade system to create storage instances for each implementation.

Open
OID
0c1c0f…3a8d:38
NewProtocolFeeStore details

Inspect func

IProtocolFee

type

Value

protocol_fee.IProtocolFee

IProtocolFeeManager

type

Value

protocol_fee.IProtocolFeeManager

IProtocolFeeGetter

type

Value

protocol_fee.IProtocolFeeGetter

IProtocolFeeStore

type

Value

protocol_fee.IProtocolFeeStore

RegisterInitializer

func(initializer func(...))

RegisterInitializer registers a new pool implementation version. This function is called by each version (v1, v2, etc.) during initialization to register their implementation with the proxy system. The initializer function creates a new instance of the implementation using the provided protocolFeeStore interface. It receives a realm value that resolves to the protocol\_fee proxy realm — the only address with write permission on the shared KV store — so any per-version store bootstrapping performed inside the initializer passes the proxy's authorization check. Security: Only contracts within the domain path can register initializers. Each package path can only register once to prevent duplicate registrations.

Open
OID
0c1c0f…3a8d:39
RegisterInitializer details

Inspect func

UpgradeImpl

func(packagePath string)

UpgradeImpl switches the active protocol fee implementation to a different version. This function allows seamless upgrades from one version to another without data migration or downtime. Security: Only admin or governance can perform upgrades. The new implementation must have been previously registered via RegisterInitializer.

Open
OID
0c1c0f…3a8d:41
UpgradeImpl details

Inspect func

GetImplementationPackagePath

func() string

GetImplementationPackagePath returns the package path of the currently active implementation.

Open
OID
0c1c0f…3a8d:42
GetImplementationPackagePath details

Inspect func
GetDomainPath : func() string Inspect
GetVersionPackagePath : func() string Inspect
cloneStringInt64Map : func(src map[string]int64) map[string]int64 Inspect
cloneStringSlice : func(src []string) []string Inspect
DistributeProtocolFee : func() Inspect
DistributeProtocolFeeByTokenPath : func(tokenPath string) Inspect
SetDevOpsPct : func(pct int64) Inspect
SetGovStakerPct : func(pct int64) Inspect
AddToProtocolFee : func(tokenPath string, amount int64) .uverse.error Inspect
GetDevOpsPct : func() int64 Inspect
GetGovStakerPct : func() int64 Inspect
GetReservedTokens : func() []string Inspect
GetAccuTransfersToGovStaker : func() map[string]int64 Inspect
GetAccuTransfersToDevOps : func() map[string]int64 Inspect
GetAccuTransferToGovStakerByTokenPath : func(tokenPath string) int64 Inspect
GetAccuTransferToDevOpsByTokenPath : func(tokenPath string) int64 Inspect
GetActualDistributedToGovStaker : func() map[string]int64 Inspect
GetActualDistributedToDevOps : func() map[string]int64 Inspect
GetActualDistributedToGovStakerByTokenPath : func(tokenPath string) int64 Inspect
GetActualDistributedToDevOpsByTokenPath : func(tokenPath string) int64 Inspect
currentAddress : .uverse.address =<gnolang.StringValue>
domainPath : string ="gno.land/r/gnoswap/protocol_fee"
kvStore : *store.kvStore Inspect
versionManager : *version_manager.versionManager Inspect
implementation : *v1.protocolFeeV1 Inspect
init.25 : func() Inspect
initializeDomainStore : func(int, rlm .uverse.realm, kvStore store.KVStore) interface{...} Inspect
getImplementation : func() protocol_fee.IProtocolFee Inspect
updateImplementation : func() .uverse.error Inspect
StoreKey : type =protocol_fee.StoreKey
StoreKeyDevOpsPct : protocol_fee.StoreKey =<gnolang.StringValue>
StoreKeyAccuToGovStaker : protocol_fee.StoreKey =<gnolang.StringValue>
StoreKeyAccuToDevOps : protocol_fee.StoreKey =<gnolang.StringValue>
StoreKeyDistributedToGovStakerHistory : protocol_fee.StoreKey =<gnolang.StringValue>
StoreKeyDistributedToDevOpsHistory : protocol_fee.StoreKey =<gnolang.StringValue>
StoreKeyReservedTokens : protocol_fee.StoreKey =<gnolang.StringValue>
defaultDevOpsPct : int64 =0
errSpoofedRealm : untyped string ="rlm does not match the current crossing frame"
NewBPTreeN : func(fanout int) *v0.BPTree Inspect
protocolFeeStore : type =protocol_fee.protocolFeeStore
NewProtocolFeeStore : func(kvStore store.KVStore) protocol_fee.IProtocolFeeStore Inspect
IProtocolFee : type =protocol_fee.IProtocolFee
IProtocolFeeManager : type =protocol_fee.IProtocolFeeManager
IProtocolFeeGetter : type =protocol_fee.IProtocolFeeGetter
IProtocolFeeStore : type =protocol_fee.IProtocolFeeStore
RegisterInitializer : func(initializer func(...)) Inspect
UpgradeImpl : func(packagePath string) Inspect
GetImplementationPackagePath : func() string Inspect