@@ -32,7 +32,6 @@ import (
3232
3333 "github.com/0xPolygon/polygon-cli/bindings/ulxly"
3434 "github.com/0xPolygon/polygon-cli/bindings/ulxly/polygonrollupmanager"
35- "github.com/0xPolygon/polygon-cli/bindings/ulxly/polygonzkevmglobalexitrootl2"
3635 "github.com/0xPolygon/polygon-cli/cmd/flag_loader"
3736 "github.com/rs/zerolog/log"
3837 "github.com/spf13/cobra"
@@ -373,20 +372,11 @@ func nullifierAndBalanceTree(args []string) error {
373372 if err != nil {
374373 return err
375374 }
376- gerManagerAddress , err := bridgeV2 .GlobalExitRootManager (& bind.CallOpts {Pending : false })
375+ ler_count , err := bridgeV2 .LastUpdatedDepositCount (& bind.CallOpts {Pending : false })
377376 if err != nil {
378377 return err
379378 }
380- gerManager , err := polygonzkevmglobalexitrootl2 .NewPolygonzkevmglobalexitrootl2 (gerManagerAddress , client )
381- if err != nil {
382- return err
383- }
384- var ler common.Hash
385- ler , err = gerManager .LastRollupExitRoot (& bind.CallOpts {Pending : false })
386- if err != nil {
387- return err
388- }
389- log .Info ().Msgf ("Last Local Exit Root: %s" , ler .String ())
379+ log .Info ().Msgf ("Last LER count: %d" , ler_count )
390380 balanceTreeRoot , err := computeBalanceTree (client , bridgeAddress , l2RawClaimsData , l2NetworkID , l2RawDepositsData )
391381 if err != nil {
392382 return err
@@ -395,7 +385,7 @@ func nullifierAndBalanceTree(args []string) error {
395385 if err != nil {
396386 return err
397387 }
398- initPessimisticRoot := crypto .Keccak256Hash (balanceTreeRoot .Bytes (), nullifierTreeRoot .Bytes (), ler . Bytes ( ))
388+ initPessimisticRoot := crypto .Keccak256Hash (balanceTreeRoot .Bytes (), nullifierTreeRoot .Bytes (), Uint32ToBytesLittleEndian ( ler_count ))
399389 fmt .Printf (`
400390 {
401391 "balanceTreeRoot": "%s",
0 commit comments