This example demonstrates the new plugin for ERC4626 vaults, to deposit/withdraw get totalSuppy and more functions. You can also check your balance of the SHR token (Sozu Haus Resident)
- Install dependencies:
pnpm install- Copy the
.env.templateand populate with your values:
cp .env.template .envOPENAI_API_KEY: Your OpenAI API key for the AI modelWALLET_PRIVATE_KEY: Your wallet's private key (with 0x prefix)RPC_PROVIDER_URL: EVM network RPC URL (with sepolia mantle)
- Run the interactive CLI:
npx ts-node index.ts- Example interactions:
what's the symbol of the token in 0x28c52E6c053AD4F2727E2F8de2AD5B81139ca9D4
what's the symbol of the token in the SozuHausResidentVault
whats the total supply of SozuHausResidentVault
whats the total assets of SozuHausResidentVault
who is the owner of the vault 0x28c52E6c053AD4F2727E2F8de2AD5B81139ca9D4
what's the name of the vault 0x28c52E6c053AD4F2727E2F8de2AD5B81139ca9D4
what's the underlying token of the vault 0x28c52E6c053AD4F2727E2F8de2AD5B81139ca9D4
deposit 111 into the vault 0x28c52E6c053AD4F2727E2F8de2AD5B81139ca9D4 as my wallet address as receiver
what's my wallet address's max witdrawal amount of the vault SozuHausResidentVault
withdraw the max amount to my wallet address from the vault SozuHausResidentVault