Skip to content

Commit

Permalink
comment: public or private struct
Browse files Browse the repository at this point in the history
  • Loading branch information
r3v4s committed Feb 20, 2024
1 parent 3dfbff8 commit 1020f20
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 27 deletions.
8 changes: 4 additions & 4 deletions pool/type.gno
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ type ProtocolFees struct {
token1 bigint
}

type ModifyPositionParams struct {
type ModifyPositionParams struct { // r3v4_xxx: private?
owner std.Address
tickLower int32
tickUpper int32
liquidityDelta bigint
}

type SwapCache struct {
type SwapCache struct { // r3v4_xxx: private?
feeProtocol uint8
liquidityStart bigint
}

type SwapState struct {
type SwapState struct { // r3v4_xxx: private?
amountSpecifiedRemaining bigint
amountCalculated bigint
sqrtPriceX96 bigint
Expand All @@ -43,7 +43,7 @@ type SwapState struct {
liquidity bigint
}

type StepComputations struct {
type StepComputations struct { // r3v4_xxx: private?
sqrtPriceStartX96 bigint
tickNext int32
initialized bool
Expand Down
15 changes: 4 additions & 11 deletions position/type.gno
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Position struct {
tokensOwed1 bigint
}

type MintParams struct {
type MintParams struct { // r3v4_xxx: private?
token0 string
token1 string
fee uint16
Expand All @@ -37,7 +37,7 @@ type MintParams struct {
deadline bigint
}

type AddLiquidityParams struct {
type AddLiquidityParams struct { // r3v4_xxx: private?
poolKey string
recipient std.Address // XXX de facto: hardcoded to nft manager contract address
tickLower int32
Expand All @@ -48,7 +48,7 @@ type AddLiquidityParams struct {
amount1Min bigint
}

type IncreaseLiquidityParams struct {
type IncreaseLiquidityParams struct { // r3v4_xxx: private?
tokenId uint64
amount0Desired bigint
amount1Desired bigint
Expand All @@ -57,15 +57,8 @@ type IncreaseLiquidityParams struct {
deadline bigint
}

type DecreaseLiquidityParams struct {
type DecreaseLiquidityParams struct { // r3v4_xxx: private?
tokenId uint64
liquidity bigint
deadline bigint
}

type CollectParams struct {
tokenId uint64
recipient std.Address
amount0Max bigint
amount1Max bigint
}
18 changes: 9 additions & 9 deletions router/type.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@ package router
import "std"

// SWAP TYPE
type SwapType string
type SwapType string // r3v4_xxx: private?

const (
ExactIn SwapType = "EXACT_IN"
ExactOut SwapType = "EXACT_OUT"
ExactIn SwapType = "EXACT_IN" // r3v4_xxx: private?
ExactOut SwapType = "EXACT_OUT" // r3v4_xxx: private?
)

// PRICE
type SwapPaths map[int]string
type TokenPairs map[string][]string
type QuoterTarget struct {
type SwapPaths map[int]string // r3v4_xxx: private?
type TokenPairs map[string][]string // r3v4_xxx: private?
type QuoterTarget struct { // r3v4_xxx: private?
pct int
pctAmount bigint
targetPath string
resultRatioX96 bigint
}

// SINGLE SWAP
type SingleSwapParams struct {
type SingleSwapParams struct { // r3v4_xxx: private?
tokenIn string
tokenOut string
fee uint16
amountSpecified bigint
}

// MUTLI SWAP
type SwapParams struct {
type SwapParams struct { // r3v4_xxx: private?
tokenIn string
tokenOut string
fee uint16
Expand All @@ -38,7 +38,7 @@ type SwapParams struct {
}

// SWAP DATA
type SwapCallbackData struct {
type SwapCallbackData struct { // r3v4_xxx: private?
tokenIn string
tokenOut string
fee uint16
Expand Down
6 changes: 3 additions & 3 deletions staker/type.gno
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"std"
)

type Incentive struct {
type Incentive struct { // r3v4_xxx: private?
targetPoolPath string
rewardToken string
rewardAmount bigint
Expand All @@ -13,14 +13,14 @@ type Incentive struct {
refundee std.Address
}

type Deposit struct {
type Deposit struct { // r3v4_xxx: private?
owner std.Address
numberOfStakes uint64
stakeTimestamp int64
targetPoolPath string
}

type StakingRewards struct {
type StakingRewards struct { // r3v4_xxx: private? or is it for gov?
Tier1 uint8
Tier2 uint8
Tier3 uint8
Expand Down

0 comments on commit 1020f20

Please sign in to comment.