Skip to content

Commit

Permalink
refactor: create x/mint Go module
Browse files Browse the repository at this point in the history
This change adds a go.mod file for x/mint to
be spun out as an independent Go module.

Updates #11899
Fixes #17813
  • Loading branch information
odeke-em committed Sep 20, 2023
1 parent 86ab989 commit b61e51d
Show file tree
Hide file tree
Showing 93 changed files with 2,112 additions and 233 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,15 @@ updates:
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "x/mint"
schedule:
interval: weekly
day: tuesday
time: "03:00"
labels:
- "A:automerge"
- dependencies

# Dependencies should be up to date on release branch
- package-ecosystem: gomod
Expand Down
45 changes: 22 additions & 23 deletions api/cosmos/mint/module/v1/module.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion baseapp/block_gas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"cosmossdk.io/log"
sdkmath "cosmossdk.io/math"
store "cosmossdk.io/store/types"
minttypes "cosmossdk.io/x/mint/types"

baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil"
"github.com/cosmos/cosmos-sdk/client"
Expand All @@ -33,7 +34,6 @@ import (
xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
)

var blockMaxGas = uint64(simtestutil.DefaultConsensusParams.Block.MaxGas)
Expand Down
2 changes: 1 addition & 1 deletion baseapp/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
errorsmod "cosmossdk.io/errors"
"cosmossdk.io/math"
storetypes "cosmossdk.io/store/types"
_ "cosmossdk.io/x/mint"

"github.com/cosmos/cosmos-sdk/baseapp"
baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil"
Expand All @@ -48,7 +49,6 @@ import (
_ "github.com/cosmos/cosmos-sdk/x/bank"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
_ "github.com/cosmos/cosmos-sdk/x/consensus"
_ "github.com/cosmos/cosmos-sdk/x/mint"
_ "github.com/cosmos/cosmos-sdk/x/params"
_ "github.com/cosmos/cosmos-sdk/x/staking"
)
Expand Down
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
go 1.21
go 1.21.0

toolchain go1.21.0
toolchain go1.21.1

module github.com/cosmos/cosmos-sdk

