Skip to content

Commit 66bbe8c

Browse files
authored
Merge branch 'master' into dependabot/go_modules/tutorials/nameservice/base/github.com/dvsekhvalnov/jose2go-1.6.0
2 parents 325d93c + 8edd000 commit 66bbe8c

Some content is hidden

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

96 files changed

+13953
-695
lines changed

.github/CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CODEOWNERS: <https://help.github.com/articles/about-codeowners/>
2+
3+
@samricotta
File renamed without changes.
File renamed without changes.
File renamed without changes.

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
build/tutoriald
1+
build/exampled
22
build/
33
data/
44
config/

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The published content currently lives in a few separate folders:
4747

4848
Meet the people [behind the Cosmos SDK and contributors](https://github.com/cosmos/sdk-tutorials/graphs/contributors).
4949

50-
## Viewing Tutorial Builds
50+
## Viewing Example Builds
5151

5252
There are two ways to see what your changes will look like in production before the updated pages are published:
5353

tutorials/base/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ ifeq (,$(VERSION))
1111
endif
1212

1313
# Update the ldflags with the app, client & server names
14-
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=tutorial \
15-
-X github.com/cosmos/cosmos-sdk/version.AppName=tutoriald \
14+
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=example \
15+
-X github.com/cosmos/cosmos-sdk/version.AppName=exampled \
1616
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
1717
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT)
1818

@@ -27,8 +27,8 @@ all: install
2727
install:
2828
@echo "--> ensure dependencies have not been modified"
2929
@go mod verify
30-
@echo "--> installing tutoriald"
31-
@go install $(BUILD_FLAGS) -mod=readonly ./cmd/tutoriald
30+
@echo "--> installing exampled"
31+
@go install $(BUILD_FLAGS) -mod=readonly ./cmd/exampled
3232

3333
init:
3434
./scripts/init.sh

tutorials/base/app/app.go

+15-15
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ var DefaultNodeHome string
4545
var AppConfigYAML []byte
4646

4747
var (
48-
_ runtime.AppI = (*TutorialApp)(nil)
49-
_ servertypes.Application = (*TutorialApp)(nil)
48+
_ runtime.AppI = (*ExampleApp)(nil)
49+
_ servertypes.Application = (*ExampleApp)(nil)
5050
)
5151

52-
// TutorialApp extends an ABCI application, but with most of its parameters exported.
52+
// ExampleApp extends an ABCI application, but with most of its parameters exported.
5353
// They are exported for convenience in creating helper functions, as object
5454
// capabilities aren't needed for testing.
55-
type TutorialApp struct {
55+
type ExampleApp struct {
5656
*runtime.App
5757
legacyAmino *codec.LegacyAmino
5858
appCodec codec.Codec
@@ -76,7 +76,7 @@ func init() {
7676
panic(err)
7777
}
7878

79-
DefaultNodeHome = filepath.Join(userHomeDir, ".tutoriald")
79+
DefaultNodeHome = filepath.Join(userHomeDir, ".exampled")
8080
}
8181

8282
// AppConfig returns the default app config.
@@ -92,17 +92,17 @@ func AppConfig() depinject.Config {
9292
)
9393
}
9494

