From 34be780a0c7b0f30668674cbcc53d7ec989c078d Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Sun, 5 Nov 2023 19:36:12 -0500 Subject: [PATCH] fix test --- e2e/localnet/utils/utils.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/e2e/localnet/utils/utils.go b/e2e/localnet/utils/utils.go index c396f09479..6ab469c95b 100644 --- a/e2e/localnet/utils/utils.go +++ b/e2e/localnet/utils/utils.go @@ -22,6 +22,7 @@ package utils import ( "context" + "math/big" "time" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -100,10 +101,13 @@ func DeployERC20( ctx, cancel := context.WithTimeout(context.Background(), TxTimeout) defer cancel() - var addr common.Address - addr, err = bind.WaitDeployed(ctx, client, tx) + _, err = bind.WaitMined(ctx, client, tx) Expect(err).ToNot(HaveOccurred()) - Expect(addr).To(Equal(expectedAddr)) + + time.Sleep(500 * time.Millisecond) //nolint:gomnd // temporary. + code, err := client.CodeAt(ctx, expectedAddr, big.NewInt(-1)) + Expect(err).ToNot(HaveOccurred()) + Expect(code).ToNot(BeEmpty()) return contract, expectedAddr }