diff --git a/ethtxmanager/ethtxmanager.go b/ethtxmanager/ethtxmanager.go index f6f6715..5d39028 100644 --- a/ethtxmanager/ethtxmanager.go +++ b/ethtxmanager/ethtxmanager.go @@ -508,8 +508,7 @@ func (c *Client) waitMinedTxToBeSafe(ctx context.Context) error { safeBlockNumber = currentBlockNumber - c.cfg.SafeStatusL1NumberOfBlocks } else { // Get Safe block Number - safeL1BlockNumberFetch := l1_check_block.NewSafeL1BlockNumberFetch(l1_check_block.SafeBlockNumber, 0) - safeBlockNumber, err = safeL1BlockNumberFetch.GetSafeBlockNumber(ctx, c.etherman) + safeBlockNumber, err = l1_check_block.L1SafeFetch.BlockNumber(ctx, c.etherman) if err != nil { return fmt.Errorf("failed to get safe block number: %v", err) } @@ -552,8 +551,7 @@ func (c *Client) waitSafeTxToBeFinalized(ctx context.Context) error { finaLizedBlockNumber = currentBlockNumber - c.cfg.FinalizedStatusL1NumberOfBlocks } else { // Get Network Default value - safeL1BlockNumberFetch := l1_check_block.NewSafeL1BlockNumberFetch(l1_check_block.FinalizedBlockNumber, 0) - finaLizedBlockNumber, err = safeL1BlockNumberFetch.GetSafeBlockNumber(ctx, c.etherman) + finaLizedBlockNumber, err = l1_check_block.L1FinalizedFetch.BlockNumber(ctx, c.etherman) if err != nil { return fmt.Errorf("failed to get finalized block number: %v", err) } diff --git a/go.mod b/go.mod index 5913621..5a845fb 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/0xPolygonHermez/zkevm-ethtx-manager go 1.21.3 require ( - github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.4.0 + github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.5.1 github.com/ethereum/go-ethereum v1.14.5 github.com/hermeznetwork/tracerr v0.3.2 github.com/holiman/uint256 v1.2.4 @@ -46,7 +46,7 @@ require ( github.com/google/uuid v1.5.0 // indirect github.com/gorilla/websocket v1.5.1 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.2 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/logrusorgru/aurora v2.0.3+incompatible // indirect diff --git a/go.sum b/go.sum index d7c6c50..c20bfda 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.4.0 h1:RoEQ9IEZqr5OXP1egWbEF6urQq+frdj+17JeteMIJfA= -github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.4.0/go.mod h1:+5qELbp9l/AsnfwMiCl51YCGfvAfaTqVwOKrmWNJoOs= +github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.5.1 h1:mL21zEW6p9E/NvopykiRBUqY1GT/3OuOdW2IvZcIC4g= +github.com/0xPolygonHermez/zkevm-synchronizer-l1 v0.5.1/go.mod h1:fAwP9VXeKdUY7gJu6S4sus72CtPFUEB7+BYFSJYMu8s= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= @@ -140,8 +140,8 @@ github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+ github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=