95-
// NewTutorialApp returns a reference to an initialized tutorialApp.
96-
func NewTutorialApp(
95+
// NewExampleApp returns a reference to an initialized ExampleApp.
96+
func NewExampleApp(
9797
logger log.Logger,
9898
db dbm.DB,
9999
traceStore io.Writer,
100100
loadLatest bool,
101101
appOpts servertypes.AppOptions,
102102
baseAppOptions ...func(*baseapp.BaseApp),
103-
) (*TutorialApp, error) {
103+
) (*ExampleApp, error) {
104104
var (
105-
app = &TutorialApp{}
105+
app = &ExampleApp{}
106106
appBuilder *runtime.AppBuilder
107107
)
108108

@@ -149,13 +149,13 @@ func NewTutorialApp(
149149
return app, nil
150150
}
151151

152-
// LegacyAmino returns tutorialApp's amino codec.
153-
func (app *TutorialApp) LegacyAmino() *codec.LegacyAmino {
152+
// LegacyAmino returns ExampleApp's amino codec.
153+
func (app *ExampleApp) LegacyAmino() *codec.LegacyAmino {
154154
return app.legacyAmino
155155
}
156156

157157
// GetKey returns the KVStoreKey for the provided store key.
158-
func (app *TutorialApp) GetKey(storeKey string) *storetypes.KVStoreKey {
158+
func (app *ExampleApp) GetKey(storeKey string) *storetypes.KVStoreKey {
159159
sk := app.UnsafeFindStoreKey(storeKey)
160160
kvStoreKey, ok := sk.(*storetypes.KVStoreKey)
161161
if !ok {
@@ -164,7 +164,7 @@ func (app *TutorialApp) GetKey(storeKey string) *storetypes.KVStoreKey {
164164
return kvStoreKey
165165
}
166166

167-
func (app *TutorialApp) kvStoreKeys() map[string]*storetypes.KVStoreKey {
167+
func (app *ExampleApp) kvStoreKeys() map[string]*storetypes.KVStoreKey {
168168
keys := make(map[string]*storetypes.KVStoreKey)
169169
for _, k := range app.GetStoreKeys() {
170170
if kv, ok := k.(*storetypes.KVStoreKey); ok {
@@ -176,13 +176,13 @@ func (app *TutorialApp) kvStoreKeys() map[string]*storetypes.KVStoreKey {
176176
}
177177

178178
// SimulationManager implements the SimulationApp interface
179-
func (app *TutorialApp) SimulationManager() *module.SimulationManager {
179+
func (app *ExampleApp) SimulationManager() *module.SimulationManager {
180180
return app.sm
181181
}
182182

183183
// RegisterAPIRoutes registers all application module routes with the provided
184184
// API server.
185-
func (app *TutorialApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
185+
func (app *ExampleApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
186186
app.App.RegisterAPIRoutes(apiSvr, apiConfig)
187187
// register swagger API in app.go so that other applications can override easily
188188
if err := server.RegisterSwaggerAPI(apiSvr.ClientCtx, apiSvr.Router, apiConfig.Swagger); err != nil {

tutorials/base/app/app.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ modules:
22
- name: runtime
33
config:
44
"@type": cosmos.app.runtime.v1alpha1.Module
5-
app_name: TutorialApp
5+
app_name: ExampleApp
66
# During begin block slashing happens after distr.BeginBlocker so that
77
# there is nothing left over in the validator fee pool, so as to keep the CanWithdrawInvariant invariant.
88
# NOTE: staking module is required if HistoricalEntries param > 0

tutorials/base/app/export.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
)
1616

1717
// ExportAppStateAndValidators exports the state of the application for a genesis file.
18-
func (app *TutorialApp) ExportAppStateAndValidators(
18+
func (app *ExampleApp) ExportAppStateAndValidators(
1919
forZeroHeight bool,
2020
jailAllowedAddrs []string,
2121
modulesToExport []string,
@@ -52,7 +52,7 @@ func (app *TutorialApp) ExportAppStateAndValidators(
5252

5353
// prepare for fresh start at zero height
5454
// NOTE zero height genesis is a temporary feature, which will be deprecated in favor of export at a block height
55-
func (app *TutorialApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) {
55+
func (app *ExampleApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) {
5656
applyAllowedAddrs := false
5757

5858
// check if there is a allowed address list

tutorials/base/app/params/config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import (
99
)
1010

1111
const (
12-
CoinUnit = "tutorial"
12+
CoinUnit = "example"
1313

1414
DefaultBondDenom = CoinUnit
1515

1616
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address.
17-
Bech32PrefixAccAddr = "tutorial"
17+
Bech32PrefixAccAddr = "example"
1818
)
1919

2020
var (

tutorials/base/cmd/tutoriald/cmd/commands.go tutorials/base/cmd/exampled/cmd/commands.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func txCommand() *cobra.Command {
9999
// newApp is an appCreator
100100
func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application {
101101
baseappOptions := server.DefaultBaseappOptions(appOpts)
102-
app, err := app.NewTutorialApp(logger, db, traceStore, true, appOpts, baseappOptions...)
102+
app, err := app.NewExampleApp(logger, db, traceStore, true, appOpts, baseappOptions...)
103103
if err != nil {
104104
panic(err)
105105
}
@@ -119,8 +119,8 @@ func appExport(
119119
modulesToExport []string,
120120
) (servertypes.ExportedApp, error) {
121121
var (
122-
tutorialApp *app.TutorialApp
123-
err error
122+
ExampleApp *app.ExampleApp
123+
err error
124124
)
125125

126126
// this check is necessary as we use the flag in x/upgrade.
@@ -140,20 +140,20 @@ func appExport(
140140
appOpts = viperAppOpts
141141

142142
if height != -1 {
143-
tutorialApp, err = app.NewTutorialApp(logger, db, traceStore, false, appOpts)
143+
ExampleApp, err = app.NewExampleApp(logger, db, traceStore, false, appOpts)
144144
if err != nil {
145145
return servertypes.ExportedApp{}, err
146146
}
147147

148-
if err := tutorialApp.LoadHeight(height); err != nil {
148+
if err := ExampleApp.LoadHeight(height); err != nil {
149149
return servertypes.ExportedApp{}, err
150150
}
151151
} else {
152-
tutorialApp, err = app.NewTutorialApp(logger, db, traceStore, true, appOpts)
152+
ExampleApp, err = app.NewExampleApp(logger, db, traceStore, true, appOpts)
153153
if err != nil {
154154
return servertypes.ExportedApp{}, err
155155
}
156156
}
157157

158-
return tutorialApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport)
158+
return ExampleApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport)
159159
}

tutorials/base/cmd/tutoriald/cmd/root.go tutorials/base/cmd/exampled/cmd/root.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"github.com/cosmos/sdk-tutorials/tutorials/base/app"
2828
)
2929

30-
// NewRootCmd creates a new root command for tutoriald. It is called once in the
30+
// NewRootCmd creates a new root command for exampled. It is called once in the
3131
// main function.
3232
func NewRootCmd() *cobra.Command {
3333
var (
@@ -60,8 +60,8 @@ func NewRootCmd() *cobra.Command {
6060
}
6161

6262
rootCmd := &cobra.Command{
63-
Use: "tutoriald",
64-
Short: "tutoriald - the tutorial chain app",
63+
Use: "exampled",
64+
Short: "exampled - the example chain app",
6565
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
6666
// set the default command outputs
6767
cmd.SetOut(cmd.OutOrStdout())
@@ -101,7 +101,7 @@ func NewRootCmd() *cobra.Command {
101101

102102
// overwrite the minimum gas price from the app configuration
103103
srvCfg := serverconfig.DefaultConfig()
104-
srvCfg.MinGasPrices = "0tutorial"
104+
srvCfg.MinGasPrices = "0example"
105105

106106
// overwrite the block timeout
107107
cmtCfg := cmtcfg.DefaultConfig()

tutorials/base/cmd/tutoriald/main.go tutorials/base/cmd/exampled/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
"github.com/cosmos/sdk-tutorials/tutorials/base/app"
1010
"github.com/cosmos/sdk-tutorials/tutorials/base/app/params"
11-
"github.com/cosmos/sdk-tutorials/tutorials/base/cmd/tutoriald/cmd"
11+
"github.com/cosmos/sdk-tutorials/tutorials/base/cmd/exampled/cmd"
1212
)
1313

1414
func main() {

tutorials/base/go.mod

+23-20
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ require (
99
github.com/creachadair/atomicfile v0.3.1 // indirect
1010
github.com/creachadair/tomledit v0.0.24 // indirect
1111
github.com/golang/mock v1.6.0 // indirect
12+
github.com/sagikazarmark/locafero v0.4.0 // indirect
13+
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
14+
github.com/sourcegraph/conc v0.3.0 // indirect
15+
go.uber.org/multierr v1.10.0 // indirect
1216
)
1317

1418
require (
@@ -39,7 +43,7 @@ require (
3943
github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6 // indirect
4044
github.com/cockroachdb/redact v1.1.5 // indirect
4145
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
42-
github.com/cometbft/cometbft v0.38.2
46+
github.com/cometbft/cometbft v0.38.6
4347
github.com/cometbft/cometbft-db v0.9.1 // indirect
4448
github.com/cosmos/btcutil v1.0.5 // indirect
4549
github.com/cosmos/cosmos-db v1.0.0
@@ -51,7 +55,7 @@ require (
5155
github.com/cosmos/ics23/go v0.10.0 // indirect
5256
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
5357
github.com/danieljoos/wincred v1.1.2 // indirect
54-
github.com/davecgh/go-spew v1.1.1 // indirect
58+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5559
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
5660
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
5761
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
@@ -62,7 +66,7 @@ require (
6266
github.com/emicklei/dot v1.6.0 // indirect
6367
github.com/fatih/color v1.15.0 // indirect
6468
github.com/felixge/httpsnoop v1.0.2 // indirect
65-
github.com/fsnotify/fsnotify v1.6.0 // indirect
69+
github.com/fsnotify/fsnotify v1.7.0 // indirect
6670
github.com/getsentry/sentry-go v0.25.0 // indirect
6771
github.com/go-kit/kit v0.12.0 // indirect
6872
github.com/go-kit/log v0.2.1 // indirect
@@ -114,7 +118,7 @@ require (
114118
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
115119
github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect
116120
github.com/pkg/errors v0.9.1 // indirect
117-
github.com/pmezard/go-difflib v1.0.0 // indirect
121+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
118122
github.com/prometheus/client_golang v1.17.0 // indirect
119123
github.com/prometheus/client_model v0.5.0 // indirect
120124
github.com/prometheus/common v0.45.0 // indirect
@@ -124,32 +128,31 @@ require (
124128
github.com/rs/cors v1.8.3 // indirect
125129
github.com/rs/zerolog v1.31.0 // indirect
126130
github.com/sasha-s/go-deadlock v0.3.1 // indirect
127-
github.com/spf13/afero v1.9.5 // indirect
128-
github.com/spf13/cast v1.5.1 // indirect
129-
github.com/spf13/cobra v1.7.0
130-
github.com/spf13/jwalterweatherman v1.1.0 // indirect
131+
github.com/spf13/afero v1.11.0 // indirect
132+
github.com/spf13/cast v1.6.0 // indirect
133+
github.com/spf13/cobra v1.8.0
131134
github.com/spf13/pflag v1.0.5 // indirect
132-
github.com/spf13/viper v1.16.0
135+
github.com/spf13/viper v1.18.1
133136
github.com/stretchr/testify v1.8.4 // indirect
134-
github.com/subosito/gotenv v1.4.2 // indirect
137+
github.com/subosito/gotenv v1.6.0 // indirect
135138
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
136139
github.com/tendermint/go-amino v0.16.0 // indirect
137140
github.com/tidwall/btree v1.7.0 // indirect
138141
github.com/zondax/hid v0.9.2 // indirect
139142
github.com/zondax/ledger-go v0.14.3 // indirect
140143
go.etcd.io/bbolt v1.3.8 // indirect
141-
golang.org/x/crypto v0.17.0 // indirect
144+
golang.org/x/crypto v0.18.0 // indirect
142145
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
143-
golang.org/x/net v0.19.0 // indirect
144-
golang.org/x/sync v0.3.0 // indirect
145-
golang.org/x/sys v0.15.0 // indirect
146-
golang.org/x/term v0.15.0 // indirect
146+
golang.org/x/net v0.20.0 // indirect
147+
golang.org/x/sync v0.5.0 // indirect
148+
golang.org/x/sys v0.16.0 // indirect
149+
golang.org/x/term v0.16.0 // indirect
147150
golang.org/x/text v0.14.0 // indirect
148-
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect
149-
google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect
150-
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect
151-
google.golang.org/grpc v1.59.0 // indirect
152-
google.golang.org/protobuf v1.31.0 // indirect
151+
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
152+
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
153+
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
154+
google.golang.org/grpc v1.60.0 // indirect
155+
google.golang.org/protobuf v1.33.0 // indirect
153156
gopkg.in/ini.v1 v1.67.0 // indirect
154157
gopkg.in/yaml.v2 v2.4.0 // indirect
155158
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)