Skip to content

Commit

Permalink
ci(e2e): fix solver deploy key (#2570)
Browse files Browse the repository at this point in the history
Only use proper solver keys in devnet (other networks don't have it
configured).

issue: none
  • Loading branch information
corverroos authored Nov 26, 2024
1 parent 10507bd commit f543d00
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions e2e/app/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,18 @@ func writeSolverConfig(ctx context.Context, def Definition, logCfg log.Config) e
endpoints = ExternalEndpoints(def)
}

// Save private key
privKey, err := eoa.PrivateKey(ctx, def.Testnet.Network, eoa.RoleSolver)
// Save private key (use random keys for non-devnet)
// TODO(corver): Switch to proper keys once ready.
privKey, err := ethcrypto.GenerateKey()
if err != nil {
return errors.Wrap(err, "get relayer key")
return errors.Wrap(err, "generate private key")
} else if def.Testnet.Network == netconf.Devnet {
privKey, err = eoa.PrivateKey(ctx, def.Testnet.Network, eoa.RoleSolver)
if err != nil {
return errors.Wrap(err, "get solver key")
}
}

if err := ethcrypto.SaveECDSA(filepath.Join(confRoot, privKeyFile), privKey); err != nil {
return errors.Wrap(err, "write private key")
}
Expand Down

0 comments on commit f543d00

Please sign in to comment.