From 1020f200e3121eac0f89e1700fb74970660f13bc Mon Sep 17 00:00:00 2001 From: n3wbie Date: Tue, 20 Feb 2024 19:44:11 +0900 Subject: [PATCH] comment: public or private struct --- pool/type.gno | 8 ++++---- position/type.gno | 15 ++++----------- router/type.gno | 18 +++++++++--------- staker/type.gno | 6 +++--- 4 files changed, 20 insertions(+), 27 deletions(-) diff --git a/pool/type.gno b/pool/type.gno index 8387e2e1..2d071067 100644 --- a/pool/type.gno +++ b/pool/type.gno @@ -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 @@ -43,7 +43,7 @@ type SwapState struct { liquidity bigint } -type StepComputations struct { +type StepComputations struct { // r3v4_xxx: private? sqrtPriceStartX96 bigint tickNext int32 initialized bool diff --git a/position/type.gno b/position/type.gno index 2c66f29e..90feafc8 100644 --- a/position/type.gno +++ b/position/type.gno @@ -23,7 +23,7 @@ type Position struct { tokensOwed1 bigint } -type MintParams struct { +type MintParams struct { // r3v4_xxx: private? token0 string token1 string fee uint16 @@ -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 @@ -48,7 +48,7 @@ type AddLiquidityParams struct { amount1Min bigint } -type IncreaseLiquidityParams struct { +type IncreaseLiquidityParams struct { // r3v4_xxx: private? tokenId uint64 amount0Desired bigint amount1Desired bigint @@ -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 -} diff --git a/router/type.gno b/router/type.gno index 5cb85551..1fdff15c 100644 --- a/router/type.gno +++ b/router/type.gno @@ -3,17 +3,17 @@ 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 @@ -21,7 +21,7 @@ type QuoterTarget struct { } // SINGLE SWAP -type SingleSwapParams struct { +type SingleSwapParams struct { // r3v4_xxx: private? tokenIn string tokenOut string fee uint16 @@ -29,7 +29,7 @@ type SingleSwapParams struct { } // MUTLI SWAP -type SwapParams struct { +type SwapParams struct { // r3v4_xxx: private? tokenIn string tokenOut string fee uint16 @@ -38,7 +38,7 @@ type SwapParams struct { } // SWAP DATA -type SwapCallbackData struct { +type SwapCallbackData struct { // r3v4_xxx: private? tokenIn string tokenOut string fee uint16 diff --git a/staker/type.gno b/staker/type.gno index 4c94051b..79b7b08d 100644 --- a/staker/type.gno +++ b/staker/type.gno @@ -4,7 +4,7 @@ import ( "std" ) -type Incentive struct { +type Incentive struct { // r3v4_xxx: private? targetPoolPath string rewardToken string rewardAmount bigint @@ -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