From 4ba3f78a22f3c9fb930b4e7ac96a37b9d20bde53 Mon Sep 17 00:00:00 2001 From: bizk Date: Thu, 31 Aug 2023 17:18:36 -0300 Subject: [PATCH] rename module for vanity url --- README.md | 10 +++++----- client_offline.go | 2 +- client_online.go | 4 ++-- cmd/rosetta.go | 2 +- cmd/rosetta/main.go | 4 ++-- config.go | 2 +- converter.go | 4 ++-- converter_test.go | 4 ++-- go.mod | 2 +- lib/internal/service/account.go | 4 ++-- lib/internal/service/block.go | 4 ++-- lib/internal/service/construction.go | 2 +- lib/internal/service/mempool.go | 2 +- lib/internal/service/network.go | 2 +- lib/internal/service/offline.go | 4 ++-- lib/internal/service/online.go | 4 ++-- lib/server/server.go | 4 ++-- plugins_test.go | 2 +- util.go | 2 +- utils.go | 2 +- 20 files changed, 33 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 94fc930..936666f 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Rosetta can be executed as a standalone service, it connects to the node endpoin Install Rosetta standalone server with the following command: ```bash -go install cosmossdk.io/rosetta +go install github.com/cosmos/rosetta ``` Alternatively, for building from source, simply run `make rosetta`. The binary will be located in the root folder. @@ -27,7 +27,7 @@ To enable Native Rosetta API support, it's required to add the `RosettaCommand` Import the `rosettaCmd` package: ```go -import "cosmossdk.io/rosetta/cmd" +import "github.com/cosmos/rosetta/cmd" ``` Find the following line: @@ -44,7 +44,7 @@ rootCmd.AddCommand( ) ``` -The `RosettaCommand` function builds the `rosetta` root command and is defined in the `rosettaCmd` package (`cosmossdk.io/rosetta/cmd`). +The `RosettaCommand` function builds the `rosetta` root command and is defined in the `rosettaCmd` package (`github.com/cosmos/rosetta/cmd`). Since we’ve updated the Cosmos SDK to work with the Rosetta API, updating the application's root command file is all you need to do. @@ -109,7 +109,7 @@ import ( "context" "github.com/coinbase/rosetta-sdk-go/types" -"cosmossdk.io/rosetta/lib" +"github.com/cosmos/rosetta/lib" ) // CustomClient embeds the standard cosmos client @@ -135,7 +135,7 @@ Example: ```go package custom_errors -import crgerrs "cosmossdk.io/rosetta/lib/errors" +import crgerrs "github.com/cosmos/rosetta/lib/errors" var customErrRetriable = true var CustomError = crgerrs.RegisterError(100, "custom message", customErrRetriable, "description") diff --git a/client_offline.go b/client_offline.go index c3cb069..75f1241 100644 --- a/client_offline.go +++ b/client_offline.go @@ -6,7 +6,7 @@ import ( "github.com/coinbase/rosetta-sdk-go/types" - crgerrs "cosmossdk.io/rosetta/lib/errors" + crgerrs "github.com/cosmos/rosetta/lib/errors" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/client_online.go b/client_online.go index aebaffb..3e2ee4f 100644 --- a/client_online.go +++ b/client_online.go @@ -22,8 +22,8 @@ import ( "github.com/cometbft/cometbft/rpc/client/http" "google.golang.org/grpc" - crgerrs "cosmossdk.io/rosetta/lib/errors" - crgtypes "cosmossdk.io/rosetta/lib/types" + crgerrs "github.com/cosmos/rosetta/lib/errors" + crgtypes "github.com/cosmos/rosetta/lib/types" sdk "github.com/cosmos/cosmos-sdk/types" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" diff --git a/cmd/rosetta.go b/cmd/rosetta.go index ac7a9d3..24678da 100644 --- a/cmd/rosetta.go +++ b/cmd/rosetta.go @@ -5,9 +5,9 @@ import ( "github.com/spf13/cobra" - "cosmossdk.io/rosetta" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/rosetta" ) // RosettaCommand builds the rosetta root command given diff --git a/cmd/rosetta/main.go b/cmd/rosetta/main.go index 6e66caa..8b3ad17 100644 --- a/cmd/rosetta/main.go +++ b/cmd/rosetta/main.go @@ -3,10 +3,10 @@ package main import ( "os" - "cosmossdk.io/rosetta" + "github.com/cosmos/rosetta" "cosmossdk.io/log" - rosettaCmd "cosmossdk.io/rosetta/cmd" + rosettaCmd "github.com/cosmos/rosetta/cmd" ) func main() { diff --git a/config.go b/config.go index 24821c1..b5f9d18 100644 --- a/config.go +++ b/config.go @@ -8,7 +8,7 @@ import ( "github.com/coinbase/rosetta-sdk-go/types" "github.com/spf13/pflag" - crg "cosmossdk.io/rosetta/lib/server" + crg "github.com/cosmos/rosetta/lib/server" clientflags "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" diff --git a/converter.go b/converter.go index 814fb19..f483161 100644 --- a/converter.go +++ b/converter.go @@ -18,8 +18,8 @@ import ( secp "github.com/decred/dcrd/dcrec/secp256k1/v4" sdkmath "cosmossdk.io/math" - crgerrs "cosmossdk.io/rosetta/lib/errors" - crgtypes "cosmossdk.io/rosetta/lib/types" + crgerrs "github.com/cosmos/rosetta/lib/errors" + crgtypes "github.com/cosmos/rosetta/lib/types" sdkclient "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" diff --git a/converter_test.go b/converter_test.go index 55d4fce..07528db 100644 --- a/converter_test.go +++ b/converter_test.go @@ -5,8 +5,8 @@ import ( "encoding/json" "testing" - "cosmossdk.io/rosetta" - crgerrs "cosmossdk.io/rosetta/lib/errors" + "github.com/cosmos/rosetta" + crgerrs "github.com/cosmos/rosetta/lib/errors" rosettatypes "github.com/coinbase/rosetta-sdk-go/types" abci "github.com/cometbft/cometbft/abci/types" diff --git a/go.mod b/go.mod index 5ea1470..502cb68 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module cosmossdk.io/rosetta +module github.com/cosmos/rosetta go 1.20 diff --git a/lib/internal/service/account.go b/lib/internal/service/account.go index 6f61069..f97b6c9 100644 --- a/lib/internal/service/account.go +++ b/lib/internal/service/account.go @@ -3,9 +3,9 @@ package service import ( "context" - "cosmossdk.io/rosetta/lib/errors" - crgtypes "cosmossdk.io/rosetta/lib/types" "github.com/coinbase/rosetta-sdk-go/types" + "github.com/cosmos/rosetta/lib/errors" + crgtypes "github.com/cosmos/rosetta/lib/types" ) // AccountBalance retrieves the account balance of an address diff --git a/lib/internal/service/block.go b/lib/internal/service/block.go index 22097fa..d8a4e67 100644 --- a/lib/internal/service/block.go +++ b/lib/internal/service/block.go @@ -3,9 +3,9 @@ package service import ( "context" - "cosmossdk.io/rosetta/lib/errors" - crgtypes "cosmossdk.io/rosetta/lib/types" "github.com/coinbase/rosetta-sdk-go/types" + "github.com/cosmos/rosetta/lib/errors" + crgtypes "github.com/cosmos/rosetta/lib/types" ) // Block gets the transactions in the given block diff --git a/lib/internal/service/construction.go b/lib/internal/service/construction.go index f3a95f8..b4dd36d 100644 --- a/lib/internal/service/construction.go +++ b/lib/internal/service/construction.go @@ -8,8 +8,8 @@ import ( "strings" sdkmath "cosmossdk.io/math" - "cosmossdk.io/rosetta/lib/errors" "github.com/coinbase/rosetta-sdk-go/types" + "github.com/cosmos/rosetta/lib/errors" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/lib/internal/service/mempool.go b/lib/internal/service/mempool.go index 23ea255..95ff6d9 100644 --- a/lib/internal/service/mempool.go +++ b/lib/internal/service/mempool.go @@ -3,8 +3,8 @@ package service import ( "context" - "cosmossdk.io/rosetta/lib/errors" "github.com/coinbase/rosetta-sdk-go/types" + "github.com/cosmos/rosetta/lib/errors" ) // Mempool fetches the transactions contained in the mempool diff --git a/lib/internal/service/network.go b/lib/internal/service/network.go index 76d41ea..e00ae79 100644 --- a/lib/internal/service/network.go +++ b/lib/internal/service/network.go @@ -3,8 +3,8 @@ package service import ( "context" - "cosmossdk.io/rosetta/lib/errors" coinbase "github.com/coinbase/rosetta-sdk-go/types" + "github.com/cosmos/rosetta/lib/errors" ) func (on OnlineNetwork) NetworkList(_ context.Context, _ *coinbase.MetadataRequest) (*coinbase.NetworkListResponse, *coinbase.Error) { diff --git a/lib/internal/service/offline.go b/lib/internal/service/offline.go index f2e872c..08bf9a2 100644 --- a/lib/internal/service/offline.go +++ b/lib/internal/service/offline.go @@ -5,8 +5,8 @@ import ( "github.com/coinbase/rosetta-sdk-go/types" - crgerrs "cosmossdk.io/rosetta/lib/errors" - crgtypes "cosmossdk.io/rosetta/lib/types" + crgerrs "github.com/cosmos/rosetta/lib/errors" + crgtypes "github.com/cosmos/rosetta/lib/types" ) // NewOffline instantiates the instance of an offline network diff --git a/lib/internal/service/online.go b/lib/internal/service/online.go index 953d09d..5513a77 100644 --- a/lib/internal/service/online.go +++ b/lib/internal/service/online.go @@ -7,8 +7,8 @@ import ( "github.com/coinbase/rosetta-sdk-go/types" "cosmossdk.io/log" - crgerrs "cosmossdk.io/rosetta/lib/errors" - crgtypes "cosmossdk.io/rosetta/lib/types" + crgerrs "github.com/cosmos/rosetta/lib/errors" + crgtypes "github.com/cosmos/rosetta/lib/types" ) // genesisBlockFetchTimeout defines a timeout to fetch the genesis block diff --git a/lib/server/server.go b/lib/server/server.go index d1384c2..4c3c684 100644 --- a/lib/server/server.go +++ b/lib/server/server.go @@ -11,8 +11,8 @@ import ( "github.com/cosmos/rosetta-sdk-go/server" "cosmossdk.io/log" - "cosmossdk.io/rosetta/lib/internal/service" - crgtypes "cosmossdk.io/rosetta/lib/types" + "github.com/cosmos/rosetta/lib/internal/service" + crgtypes "github.com/cosmos/rosetta/lib/types" ) const ( diff --git a/plugins_test.go b/plugins_test.go index a9e4342..b221485 100644 --- a/plugins_test.go +++ b/plugins_test.go @@ -4,7 +4,7 @@ package rosetta_test // import ( // "testing" // -// "cosmossdk.io/rosetta" +// "github.com/cosmos/rosetta" // // "github.com/cosmos/cosmos-sdk/codec" // "github.com/stretchr/testify/suite" diff --git a/util.go b/util.go index b6c5ea2..ec95311 100644 --- a/util.go +++ b/util.go @@ -4,7 +4,7 @@ import ( "encoding/json" "time" - crgerrs "cosmossdk.io/rosetta/lib/errors" + crgerrs "github.com/cosmos/rosetta/lib/errors" ) // timeToMilliseconds converts time to milliseconds timestamp diff --git a/utils.go b/utils.go index cbb204a..f32a353 100644 --- a/utils.go +++ b/utils.go @@ -8,9 +8,9 @@ import ( signing2 "cosmossdk.io/x/tx/signing" "google.golang.org/protobuf/types/known/anypb" - crgerrs "cosmossdk.io/rosetta/lib/errors" sdk "github.com/cosmos/cosmos-sdk/types" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + crgerrs "github.com/cosmos/rosetta/lib/errors" ) func parseSignerData(signerData authsigning.SignerData) signing2.SignerData {