Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
consistent naming of 'rollupId' argument over all methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nivida committed Jan 9, 2024
1 parent bd975ac commit 2c86552
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions etherman/etherman.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func New(ethClient EthereumClient, auth bind.TransactOpts, cfg *config.Config) (
}, nil
}

func (e *Etherman) GetSequencerAddr(rollupID uint32) (common.Address, error) {
address, err := e.getTrustedSequencerAddress(rollupID)
func (e *Etherman) GetSequencerAddr(rollupId uint32) (common.Address, error) {
address, err := e.getTrustedSequencerAddress(rollupId)
if err != nil {
return common.Address{}, err
}
Expand Down Expand Up @@ -88,15 +88,15 @@ func (e *Etherman) CallContract(ctx context.Context, call ethereum.CallMsg, bloc
return e.ethClient.CallContract(ctx, call, blockNumber)
}

func (e *Etherman) getRollupContractAddress(rollupID uint32) (common.Address, error) {
func (e *Etherman) getRollupContractAddress(rollupId uint32) (common.Address, error) {
contract, err := polygonrollupmanager.NewPolygonrollupmanager(e.config.L1.RollupManagerContract, e.ethClient)

if err != nil {
log.Errorf("error instantiating contract: %s", err)
return common.Address{}, err
}

rollupData, err := contract.RollupIDToRollupData(&bind.CallOpts{Pending: false}, rollupID)
rollupData, err := contract.RollupIDToRollupData(&bind.CallOpts{Pending: false}, rollupId)

if err != nil {
log.Errorf("error receiving the 'RollupData' struct: %s", err)
Expand All @@ -106,8 +106,8 @@ func (e *Etherman) getRollupContractAddress(rollupID uint32) (common.Address, er
return rollupData.RollupContract, nil
}

func (e *Etherman) getTrustedSequencerAddress(rollupID uint32) (common.Address, error) {
rollupContractAddress, err := e.getRollupContractAddress(rollupID)
func (e *Etherman) getTrustedSequencerAddress(rollupId uint32) (common.Address, error) {
rollupContractAddress, err := e.getRollupContractAddress(rollupId)
if err != nil {
log.Errorf("error requesting the RollupContract address from PolygonRollupManager: %s", err)
return common.Address{}, err
Expand Down
2 changes: 1 addition & 1 deletion types/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type DBInterface interface {
}

type EthermanInterface interface {
GetSequencerAddr(rollupID uint32) (common.Address, error)
GetSequencerAddr(rollupId uint32) (common.Address, error)
BuildTrustedVerifyBatchesTxData(lastVerifiedBatch, newVerifiedBatch uint64, proof tx.ZKP, rollupId uint32) (data []byte, err error)
CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
}
Expand Down

0 comments on commit 2c86552

Please sign in to comment.