Skip to content

Commit

Permalink
Fix asset signer tool (#239)
Browse files Browse the repository at this point in the history
* update

* fix rollup id

* fix comment

* add docker image

---------

Co-authored-by: JianGuo <[email protected]>
  • Loading branch information
giskook and zjg555543 authored Aug 6, 2024
1 parent a752112 commit 336b9b0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion etherman/etherman_xlayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func NewClient(cfg Config, l1Config L1Config) (*Client, error) {
// Get RollupID
rollupID, err := rollupManager.RollupAddressToID(&bind.CallOpts{Pending: false}, l1Config.ZkEVMAddr)
if err != nil {
log.Debugf("error rollupManager.RollupAddressToID(%s). Error: %w", l1Config.RollupManagerAddr, err)
log.Debugf("error rollupManager.RollupAddressToID(%s). Error: %w", l1Config.ZkEVMAddr, err)
return nil, err
}
log.Debug("rollupID: ", rollupID)
Expand Down
4 changes: 2 additions & 2 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ services:
xlayer-signer:
container_name: xlayer-signer
restart: unless-stopped
image: xlayer-signer
image: giskook/xlayer-signer:0001
ports:
- 7001:7001
volumes:
Expand Down Expand Up @@ -887,4 +887,4 @@ services:
- ENABLE_DEPOSIT_WARNING=true
- ENABLE_REPORT_FORM=false
- USE_FIAT_EXCHANGE_RATES=false
- SHOW_OUTDATED_NETWORK_MODAL=false
- SHOW_OUTDATED_NETWORK_MODAL=false
9 changes: 5 additions & 4 deletions tools/signer/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ type L1 struct {
SeqPrivateKey types.KeystoreFileConfig `mapstructure:"SeqPrivateKey"`
AggPrivateKey types.KeystoreFileConfig `mapstructure:"AggPrivateKey"`

PolygonMaticAddress common.Address `mapstructure:"PolygonMaticAddress"`
GlobalExitRootManagerAddr common.Address `mapstructure:"GlobalExitRootManagerAddress"`
DataCommitteeAddr common.Address `mapstructure:"DataCommitteeAddress"`
PolygonZkEVMAddress common.Address `mapstructure:"PolygonZkEVMAddress"`
PolygonMaticAddress common.Address `mapstructure:"PolygonMaticAddress"`
GlobalExitRootManagerAddr common.Address `mapstructure:"GlobalExitRootManagerAddress"`
DataCommitteeAddr common.Address `mapstructure:"DataCommitteeAddress"`
PolygonZkEVMAddress common.Address `mapstructure:"PolygonZkEVMAddress"`
PolygonRollupManagerAddress common.Address `mapstructure:"PolygonRollupManagerAddress"`
}

// Config is the configuration for the tool
Expand Down
2 changes: 2 additions & 0 deletions tools/signer/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ func NewServer(cfg *config.Config, ctx context.Context) *Server {
ZkEVMAddr: cfg.L1.PolygonZkEVMAddress,
PolAddr: cfg.L1.PolygonMaticAddress,
GlobalExitRootManagerAddr: cfg.L1.GlobalExitRootManagerAddr,
RollupManagerAddr: cfg.L1.PolygonRollupManagerAddress,
}

var err error
srv.ethClient, err = etherman.NewClient(srv.ethCfg, srv.l1Cfg)
log.Infof("url: %v, l1 chain id: %v, zkevm addr: %v, rollup manager addr: %v", srv.ethCfg.URL, srv.l1Cfg.L1ChainID, srv.l1Cfg.ZkEVMAddr, srv.l1Cfg.RollupManagerAddr)
if err != nil {
log.Fatal("error creating etherman client. Error: %v", err)
}
Expand Down

0 comments on commit 336b9b0

Please sign in to comment.