Skip to content

Commit

Permalink
fix: don't cast uint64 to int64 when creating big.Int
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Dec 10, 2024
1 parent e8cb97c commit d023557
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rollupmanager/rollupmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (rm *RollupManager) GetRollupCreationInfo(ctx context.Context, rollupID uin
if err != nil {
return CreateRollupInfo{}, err
}
callOpts := &bind.CallOpts{BlockNumber: big.NewInt(int64(rm.UpdateToULxLyBlock - 1))}
callOpts := &bind.CallOpts{BlockNumber: new(big.Int).SetUint64(rm.UpdateToULxLyBlock - 1)}
root, err := rollup.BatchNumToStateRoot(callOpts, 0)
if err != nil {
fmt.Println("couldn't find genesis for batch 0 of the rollup 1")
Expand Down Expand Up @@ -197,7 +197,7 @@ func (rm *RollupManager) GetRollupCreationInfo(ctx context.Context, rollupID uin
if err != nil {
return CreateRollupInfo{}, err
}
b, err := rm.Client.BlockByNumber(ctx, big.NewInt(int64(it.Event.Raw.BlockNumber)))
b, err := rm.Client.BlockByNumber(ctx, new(big.Int).SetUint64(it.Event.Raw.BlockNumber))
if err != nil {
return CreateRollupInfo{}, err
}
Expand Down

0 comments on commit d023557

Please sign in to comment.