75b02dff3d
* op-signer: add to this repo * circleci: add op-signer jobs/workflows * ops: update tag service to include op-signer * readme: add op-signer one sentence description * ci: add op-signer option to github action * ops: add op-signer min version
52 lines
1.1 KiB
Go
52 lines
1.1 KiB
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
"github.com/ethereum/go-ethereum/log"
|
|
|
|
signer "github.com/ethereum-optimism/infra/op-signer"
|
|
"github.com/ethereum-optimism/optimism/op-service/cliapp"
|
|
oplog "github.com/ethereum-optimism/optimism/op-service/log"
|
|
)
|
|
|
|
var (
|
|
Version = ""
|
|
GitCommit = ""
|
|
GitDate = ""
|
|
)
|
|
|
|
func main() {
|
|
oplog.SetupDefaults()
|
|
|
|
app := cli.NewApp()
|
|
app.Flags = cliapp.ProtectFlags(signer.CLIFlags("OP_SIGNER"))
|
|
app.Version = fmt.Sprintf("%s-%s-%s", Version, GitCommit, GitDate)
|
|
app.Name = "op-signer"
|
|
app.Usage = "OP Signing Service"
|
|
app.Description = ""
|
|
app.Commands = []*cli.Command{
|
|
{
|
|
Name: "client",
|
|
Usage: "test client for signer service",
|
|
Subcommands: []*cli.Command{
|
|
{
|
|
Name: "sign",
|
|
Usage: "sign a transaction",
|
|
Action: signer.ClientSign(Version),
|
|
Flags: cliapp.ProtectFlags(signer.ClientSignCLIFlags("SIGNER")),
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
app.Action = cliapp.LifecycleCmd(signer.MainAppAction(Version))
|
|
err := app.Run(os.Args)
|
|
if err != nil {
|
|
log.Crit("Application failed", "message", err)
|
|
}
|
|
}
|