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

instance.gno

0.71 Kb · 26 lines
 1package protocol_fee
 2
 3import (
 4	"gno.land/r/gnoswap/protocol_fee"
 5)
 6
 7type protocolFeeV1 struct {
 8	store protocol_fee.IProtocolFeeStore
 9}
10
11func (pf *protocolFeeV1) getProtocolFeeState() *protocolFeeState {
12	return NewProtocolFeeStateBy(pf.store)
13}
14
15// NewProtocolFeeV1 creates the protocol-fee v1 implementation backed by protocolFeeStore.
16//
17// Parameters:
18//   - protocolFeeStore: Store implementation containing the protocol-fee state for this version.
19//
20// Returns:
21//   - implementation: An IProtocolFee implementation that exposes v1 behavior through protocolFeeStore.
22func NewProtocolFeeV1(protocolFeeStore protocol_fee.IProtocolFeeStore) protocol_fee.IProtocolFee {
23	return &protocolFeeV1{
24		store: protocolFeeStore,
25	}
26}