From 2c86552788a3d1e58d2abb9d5ba12f352f520772 Mon Sep 17 00:00:00 2001 From: Samuel Furter Date: Tue, 9 Jan 2024 11:54:25 +0100 Subject: [PATCH] consistent naming of 'rollupId' argument over all methods --- etherman/etherman.go | 12 ++++++------ types/interfaces.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/etherman/etherman.go b/etherman/etherman.go index ff21dcb..bb1eb54 100644 --- a/etherman/etherman.go +++ b/etherman/etherman.go @@ -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 } @@ -88,7 +88,7 @@ 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 { @@ -96,7 +96,7 @@ func (e *Etherman) getRollupContractAddress(rollupID uint32) (common.Address, er 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) @@ -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 diff --git a/types/interfaces.go b/types/interfaces.go index b0ae843..2a198a6 100644 --- a/types/interfaces.go +++ b/types/interfaces.go @@ -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) }