Skip to content

Commit

Permalink
fix(lib/contracts): add one block wait for holesky deployments (#2552)
Browse files Browse the repository at this point in the history
Add 12 second/~1 block wait for Holesky deployments in an effort to
diagnose Staging deployment failures on Holesky.

issue: none
  • Loading branch information
Zodomo authored Nov 22, 2024
1 parent 7fcfb3e commit 733f15b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/ethclient/ethbackend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/omni-network/omni/lib/anvil"
"github.com/omni-network/omni/lib/errors"
"github.com/omni-network/omni/lib/ethclient"
"github.com/omni-network/omni/lib/evmchain"
"github.com/omni-network/omni/lib/fireblocks"
"github.com/omni-network/omni/lib/k1util"
"github.com/omni-network/omni/lib/log"
Expand Down Expand Up @@ -177,6 +178,12 @@ func (b *Backend) WaitMined(ctx context.Context, tx *ethtypes.Transaction) (*eth
return rec, errors.New("receipt status unsuccessful", "status", rec.Status, "tx", tx.Hash())
}

// If b.chainID == holesky, wait a little longer for the tx to be indexed.
if b.chainID == evmchain.IDHolesky {
log.Debug(ctx, "Waiting extra 12 seconds (~1 block) for tx to be indexed on Holesky")
time.Sleep(time.Second * 12)
}

return rec, nil
}

Expand Down

0 comments on commit 733f15b

Please sign in to comment.