diff --git a/README.md b/README.md index 132b6024..e9685258 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,6 @@ A series of guides and a prototyping tools for creating custom pools that integrate with Balancer v3 -## Decision Records - -- Using SE-2 hardhat with added `hardhat-foundry` plugin - - devs can choose preference of deploying / testing with hardhat or foundry - - balancer will release npm packages for their v3 contracts - ## Requirements Before you begin, you need to install the following tools: @@ -18,7 +12,7 @@ Before you begin, you need to install the following tools: ## Quickstart -1. Clone the repo (with SSH since private for now) +1. Clone the repo ``` git clone git@github.com:MattPereira/scaffold-balancer-v3.git @@ -38,10 +32,27 @@ yarn start ## Deploying Contracts -1. Set a `DEPLOYER_PRIVATE_KEY` in a `.env` at path `packagages/hardhat/.env`. Only do this with a develpment specific wallet that has only testnet funds. **NEVER PUT REAL FUNDS AT RISK WITH A PLAIN TEXT PRIVATE KEY** +1. Set a `DEPLOYER_PRIVATE_KEY` in a `.env` at path `packagages/hardhat/.env` -2. Run the deploy script. Note that whenever you deploy new contract the frontend will automatically be updated to point at the newly deployed contract +2. Run the deploy script\* ``` yarn deploy --network sepolia ``` + +\*Whenever you deploy new contract the frontend will automatically update to point at the newly deployed contract + +## How To Create Custom Pool + +1. Deploy a contract that inherits from `IBasePool` and `BalancerPoolToken` and impliments the three required functions: `onSwap`, `computeInvariant`, and `computeBalance` + - [See docs on creating custom pool](https://docs-v3.balancer.fi/concepts/guides/create-custom-amm-with-novel-invariant.html#build-your-custom-amm) +2. Register the pool with the `Vault` by calling `VaultExtension.registerPool` with the necessary arguments +3. Initialize the pool with the `Vault` by calling `Router.initialize` with the necessary arguments + - [See docs on`Router.initialize`](https://docs-v3.balancer.fi/concepts/router/overview.html#initialize) + +## How To Interact With A Custom Pool + +- The `Router` is the recommended entrypoint for all user operations + - [See Router Technical Description](https://docs-v3.balancer.fi/concepts/router/technical.html) +- The `Router` provides functions for querying and executing `swap`, `add`, and `remove` + - [See Router API](https://docs-v3.balancer.fi/concepts/router/overview.html) diff --git a/packages/nextjs/app/pools/_components/PoolActions.tsx b/packages/nextjs/app/pools/_components/PoolActions.tsx index 3ee48066..c9692f03 100644 --- a/packages/nextjs/app/pools/_components/PoolActions.tsx +++ b/packages/nextjs/app/pools/_components/PoolActions.tsx @@ -22,15 +22,13 @@ export const PoolActions = () => {