From afdbc51e475a4dddd5fe25b8f5f107259a535b77 Mon Sep 17 00:00:00 2001 From: Amaury <1293565+amaurym@users.noreply.github.com> Date: Tue, 17 Jan 2023 11:00:31 +0100 Subject: [PATCH] refactor: Move to x/tx package (#14634) --- .github/dependabot.yml | 2 +- .github/labeler.yml | 2 ++ .github/workflows/test.yml | 14 +++++++------- CHANGELOG.md | 1 + x/tx/CHANGELOG.md | 7 +++++++ {tx => x/tx}/go.mod | 2 +- {tx => x/tx}/go.sum | 0 {tx => x/tx}/signing/sign_mode_handler.go | 0 {tx => x/tx}/sonar-project.properties | 2 +- {tx => x/tx}/textual/any.go | 0 {tx => x/tx}/textual/any_test.go | 2 +- {tx => x/tx}/textual/bench_test.go | 0 {tx => x/tx}/textual/bytes.go | 0 {tx => x/tx}/textual/bytes_test.go | 2 +- {tx => x/tx}/textual/coin_test.go | 2 +- {tx => x/tx}/textual/coins.go | 0 {tx => x/tx}/textual/coins_test.go | 2 +- {tx => x/tx}/textual/dec.go | 0 {tx => x/tx}/textual/dec_test.go | 2 +- {tx => x/tx}/textual/duration.go | 0 {tx => x/tx}/textual/duration_test.go | 2 +- {tx => x/tx}/textual/e2e_test.go | 4 ++-- {tx => x/tx}/textual/encode.go | 2 +- {tx => x/tx}/textual/encode_test.go | 0 {tx => x/tx}/textual/enum.go | 0 {tx => x/tx}/textual/enum_test.go | 4 ++-- {tx => x/tx}/textual/int.go | 0 {tx => x/tx}/textual/int_test.go | 2 +- {tx => x/tx}/textual/internal/cbor/cbor.go | 0 {tx => x/tx}/textual/internal/cbor/cbor_test.go | 2 +- {tx => x/tx}/textual/internal/testdata/README.md | 0 {tx => x/tx}/textual/internal/testdata/any.json | 0 {tx => x/tx}/textual/internal/testdata/bytes.json | 0 {tx => x/tx}/textual/internal/testdata/coin.json | 0 {tx => x/tx}/textual/internal/testdata/coins.json | 0 .../tx}/textual/internal/testdata/decimals.json | 0 .../tx}/textual/internal/testdata/duration.json | 0 {tx => x/tx}/textual/internal/testdata/e2e.json | 0 {tx => x/tx}/textual/internal/testdata/encode.json | 0 {tx => x/tx}/textual/internal/testdata/enum.json | 0 .../tx}/textual/internal/testdata/integers.json | 0 .../tx}/textual/internal/testdata/message.json | 0 .../tx}/textual/internal/testdata/repeated.json | 0 {tx => x/tx}/textual/internal/testdata/string.json | 0 .../tx}/textual/internal/testdata/timestamp.json | 0 {tx => x/tx}/textual/internal/testdata/tx.json | 0 {tx => x/tx}/textual/internal/testpb/1.proto | 2 +- {tx => x/tx}/textual/internal/testpb/1.pulsar.go | 0 {tx => x/tx}/textual/internal/testpb/Makefile | 0 {tx => x/tx}/textual/internal/testpb/buf.gen.yaml | 2 +- {tx => x/tx}/textual/internal/testpb/buf.lock | 0 {tx => x/tx}/textual/internal/testpb/buf.yaml | 0 {tx => x/tx}/textual/internal/textualpb/Makefile | 0 .../tx}/textual/internal/textualpb/buf.gen.yaml | 2 +- {tx => x/tx}/textual/internal/textualpb/buf.lock | 0 {tx => x/tx}/textual/internal/textualpb/buf.yaml | 0 {tx => x/tx}/textual/internal/textualpb/doc.go | 0 .../tx}/textual/internal/textualpb/textual.proto | 0 .../textual/internal/textualpb/textual.pulsar.go | 0 {tx => x/tx}/textual/message.go | 0 {tx => x/tx}/textual/message_test.go | 4 ++-- {tx => x/tx}/textual/protoreflect_list_test.go | 0 {tx => x/tx}/textual/repeated_test.go | 4 ++-- {tx => x/tx}/textual/string.go | 0 {tx => x/tx}/textual/string_test.go | 2 +- {tx => x/tx}/textual/timestamp.go | 0 {tx => x/tx}/textual/timestamp_test.go | 2 +- {tx => x/tx}/textual/tx.go | 2 +- {tx => x/tx}/textual/tx_test.go | 6 +++--- {tx => x/tx}/textual/types.go | 0 {tx => x/tx}/textual/valuerenderer.go | 4 ++-- {tx => x/tx}/textual/valuerenderer_test.go | 4 ++-- 72 files changed, 50 insertions(+), 40 deletions(-) create mode 100644 x/tx/CHANGELOG.md rename {tx => x/tx}/go.mod (96%) rename {tx => x/tx}/go.sum (100%) rename {tx => x/tx}/signing/sign_mode_handler.go (100%) rename {tx => x/tx}/sonar-project.properties (89%) rename {tx => x/tx}/textual/any.go (100%) rename {tx => x/tx}/textual/any_test.go (98%) rename {tx => x/tx}/textual/bench_test.go (100%) rename {tx => x/tx}/textual/bytes.go (100%) rename {tx => x/tx}/textual/bytes_test.go (97%) rename {tx => x/tx}/textual/coin_test.go (99%) rename {tx => x/tx}/textual/coins.go (100%) rename {tx => x/tx}/textual/coins_test.go (99%) rename {tx => x/tx}/textual/dec.go (100%) rename {tx => x/tx}/textual/dec_test.go (96%) rename {tx => x/tx}/textual/duration.go (100%) rename {tx => x/tx}/textual/duration_test.go (97%) rename {tx => x/tx}/textual/e2e_test.go (95%) rename {tx => x/tx}/textual/encode.go (95%) rename {tx => x/tx}/textual/encode_test.go (100%) rename {tx => x/tx}/textual/enum.go (100%) rename {tx => x/tx}/textual/enum_test.go (96%) rename {tx => x/tx}/textual/int.go (100%) rename {tx => x/tx}/textual/int_test.go (98%) rename {tx => x/tx}/textual/internal/cbor/cbor.go (100%) rename {tx => x/tx}/textual/internal/cbor/cbor_test.go (98%) rename {tx => x/tx}/textual/internal/testdata/README.md (100%) rename {tx => x/tx}/textual/internal/testdata/any.json (100%) rename {tx => x/tx}/textual/internal/testdata/bytes.json (100%) rename {tx => x/tx}/textual/internal/testdata/coin.json (100%) rename {tx => x/tx}/textual/internal/testdata/coins.json (100%) rename {tx => x/tx}/textual/internal/testdata/decimals.json (100%) rename {tx => x/tx}/textual/internal/testdata/duration.json (100%) rename {tx => x/tx}/textual/internal/testdata/e2e.json (100%) rename {tx => x/tx}/textual/internal/testdata/encode.json (100%) rename {tx => x/tx}/textual/internal/testdata/enum.json (100%) rename {tx => x/tx}/textual/internal/testdata/integers.json (100%) rename {tx => x/tx}/textual/internal/testdata/message.json (100%) rename {tx => x/tx}/textual/internal/testdata/repeated.json (100%) rename {tx => x/tx}/textual/internal/testdata/string.json (100%) rename {tx => x/tx}/textual/internal/testdata/timestamp.json (100%) rename {tx => x/tx}/textual/internal/testdata/tx.json (100%) rename {tx => x/tx}/textual/internal/testpb/1.proto (98%) rename {tx => x/tx}/textual/internal/testpb/1.pulsar.go (100%) rename {tx => x/tx}/textual/internal/testpb/Makefile (100%) rename {tx => x/tx}/textual/internal/testpb/buf.gen.yaml (85%) rename {tx => x/tx}/textual/internal/testpb/buf.lock (100%) rename {tx => x/tx}/textual/internal/testpb/buf.yaml (100%) rename {tx => x/tx}/textual/internal/textualpb/Makefile (100%) rename {tx => x/tx}/textual/internal/textualpb/buf.gen.yaml (84%) rename {tx => x/tx}/textual/internal/textualpb/buf.lock (100%) rename {tx => x/tx}/textual/internal/textualpb/buf.yaml (100%) rename {tx => x/tx}/textual/internal/textualpb/doc.go (100%) rename {tx => x/tx}/textual/internal/textualpb/textual.proto (100%) rename {tx => x/tx}/textual/internal/textualpb/textual.pulsar.go (100%) rename {tx => x/tx}/textual/message.go (100%) rename {tx => x/tx}/textual/message_test.go (94%) rename {tx => x/tx}/textual/protoreflect_list_test.go (100%) rename {tx => x/tx}/textual/repeated_test.go (95%) rename {tx => x/tx}/textual/string.go (100%) rename {tx => x/tx}/textual/string_test.go (98%) rename {tx => x/tx}/textual/timestamp.go (100%) rename {tx => x/tx}/textual/timestamp_test.go (98%) rename {tx => x/tx}/textual/tx.go (99%) rename {tx => x/tx}/textual/tx_test.go (97%) rename {tx => x/tx}/textual/types.go (100%) rename {tx => x/tx}/textual/valuerenderer.go (98%) rename {tx => x/tx}/textual/valuerenderer_test.go (96%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 81d4cee867..143c0767b1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -94,7 +94,7 @@ updates: - "A:automerge" - dependencies - package-ecosystem: gomod - directory: "/tx" + directory: "/x/tx" schedule: interval: weekly labels: diff --git a/.github/labeler.yml b/.github/labeler.yml index 87b45b26d6..f204e8d399 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -39,6 +39,8 @@ - x/consensus/**/* "C:x/circuit": - x/circuit/**/* +"C:x/tx": + - x/tx/**/* "C:collections": - collections/**/* "C:Cosmovisor": diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9660f4f4de..eff5ca80a1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -559,7 +559,7 @@ jobs: # NOTE: The following jobs are used to test the Cosmos SDK Go submodules present under x/{module}. # They run when there is a diff in their respective directories. - test-tx: + test-x-tx: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -567,18 +567,18 @@ jobs: with: go-version: 1.19.4 cache: true - cache-dependency-path: tx/go.sum + cache-dependency-path: x/tx/go.sum - uses: technote-space/get-diff-action@v6.1.2 id: git_diff with: PATTERNS: | - tx/**/*.go - tx/go.mod - tx/go.sum + x/tx/**/*.go + x/tx/go.mod + x/tx/go.sum - name: tests if: env.GIT_DIFF run: | - cd tx + cd x/tx go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... - name: sonarcloud if: ${{ env.GIT_DIFF && !github.event.pull_request.draft }} @@ -587,7 +587,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: - projectBaseDir: tx/ + projectBaseDir: x/tx/ test-x-nft: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 817b1436cf..f4cd7c8d97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -157,6 +157,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### API Breaking Changes +* (tx) [#14634](https://github.com/cosmos/cosmos-sdk/pull/14634) Move the `tx` go module to `x/tx`. * (snapshots) [#14597](https://github.com/cosmos/cosmos-sdk/pull/14597) Move `snapshots` to `store/snapshots`, rename and bump proto package to v1. * (crypto/keyring) [#14151](https://github.com/cosmos/cosmos-sdk/pull/14151) Move keys presentation from `crypto/keyring` to `client/keys` * (modules) [#13850](https://github.com/cosmos/cosmos-sdk/pull/13850) and [#14046](https://github.com/cosmos/cosmos-sdk/pull/14046) Remove gogoproto stringer annotations. This removes the custom `String()` methods on all types that were using the annotations. diff --git a/x/tx/CHANGELOG.md b/x/tx/CHANGELOG.md new file mode 100644 index 0000000000..82e66fb32d --- /dev/null +++ b/x/tx/CHANGELOG.md @@ -0,0 +1,7 @@ +# CHANGELOG + +## Unreleased + +### Features + +### Improvements diff --git a/tx/go.mod b/x/tx/go.mod similarity index 96% rename from tx/go.mod rename to x/tx/go.mod index 91a4e0168b..ed98d02212 100644 --- a/tx/go.mod +++ b/x/tx/go.mod @@ -1,4 +1,4 @@ -module cosmossdk.io/tx +module cosmossdk.io/x/tx go 1.19 diff --git a/tx/go.sum b/x/tx/go.sum similarity index 100% rename from tx/go.sum rename to x/tx/go.sum diff --git a/tx/signing/sign_mode_handler.go b/x/tx/signing/sign_mode_handler.go similarity index 100% rename from tx/signing/sign_mode_handler.go rename to x/tx/signing/sign_mode_handler.go diff --git a/tx/sonar-project.properties b/x/tx/sonar-project.properties similarity index 89% rename from tx/sonar-project.properties rename to x/tx/sonar-project.properties index b04a5c4f80..4550b73afb 100644 --- a/tx/sonar-project.properties +++ b/x/tx/sonar-project.properties @@ -1,7 +1,7 @@ sonar.projectKey=cosmos-sdk-tx sonar.organization=cosmos -sonar.projectName=Cosmos SDK - Tx +sonar.projectName=Cosmos SDK - x/tx sonar.project.monorepo.enabled=true sonar.sources=. diff --git a/tx/textual/any.go b/x/tx/textual/any.go similarity index 100% rename from tx/textual/any.go rename to x/tx/textual/any.go diff --git a/tx/textual/any_test.go b/x/tx/textual/any_test.go similarity index 98% rename from tx/textual/any_test.go rename to x/tx/textual/any_test.go index e6842d0448..a8a8e2f556 100644 --- a/tx/textual/any_test.go +++ b/x/tx/textual/any_test.go @@ -7,7 +7,7 @@ import ( "os" "testing" - "cosmossdk.io/tx/textual" + "cosmossdk.io/x/tx/textual" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/require" diff --git a/tx/textual/bench_test.go b/x/tx/textual/bench_test.go similarity index 100% rename from tx/textual/bench_test.go rename to x/tx/textual/bench_test.go diff --git a/tx/textual/bytes.go b/x/tx/textual/bytes.go similarity index 100% rename from tx/textual/bytes.go rename to x/tx/textual/bytes.go diff --git a/tx/textual/bytes_test.go b/x/tx/textual/bytes_test.go similarity index 97% rename from tx/textual/bytes_test.go rename to x/tx/textual/bytes_test.go index ab82a8cd37..3492d23860 100644 --- a/tx/textual/bytes_test.go +++ b/x/tx/textual/bytes_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "cosmossdk.io/tx/textual" + "cosmossdk.io/x/tx/textual" "github.com/stretchr/testify/require" "google.golang.org/protobuf/reflect/protoreflect" ) diff --git a/tx/textual/coin_test.go b/x/tx/textual/coin_test.go similarity index 99% rename from tx/textual/coin_test.go rename to x/tx/textual/coin_test.go index 43071b5807..78a2d610ff 100644 --- a/tx/textual/coin_test.go +++ b/x/tx/textual/coin_test.go @@ -12,7 +12,7 @@ import ( bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - "cosmossdk.io/tx/textual" + "cosmossdk.io/x/tx/textual" ) // mockCoinMetadataKey is used in the mock coin metadata querier. diff --git a/tx/textual/coins.go b/x/tx/textual/coins.go similarity index 100% rename from tx/textual/coins.go rename to x/tx/textual/coins.go diff --git a/tx/textual/coins_test.go b/x/tx/textual/coins_test.go similarity index 99% rename from tx/textual/coins_test.go rename to x/tx/textual/coins_test.go index ca8105b9d9..4f42abe94b 100644 --- a/tx/textual/coins_test.go +++ b/x/tx/textual/coins_test.go @@ -9,7 +9,7 @@ import ( bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" "cosmossdk.io/math" - "cosmossdk.io/tx/textual" + "cosmossdk.io/x/tx/textual" "github.com/stretchr/testify/require" "google.golang.org/protobuf/reflect/protoreflect" ) diff --git a/tx/textual/dec.go b/x/tx/textual/dec.go similarity index 100% rename from tx/textual/dec.go rename to x/tx/textual/dec.go diff --git a/tx/textual/dec_test.go b/x/tx/textual/dec_test.go similarity index 96% rename from tx/textual/dec_test.go rename to x/tx/textual/dec_test.go index 9206323048..bc1952a36f 100644 --- a/tx/textual/dec_test.go +++ b/x/tx/textual/dec_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "cosmossdk.io/tx/textual" + "cosmossdk.io/x/tx/textual" "github.com/stretchr/testify/require" "google.golang.org/protobuf/reflect/protoreflect" ) diff --git a/tx/textual/duration.go b/x/tx/textual/duration.go similarity index 100% rename from tx/textual/duration.go rename to x/tx/textual/duration.go diff --git a/tx/textual/duration_test.go b/x/tx/textual/duration_test.go similarity index 97% rename from tx/textual/duration_test.go rename to x/tx/textual/duration_test.go index 88dd12152f..437241a295 100644 --- a/tx/textual/duration_test.go +++ b/x/tx/textual/duration_test.go @@ -7,7 +7,7 @@ import ( "os" "testing" - "cosmossdk.io/tx/textual" + "cosmossdk.io/x/tx/textual" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" diff --git a/tx/textual/e2e_test.go b/x/tx/textual/e2e_test.go similarity index 95% rename from tx/textual/e2e_test.go rename to x/tx/textual/e2e_test.go index 3d26755706..cfccff0f2e 100644 --- a/tx/textual/e2e_test.go +++ b/x/tx/textual/e2e_test.go @@ -16,8 +16,8 @@ import ( _ "cosmossdk.io/api/cosmos/crypto/multisig" _ "cosmossdk.io/api/cosmos/crypto/secp256k1" _ "cosmossdk.io/api/cosmos/gov/v1" - "cosmossdk.io/tx/textual" - "cosmossdk.io/tx/textual/internal/textualpb" + "cosmossdk.io/x/tx/textual" + "cosmossdk.io/x/tx/textual/internal/textualpb" ) type e2eJsonTest struct { diff --git a/tx/textual/encode.go b/x/tx/textual/encode.go similarity index 95% rename from tx/textual/encode.go rename to x/tx/textual/encode.go index 6a9f0f97ba..cfa916070f 100644 --- a/tx/textual/encode.go +++ b/x/tx/textual/encode.go @@ -3,7 +3,7 @@ package textual import ( "io" - "cosmossdk.io/tx/textual/internal/cbor" + "cosmossdk.io/x/tx/textual/internal/cbor" ) var ( diff --git a/tx/textual/encode_test.go b/x/tx/textual/encode_test.go similarity index 100% rename from tx/textual/encode_test.go rename to x/tx/textual/encode_test.go diff --git a/tx/textual/enum.go b/x/tx/textual/enum.go similarity index 100% rename from tx/textual/enum.go rename to x/tx/textual/enum.go diff --git a/tx/textual/enum_test.go b/x/tx/textual/enum_test.go similarity index 96% rename from tx/textual/enum_test.go rename to x/tx/textual/enum_test.go index 2076ba4a55..5fdea7c72d 100644 --- a/tx/textual/enum_test.go +++ b/x/tx/textual/enum_test.go @@ -7,8 +7,8 @@ import ( "strings" "testing" - "cosmossdk.io/tx/textual" - "cosmossdk.io/tx/textual/internal/testpb" + "cosmossdk.io/x/tx/textual" + "cosmossdk.io/x/tx/textual/internal/testpb" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/require" "google.golang.org/protobuf/encoding/protojson" diff --git a/tx/textual/int.go b/x/tx/textual/int.go similarity index 100% rename from tx/textual/int.go rename to x/tx/textual/int.go diff --git a/tx/textual/int_test.go b/x/tx/textual/int_test.go similarity index 98% rename from tx/textual/int_test.go rename to x/tx/textual/int_test.go index 48e339a04c..bac7bb9d3d 100644 --- a/tx/textual/int_test.go +++ b/x/tx/textual/int_test.go @@ -11,7 +11,7 @@ import ( "google.golang.org/protobuf/reflect/protoreflect" "cosmossdk.io/math" - "cosmossdk.io/tx/textual" + "cosmossdk.io/x/tx/textual" ) func TestIntJsonTestcases(t *testing.T) { diff --git a/tx/textual/internal/cbor/cbor.go b/x/tx/textual/internal/cbor/cbor.go similarity index 100% rename from tx/textual/internal/cbor/cbor.go rename to x/tx/textual/internal/cbor/cbor.go diff --git a/tx/textual/internal/cbor/cbor_test.go b/x/tx/textual/internal/cbor/cbor_test.go similarity index 98% rename from tx/textual/internal/cbor/cbor_test.go rename to x/tx/textual/internal/cbor/cbor_test.go index 5f3250d4e6..a574f7f3cd 100644 --- a/tx/textual/internal/cbor/cbor_test.go +++ b/x/tx/textual/internal/cbor/cbor_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - "cosmossdk.io/tx/textual/internal/cbor" + "cosmossdk.io/x/tx/textual/internal/cbor" "github.com/stretchr/testify/require" ) diff --git a/tx/textual/internal/testdata/README.md b/x/tx/textual/internal/testdata/README.md similarity index 100% rename from tx/textual/internal/testdata/README.md rename to x/tx/textual/internal/testdata/README.md diff --git a/tx/textual/internal/testdata/any.json b/x/tx/textual/internal/testdata/any.json similarity index 100% rename from tx/textual/internal/testdata/any.json rename to x/tx/textual/internal/testdata/any.json diff --git a/tx/textual/internal/testdata/bytes.json b/x/tx/textual/internal/testdata/bytes.json similarity index 100% rename from tx/textual/internal/testdata/bytes.json rename to x/tx/textual/internal/testdata/bytes.json diff --git a/tx/textual/internal/testdata/coin.json b/x/tx/textual/internal/testdata/coin.json similarity index 100% rename from tx/textual/internal/testdata/coin.json rename to x/tx/textual/internal/testdata/coin.json diff --git a/tx/textual/internal/testdata/coins.json b/x/tx/textual/internal/testdata/coins.json similarity index 100% rename from tx/textual/internal/testdata/coins.json rename to x/tx/textual/internal/testdata/coins.json diff --git a/tx/textual/internal/testdata/decimals.json b/x/tx/textual/internal/testdata/decimals.json similarity index 100% rename from tx/textual/internal/testdata/decimals.json rename to x/tx/textual/internal/testdata/decimals.json diff --git a/tx/textual/internal/testdata/duration.json b/x/tx/textual/internal/testdata/duration.json similarity index 100% rename from tx/textual/internal/testdata/duration.json rename to x/tx/textual/internal/testdata/duration.json diff --git a/tx/textual/internal/testdata/e2e.json b/x/tx/textual/internal/testdata/e2e.json similarity index 100% rename from tx/textual/internal/testdata/e2e.json rename to x/tx/textual/internal/testdata/e2e.json diff --git a/tx/textual/internal/testdata/encode.json b/x/tx/textual/internal/testdata/encode.json similarity index 100% rename from tx/textual/internal/testdata/encode.json rename to x/tx/textual/internal/testdata/encode.json diff --git a/tx/textual/internal/testdata/enum.json b/x/tx/textual/internal/testdata/enum.json similarity index 100% rename from tx/textual/internal/testdata/enum.json rename to x/tx/textual/internal/testdata/enum.json diff --git a/tx/textual/internal/testdata/integers.json b/x/tx/textual/internal/testdata/integers.json similarity index 100% rename from tx/textual/internal/testdata/integers.json rename to x/tx/textual/internal/testdata/integers.json diff --git a/tx/textual/internal/testdata/message.json b/x/tx/textual/internal/testdata/message.json similarity index 100% rename from tx/textual/internal/testdata/message.json rename to x/tx/textual/internal/testdata/message.json diff --git a/tx/textual/internal/testdata/repeated.json b/x/tx/textual/internal/testdata/repeated.json similarity index 100% rename from tx/textual/internal/testdata/repeated.json rename to x/tx/textual/internal/testdata/repeated.json diff --git a/tx/textual/internal/testdata/string.json b/x/tx/textual/internal/testdata/string.json similarity index 100% rename from tx/textual/internal/testdata/string.json rename to x/tx/textual/internal/testdata/string.json diff --git a/tx/textual/internal/testdata/timestamp.json b/x/tx/textual/internal/testdata/timestamp.json similarity index 100% rename from tx/textual/internal/testdata/timestamp.json rename to x/tx/textual/internal/testdata/timestamp.json diff --git a/tx/textual/internal/testdata/tx.json b/x/tx/textual/internal/testdata/tx.json similarity index 100% rename from tx/textual/internal/testdata/tx.json rename to x/tx/textual/internal/testdata/tx.json diff --git a/tx/textual/internal/testpb/1.proto b/x/tx/textual/internal/testpb/1.proto similarity index 98% rename from tx/textual/internal/testpb/1.proto rename to x/tx/textual/internal/testpb/1.proto index 070e91264b..f3f12f6215 100644 --- a/tx/textual/internal/testpb/1.proto +++ b/x/tx/textual/internal/testpb/1.proto @@ -7,7 +7,7 @@ import "google/protobuf/descriptor.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "cosmossdk.io/tx/textual/internal/testpb"; +option go_package = "cosmossdk.io/x/tx/textual/internal/testpb"; // A is used for testing value renderers. message A { diff --git a/tx/textual/internal/testpb/1.pulsar.go b/x/tx/textual/internal/testpb/1.pulsar.go similarity index 100% rename from tx/textual/internal/testpb/1.pulsar.go rename to x/tx/textual/internal/testpb/1.pulsar.go diff --git a/tx/textual/internal/testpb/Makefile b/x/tx/textual/internal/testpb/Makefile similarity index 100% rename from tx/textual/internal/testpb/Makefile rename to x/tx/textual/internal/testpb/Makefile diff --git a/tx/textual/internal/testpb/buf.gen.yaml b/x/tx/textual/internal/testpb/buf.gen.yaml similarity index 85% rename from tx/textual/internal/testpb/buf.gen.yaml rename to x/tx/textual/internal/testpb/buf.gen.yaml index 137c21bccb..cc934eb887 100644 --- a/tx/textual/internal/testpb/buf.gen.yaml +++ b/x/tx/textual/internal/testpb/buf.gen.yaml @@ -2,7 +2,7 @@ version: v1 managed: enabled: true go_package_prefix: - default: cosmossdk.io/tx/textual/internal/testpb + default: cosmossdk.io/x/tx/textual/internal/testpb except: - buf.build/googleapis/googleapis - buf.build/cosmos/gogo-proto diff --git a/tx/textual/internal/testpb/buf.lock b/x/tx/textual/internal/testpb/buf.lock similarity index 100% rename from tx/textual/internal/testpb/buf.lock rename to x/tx/textual/internal/testpb/buf.lock diff --git a/tx/textual/internal/testpb/buf.yaml b/x/tx/textual/internal/testpb/buf.yaml similarity index 100% rename from tx/textual/internal/testpb/buf.yaml rename to x/tx/textual/internal/testpb/buf.yaml diff --git a/tx/textual/internal/textualpb/Makefile b/x/tx/textual/internal/textualpb/Makefile similarity index 100% rename from tx/textual/internal/textualpb/Makefile rename to x/tx/textual/internal/textualpb/Makefile diff --git a/tx/textual/internal/textualpb/buf.gen.yaml b/x/tx/textual/internal/textualpb/buf.gen.yaml similarity index 84% rename from tx/textual/internal/textualpb/buf.gen.yaml rename to x/tx/textual/internal/textualpb/buf.gen.yaml index cb7e582782..08ecaa895c 100644 --- a/tx/textual/internal/textualpb/buf.gen.yaml +++ b/x/tx/textual/internal/textualpb/buf.gen.yaml @@ -2,7 +2,7 @@ version: v1 managed: enabled: true go_package_prefix: - default: cosmossdk.io/tx/textual/internal/textualpb + default: cosmossdk.io/x/tx/textual/internal/textualpb except: - buf.build/googleapis/googleapis - buf.build/cosmos/gogo-proto diff --git a/tx/textual/internal/textualpb/buf.lock b/x/tx/textual/internal/textualpb/buf.lock similarity index 100% rename from tx/textual/internal/textualpb/buf.lock rename to x/tx/textual/internal/textualpb/buf.lock diff --git a/tx/textual/internal/textualpb/buf.yaml b/x/tx/textual/internal/textualpb/buf.yaml similarity index 100% rename from tx/textual/internal/textualpb/buf.yaml rename to x/tx/textual/internal/textualpb/buf.yaml diff --git a/tx/textual/internal/textualpb/doc.go b/x/tx/textual/internal/textualpb/doc.go similarity index 100% rename from tx/textual/internal/textualpb/doc.go rename to x/tx/textual/internal/textualpb/doc.go diff --git a/tx/textual/internal/textualpb/textual.proto b/x/tx/textual/internal/textualpb/textual.proto similarity index 100% rename from tx/textual/internal/textualpb/textual.proto rename to x/tx/textual/internal/textualpb/textual.proto diff --git a/tx/textual/internal/textualpb/textual.pulsar.go b/x/tx/textual/internal/textualpb/textual.pulsar.go similarity index 100% rename from tx/textual/internal/textualpb/textual.pulsar.go rename to x/tx/textual/internal/textualpb/textual.pulsar.go diff --git a/tx/textual/message.go b/x/tx/textual/message.go similarity index 100% rename from tx/textual/message.go rename to x/tx/textual/message.go diff --git a/tx/textual/message_test.go b/x/tx/textual/message_test.go similarity index 94% rename from tx/textual/message_test.go rename to x/tx/textual/message_test.go index 694e750e6a..f355b3cdef 100644 --- a/tx/textual/message_test.go +++ b/x/tx/textual/message_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/require" bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" - "cosmossdk.io/tx/textual" - "cosmossdk.io/tx/textual/internal/testpb" + "cosmossdk.io/x/tx/textual" + "cosmossdk.io/x/tx/textual/internal/testpb" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" ) diff --git a/tx/textual/protoreflect_list_test.go b/x/tx/textual/protoreflect_list_test.go similarity index 100% rename from tx/textual/protoreflect_list_test.go rename to x/tx/textual/protoreflect_list_test.go diff --git a/tx/textual/repeated_test.go b/x/tx/textual/repeated_test.go similarity index 95% rename from tx/textual/repeated_test.go rename to x/tx/textual/repeated_test.go index e85439db78..dfa6c6e380 100644 --- a/tx/textual/repeated_test.go +++ b/x/tx/textual/repeated_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/tx/textual" - "cosmossdk.io/tx/textual/internal/testpb" + "cosmossdk.io/x/tx/textual" + "cosmossdk.io/x/tx/textual/internal/testpb" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" ) diff --git a/tx/textual/string.go b/x/tx/textual/string.go similarity index 100% rename from tx/textual/string.go rename to x/tx/textual/string.go diff --git a/tx/textual/string_test.go b/x/tx/textual/string_test.go similarity index 98% rename from tx/textual/string_test.go rename to x/tx/textual/string_test.go index 9d6f10e37d..09621f660a 100644 --- a/tx/textual/string_test.go +++ b/x/tx/textual/string_test.go @@ -7,7 +7,7 @@ import ( "os" "testing" - "cosmossdk.io/tx/textual" + "cosmossdk.io/x/tx/textual" "github.com/stretchr/testify/require" "google.golang.org/protobuf/reflect/protoreflect" ) diff --git a/tx/textual/timestamp.go b/x/tx/textual/timestamp.go similarity index 100% rename from tx/textual/timestamp.go rename to x/tx/textual/timestamp.go diff --git a/tx/textual/timestamp_test.go b/x/tx/textual/timestamp_test.go similarity index 98% rename from tx/textual/timestamp_test.go rename to x/tx/textual/timestamp_test.go index eec34deb05..6ab351f9cb 100644 --- a/tx/textual/timestamp_test.go +++ b/x/tx/textual/timestamp_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "cosmossdk.io/tx/textual" + "cosmossdk.io/x/tx/textual" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" diff --git a/tx/textual/tx.go b/x/tx/textual/tx.go similarity index 99% rename from tx/textual/tx.go rename to x/tx/textual/tx.go index 5617ae22f7..28074cb67d 100644 --- a/tx/textual/tx.go +++ b/x/tx/textual/tx.go @@ -17,7 +17,7 @@ import ( msg "cosmossdk.io/api/cosmos/msg/v1" signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" - "cosmossdk.io/tx/textual/internal/textualpb" + "cosmossdk.io/x/tx/textual/internal/textualpb" ) var ( diff --git a/tx/textual/tx_test.go b/x/tx/textual/tx_test.go similarity index 97% rename from tx/textual/tx_test.go rename to x/tx/textual/tx_test.go index 42e0c0c96e..a36358bd37 100644 --- a/tx/textual/tx_test.go +++ b/x/tx/textual/tx_test.go @@ -20,9 +20,9 @@ import ( _ "cosmossdk.io/api/cosmos/crypto/secp256k1" _ "cosmossdk.io/api/cosmos/gov/v1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" - "cosmossdk.io/tx/signing" - "cosmossdk.io/tx/textual" - "cosmossdk.io/tx/textual/internal/textualpb" + "cosmossdk.io/x/tx/signing" + "cosmossdk.io/x/tx/textual" + "cosmossdk.io/x/tx/textual/internal/textualpb" ) // txJsonTestTx represents the type that in the JSON test diff --git a/tx/textual/types.go b/x/tx/textual/types.go similarity index 100% rename from tx/textual/types.go rename to x/tx/textual/types.go diff --git a/tx/textual/valuerenderer.go b/x/tx/textual/valuerenderer.go similarity index 98% rename from tx/textual/valuerenderer.go rename to x/tx/textual/valuerenderer.go index 2ab7891368..851370a3b8 100644 --- a/tx/textual/valuerenderer.go +++ b/x/tx/textual/valuerenderer.go @@ -13,8 +13,8 @@ import ( bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - "cosmossdk.io/tx/signing" - "cosmossdk.io/tx/textual/internal/textualpb" + "cosmossdk.io/x/tx/signing" + "cosmossdk.io/x/tx/textual/internal/textualpb" cosmos_proto "github.com/cosmos/cosmos-proto" ) diff --git a/tx/textual/valuerenderer_test.go b/x/tx/textual/valuerenderer_test.go similarity index 96% rename from tx/textual/valuerenderer_test.go rename to x/tx/textual/valuerenderer_test.go index 48613426cb..dc37f38554 100644 --- a/tx/textual/valuerenderer_test.go +++ b/x/tx/textual/valuerenderer_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/protobuf/reflect/protoreflect" - "cosmossdk.io/tx/textual" - "cosmossdk.io/tx/textual/internal/testpb" + "cosmossdk.io/x/tx/textual" + "cosmossdk.io/x/tx/textual/internal/testpb" ) func TestDispatcher(t *testing.T) {