Skip to content

Commit

Permalink
add spl balance in command
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Jan 24, 2025
1 parent a8b05a8 commit 6ac734d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions e2e/runner/balances.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type AccountBalances struct {
ZetaERC20 *big.Int
ZetaBTC *big.Int
ZetaSOL *big.Int
ZetaSPL *big.Int
EvmETH *big.Int
EvmZETA *big.Int
EvmERC20 *big.Int
Expand Down Expand Up @@ -72,6 +73,10 @@ func (r *E2ERunner) GetAccountBalances(skipBTC bool) (AccountBalances, error) {
if err != nil {
return AccountBalances{}, fmt.Errorf("get sol zrc20 balance: %w", err)
}
zetaSPL, err := r.getZRC20BalanceSafe(r.SPLZRC20)
if err != nil {
return AccountBalances{}, fmt.Errorf("get spl zrc20 balance: %w", err)
}

// evm
evmEth, err := r.EVMClient.BalanceAt(r.Ctx, r.EVMAddress(), nil)
Expand Down Expand Up @@ -140,6 +145,7 @@ func (r *E2ERunner) GetAccountBalances(skipBTC bool) (AccountBalances, error) {
ZetaERC20: zetaErc20,
ZetaBTC: zetaBtc,
ZetaSOL: zetaSol,
ZetaSPL: zetaSPL,
EvmETH: evmEth,
EvmZETA: evmZeta,
EvmERC20: evmErc20,
Expand Down Expand Up @@ -190,6 +196,7 @@ func (r *E2ERunner) PrintAccountBalances(balances AccountBalances) {
r.Logger.Print("* ERC20 balance: %s", balances.ZetaERC20.String())
r.Logger.Print("* BTC balance: %s", balances.ZetaBTC.String())
r.Logger.Print("* SOL balance: %s", balances.ZetaSOL.String())
r.Logger.Print("* SPL balance: %s", balances.ZetaSPL.String())

// evm
r.Logger.Print("EVM:")
Expand Down

0 comments on commit 6ac734d

Please sign in to comment.