Add API for compatible query of two types of transactions (#683)

* Add API for compatible query of two types of transactions

* format code

* optimize code

* optimize code

* format code

* optimize code

* add error handling

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
Pierre
2021-01-11 10:31:30 -03:00
committed by GitHub
co-authored by Federico Kunze
parent 52d6d71482
commit 9ecd264ae0
2 changed files with 101 additions and 5 deletions
+3 -5
View File
@@ -6,21 +6,19 @@ import (
"os"
"strings"
"github.com/spf13/viper"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/input"
"github.com/cosmos/cosmos-sdk/client/lcd"
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest"
"github.com/cosmos/ethermint/app"
"github.com/cosmos/ethermint/crypto/ethsecp256k1"
"github.com/cosmos/ethermint/crypto/hd"
"github.com/cosmos/ethermint/rpc/websockets"
evmrest "github.com/cosmos/ethermint/x/evm/client/rest"
"github.com/ethereum/go-ethereum/rpc"
"github.com/spf13/viper"
)
const (
@@ -75,7 +73,7 @@ func RegisterRoutes(rs *lcd.RestServer) {
// Register all other Cosmos routes
client.RegisterRoutes(rs.CliCtx, rs.Mux)
authrest.RegisterTxRoutes(rs.CliCtx, rs.Mux)
evmrest.RegisterRoutes(rs.CliCtx, rs.Mux)
app.ModuleBasics.RegisterRESTRoutes(rs.CliCtx, rs.Mux)
// start websockets server