Skip to content

Commit

Permalink
fix evm test
Browse files Browse the repository at this point in the history
  • Loading branch information
wifiboy16 committed Aug 31, 2023
1 parent 813a567 commit 9367cde
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions testutils/evm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ func TestCallErc20Contract(t *testing.T) {
t.Fatal(err)
}
toAmount := int64(2)
toMeerAmount := big.NewInt(1e18).Mul(big.NewInt(1e18), big.NewInt(2))
for i := 0; i < 2; i++ {
_, _ = h.Wallet.NewAddress()
to := h.Wallet.ethAddrs[uint32(i+1)]
// send 2 meer
txid, err := h.Wallet.CreateLegacyTx(h.Wallet.privkeys[0], &to, 0, 21000, big.NewInt(1e18).Mul(big.NewInt(1e18), big.NewInt(2)), nil)
txid, err := h.Wallet.CreateLegacyTx(h.Wallet.privkeys[0], &to, 0, 21000, toMeerAmount, nil)
if err != nil {
t.Fatal(err)
}
Expand All @@ -117,7 +118,7 @@ func TestCallErc20Contract(t *testing.T) {
if err != nil {
log.Fatal(err)
}
assert.Equal(t, meerBa, big.NewInt(1e16))
assert.Equal(t, meerBa, toMeerAmount)
ba, err = tokenCall.BalanceOf(&bind.CallOpts{}, h.Wallet.ethAddrs[uint32(i)])
if err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 9367cde

Please sign in to comment.