diff --git a/src/hooks/useVaultV2.ts b/src/hooks/useVaultV2.ts index 13da3bf8..c6b74a92 100644 --- a/src/hooks/useVaultV2.ts +++ b/src/hooks/useVaultV2.ts @@ -233,7 +233,16 @@ export function useVaultV2({ txs.push(submitSetSelfAllocatorTx, setSelfAllocatorTx); - // Step 6.2 (Optional). Set initial allocator if provided. + // Step 6.2 As allocator, set max apy + const setMaxAPYTx = encodeFunctionData({ + abi: vaultv2Abi, + functionName: 'setMaxRate', + args: [63419583967n], // max max rate = 200e16 / (86400 * 365) // 200% APR + }); + + txs.push(setMaxAPYTx); + + // Step 6.3 (Optional). Set initial allocator if provided. if (allocator && allocator !== zeroAddress) { const setAllocatorTx = encodeFunctionData({ abi: vaultv2Abi, diff --git a/src/utils/networks.ts b/src/utils/networks.ts index c7b4d704..67c15a3e 100644 --- a/src/utils/networks.ts +++ b/src/utils/networks.ts @@ -6,7 +6,7 @@ import type { AgentMetadata } from './types'; const alchemyKey = process.env.NEXT_PUBLIC_ALCHEMY_API_KEY; const rpcPriority = process.env.NEXT_PUBLIC_RPC_PRIORITY; -const apiKey = process.env.NEXT_PUBLIC_THEGRAPH_API_KEY; +const _apiKey = process.env.NEXT_PUBLIC_THEGRAPH_API_KEY; /** * Helper function to get RPC URL with fallback logic. Priority behavior: