From f51712176be82ccf46d90b8d07adc886bd5fa3ca Mon Sep 17 00:00:00 2001 From: Matthew Pereira Date: Thu, 21 Mar 2024 21:27:05 -0700 Subject: [PATCH] register script closer to functional --- packages/hardhat/scripts/registerPool.ts | 34 +++++++++---------- .../app/pools/_components/PoolActions.tsx | 2 ++ packages/nextjs/app/pools/page.tsx | 4 +-- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/packages/hardhat/scripts/registerPool.ts b/packages/hardhat/scripts/registerPool.ts index b8ab80d5..0662d376 100644 --- a/packages/hardhat/scripts/registerPool.ts +++ b/packages/hardhat/scripts/registerPool.ts @@ -33,31 +33,31 @@ async function main() { { token: "0xB77EB1A70A96fDAAeB31DB1b42F2b8b5846b2613", // sepoliaDAI tokenType: 0, // STANDARD - rateProvider: "???", // contract address that satisfies IRateProvider? + rateProvider: "0x0000000000000000000000000000000000000000", // https://docs-v3.balancer.fi/reference/contracts/rate-providers.html#none-of-the-assets yieldFeeExempt: false, }, { token: "0x80D6d3946ed8A1Da4E226aa21CCdDc32bd127d1A", // sepoliaUSDC tokenType: 0, // STANDARD - rateProvider: "???", // contract address that satisfies IRateProvider? + rateProvider: "0x0000000000000000000000000000000000000000", // https://docs-v3.balancer.fi/reference/contracts/rate-providers.html#none-of-the-assets yieldFeeExempt: false, }, ]; - const pauseWindowEndTime = 0; // The timestamp after which it is no longer possible to pause the pool - const pauseManager = hre.ethers.ZeroAddress; // Optional contract the Vault will allow to pause the pool - const hookConfig = [ - // Flags indicating which hooks the pool supports - { - shouldCallBeforeInitialize: false, - shouldCallAfterInitialize: false, - shouldCallBeforeSwap: false, - shouldCallAfterSwap: false, - shouldCallBeforeAddLiquidity: false, - shouldCallAfterAddLiquidity: false, - shouldCallBeforeRemoveLiquidity: false, - shouldCallAfterRemoveLiquidity: false, - }, - ]; + // The timestamp after which it is no longer possible to pause the pool + const pauseWindowEndTime = 0; + // Optional contract the Vault will allow to pause the pool + const pauseManager = hre.ethers.ZeroAddress; + // Flags indicating which hooks the pool supports + const hookConfig = { + shouldCallBeforeInitialize: false, + shouldCallAfterInitialize: false, + shouldCallBeforeSwap: false, + shouldCallAfterSwap: false, + shouldCallBeforeAddLiquidity: false, + shouldCallAfterAddLiquidity: false, + shouldCallBeforeRemoveLiquidity: false, + shouldCallAfterRemoveLiquidity: false, + }; const liquidityManagement = { supportsAddLiquidityCustom: false, supportsRemoveLiquidityCustom: false, diff --git a/packages/nextjs/app/pools/_components/PoolActions.tsx b/packages/nextjs/app/pools/_components/PoolActions.tsx index 2bfdbfb6..9d0b66fc 100644 --- a/packages/nextjs/app/pools/_components/PoolActions.tsx +++ b/packages/nextjs/app/pools/_components/PoolActions.tsx @@ -7,6 +7,8 @@ type Action = "Swap" | "Join" | "Exit"; /** * Allow user to perform swap, join, and exit transactions with a pool + * + * inspirational demo 👉 https://docs.balancer.fi/tools/core/pools.html */ export const PoolActions = () => { const [activeTab, setActiveTab] = useState("Swap"); diff --git a/packages/nextjs/app/pools/page.tsx b/packages/nextjs/app/pools/page.tsx index 9d891240..3cc594d0 100644 --- a/packages/nextjs/app/pools/page.tsx +++ b/packages/nextjs/app/pools/page.tsx @@ -42,7 +42,7 @@ const Pools: NextPage = () => {

-
+
{
-
+

{pool?.name}