Expand All @@ -13,6 +13,7 @@ require (
cosmossdk.io/log v1.2.1
cosmossdk.io/math v1.1.2
cosmossdk.io/store v1.0.0-rc.0
cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000
cosmossdk.io/x/tx v0.10.0
github.com/99designs/keyring v1.2.1
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816
Expand Down Expand Up @@ -59,7 +60,7 @@ require (
golang.org/x/crypto v0.13.0
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63
golang.org/x/sync v0.3.0
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb
google.golang.org/grpc v1.58.1
google.golang.org/protobuf v1.31.0
gotest.tools/v3 v3.5.1
Expand Down Expand Up @@ -169,6 +170,7 @@ require (

// Below are the long-lived replace of the Cosmos SDK
replace (
cosmossdk.io/x/mint => ./x/mint
// use cosmos fork of keyring
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
// dgrijalva/jwt-go is deprecated and doesn't receive security updates.
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1204,8 +1204,8 @@ google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g=
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8=
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw=
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ=
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb h1:lK0oleSc7IQsUxO3U5TjL9DWlsxpEBemh+zpB7IqhWI=
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb h1:Isk1sSH7bovx8Rti2wZK0UZF6oraBDK74uoyLEEVFN0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
Expand Down
1 change: 1 addition & 0 deletions go.work.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use (
./tools/hubl
./x/accounts
./x/tx
./x/mint
./x/nft
./x/circuit
./x/feegrant
Expand Down
1 change: 1 addition & 0 deletions math/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module cosmossdk.io/math
go 1.20

require (
github.com/google/go-cmp v0.5.8
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
sigs.k8s.io/yaml v1.3.0
Expand Down
2 changes: 2 additions & 0 deletions math/go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
Expand Down
4 changes: 2 additions & 2 deletions proto/buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: cc916c31859748a68fd229a3c8d7a2e8
digest: shake256:469b049d0eb04203d5272062636c078decefc96fec69739159c25d85349c50c34c7706918a8b216c5c27f76939df48452148cff8c5c3ae77fa6ba5c25c1b8bf8
commit: 28151c0d0a1641bf938a7672c500e01d
digest: shake256:49215edf8ef57f7863004539deff8834cfb2195113f0b890dd1f67815d9353e28e668019165b9d872395871eeafcbab3ccfdb2b5f11734d3cca95be9e8d139de
- remote: buf.build
owner: protocolbuffers
repository: wellknowntypes
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/mint/module/v1/module.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "cosmos/app/v1alpha1/module.proto";
// Module is the config object of the mint module.
message Module {
option (cosmos.app.v1alpha1.module) = {
go_import: "github.com/cosmos/cosmos-sdk/x/mint"
go_import: "cosmossdk.io/x/mint"
};

string fee_collector_name = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/mint/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
import "cosmos/mint/v1beta1/mint.proto";
import "amino/amino.proto";

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

Check failure on line 8 in proto/cosmos/mint/v1beta1/genesis.proto

View workflow job for this annotation

GitHub Actions / break-check

File option "go_package" changed from "github.com/cosmos/cosmos-sdk/x/mint/types" to "cosmossdk.io/x/mint/types".

// GenesisState defines the mint module's genesis state.
message GenesisState {
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/mint/v1beta1/mint.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package cosmos.mint.v1beta1;

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

Check failure on line 4 in proto/cosmos/mint/v1beta1/mint.proto

View workflow job for this annotation

GitHub Actions / break-check

File option "go_package" changed from "github.com/cosmos/cosmos-sdk/x/mint/types" to "cosmossdk.io/x/mint/types".

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/mint/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "cosmos/mint/v1beta1/mint.proto";
import "amino/amino.proto";
import "cosmos_proto/cosmos.proto";

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

Check failure on line 10 in proto/cosmos/mint/v1beta1/query.proto

View workflow job for this annotation

GitHub Actions / break-check

File option "go_package" changed from "github.com/cosmos/cosmos-sdk/x/mint/types" to "cosmossdk.io/x/mint/types".

// Query provides defines the gRPC querier service.
service Query {
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/mint/v1beta1/tx.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package cosmos.mint.v1beta1;

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

Check failure on line 4 in proto/cosmos/mint/v1beta1/tx.proto

View workflow job for this annotation

GitHub Actions / break-check

File option "go_package" changed from "github.com/cosmos/cosmos-sdk/x/mint/types" to "cosmossdk.io/x/mint/types".

import "cosmos/msg/v1/msg.proto";
import "amino/amino.proto";
Expand Down
6 changes: 3 additions & 3 deletions simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ import (
"github.com/cosmos/cosmos-sdk/x/group"
groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper"
groupmodule "github.com/cosmos/cosmos-sdk/x/group/module"
"github.com/cosmos/cosmos-sdk/x/mint"
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
"cosmossdk.io/x/mint"
mintkeeper "cosmossdk.io/x/mint/keeper"
minttypes "cosmossdk.io/x/mint/types"
"github.com/cosmos/cosmos-sdk/x/params"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
Expand Down
6 changes: 3 additions & 3 deletions simapp/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import (
evidencetypes "cosmossdk.io/x/evidence/types"
"cosmossdk.io/x/feegrant"
_ "cosmossdk.io/x/feegrant/module" // import for side-effects
_ "cosmossdk.io/x/mint" // import for side-effects
minttypes "cosmossdk.io/x/mint/types"
"cosmossdk.io/x/nft"
_ "cosmossdk.io/x/nft/module" // import for side-effects
_ "cosmossdk.io/x/upgrade" // import for side-effects
Expand Down Expand Up @@ -63,9 +65,7 @@ import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
"github.com/cosmos/cosmos-sdk/x/group"
_ "github.com/cosmos/cosmos-sdk/x/group/module" // import for side-effects
_ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
_ "github.com/cosmos/cosmos-sdk/x/params" // import for side-effects
_ "github.com/cosmos/cosmos-sdk/x/params" // import for side-effects
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
_ "github.com/cosmos/cosmos-sdk/x/slashing" // import for side-effects
Expand Down
2 changes: 1 addition & 1 deletion simapp/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"cosmossdk.io/log"
"cosmossdk.io/x/evidence"
feegrantmodule "cosmossdk.io/x/feegrant/module"
"cosmossdk.io/x/mint"
"cosmossdk.io/x/upgrade"

"github.com/cosmos/cosmos-sdk/baseapp"
Expand All @@ -38,7 +39,6 @@ import (
"github.com/cosmos/cosmos-sdk/x/genutil"
"github.com/cosmos/cosmos-sdk/x/gov"
group "github.com/cosmos/cosmos-sdk/x/group/module"
"github.com/cosmos/cosmos-sdk/x/mint"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/cosmos/cosmos-sdk/x/slashing"
"github.com/cosmos/cosmos-sdk/x/staking"
Expand Down
2 changes: 1 addition & 1 deletion simapp/app_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
circuitkeeper "cosmossdk.io/x/circuit/keeper"
evidencekeeper "cosmossdk.io/x/evidence/keeper"
feegrantkeeper "cosmossdk.io/x/feegrant/keeper"
mintkeeper "cosmossdk.io/x/mint/keeper"
nftkeeper "cosmossdk.io/x/nft/keeper"
upgradekeeper "cosmossdk.io/x/upgrade/keeper"

Expand All @@ -40,7 +41,6 @@ import (
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper"
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
Expand Down
13 changes: 11 additions & 2 deletions simapp/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module cosmossdk.io/simapp

go 1.21
go 1.21.0

toolchain go1.21.1

require (
cosmossdk.io/api v0.7.1
Expand Down Expand Up @@ -32,6 +34,11 @@ require (
google.golang.org/protobuf v1.31.0
)

require (
cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000
github.com/tendermint/tendermint v0.35.9
)

require (
cloud.google.com/go v0.110.6 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
Expand All @@ -48,6 +55,7 @@ require (
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
github.com/bits-and-blooms/bitset v1.8.0 // indirect
github.com/btcsuite/btcd v0.22.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
Expand Down Expand Up @@ -178,7 +186,7 @@ require (
google.golang.org/api v0.134.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb // indirect
google.golang.org/grpc v1.58.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand All @@ -203,6 +211,7 @@ replace (
cosmossdk.io/x/circuit => ../x/circuit
cosmossdk.io/x/evidence => ../x/evidence
cosmossdk.io/x/feegrant => ../x/feegrant
cosmossdk.io/x/mint => ../x/mint
cosmossdk.io/x/nft => ../x/nft
cosmossdk.io/x/upgrade => ../x/upgrade
)
Expand Down
Loading

0 comments on commit b61e51d

Please sign in to comment.