Skip to content

Commit

Permalink
add planning comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPereira committed Mar 18, 2024
1 parent 408cd8c commit cef98d0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hardhat/scripts/RegisterPool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions packages/nextjs/app/pools/_components/PoolComposition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
14 changes: 14 additions & 0 deletions packages/nextjs/app/pools/_components/PoolDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions packages/nextjs/app/pools/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Address>("");
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
Expand Down

0 comments on commit cef98d0

Please sign in to comment.