From b678fb4b3ec22cc04a337d337588d26a45633eb7 Mon Sep 17 00:00:00 2001 From: elizabeth Date: Thu, 13 Jul 2023 14:42:37 -0400 Subject: [PATCH] remove metro --- internal/ethapi/api.go | 11 ----------- internal/ethapi/metro.go | 21 --------------------- 2 files changed, 32 deletions(-) delete mode 100644 internal/ethapi/metro.go diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 51412df254..7d8cc232c3 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1699,17 +1699,6 @@ func SubmitTransaction(ctx context.Context, b Backend, tx *types.Transaction) (c return common.Hash{}, err } - // send to metro instead of eth mempool - txBytes, err := tx.MarshalBinary() - if err != nil { - return common.Hash{}, err - } - - metroAPI := NewMetroAPI(b.MetroGRPCEndpoint()) - if err := metroAPI.SubmitTransaction(txBytes); err != nil { - return common.Hash{}, err - } - // Print a log with full tx details for manual investigations and interventions signer := types.MakeSigner(b.ChainConfig(), b.CurrentBlock().Number) from, err := types.Sender(signer, tx) diff --git a/internal/ethapi/metro.go b/internal/ethapi/metro.go deleted file mode 100644 index ec9c4342ef..0000000000 --- a/internal/ethapi/metro.go +++ /dev/null @@ -1,21 +0,0 @@ -package ethapi - -import ( - metrotx "github.com/astriaorg/metro-transactions/tx" - "github.com/ethereum/go-ethereum/log" -) - -const secondaryChainID = "ethereum" - -type MetroAPI struct { - endpoint string -} - -func NewMetroAPI(endpoint string) *MetroAPI { - log.Info("NewMetroAPI", "endpoint", endpoint) - return &MetroAPI{endpoint: endpoint} -} - -func (api *MetroAPI) SubmitTransaction(tx []byte) error { - return metrotx.BuildAndSendSecondaryTransaction(api.endpoint, secondaryChainID, tx) -}