From cef98d005e6d6e45063c36dc61803330ebc22d45 Mon Sep 17 00:00:00 2001 From: Matthew Pereira Date: Mon, 18 Mar 2024 16:28:28 -0700 Subject: [PATCH] add planning comments --- packages/hardhat/scripts/RegisterPool.s.sol | 2 +- .../app/pools/_components/PoolComposition.tsx | 2 ++ .../nextjs/app/pools/_components/PoolDetails.tsx | 14 ++++++++++++++ packages/nextjs/app/pools/page.tsx | 3 +++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/hardhat/scripts/RegisterPool.s.sol b/packages/hardhat/scripts/RegisterPool.s.sol index a1120530..2eb9d971 100644 --- a/packages/hardhat/scripts/RegisterPool.s.sol +++ b/packages/hardhat/scripts/RegisterPool.s.sol @@ -7,7 +7,7 @@ import { IVaultExtension, TokenConfig, TokenType, IERC20, IRateProvider } from " /** * Register an already deployed pool on sepolia - * @dev need to figure out TokenConfig's IRateProvider. Is it a contract that we need to deploy first? + * @dev need to figure out TokenConfig's IRateProvider. Is it a seperate contract that we need to deploy first? * * https://docs-v3.balancer.fi/concepts/vault/onchain-api.html#registerpool * https://github.com/balancer/balancer-v3-monorepo/blob/ad6e2f7ad2fc0b54ff7eb5d704d6635a1ccc093b/pkg/interfaces/contracts/vault/IVaultExtension.sol#L58-L90 diff --git a/packages/nextjs/app/pools/_components/PoolComposition.tsx b/packages/nextjs/app/pools/_components/PoolComposition.tsx index 395412fd..df6b493f 100644 --- a/packages/nextjs/app/pools/_components/PoolComposition.tsx +++ b/packages/nextjs/app/pools/_components/PoolComposition.tsx @@ -2,6 +2,8 @@ import { SkeletonLoader } from "~~/components/common"; /** * Display a pool's token composition including the tokens' address, balance, and weight + * + * https://docs-v3.balancer.fi/concepts/vault/onchain-api.html#pool-information */ export const PoolComposition = () => { return ( diff --git a/packages/nextjs/app/pools/_components/PoolDetails.tsx b/packages/nextjs/app/pools/_components/PoolDetails.tsx index cf3590f2..e6fa2850 100644 --- a/packages/nextjs/app/pools/_components/PoolDetails.tsx +++ b/packages/nextjs/app/pools/_components/PoolDetails.tsx @@ -6,6 +6,20 @@ import { usePoolContract } from "~~/hooks/balancer"; /** * Display a pool's contract details + * @dev do we want to display any of the pool config details? -> https://docs-v3.balancer.fi/concepts/vault/onchain-api.html#getpoolconfig + * + * struct PoolConfig { + bool isPoolRegistered; + bool isPoolInitialized; + bool isPoolPaused; + bool isPoolInRecoveryMode; + bool hasDynamicSwapFee; + uint64 staticSwapFeePercentage; // stores an 18-decimal FP value (max FixedPoint.ONE) + uint24 tokenDecimalDiffs; // stores 18-(token decimals), for each token + uint32 pauseWindowEndTime; + PoolHooks hooks; + LiquidityManagement liquidityManagement; + } */ export const PoolDetails = ({ poolAddress }: { poolAddress: string }) => { const { data: pool } = usePoolContract(poolAddress); diff --git a/packages/nextjs/app/pools/page.tsx b/packages/nextjs/app/pools/page.tsx index 51db2e0d..2d867740 100644 --- a/packages/nextjs/app/pools/page.tsx +++ b/packages/nextjs/app/pools/page.tsx @@ -9,6 +9,9 @@ import deployedContractsData from "~~/contracts/deployedContracts"; import { usePoolContract } from "~~/hooks/balancer"; import scaffoldConfig from "~~/scaffold.config"; +/** + * + */ const Pools: NextPage = () => { const [poolAddress, setPoolAddress] = useState
(""); const [isDropdownOpen, setIsDropdownOpen] = useState(false);