Skip to content

Commit

Permalink
waiting for receipt for initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanIliev545 committed Nov 24, 2023
1 parent 69ea0ab commit 643c47b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion integration/simulation/network/geth_utils.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package network

import (
"context"
"errors"
"fmt"
"math/big"
Expand All @@ -14,6 +15,7 @@ import (
"github.com/ten-protocol/go-ten/go/ethadapter"
"github.com/ten-protocol/go-ten/go/wallet"
"github.com/ten-protocol/go-ten/integration"
integrationCommon "github.com/ten-protocol/go-ten/integration/common"
"github.com/ten-protocol/go-ten/integration/common/testlog"
"github.com/ten-protocol/go-ten/integration/erc20contract"
"github.com/ten-protocol/go-ten/integration/eth2network"
Expand Down Expand Up @@ -113,11 +115,16 @@ func DeployObscuroNetworkContracts(client ethadapter.EthClient, wallets *params.
return nil, fmt.Errorf("unable to create a keyed transactor for initializing the management contract. Cause: %w", err)
}

_, err = managementContract.Initialize(opts)
tx, err := managementContract.Initialize(opts)
if err != nil {
return nil, fmt.Errorf("unable to initialize management contract. Cause: %w", err)
}

_, err = integrationCommon.AwaitReceiptEth(context.Background(), client.EthClient(), tx.Hash(), 25*time.Second)
if err != nil {
return nil, fmt.Errorf("no receipt for management contract initialization")
}

l1BusAddress, err := managementContract.MessageBus(&bind.CallOpts{})
if err != nil {
return nil, fmt.Errorf("failed to fetch MessageBus address. Cause: %w", err)
Expand Down

0 comments on commit 643c47b

Please sign in to comment.