Skip to content

Commit 7bef022

Browse files
authored
refactor(mint): new go module (#18283)
1 parent 21e69ba commit 7bef022

84 files changed

Lines changed: 1652 additions & 82 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,3 +1160,34 @@ jobs:
11601160
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
11611161
with:
11621162
projectBaseDir: x/bank/
1163+
1164+
test-x-mint:
1165+
runs-on: ubuntu-latest
1166+
steps:
1167+
- uses: actions/checkout@v4
1168+
- uses: actions/setup-go@v4
1169+
with:
1170+
go-version: "1.21"
1171+
check-latest: true
1172+
cache: true
1173+
cache-dependency-path: x/mint/go.sum
1174+
- uses: technote-space/get-diff-action@v6.1.2
1175+
id: git_diff
1176+
with:
1177+
PATTERNS: |
1178+
x/mint/**/*.go
1179+
x/mint/go.mod
1180+
x/mint/go.sum
1181+
- name: tests
1182+
if: env.GIT_DIFF
1183+
run: |
1184+
cd x/mint
1185+
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./...
1186+
- name: sonarcloud
1187+
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }}
1188+
uses: SonarSource/sonarcloud-github-action@master
1189+
env:
1190+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1191+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1192+
with:
1193+
projectBaseDir: x/mint/

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
181181
* (x/slashing) [#18201](https://github.com/cosmos/cosmos-sdk/pull/18201) Slashing module was moved to its own go.mod `cosmossdk.io/x/slashing`
182182
* (x/staking) [#18257](https://github.com/cosmos/cosmos-sdk/pull/18257) Staking module was moved to its own go.mod `cosmossdk.io/x/staking`
183183
* (x/authz) [#18265](https://github.com/cosmos/cosmos-sdk/pull/18265) Authz module was moved to its own go.mod `cosmossdk.io/x/authz`
184+
* (x/mint) [#18283](https://github.com/cosmos/cosmos-sdk/pull/18283) Mint module was moved to its own go.mod `cosmossdk.io/x/mint`
184185
* (x/consensus) [#18041](https://github.com/cosmos/cosmos-sdk/pull/18041) `ToProtoConsensusParams()` returns an error
185186
* (x/slashing) [#18115](https://github.com/cosmos/cosmos-sdk/pull/18115) `NewValidatorSigningInfo` takes strings instead of `sdk.AccAddress`
186187

UPGRADING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ Group was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/group
8080

8181
Gov was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/gov`
8282

83+
#### `x/mint`
84+
85+
Mint was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/mint`
8386

8487
#### `x/slashing`
8588

baseapp/block_gas_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
store "cosmossdk.io/store/types"
1717
bankkeeper "cosmossdk.io/x/bank/keeper"
1818
banktypes "cosmossdk.io/x/bank/types"
19+
minttypes "cosmossdk.io/x/mint/types"
1920

2021
baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil"
2122
"github.com/cosmos/cosmos-sdk/client"
@@ -33,7 +34,6 @@ import (
3334
"github.com/cosmos/cosmos-sdk/types/tx/signing"
3435
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
3536
xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
36-
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
3737
)
3838

3939
var blockMaxGas = uint64(simtestutil.DefaultConsensusParams.Block.MaxGas)

baseapp/utils_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
storetypes "cosmossdk.io/store/types"
2929
_ "cosmossdk.io/x/bank"
3030
banktypes "cosmossdk.io/x/bank/types"
31+
_ "cosmossdk.io/x/mint"
3132
_ "cosmossdk.io/x/staking"
3233

3334
"github.com/cosmos/cosmos-sdk/baseapp"
@@ -49,7 +50,6 @@ import (
4950
_ "github.com/cosmos/cosmos-sdk/x/auth/tx/config"
5051
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
5152
_ "github.com/cosmos/cosmos-sdk/x/consensus"
52-
_ "github.com/cosmos/cosmos-sdk/x/mint"
5353
)
5454

5555
var ParamStoreKey = []byte("paramstore")

client/v2/go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ require (
2626
cosmossdk.io/log v1.2.1 // indirect
2727
cosmossdk.io/math v1.1.3-rc.1 // indirect
2828
cosmossdk.io/store v1.0.0-rc.0 // indirect
29+
cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000 // indirect
2930
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect
3031
filippo.io/edwards25519 v1.0.0 // indirect
3132
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
@@ -163,6 +164,7 @@ replace (
163164
cosmossdk.io/x/bank => ./../../x/bank
164165
cosmossdk.io/x/distribution => ./../../x/distribution
165166
cosmossdk.io/x/gov => ./../../x/gov
167+
cosmossdk.io/x/mint => ./../../x/mint
166168
cosmossdk.io/x/slashing => ./../../x/slashing
167169
cosmossdk.io/x/staking => ./../../x/staking
168170
)

contrib/images/simd-env/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ COPY x/slashing/go.mod x/slashing/go.sum /work/x/slashing/
2020
COPY x/staking/go.mod x/staking/go.sum /work/x/staking/
2121
COPY x/authz/go.mod x/authz/go.sum /work/x/authz/
2222
COPY x/bank/go.mod x/bank/go.sum /work/x/bank/
23+
COPY x/mint/go.mod x/mint/go.sum /work/x/mint/
2324
RUN go mod download
2425

2526
COPY ./ /work

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ require (
1414
cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000
1515
cosmossdk.io/x/distribution v0.0.0-20230925135524-a1bc045b3190
1616
cosmossdk.io/x/gov v0.0.0-20230925135524-a1bc045b3190
17+
cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000
1718
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000
1819
cosmossdk.io/x/tx v0.11.0
1920
github.com/99designs/keyring v1.2.1
@@ -173,6 +174,7 @@ replace (
173174
cosmossdk.io/x/bank => ./x/bank
174175
cosmossdk.io/x/distribution => ./x/distribution
175176
cosmossdk.io/x/gov => ./x/gov
177+
cosmossdk.io/x/mint => ./x/mint
176178
cosmossdk.io/x/protocolpool => ./x/protocolpool
177179
cosmossdk.io/x/slashing => ./x/slashing
178180
cosmossdk.io/x/staking => ./x/staking

proto/cosmos/mint/module/v1/module.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import "cosmos/app/v1alpha1/module.proto";
77
// Module is the config object of the mint module.
88
message Module {
99
option (cosmos.app.v1alpha1.module) = {
10-
go_import: "github.com/cosmos/cosmos-sdk/x/mint"
10+
go_import: "cosmossdk.io/x/mint"
1111
};
1212

1313
string fee_collector_name = 1;
1414

1515
// authority defines the custom module authority. If not set, defaults to the governance module.
1616
string authority = 2;
17-
}
17+
}

proto/cosmos/mint/v1beta1/genesis.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
55
import "cosmos/mint/v1beta1/mint.proto";
66
import "amino/amino.proto";
77

8-
option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types";
8+
option go_package = "cosmossdk.io/x/mint/types";
99

1010
// GenesisState defines the mint module's genesis state.
1111
message GenesisState {

0 commit comments

Comments
 (0)