go-ethereum/cmd/utils/taiko_flags.go
David 3b305232a5
feat(beacon): remove soft blocks implementation (#366)
* Revert "chore(cmd): add `--taiko` flag (#365)"

This reverts commit ca784a23df.

* Revert "chore(cmd): remove `--taiko.preconfirmationForwardingUrl` flag (#362)"

This reverts commit 283fedd05b.

* Revert "feat(beacon): introduce soft blocks (#342)"

This reverts commit a2cbf904ea.
2025-01-10 15:25:30 +08:00

41 lines
965 B
Go

package utils
import (
"os"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/eth/ethconfig"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rpc"
"github.com/urfave/cli/v2"
)
var (
TaikoFlag = cli.BoolFlag{
Name: "taiko",
Usage: "Taiko network",
}
)
// RegisterTaikoAPIs initializes and registers the Taiko RPC APIs.
func RegisterTaikoAPIs(stack *node.Node, cfg *ethconfig.Config, backend *eth.Ethereum) {
if os.Getenv("TAIKO_TEST") != "" {
return
}
// Add methods under "taiko_" RPC namespace to the available APIs list
stack.RegisterAPIs([]rpc.API{
{
Namespace: "taiko",
Version: params.VersionWithMeta,
Service: eth.NewTaikoAPIBackend(backend),
Public: true,
},
{
Namespace: "taikoAuth",
Version: params.VersionWithMeta,
Service: eth.NewTaikoAuthAPIBackend(backend),
Authenticated: true,
},
})
}