Skip to content

Commit

Permalink
fix api change test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor G committed Apr 19, 2024
1 parent 46c6e97 commit 83a514a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions fvm/evm/handler/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestHandler_TransactionRunOrPanic(t *testing.T) {
return result, nil
},
}
handler := handler.NewContractHandler(flow.Emulator, rootAddr, flowTokenAddress, bs, aa, backend, em)
handler := handler.NewContractHandler(flow.Emulator, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, em)

coinbase := types.NewAddress(gethCommon.Address{})

Expand Down Expand Up @@ -163,7 +163,7 @@ func TestHandler_TransactionRunOrPanic(t *testing.T) {
}, nil
},
}
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, bs, aa, backend, em)
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, em)

coinbase := types.NewAddress(gethCommon.Address{})

Expand Down Expand Up @@ -220,7 +220,7 @@ func TestHandler_TransactionRunOrPanic(t *testing.T) {
return &types.Result{}, types.NewFatalError(fmt.Errorf("Fatal error"))
},
}
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, bs, aa, backend, em)
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, em)
assertPanic(t, errors.IsFailure, func() {
tx := eoa.PrepareSignAndEncodeTx(
t,
Expand Down Expand Up @@ -464,7 +464,7 @@ func TestHandler_COA(t *testing.T) {
},
}

handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, bs, aa, backend, em)
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, em)

account := handler.AccountByAddress(testutils.RandomAddress(t), false)
account.Withdraw(types.NewBalanceFromUFix64(1))
Expand All @@ -481,7 +481,7 @@ func TestHandler_COA(t *testing.T) {
},
}

handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, bs, aa, backend, em)
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, em)
account := handler.AccountByAddress(testutils.RandomAddress(t), true)

account.Withdraw(types.NewBalanceFromUFix64(1))
Expand All @@ -498,7 +498,7 @@ func TestHandler_COA(t *testing.T) {
},
}

handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, bs, aa, backend, em)
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, em)
account := handler.AccountByAddress(testutils.RandomAddress(t), true)

account.Withdraw(types.NewBalanceFromUFix64(0))
Expand All @@ -515,7 +515,7 @@ func TestHandler_COA(t *testing.T) {
},
}

handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, bs, aa, backend, em)
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, em)
account := handler.AccountByAddress(testutils.RandomAddress(t), true)

account.Withdraw(types.NewBalanceFromUFix64(0))
Expand Down Expand Up @@ -545,7 +545,7 @@ func TestHandler_COA(t *testing.T) {
},
}

handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, bs, aa, backend, em)
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, em)
account := handler.AccountByAddress(testutils.RandomAddress(t), true)

account.Deposit(types.NewFlowTokenVault(types.NewBalanceFromUFix64(1)))
Expand All @@ -562,7 +562,7 @@ func TestHandler_COA(t *testing.T) {
},
}

handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, bs, aa, backend, em)
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, em)
account := handler.AccountByAddress(testutils.RandomAddress(t), true)

account.Deposit(types.NewFlowTokenVault(types.NewBalanceFromUFix64(1)))
Expand Down Expand Up @@ -700,7 +700,7 @@ func TestHandler_TransactionRun(t *testing.T) {
return result, nil
},
}
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, bs, aa, backend, em)
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, em)
tx := eoa.PrepareSignAndEncodeTx(
t,
gethCommon.Address{},
Expand Down Expand Up @@ -746,7 +746,7 @@ func TestHandler_TransactionRun(t *testing.T) {
return result, nil
},
}
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, bs, aa, backend, em)
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, em)

tx := eoa.PrepareSignAndEncodeTx(
t,
Expand Down Expand Up @@ -781,7 +781,7 @@ func TestHandler_TransactionRun(t *testing.T) {
return &types.Result{ValidationError: evmErr}, nil
},
}
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, bs, aa, backend, em)
handler := handler.NewContractHandler(flow.Testnet, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, em)

coinbase := types.NewAddress(gethCommon.Address{})

Expand Down Expand Up @@ -845,6 +845,6 @@ func SetupHandler(t testing.TB, backend types.Backend, rootAddr flow.Address) *h
aa := handler.NewAddressAllocator()
emulator := emulator.NewEmulator(backend, rootAddr)

handler := handler.NewContractHandler(flow.Emulator, rootAddr, flowTokenAddress, bs, aa, backend, emulator)
handler := handler.NewContractHandler(flow.Emulator, rootAddr, flowTokenAddress, rootAddr, bs, aa, backend, emulator)
return handler
}

0 comments on commit 83a514a

Please sign in to comment.