-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Expected Behavior
Example wallet has balance in both ETH / USDC
ETH balance 0.012002096113860558
USDC balance 12.60609
Actual Behavior
ETH balance 0.0
USDC balance 0.0
Using the wallet() / walletDisplay() can do expected behaviour
Steps to Reproduce the Problem
- prepare reproduce.ts
import { CrocEnv } from '../croc';
import { ethers } from 'ethers';
import * as dotenv from 'dotenv';
// console.log({ path: __dirname+'/.env' })
dotenv.config();
const USDC = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" // USDC on mainnet
// set up RPC
const wallet = new ethers.Wallet(KEY)
console.log("Processing wallet", wallet.address)
const croc = new CrocEnv("mainnet", wallet)
// balance before swap
const ethBalance = await croc.tokenEth().balanceDisplay(wallet.address)
console.log("ETH balance", ethBalance)
const usdcBalance = await croc.token(USDC).balanceDisplay(wallet.address)
console.log("USDC balance", usdcBalance)
- run in terminal
ts-node reproduce.ts
## Specifications
- Version: 0.3.9-3
- Platform: Mac OS
- ts-node version: v10.9.2
- other tsconfig.json and package.json same as sdk package.
Metadata
Metadata
Assignees
Labels
No labels