github.com/hungdoo/bot@v0.0.0-20240325145135-dd1f386f7b81/src/packages/command/balance/command_test.go (about) 1 package balance 2 3 import ( 4 "testing" 5 "time" 6 7 "github.com/ethereum/go-ethereum/common" 8 command "github.com/hungdoo/bot/src/packages/command/common" 9 "github.com/shopspring/decimal" 10 ) 11 12 func TestBalance(t *testing.T) { 13 rpc := "https://mainnet.gateway.tenderly.co" 14 15 cmd := &BalanceCommand{ 16 Command: command.Command{ 17 Name: "test", 18 Enabled: true, 19 Type: command.Balance, 20 IdleTime: time.Second * 30, 21 }, 22 Rpc: rpc, 23 Wallets: []Wallet{ 24 { 25 Address: common.HexToAddress("0x3b245f18149c1cb082cc3ddf05a483e8a79ae677"), 26 PreBalance: decimal.Zero, 27 }, 28 }, 29 } 30 31 res, err := cmd.Execute(true, "") 32 33 t.Log(res) 34 t.Log(err) 35 }