diff --git a/changelog.md b/changelog.md index 44a0895975..9f03fafe41 100644 --- a/changelog.md +++ b/changelog.md @@ -19,8 +19,8 @@ - [#4300](https://github.com/ignite/cli/pull/4300) Only panics the module in the most top function level - [#4327](https://github.com/ignite/cli/pull/4327) Use the TxConfig from simState instead create a new one - [#4326](https://github.com/ignite/cli/pull/4326) Add `buf.build` version to `ignite version` command -- [#4289](https://github.com/ignite/cli/pull/4289), [#4423](https://github.com/ignite/cli/pull/4423) Cosmos SDK v0.52 support - [#4436](https://github.com/ignite/cli/pull/4436) Return tx hash to the faucet API +- [#4289](https://github.com/ignite/cli/pull/4289), [#4423](https://github.com/ignite/cli/pull/4423), [#4432](https://github.com/ignite/cli/pull/4432) Cosmos SDK v0.52 support ### Changes diff --git a/go.mod b/go.mod index 0f1f160082..5417631b38 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,13 @@ go 1.23.3 // Cosmos SDK v0.52 integration replace ( - cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20241106232657-2290c5ee5582 // main - cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.4 // main - cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241106232657-2290c5ee5582 // main - cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241106211233-535aa2f3508e // release/v0.52.x - cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241106211233-535aa2f3508e // release/v0.52.x - cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241106211233-535aa2f3508e // release/v0.52.x - cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241106211233-535aa2f3508e // release/v0.52.x - github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2 + cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20241202173430-9d9c19c0f854 // main + cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.6 // main + cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241202173430-9d9c19c0f854 // main + cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241202180139-76f8af9617cd // release/v0.52.x + cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241202180139-76f8af9617cd // release/v0.52.x + cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241202180139-76f8af9617cd // release/v0.52.x + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241203223452-5a18da34d859 ) replace ( @@ -42,8 +41,8 @@ require ( github.com/charmbracelet/glow v1.4.1 github.com/charmbracelet/lipgloss v1.0.0 github.com/cockroachdb/errors v1.11.3 - github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f - github.com/cometbft/cometbft/api v1.0.0-rc.1 + github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9 + github.com/cometbft/cometbft/api v1.0.0-rc2 github.com/cosmos/cosmos-sdk v0.52.0 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.7.0 @@ -82,18 +81,18 @@ require ( github.com/rs/cors v1.11.1 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/tbruyelle/mdgofmt v0.1.3 github.com/vektra/mockery/v2 v2.46.0 go.etcd.io/bbolt v1.4.0-alpha.1 - golang.org/x/mod v0.21.0 + golang.org/x/mod v0.22.0 golang.org/x/sync v0.9.0 - golang.org/x/term v0.25.0 - golang.org/x/text v0.19.0 - golang.org/x/tools v0.25.0 + golang.org/x/term v0.26.0 + golang.org/x/text v0.20.0 + golang.org/x/tools v0.27.0 golang.org/x/vuln v1.0.4 - google.golang.org/grpc v1.67.1 - google.golang.org/protobuf v1.35.1 + google.golang.org/grpc v1.68.0 + google.golang.org/protobuf v1.35.2 gopkg.in/yaml.v3 v3.0.1 mvdan.cc/gofumpt v0.7.0 sigs.k8s.io/yaml v1.4.0 @@ -105,19 +104,19 @@ require ( buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20240508200655-46a4cf4ba109.1 // indirect buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.1-20240514010100-299bd9c9a0c4.1 // indirect buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.1-20240514010100-299bd9c9a0c4.1 // indirect - buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.1-20240701160653-fedbb9acfd2f.1 // indirect - buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.1-20240130113600-88ef6483f90f.1 // indirect + buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1 // indirect + buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1 // indirect connectrpc.com/connect v1.16.1 // indirect connectrpc.com/otelconnect v0.7.0 // indirect cosmossdk.io/api v0.8.0 // indirect - cosmossdk.io/collections v0.4.1-0.20241031202146-5b7fc8ae90a7 // indirect - cosmossdk.io/core/testing v0.0.0-20240923163230-04da382a9f29 // indirect + cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b // indirect + cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e // indirect cosmossdk.io/depinject v1.1.0 // indirect cosmossdk.io/errors v1.0.1 // indirect - cosmossdk.io/log v1.4.1 // indirect - cosmossdk.io/schema v0.3.1-0.20240930054013-7c6e0388a3f9 // indirect + cosmossdk.io/log v1.5.0 // indirect + cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b // indirect cosmossdk.io/store v1.1.1-0.20240909133312-50288938d1b6 // indirect - cosmossdk.io/x/tx v1.0.0-alpha.1 // indirect + cosmossdk.io/x/tx v1.0.0-alpha.2 // indirect dario.cat/mergo v1.0.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/4meepo/tagalign v1.3.4 // indirect @@ -133,7 +132,7 @@ require ( github.com/DataDog/zstd v1.5.6 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect - github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/Masterminds/semver/v3 v3.3.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect @@ -156,14 +155,14 @@ require ( github.com/bombsimon/wsl/v4 v4.4.1 // indirect github.com/breml/bidichk v0.2.7 // indirect github.com/breml/errchkjson v0.3.6 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect - github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 // indirect github.com/bufbuild/protocompile v0.13.1-0.20240510201809-752249dfc37f // indirect github.com/bufbuild/protoplugin v0.0.0-20240323223605-e2735f6c31ee // indirect github.com/bufbuild/protovalidate-go v0.6.2 // indirect github.com/bufbuild/protoyaml-go v0.1.9 // indirect github.com/butuzov/ireturn v0.3.0 // indirect github.com/butuzov/mirror v1.2.0 // indirect + github.com/bytedance/sonic v1.12.4 // indirect + github.com/bytedance/sonic/loader v0.2.1 // indirect github.com/calmh/randomart v1.1.0 // indirect github.com/catenacyber/perfsprint v0.7.1 // indirect github.com/ccojocar/zxcvbn-go v1.0.2 // indirect @@ -179,6 +178,8 @@ require ( github.com/cilium/ebpf v0.11.0 // indirect github.com/ckaznocha/intrange v0.1.2 // indirect github.com/cloudflare/circl v1.3.7 // indirect + github.com/cloudwego/base64x v0.1.4 // indirect + github.com/cloudwego/iasm v0.2.0 // indirect github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v1.1.2 // indirect @@ -191,9 +192,8 @@ require ( github.com/cosiner/argv v0.1.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect - github.com/cosmos/crypto v0.1.2 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.3.1 // indirect + github.com/cosmos/iavl v1.3.2 // indirect github.com/cosmos/ics23/go v0.11.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect @@ -206,8 +206,8 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/denis-tingaikin/go-header v0.5.0 // indirect github.com/derekparker/trie v0.0.0-20230829180723-39f4de51ef7d // indirect - github.com/dgraph-io/badger/v4 v4.3.0 // indirect - github.com/dgraph-io/ristretto v1.0.0 // indirect + github.com/dgraph-io/badger/v4 v4.4.0 // indirect + github.com/dgraph-io/ristretto/v2 v2.0.0 // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect github.com/distribution/reference v0.6.0 // indirect github.com/dlclark/regexp2 v1.2.0 // indirect @@ -229,7 +229,7 @@ require ( github.com/felixge/fgprof v0.9.4 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/firefart/nonamedreturns v1.0.5 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect github.com/ghostiam/protogetter v0.3.6 // indirect github.com/go-chi/chi/v5 v5.0.12 // indirect @@ -237,7 +237,6 @@ require ( github.com/go-delve/liner v1.2.3-0.20231231155935-4726ab1d7f62 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.4.2 // indirect @@ -325,7 +324,8 @@ require ( github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kisielk/errcheck v1.7.0 // indirect github.com/kkHAIKE/contextcheck v1.1.5 // indirect - github.com/klauspost/compress v1.17.10 // indirect + github.com/klauspost/compress v1.17.11 // indirect + github.com/klauspost/cpuid/v2 v2.2.9 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -389,9 +389,9 @@ require ( github.com/pkg/profile v1.7.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polyfloyd/go-errorlint v1.6.0 // indirect - github.com/prometheus/client_golang v1.20.4 // indirect + github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.59.1 // indirect + github.com/prometheus/common v0.60.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/quasilyte/go-ruleguard v0.4.2 // indirect github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect @@ -444,6 +444,7 @@ require ( github.com/timonwong/loggercheck v0.9.4 // indirect github.com/tomarrell/wrapcheck/v2 v2.9.0 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ultraware/funlen v0.1.0 // indirect github.com/ultraware/whitespace v0.1.1 // indirect github.com/uudashr/gocognit v1.1.3 // indirect @@ -474,16 +475,16 @@ require ( go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/arch v0.6.0 // indirect - golang.org/x/crypto v0.28.0 // indirect - golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/arch v0.12.0 // indirect + golang.org/x/crypto v0.29.0 // indirect + golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect - golang.org/x/net v0.30.0 // indirect + golang.org/x/net v0.31.0 // indirect golang.org/x/sys v0.27.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index f8eed5548c..4239c0ca1d 100644 --- a/go.sum +++ b/go.sum @@ -9,10 +9,10 @@ buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.1-20240514010100-299bd9c9 buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.1-20240514010100-299bd9c9a0c4.1/go.mod h1:3Vwq3HRCNOcnv99Ra+/8K5cntwO/Gw98cIjsjQVxf4E= buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.1-20240514010100-299bd9c9a0c4.1 h1:zrXXp1IT3qukIKorguvnrw/JzxYttBrXzktUQGiQHqA= buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.1-20240514010100-299bd9c9a0c4.1/go.mod h1:8ONhsyCTLQ9kBslWnMgPrXTcxzCkKlxZqN9ewUveui8= -buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.1-20240701160653-fedbb9acfd2f.1 h1:DIUSA9vcIz63uUotWfbXXlwv1iTL+C0O2kEMLsnIIbc= -buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.1-20240701160653-fedbb9acfd2f.1/go.mod h1:JTBMfyi+qAXUHumX+rcD2WIq9FNWmdcNh5MjBnSw0L0= -buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.1-20240130113600-88ef6483f90f.1 h1:F78ecjvMtgd1aZ1Aj9cvBjURxVGCYvRM+OOy5eR+pjw= -buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.1-20240130113600-88ef6483f90f.1/go.mod h1:zqi/LZjZhyvjCMTEVIwAf5VRlkLduuCfqmZxgoormq0= +buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1 h1:kAu+bRyXqQWarx/4mAdKFYW6bgvjGKhzvIXJvMHivC4= +buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1/go.mod h1:wqOtclGXqh+7m/L6fn0SatBJ+m9E5muF/41a3LgIPVI= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1 h1:FYhA+EOS18QBdffLVpisUjBGsCtUljMx4bFOsZT81ZM= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1/go.mod h1:17Ax38yd8pg56din4ecwSDBRCSX0qLcif5Cdf8ayto4= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -29,32 +29,32 @@ connectrpc.com/connect v1.16.1 h1:rOdrK/RTI/7TVnn3JsVxt3n028MlTRwmK5Q4heSpjis= connectrpc.com/connect v1.16.1/go.mod h1:XpZAduBQUySsb4/KO5JffORVkDI4B6/EYPi7N8xpNZw= connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY= connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc= -cosmossdk.io/api v0.7.3-0.20241106232657-2290c5ee5582 h1:EbYIA0GWJKGU27Lqt4QxqdqM5ofdn/cwYCFkm0mx2A4= -cosmossdk.io/api v0.7.3-0.20241106232657-2290c5ee5582/go.mod h1:vJzWrAeIXCkD3Y0DiJhVYKEpEUBQL+7YeBLDsptONPA= -cosmossdk.io/collections v0.4.1-0.20241031202146-5b7fc8ae90a7 h1:e5WKeWdFiH5hw1Apu/0MJQ/GoQxIcnC6++TFzBVNy0s= -cosmossdk.io/collections v0.4.1-0.20241031202146-5b7fc8ae90a7/go.mod h1:DcD++Yfcq0OFtM3CJNYLIBjfZ+4DEyeJ/AUk6gkwlOE= -cosmossdk.io/core v1.0.0-alpha.4 h1:9iuroT9ejDYETCsGkzkvs/wAY/5UFl7nCIINFRxyMJY= -cosmossdk.io/core v1.0.0-alpha.4/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY= -cosmossdk.io/core/testing v0.0.0-20240923163230-04da382a9f29 h1:NxxUo0GMJUbIuVg0R70e3cbn9eFTEuMr7ev1AFvypdY= -cosmossdk.io/core/testing v0.0.0-20240923163230-04da382a9f29/go.mod h1:8s2tPeJtSiQuoyPmr2Ag7meikonISO4Fv4MoO8+ORrs= +cosmossdk.io/api v0.7.3-0.20241202173430-9d9c19c0f854 h1:D1Zv36Z18p/HscNyaFn9oYC/ED/ivZ1yXffTQmyhDYg= +cosmossdk.io/api v0.7.3-0.20241202173430-9d9c19c0f854/go.mod h1:vZy0Ev95gwANXt5ssiDui4L5nlMYO5bzqR77hCjIz9s= +cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b h1:MgU4EDOo/pXgepHCUFQFnIfUCxk/JO0AJGDTUQhhEhg= +cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b/go.mod h1:uf12i1yKvzEIHt2ok7poNqFDQTb71O00RQLitSynmrg= +cosmossdk.io/core v1.0.0-alpha.6 h1:5ukC4JcQKmemLQXcAgu/QoOvJI50hpBkIIg4ZT2EN8E= +cosmossdk.io/core v1.0.0-alpha.6/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY= +cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e h1:F+ScucYxwrrDJU8guJXQXpGhdpziYSbxW6HMP2wCNxs= +cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e/go.mod h1:3YvVv9aJayjPhdX0DY1IMrGse4sR63hNBWx2VtDWjGQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= -cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= -cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/log v1.5.0 h1:dVdzPJW9kMrnAYyMf1duqacoidB9uZIl+7c6z0mnq0g= +cosmossdk.io/log v1.5.0/go.mod h1:Tr46PUJjiUthlwQ+hxYtUtPn4D/oCZXAkYevBeh5+FI= cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= -cosmossdk.io/schema v0.3.1-0.20240930054013-7c6e0388a3f9 h1:DmOoS/1PeY6Ih0hAVlJ69kLMUrLV+TCbfICrZtB1vdU= -cosmossdk.io/schema v0.3.1-0.20240930054013-7c6e0388a3f9/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= -cosmossdk.io/store v1.0.0-rc.0.0.20241106232657-2290c5ee5582 h1:PVMvSrFMaMNy9fJ1D/bvCSS8DepswqJI/VoMuYDeYdA= -cosmossdk.io/store v1.0.0-rc.0.0.20241106232657-2290c5ee5582/go.mod h1:uaysXSQHWUykekFPvS1JqQ7HM58Zuqcby1DNlLQPWSg= -cosmossdk.io/x/bank v0.0.0-20241106211233-535aa2f3508e h1:DCULJVM+ztgWJpvRIqZNnSfQNRnyJ/hovP9xBwnGM0E= -cosmossdk.io/x/bank v0.0.0-20241106211233-535aa2f3508e/go.mod h1:OmcHhLWT30nMpN5kYEQtS7vmLIFXNFFyU2XTaVSpR/s= -cosmossdk.io/x/staking v0.0.0-20241106211233-535aa2f3508e h1:vdeJrlIqDSMQjS0dSpRWLv6skq2IzX851NjGwQJzZMk= -cosmossdk.io/x/staking v0.0.0-20241106211233-535aa2f3508e/go.mod h1:ngo+eiaYADHDVslXihZf6ZgA2nWrloHOsiOCRxHVkTY= -cosmossdk.io/x/tx v1.0.0-alpha.1 h1:5w61etWMQbdCSR7uveWXCnGnD5eQ/64B2vzIhqA80yo= -cosmossdk.io/x/tx v1.0.0-alpha.1/go.mod h1:xlJjZV1wxZBTCP+ygZx9pNT/XxsfHDPf1H0VhHaUp5w= +cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b h1:svpFdulZRrYz+RTHu2u9CeKkMKrIHx5354vjiHerovo= +cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= +cosmossdk.io/store v1.0.0-rc.0.0.20241202173430-9d9c19c0f854 h1:5bOteDYvdoRIqJ5OlQgqgbYm+hZPH0/1pnwNWFob2Fw= +cosmossdk.io/store v1.0.0-rc.0.0.20241202173430-9d9c19c0f854/go.mod h1:oZBBY4BrkYnghr6MFL0MP5mGqpkPedHcWkXwXddd6tU= +cosmossdk.io/x/bank v0.0.0-20241202180139-76f8af9617cd h1:HhPL5mBMGxacUpcodhKF2X9UzedGmKYglL+vPTdQRKo= +cosmossdk.io/x/bank v0.0.0-20241202180139-76f8af9617cd/go.mod h1:XvLY9R3xNhCz6pcLnTaN3lLR0fdiiWQusdng6oafNmQ= +cosmossdk.io/x/staking v0.0.0-20241202180139-76f8af9617cd h1:Emi9MumD3E+TdwtpR0tmrPddf6fhOyMOAJTgHxYEURI= +cosmossdk.io/x/staking v0.0.0-20241202180139-76f8af9617cd/go.mod h1:vfK1iOZa/t6UMQ27dTGZenKGQjW4EdK5oVOLBW2hRNo= +cosmossdk.io/x/tx v1.0.0-alpha.2 h1:UW80FMm7B0fiAMsrfe5+HabSJ3XBg+tQa6/GK9prqWk= +cosmossdk.io/x/tx v1.0.0-alpha.2/go.mod h1:r4yTKSJ7ZCCR95YbBfY3nfvbgNw6m9F6f25efWYYQWo= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -95,8 +95,8 @@ github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rW github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 h1:/fTUt5vmbkAcMBt4YQiuC23cV0kEsN1MVMNqeOW43cU= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0/go.mod h1:ONJg5sxcbsdQQ4pOW8TGdTidT2TMAUy/2Xhr8mrYaao= -github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= -github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4= +github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -109,8 +109,6 @@ github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJP github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= -github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= @@ -185,8 +183,6 @@ github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurT github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 h1:KdUfX2zKommPRa+PD0sWZUyXe9w277ABlgELO7H04IM= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/bufbuild/buf v1.32.1 h1:EsGUKtT1IFRAVS52v/OYcmvUAZ3o6hb6GoEOLM7WSlU= github.com/bufbuild/buf v1.32.1/go.mod h1:trWT7vC+ujoZayhIVBOoU8JEOUVxWDFNs4+ixc5bLEA= github.com/bufbuild/protocompile v0.13.1-0.20240510201809-752249dfc37f h1:cQLFPZXf32tbTLzUTg0n69Vi5kddhUiZMzpMzKRW0XU= @@ -204,6 +200,11 @@ github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD github.com/butuzov/mirror v1.2.0 h1:9YVK1qIjNspaqWutSv8gsge2e/Xpq1eqEkslEUHy5cs= github.com/butuzov/mirror v1.2.0/go.mod h1:DqZZDtzm42wIAIyHXeN8W/qb1EPlb9Qn/if9icBOpdQ= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/bytedance/sonic v1.12.4 h1:9Csb3c9ZJhfUWeMtpCDCq6BUoH5ogfDFLUgQ/jG+R0k= +github.com/bytedance/sonic v1.12.4/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.1 h1:1GgorWTqf12TA8mma4DDSbaQigE2wOgQo7iCjjJv3+E= +github.com/bytedance/sonic/loader v0.2.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/calmh/randomart v1.1.0 h1:evl+iwc10LXtHdMZhzLxmsCQVmWnkXs44SbC6Uk0Il8= github.com/calmh/randomart v1.1.0/go.mod h1:DQUbPVyP+7PAs21w/AnfMKG5NioxS3TbZ2F9MSK/jFM= github.com/catenacyber/perfsprint v0.7.1 h1:PGW5G/Kxn+YrN04cRAZKC+ZuvlVwolYMrIyyTJ/rMmc= @@ -268,6 +269,10 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= @@ -289,12 +294,12 @@ github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwP github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f h1:rPWKqyc+CeuddICqlqptf+3NPE8exbC9SOGuDPTEN3k= -github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f/go.mod h1:MqZ5E5jLU1JdP10FSRXhItpm+GdHMbW7Myv3UARLxqg= +github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9 h1:moNybQ29M6OzirXBd7DBg1FERRECndXCEnlJSCIaMvo= +github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9/go.mod h1:GMmx+Ol327wKu+M/aMIZgOaagm8CC24CqVaC4zTpEok= github.com/cometbft/cometbft-db v1.0.1 h1:SylKuLseMLQKw3+i8y8KozZyJcQSL98qEe2CGMCGTYE= github.com/cometbft/cometbft-db v1.0.1/go.mod h1:EBrFs1GDRiTqrWXYi4v90Awf/gcdD5ExzdPbg4X8+mk= -github.com/cometbft/cometbft/api v1.0.0-rc.1 h1:GtdXwDGlqwHYs16A4egjwylfYOMYyEacLBrs3Zvpt7g= -github.com/cometbft/cometbft/api v1.0.0-rc.1/go.mod h1:NDFKiBBD8HJC6QQLAoUI99YhsiRZtg2+FJWfk6A6m6o= +github.com/cometbft/cometbft/api v1.0.0-rc2 h1:ThzvNaJq37htjzfSsohhDoEebW94p0lEjA39CMDJ4xs= +github.com/cometbft/cometbft/api v1.0.0-rc2/go.mod h1:EkQiqVSu/p2ebrZEnB2z6Re7r8XNe//M7ylR0qEwWm0= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/containerd v1.7.11 h1:lfGKw3eU35sjV0aG2eYZTiwFEY1pCzxdzicHP3SZILw= github.com/containerd/containerd v1.7.11/go.mod h1:5UluHxHTX2rdvYuZ5OJTC5m/KJNs0Zs9wVoJm9zf5ZE= @@ -314,14 +319,12 @@ github.com/cosiner/argv v0.1.0 h1:BVDiEL32lwHukgJKP87btEPenzrrHUjajs/8yzaqcXg= github.com/cosiner/argv v0.1.0/go.mod h1:EusR6TucWKX+zFgtdUsKT2Cvg45K5rtpCcWz4hK06d8= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.3-0.20240911104526-ddc3f09bfc22 h1:V3WlarcZwlYYt3dUsStxm0FAFXVeEcvgwfmR6upxm5M= -github.com/cosmos/cosmos-db v1.0.3-0.20240911104526-ddc3f09bfc22/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-db v1.1.0 h1:KLHNVQ73h7vawXTpj9UJ7ZR2IXv51tsEHkQJJ9EBDzI= +github.com/cosmos/cosmos-db v1.1.0/go.mod h1:t7c4A6cfGdpUwwVxrQ0gQLeRQqGUBJu0yvE4F/26REg= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.52.0-beta.2 h1:YK6V/hEsNTme4p0rzka+u0w9mJOZbu9oiGxm6R/AcYc= -github.com/cosmos/cosmos-sdk v0.52.0-beta.2/go.mod h1:e9Od074VokLcXsta7pqT4OisUidfR/Bt7xZImKpQzPg= -github.com/cosmos/crypto v0.1.2 h1:Yn500sPY+9sKVdhiPUSDtt8JOpBGMB515dOmla4zfls= -github.com/cosmos/crypto v0.1.2/go.mod h1:b6VWz3HczIpBaQPvI7KrbQeF3pXHh0al3T5e0uwMBQw= +github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241203223452-5a18da34d859 h1:zu412u01uCGCjfozvAJnnEkuOCxsfR82ZkL4BKFY3PI= +github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241203223452-5a18da34d859/go.mod h1:FesLLSSRJl6o/2PoYUFPTtm+KnVyGQLbp5Jn2Ii2OX8= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -329,8 +332,8 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= -github.com/cosmos/iavl v1.3.1 h1:+W1G2uSUtJMqMGpwz/fKiwZxY2DDT/9/0hyNLm6Geu0= -github.com/cosmos/iavl v1.3.1/go.mod h1:T6SfBcyhulVIY2G/ZtAtQm/QiJvsuhIos52V4dWYk88= +github.com/cosmos/iavl v1.3.2 h1:pQyZMG+N/dzmpSV0IXXpSa86Dz7AmIwNjXku3xBrL60= +github.com/cosmos/iavl v1.3.2/go.mod h1:T6SfBcyhulVIY2G/ZtAtQm/QiJvsuhIos52V4dWYk88= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= @@ -367,10 +370,10 @@ github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okeg github.com/derekparker/trie v0.0.0-20221213183930-4c74548207f4/go.mod h1:C7Es+DLenIpPc9J6IYw4jrK0h7S9bKj4DNl8+KxGEXU= github.com/derekparker/trie v0.0.0-20230829180723-39f4de51ef7d h1:hUWoLdw5kvo2xCsqlsIBMvWUc1QCSsCYD2J2+Fg6YoU= github.com/derekparker/trie v0.0.0-20230829180723-39f4de51ef7d/go.mod h1:C7Es+DLenIpPc9J6IYw4jrK0h7S9bKj4DNl8+KxGEXU= -github.com/dgraph-io/badger/v4 v4.3.0 h1:lcsCE1/1qrRhqP+zYx6xDZb8n7U+QlwNicpc676Ub40= -github.com/dgraph-io/badger/v4 v4.3.0/go.mod h1:Sc0T595g8zqAQRDf44n+z3wG4BOqLwceaFntt8KPxUM= -github.com/dgraph-io/ristretto v1.0.0 h1:SYG07bONKMlFDUYu5pEu3DGAh8c2OFNzKm6G9J4Si84= -github.com/dgraph-io/ristretto v1.0.0/go.mod h1:jTi2FiYEhQ1NsMmA7DeBykizjOuY88NhKBkepyu1jPc= +github.com/dgraph-io/badger/v4 v4.4.0 h1:rA48XiDynZLyMdlaJl67p9+lqfqwxlgKtCpYLAio7Zk= +github.com/dgraph-io/badger/v4 v4.4.0/go.mod h1:sONMmPPfbnj9FPwS/etCqky/ULth6CQJuAZSuWCmixE= +github.com/dgraph-io/ristretto/v2 v2.0.0 h1:l0yiSOtlJvc0otkqyMaDNysg8E9/F/TYZwMbxscNOAQ= +github.com/dgraph-io/ristretto/v2 v2.0.0/go.mod h1:FVFokF2dRqXyPyeMnK1YDy8Fc6aTe0IKgbcd03CYeEk= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= @@ -440,8 +443,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/getsentry/sentry-go v0.29.0 h1:YtWluuCFg9OfcqnaujpY918N/AhCCwarIDWOYSBAjCA= @@ -473,8 +476,6 @@ github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXY github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= -github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= @@ -837,10 +838,14 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE= github.com/kkHAIKE/contextcheck v1.1.5 h1:CdnJh63tcDe53vG+RebdpdXJTc9atMgGqdx8LXxiilg= github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7uyFptcnWTYUA= -github.com/klauspost/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0= -github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY= +github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -1081,8 +1086,8 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= -github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1093,8 +1098,8 @@ github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7q github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= +github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1241,8 +1246,8 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= @@ -1274,6 +1279,8 @@ github.com/tomarrell/wrapcheck/v2 v2.9.0/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYc github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= @@ -1375,8 +1382,8 @@ go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= -golang.org/x/arch v0.6.0 h1:S0JTfE48HbRj80+4tbvZDYsJ3tGv6BUU3XxyZ7CirAc= -golang.org/x/arch v0.6.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/arch v0.12.0 h1:UsYJhbzPYGsT0HbEdmYcqtCv8UNGvnaL561NnIUvaKg= +golang.org/x/arch v0.12.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -1393,15 +1400,15 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f h1:XdNn9LlyWAhLVp6P/i8QYBW+hlyhrhei9uErw2B5GJo= +golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:D5SMRVC3C2/4+F/DB1wZsLRnSNimn2Sp/NPsCrsv8ak= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= @@ -1429,8 +1436,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1469,8 +1476,8 @@ golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1570,8 +1577,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -1583,8 +1590,8 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= @@ -1632,8 +1639,8 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= -golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= +golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= +golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= golang.org/x/vuln v1.0.4 h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I= golang.org/x/vuln v1.0.4/go.mod h1:NbJdUQhX8jY++FtuhrXs2Eyx0yePo9pF7nPlIjo9aaQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1667,10 +1674,10 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1684,8 +1691,8 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1700,8 +1707,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1746,6 +1753,7 @@ mvdan.cc/gofumpt v0.7.0 h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU= mvdan.cc/gofumpt v0.7.0/go.mod h1:txVFJy/Sc/mvaycET54pV8SW8gWxTlUuGHVEcncmNUo= mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8XzX0u72NttUGVFjO3U= mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f/go.mod h1:RSLa7mKKCNeTTMHBw5Hsy2rfJmd6O2ivt9Dw9ZqCQpQ= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/ignite/cmd/testnet.go b/ignite/cmd/testnet.go index da91e7213a..1c1fbcb6cd 100644 --- a/ignite/cmd/testnet.go +++ b/ignite/cmd/testnet.go @@ -8,7 +8,7 @@ import ( func NewTestnet() *cobra.Command { c := &cobra.Command{ Use: "testnet [command]", - Short: "Start a testnet local", + Short: "Simulate (Fuzz) the chain or start a testnet, either in place (using mainnet data) or with multiple nodes.", Aliases: []string{"t"}, Args: cobra.ExactArgs(1), } @@ -16,6 +16,7 @@ func NewTestnet() *cobra.Command { c.AddCommand( NewTestnetInPlace(), NewTestnetMultiNode(), + NewChainSimulate(), // While this is not per se a testnet command, it is related to testing. ) return c diff --git a/ignite/cmd/testnet_inplace.go b/ignite/cmd/testnet_inplace.go index dd9bc6d77b..af6f62f16b 100644 --- a/ignite/cmd/testnet_inplace.go +++ b/ignite/cmd/testnet_inplace.go @@ -5,6 +5,7 @@ import ( "github.com/spf13/cobra" + "github.com/cosmos/cosmos-sdk/codec/address" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ignite/cli/v29/ignite/pkg/cliui" @@ -91,6 +92,10 @@ func testnetInplace(cmd *cobra.Command, session *cliui.Session) error { accounts string accErr *cosmosaccount.AccountDoesNotExistError ) + + prefix := getAddressPrefix(cmd) + addressCodec := address.NewBech32Codec(prefix) + valAddressCodec := address.NewBech32Codec(prefix + "valoper") for _, acc := range cfg.Accounts { sdkAcc, err := ca.GetByName(acc.Name) if errors.As(err, &accErr) { @@ -100,19 +105,20 @@ func testnetInplace(cmd *cobra.Command, session *cliui.Session) error { return err } - sdkAddr, err := sdkAcc.Address(getAddressPrefix(cmd)) + sdkAddr, err := sdkAcc.Address(prefix) if err != nil { return err } if len(cfg.Validators) == 0 { return errors.Errorf("no validators found for account %s", sdkAcc.Name) } + if cfg.Validators[0].Name == acc.Name { - accAddr, err := sdk.AccAddressFromBech32(sdkAddr) + accAddr, err := addressCodec.StringToBytes(sdkAddr) if err != nil { return err } - operatorAddress = sdk.ValAddress(accAddr) + operatorAddress = accAddr } accounts = accounts + "," + sdkAddr } @@ -122,9 +128,14 @@ func testnetInplace(cmd *cobra.Command, session *cliui.Session) error { return err } + operatorAddressStr, err := valAddressCodec.BytesToString(operatorAddress) + if err != nil { + return err + } + args := chain.InPlaceArgs{ NewChainID: fmt.Sprintf("local%s", chainID), - NewOperatorAddress: operatorAddress.String(), + NewOperatorAddress: operatorAddressStr, AccountsToFund: accounts, } return c.TestnetInPlace(cmd.Context(), args) diff --git a/ignite/pkg/chaincmd/simulate.go b/ignite/pkg/chaincmd/simulate.go index 4463bd3257..225c95aa93 100644 --- a/ignite/pkg/chaincmd/simulate.go +++ b/ignite/pkg/chaincmd/simulate.go @@ -26,10 +26,10 @@ const ( optionSimappPeriod = "-Period" optionSimappGenesisTime = "-GenesisTime" - commandGoTest = "test" - optionGoBenchmem = "-benchmem" - optionGoSimappRun = "-run=^$" - optionGoSimappBench = "-bench=^BenchmarkSimulation" + commandGoTest = "test" + optionGoBenchmem = "-benchmem" + optionGoSimappRun = "-run=^TestFullAppSimulation$" + optionGoSimsTags = "-tags='sims'" ) // SimappOption for the SimulateCommand. @@ -177,7 +177,7 @@ func SimulationCommand(appPath string, options ...SimappOption) step.Option { commandGoTest, optionGoBenchmem, optionGoSimappRun, - optionGoSimappBench, + optionGoSimsTags, filepath.Join(appPath, "app"), } diff --git a/ignite/templates/app/files/app/export.go.plush b/ignite/templates/app/files/app/export.go.plush index 85434215b0..e797caf13b 100644 --- a/ignite/templates/app/files/app/export.go.plush +++ b/ignite/templates/app/files/app/export.go.plush @@ -3,7 +3,6 @@ package app import ( "encoding/json" "fmt" - "log" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" @@ -42,9 +41,6 @@ func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs } validators, err := staking.WriteValidators(ctx, app.StakingKeeper) - if err != nil { - return servertypes.ExportedApp{}, err - } return servertypes.ExportedApp{ AppState: appState, @@ -54,7 +50,7 @@ func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs }, err } -// prepare for fresh start at zero height +// prepForZeroHeightGenesis prepares for fresh start at zero height // NOTE zero height genesis is a temporary feature which will be deprecated // // in favor of export at a block height @@ -69,7 +65,7 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str allowedAddrsMap := make(map[string]bool) for _, addr := range jailAllowedAddrs { - _, err := sdk.ValAddressFromBech32(addr) + _, err := app.InterfaceRegistry().SigningContext().ValidatorAddressCodec().StringToBytes(addr) if err != nil { panic(err) } @@ -98,12 +94,15 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str } for _, delegation := range dels { - valAddr, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress) + valAddr, err := app.InterfaceRegistry().SigningContext().ValidatorAddressCodec().StringToBytes(delegation.ValidatorAddress) if err != nil { panic(err) } - delAddr := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress) + delAddr, err := app.InterfaceRegistry().SigningContext().AddressCodec().StringToBytes(delegation.DelegatorAddress) + if err != nil { + panic(err) + } _, _ = app.DistrKeeper.WithdrawDelegationRewards(ctx, delAddr, valAddr) } @@ -155,11 +154,14 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str // reinitialize all delegations for _, del := range dels { - valAddr, err := sdk.ValAddressFromBech32(del.ValidatorAddress) + valAddr, err := app.InterfaceRegistry().SigningContext().ValidatorAddressCodec().StringToBytes(del.ValidatorAddress) + if err != nil { + panic(err) + } + delAddr, err := app.InterfaceRegistry().SigningContext().AddressCodec().StringToBytes(del.DelegatorAddress) if err != nil { panic(err) } - delAddr := sdk.MustAccAddressFromBech32(del.DelegatorAddress) if err := app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr); err != nil { // never called as BeforeDelegationCreated always returns nil @@ -196,7 +198,7 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str err = app.StakingKeeper.UnbondingDelegations.Walk( ctx, nil, - func(key collections.Pair[[]byte, []byte], ubd stakingtypes.UnbondingDelegation) (stop bool, err error) { + func(_ collections.Pair[[]byte, []byte], ubd stakingtypes.UnbondingDelegation) (stop bool, err error) { for i := range ubd.Entries { ubd.Entries[i].CreationHeight = 0 } @@ -214,7 +216,6 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str // update bond intra-tx counters. store := ctx.KVStore(app.GetKey(stakingtypes.StoreKey)) iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) - counter := int16(0) for ; iter.Valid(); iter.Next() { addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key())) @@ -223,15 +224,19 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str panic("expected validator, not found") } + valAddr, err := app.StakingKeeper.ValidatorAddressCodec().BytesToString(addr) + if err != nil { + panic(err) + } + validator.UnbondingHeight = 0 - if applyAllowedAddrs && !allowedAddrsMap[addr.String()] { + if applyAllowedAddrs && !allowedAddrsMap[valAddr] { validator.Jailed = true } if err = app.StakingKeeper.SetValidator(ctx, validator); err != nil { panic(err) } - counter++ } if err := iter.Close(); err != nil { @@ -241,7 +246,7 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str _, err = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { - log.Fatal(err) + panic(err) } <%= if (!IsChainMinimal) { %> diff --git a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush index 4acf1551ca..26528a6552 100644 --- a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush +++ b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush @@ -44,7 +44,7 @@ type valArgs struct { newValAddr bytes.HexBytes newOperatorAddress string newValPubKey crypto.PubKey - accountsToFund []sdk.AccAddress + accountsToFund []string upgradeToTrigger string homeDir string } @@ -205,12 +205,20 @@ func initAppForTestnet(app *app.App, args valArgs) *app.App { defaultCoins := sdk.NewCoins(sdk.NewInt64Coin(bondDenom, 1000000000)) // Fund local accounts - for _, account := range args.accountsToFund { + // Fund local accounts + for _, accountStr := range args.accountsToFund { err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, defaultCoins) if err != nil { fmt.Fprintln(os.Stderr, err.Error()) os.Exit(1) } + + account, err := app.AuthKeeper.AddressCodec().StringToBytes(accountStr) + if err != nil { + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) + } + err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, account, defaultCoins) if err != nil { fmt.Fprintln(os.Stderr, err.Error()) @@ -246,18 +254,9 @@ func getCommandArgs(appOpts servertypes.AppOptions) (valArgs, error) { } args.upgradeToTrigger = upgradeToTrigger - // validate and set accounts to fund + // parsing and set accounts to fund accountsString := cast.ToString(appOpts.Get(flagAccountsToFund)) - - for _, account := range strings.Split(accountsString, ",") { - if account != "" { - addr, err := sdk.AccAddressFromBech32(account) - if err != nil { - return args, fmt.Errorf("invalid bech32 address format %w", err) - } - args.accountsToFund = append(args.accountsToFund, addr) - } - } + args.accountsToFund = append(args.accountsToFund, strings.Split(accountsString, ",")...) // home dir homeDir := cast.ToString(appOpts.Get(flags.FlagHome)) diff --git a/ignite/templates/app/files/go.mod.plush b/ignite/templates/app/files/go.mod.plush index b92337bb67..fd35883063 100644 --- a/ignite/templates/app/files/go.mod.plush +++ b/ignite/templates/app/files/go.mod.plush @@ -1,35 +1,35 @@ module <%= ModulePath %> -go 1.23.1 +go 1.23.3 replace ( - cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20241011204412-65ed5eb8007f - cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.4 - cosmossdk.io/core/testing => cosmossdk.io/core/testing v0.0.0-20241011204412-65ed5eb8007f - cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241011204412-65ed5eb8007f - cosmossdk.io/tools/confix => cosmossdk.io/tools/confix v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241011125406-ba5966f7dda3 - cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241011125406-ba5966f7dda3 - github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2 + cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20241202173430-9d9c19c0f854 + cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241202180139-76f8af9617cd + cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.6 + cosmossdk.io/core/testing => cosmossdk.io/core/testing v0.0.0-20241202173430-9d9c19c0f854 + cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241202173430-9d9c19c0f854 + cosmossdk.io/tools/confix => cosmossdk.io/tools/confix v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241202180139-76f8af9617cd + cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241202180139-76f8af9617cd + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241203223452-5a18da34d859 ) replace ( @@ -42,12 +42,12 @@ replace ( require ( cosmossdk.io/api v0.8.0 cosmossdk.io/client/v2 v2.0.0 - cosmossdk.io/collections v0.4.1-0.20240802064046-23fac2f1b8ab + cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b cosmossdk.io/core v1.0.0 - cosmossdk.io/depinject v1.0.0 + cosmossdk.io/depinject v1.1.0 cosmossdk.io/errors v1.0.1 cosmossdk.io/errors/v2 v2.0.0-20241122152243-fdb7688804d1 - cosmossdk.io/log v1.4.1 + cosmossdk.io/log v1.5.0 cosmossdk.io/math v1.4.0 cosmossdk.io/store v1.1.1-0.20240909133312-50288938d1b6 cosmossdk.io/tools/confix v0.1.2 @@ -69,9 +69,8 @@ require ( cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 cosmossdk.io/x/upgrade v0.1.4 github.com/bufbuild/buf v1.32.1 - github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f - github.com/cometbft/cometbft/api v1.0.0-rc.1 - github.com/cosmos/cosmos-db v1.0.3-0.20240911104526-ddc3f09bfc22 + github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9 + github.com/cometbft/cometbft/api v1.0.0-rc2 github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.52.0 github.com/cosmos/gogoproto v1.7.0 @@ -81,11 +80,12 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 github.com/spf13/cast v1.7.0 github.com/spf13/cobra v1.8.1 + github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.19.0 - github.com/stretchr/testify v1.9.0 - golang.org/x/tools v0.25.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 - google.golang.org/grpc v1.67.1 + github.com/stretchr/testify v1.10.0 + golang.org/x/tools v0.27.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 + google.golang.org/grpc v1.68.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 - google.golang.org/protobuf v1.35.1 + google.golang.org/protobuf v1.35.2 ) \ No newline at end of file diff --git a/ignite/templates/message/files/simapp/x/{{moduleName}}/simulation/{{msgName}}.go.plush b/ignite/templates/message/files/simapp/x/{{moduleName}}/simulation/{{msgName}}.go.plush index 0618022dd8..447bc01d53 100644 --- a/ignite/templates/message/files/simapp/x/{{moduleName}}/simulation/{{msgName}}.go.plush +++ b/ignite/templates/message/files/simapp/x/{{moduleName}}/simulation/{{msgName}}.go.plush @@ -3,27 +3,23 @@ package simulation import ( "math/rand" + "github.com/cosmos/cosmos-sdk/simsx" + sdk "github.com/cosmos/cosmos-sdk/types" + "<%= ModulePath %>/x/<%= ModuleName %>/keeper" "<%= ModulePath %>/x/<%= ModuleName %>/types" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) -func SimulateMsg<%= MsgName.UpperCamel %>( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, - txGen client.TxConfig, -) simtypes.Operation { - return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) +func Msg<%= MsgName.UpperCamel %>Factory(k keeper.Keeper) simsx.SimMsgFactoryFn[*types.Msg<%= MsgName.UpperCamel %>] { + return func(ctx context.Context, testData *simsx.ChainDataSource, reporter simsx.SimulationReporter) ([]simsx.SimAccount, *types.Msg<%= MsgName.UpperCamel %>) { + from := testData.AnyAccount(reporter) + msg := &types.Msg<%= MsgName.UpperCamel %>{ - <%= MsgSigner.UpperCamel %>: simAccount.Address.String(), + <%= MsgSigner.UpperCamel %>: from.AddressBech32, } - // TODO: Handling the <%= MsgName.UpperCamel %> simulation - - return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= MsgName.UpperCamel %> simulation not implemented"), nil, nil + // TODO: Handle the <%= MsgName.UpperCamel %> simulation + + return []simsx.SimAccount{from}, msg } } diff --git a/ignite/templates/message/message.go b/ignite/templates/message/message.go index 9fa658adb8..f9806d6feb 100644 --- a/ignite/templates/message/message.go +++ b/ignite/templates/message/message.go @@ -242,8 +242,8 @@ func moduleSimulationModify(replacer placeholder.Replacer, opts *Options) genny. content := typed.ModuleSimulationMsgModify( replacer, f.String(), - opts.ModuleName, opts.MsgName, + opts.MsgSigner, ) newFile := genny.NewFileS(path, content) diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/depinject.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/depinject.go.plush index 7335ce59ea..c1c6f72984 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/depinject.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/depinject.go.plush @@ -38,9 +38,8 @@ type ModuleInputs struct { Cdc codec.Codec AddressCodec address.Codec - AccountKeeper types.AccountKeeper - BankKeeper types.BankKeeper<%= for (dependency) in dependencies { %><%= if (dependency.Name != "Bank" && dependency.Name != "Account") { %> - <%= dependency.KeeperName() %> types.<%= dependency.KeeperName() %><% } %><% } %> + <%= for (dependency) in dependencies { %> + <%= dependency.KeeperName() %> types.<%= dependency.KeeperName() %><% } %> <%= if (isIBC) { %>IBCKeeperFn func() *ibckeeper.Keeper `optional:"true"` CapabilityScopedFn func(string) capabilitykeeper.ScopedKeeper `optional:"true"`<% } %> @@ -68,12 +67,7 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { in.CapabilityScopedFn,<% } %><%= for (dependency) in dependencies { %> in.<%= dependency.KeeperName() %>,<% } %> ) - m := NewAppModule( - in.Cdc, - k, - in.AccountKeeper, - in.BankKeeper, - ) + m := NewAppModule(in.Cdc, k,) return ModuleOutputs{<%= title(moduleName) %>Keeper: k, Module: m} } diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush index c296a1bbc8..475dce8ff5 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush @@ -35,21 +35,15 @@ var ( type AppModule struct { cdc codec.Codec keeper keeper.Keeper - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper } func NewAppModule( cdc codec.Codec, keeper keeper.Keeper, - accountKeeper types.AccountKeeper, - bankKeeper types.BankKeeper, ) AppModule { return AppModule{ cdc: cdc, keeper: keeper, - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, } } diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/simulation.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/simulation.go.plush index 7cc773fe9d..efc0cc72f9 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/module/simulation.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/module/simulation.go.plush @@ -7,20 +7,18 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/simulation" + "github.com/cosmos/cosmos-sdk/simsx" "<%= modulePath %>/testutil/sample" - <%= moduleName %>simulation "<%= modulePath %>/x/<%= moduleName %>/simulation" + "<%= modulePath %>/x/<%= moduleName %>/simulation" "<%= modulePath %>/x/<%= moduleName %>/types" ) // avoid unused import issue var ( - _ = <%= moduleName %>simulation.FindAccount _ = rand.Rand{} _ = sample.AccAddress _ = sdk.AccAddress{} - _ = simulation.MsgEntryKind ) const ( @@ -31,7 +29,7 @@ const ( func (AppModule) GenerateGenesisState(simState *module.SimulationState) { accs := make([]string, len(simState.Accounts)) for i, acc := range simState.Accounts { - accs[i] = acc.Address.String() + accs[i] = acc.AddressBech32 } <%= moduleName %>Genesis := types.GenesisState{ Params: types.DefaultParams(),<%= if (isIBC) { %> @@ -44,18 +42,13 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { // RegisterStoreDecoder registers a decoder. func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) {} -// WeightedOperations returns the all the gov module operations with their respective weights. -func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { - operations := make([]simtypes.WeightedOperation, 0) - - // this line is used by starport scaffolding # simapp/module/operation - - return operations +// ProposalMsgsX returns msgs used for governance proposals for simulations. +func (am AppModule) ProposalMsgsX(weights simsx.WeightSource, reg simsx.Registry) { + reg.Add(weights.Get("msg_update_params", 100), simulation.MsgUpdateParamsFactory()) + // this line is used by starport scaffolding # simapp/module/proposalSimulation } -// ProposalMsgs returns msgs used for governance proposals for simulations. -func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg { - return []simtypes.WeightedProposalMsg{ - // this line is used by starport scaffolding # simapp/module/OpMsg - } +// WeightedOperations returns the all the module operations with their respective weights. +func (am AppModule) WeightedOperationsX(weights simsx.WeightSource, reg simsx.Registry) { + // this line is used by starport scaffolding # simapp/module/operation } diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/simulation/helpers.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/simulation/helpers.go.plush deleted file mode 100644 index 92c437c0d1..0000000000 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/simulation/helpers.go.plush +++ /dev/null @@ -1,15 +0,0 @@ -package simulation - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" -) - -// FindAccount find a specific address from an account list -func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { - creator, err := sdk.AccAddressFromBech32(address) - if err != nil { - panic(err) - } - return simtypes.FindAccount(accs, creator) -} diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/simulation/params.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/simulation/params.go.plush new file mode 100644 index 0000000000..53dc9ba804 --- /dev/null +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/simulation/params.go.plush @@ -0,0 +1,21 @@ +package simulation + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/simsx" + + "<%= modulePath %>/x/<%= moduleName %>/types" +) + +// MsgUpdateParamsFactory creates a gov proposal for param updates +func MsgUpdateParamsFactory() simsx.SimMsgFactoryFn[*types.MsgUpdateParams] { + return func(ctx context.Context, testData *simsx.ChainDataSource, reporter simsx.SimulationReporter) ([]simsx.SimAccount, *types.MsgUpdateParams) { + params := types.DefaultParams() + // add custom params here + return nil, &types.MsgUpdateParams{ + Authority: testData.ModuleAccountAddress(reporter, "gov"), + Params: params, + } + } +} diff --git a/ignite/templates/module/create/files/base/x/{{moduleName}}/types/expected_keepers.go.plush b/ignite/templates/module/create/files/base/x/{{moduleName}}/types/expected_keepers.go.plush index 4287d068ab..1bf23ca6f0 100644 --- a/ignite/templates/module/create/files/base/x/{{moduleName}}/types/expected_keepers.go.plush +++ b/ignite/templates/module/create/files/base/x/{{moduleName}}/types/expected_keepers.go.plush @@ -3,15 +3,24 @@ package types import ( "context" - <%= if (dependencies.Contains("Staking")) { %>"cosmossdk.io/core/address" - <% } %> - sdk "github.com/cosmos/cosmos-sdk/types" + <%= if (dependencies.Contains("Staking")) { %>"cosmossdk.io/core/address"<% } %> <%= if (dependencies.Contains("Authz")) { %>"cosmossdk.io/x/authz"<% } %> + sdk "github.com/cosmos/cosmos-sdk/types" ) <%= for (dependency) in dependencies { %> - <%= if (dependency.Name == "Account") { %> + <%= if (dependency.Name == "Auth") { %> + // AuthKeeper defines the expected interface for the Auth module. + type AuthKeeper interface { + GetAccount(context.Context, sdk.AccAddress) sdk.AccountI // only used for simulation + // Methods imported from account should be defined here + } <% } else if (dependency.Name == "Bank") { %> + // BankKeeper defines the expected interface for the Bank module. + type BankKeeper interface { + SpendableCoins(context.Context, sdk.AccAddress) sdk.Coins + // Methods imported from bank should be defined here + } <% } else if (dependency.Name == "Staking") { %> // StakingKeeper defines the expected interface for the Staking module. type StakingKeeper interface { @@ -68,22 +77,4 @@ import ( // TODO Add methods imported from <%= toLower(dependency.Name) %> should be defined here } <% } %> -<% } %> - -// AccountKeeper defines the expected interface for the Account module. -type AccountKeeper interface { - GetAccount(context.Context, sdk.AccAddress) sdk.AccountI // only used for simulation - // Methods imported from account should be defined here -} - -// BankKeeper defines the expected interface for the Bank module. -type BankKeeper interface { - SpendableCoins(context.Context, sdk.AccAddress) sdk.Coins - // Methods imported from bank should be defined here -} - -// ParamSubspace defines the expected Subspace interface for parameters. -type ParamSubspace interface { - Get(context.Context, []byte, interface{}) - Set(context.Context, []byte, interface{}) -} +<% } %> \ No newline at end of file diff --git a/ignite/templates/typed/list/files/messages/x/{{moduleName}}/types/messages_{{typeName}}.go.plush b/ignite/templates/typed/list/files/messages/x/{{moduleName}}/types/messages_{{typeName}}.go.plush index 2055e0ee35..b426e7963c 100644 --- a/ignite/templates/typed/list/files/messages/x/{{moduleName}}/types/messages_{{typeName}}.go.plush +++ b/ignite/templates/typed/list/files/messages/x/{{moduleName}}/types/messages_{{typeName}}.go.plush @@ -1,5 +1,7 @@ package types +import sdk "github.com/cosmos/cosmos-sdk/types" + func NewMsgCreate<%= TypeName.UpperCamel %>(<%= MsgSigner.LowerCamel %> string<%= for (field) in Fields { %>, <%= field.Name.LowerCamel %> <%= field.DataType() %><% } %>) *MsgCreate<%= TypeName.UpperCamel %> { return &MsgCreate<%= TypeName.UpperCamel %>{ <%= MsgSigner.UpperCamel %>: <%= MsgSigner.LowerCamel %>,<%= for (field) in Fields { %> diff --git a/ignite/templates/typed/list/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush b/ignite/templates/typed/list/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush index fdfee44b07..b935329c83 100644 --- a/ignite/templates/typed/list/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush +++ b/ignite/templates/typed/list/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush @@ -3,58 +3,30 @@ package simulation import ( "math/rand" + "github.com/cosmos/cosmos-sdk/simsx" + sdk "github.com/cosmos/cosmos-sdk/types" + "<%= ModulePath %>/x/<%= ModuleName %>/keeper" "<%= ModulePath %>/x/<%= ModuleName %>/types" - sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/simulation" ) -func SimulateMsgCreate<%= TypeName.UpperCamel %>( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, - txGen client.TxConfig, -) simtypes.Operation { - return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) +func MsgCreate<%= TypeName.UpperCamel %>Factory(k keeper.Keeper) simsx.SimMsgFactoryFn[*types.MsgCreate<%= TypeName.UpperCamel %>] { + return func(ctx context.Context, testData *simsx.ChainDataSource, reporter simsx.SimulationReporter) ([]simsx.SimAccount, *types.MsgCreate<%= TypeName.UpperCamel %>) { + from := testData.AnyAccount(reporter) msg := &types.MsgCreate<%= TypeName.UpperCamel %>{ - <%= MsgSigner.UpperCamel %>: simAccount.Address.String(), + <%= MsgSigner.UpperCamel %>: from.AddressBech32, } - txCtx := simulation.OperationInput{ - R: r, - App: app, - TxGen: txGen, - Cdc: nil, - Msg: msg, - Context: ctx, - SimAccount: simAccount, - ModuleName: types.ModuleName, - CoinsSpentInMsg: sdk.NewCoins(), - AccountKeeper: ak, - Bankkeeper: bk, - } - return simulation.GenAndDeliverTxWithRandFees(txCtx) + return []simsx.SimAccount{from}, msg } } -func SimulateMsgUpdate<%= TypeName.UpperCamel %>( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, - txGen client.TxConfig, -) simtypes.Operation { - return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { +func MsgUpdate<%= TypeName.UpperCamel %>Factory(k keeper.Keeper) simsx.SimMsgFactoryFn[*types.MsgUpdate<%= TypeName.UpperCamel %>] { + return func(ctx context.Context, testData *simsx.ChainDataSource, reporter simsx.SimulationReporter) ([]simsx.SimAccount, *types.MsgUpdate<%= TypeName.UpperCamel %>) { var ( - simAccount = simtypes.Account{} <%= TypeName.LowerCamel %> = types.<%= TypeName.UpperCamel %>{} msg = &types.MsgUpdate<%= TypeName.UpperCamel %>{} - found = false ) var all<%= TypeName.UpperCamel %> []types.<%= TypeName.UpperCamel %> @@ -63,52 +35,35 @@ func SimulateMsgUpdate<%= TypeName.UpperCamel %>( return false, nil }) if err != nil { - panic(err) + reporter.Skip(err.Error()) + return nil, nil } - + + simAccount := simsx.SimAccount{} for _, obj := range all<%= TypeName.UpperCamel %> { - simAccount, found = FindAccount(accs, obj.<%= MsgSigner.UpperCamel %>) - if found { + if ok := testData.HasAccount(obj.<%= MsgSigner.UpperCamel %>); ok { + simAccount = testData.GetAccount(reporter, obj.<%= MsgSigner.UpperCamel %>) <%= TypeName.LowerCamel %> = obj break } } - if !found { - return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= TypeName.LowerCamel %> <%= MsgSigner.LowerCamel %> not found"), nil, nil + if simAccount.Address.Empty() { + reporter.Skip("<%= TypeName.LowerCamel %> <%= MsgSigner.LowerCamel %> not found") + return nil, nil } - msg.<%= MsgSigner.UpperCamel %> = simAccount.Address.String() + + msg.<%= MsgSigner.UpperCamel %> = simAccount.AddressBech32 msg.Id = <%= TypeName.LowerCamel %>.Id - txCtx := simulation.OperationInput{ - R: r, - App: app, - TxGen: txGen, - Cdc: nil, - Msg: msg, - Context: ctx, - SimAccount: simAccount, - ModuleName: types.ModuleName, - CoinsSpentInMsg: sdk.NewCoins(), - AccountKeeper: ak, - Bankkeeper: bk, - } - return simulation.GenAndDeliverTxWithRandFees(txCtx) + return []simsx.SimAccount{simAccount}, msg } } -func SimulateMsgDelete<%= TypeName.UpperCamel %>( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, - txGen client.TxConfig, -) simtypes.Operation { - return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { +func MsgDelete<%= TypeName.UpperCamel %>Factory(k keeper.Keeper) simsx.SimMsgFactoryFn[*types.MsgDelete<%= TypeName.UpperCamel %>] { + return func(ctx context.Context, testData *simsx.ChainDataSource, reporter simsx.SimulationReporter) ([]simsx.SimAccount, *types.MsgDelete<%= TypeName.UpperCamel %>) { var ( - simAccount = simtypes.Account{} <%= TypeName.LowerCamel %> = types.<%= TypeName.UpperCamel %>{} msg = &types.MsgDelete<%= TypeName.UpperCamel %>{} - found = false ) var all<%= TypeName.UpperCamel %> []types.<%= TypeName.UpperCamel %> @@ -117,35 +72,26 @@ func SimulateMsgDelete<%= TypeName.UpperCamel %>( return false, nil }) if err != nil { - panic(err) + reporter.Skip(err.Error()) + return nil, nil } + simAccount := simsx.SimAccount{} for _, obj := range all<%= TypeName.UpperCamel %> { - simAccount, found = FindAccount(accs, obj.<%= MsgSigner.UpperCamel %>) - if found { + if ok := testData.HasAccount(obj.<%= MsgSigner.UpperCamel %>); ok { + simAccount = testData.GetAccount(reporter, obj.<%= MsgSigner.UpperCamel %>) <%= TypeName.LowerCamel %> = obj break } } - if !found { - return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= TypeName.LowerCamel %> <%= MsgSigner.LowerCamel %> not found"), nil, nil + if simAccount.Address.Empty() { + reporter.Skip("<%= TypeName.LowerCamel %> <%= MsgSigner.LowerCamel %> not found") + return nil, nil } - msg.<%= MsgSigner.UpperCamel %> = simAccount.Address.String() + + msg.<%= MsgSigner.UpperCamel %> = simAccount.AddressBech32 msg.Id = <%= TypeName.LowerCamel %>.Id - txCtx := simulation.OperationInput{ - R: r, - App: app, - TxGen: txGen, - Cdc: nil, - Msg: msg, - Context: ctx, - SimAccount: simAccount, - ModuleName: types.ModuleName, - CoinsSpentInMsg: sdk.NewCoins(), - AccountKeeper: ak, - Bankkeeper: bk, - } - return simulation.GenAndDeliverTxWithRandFees(txCtx) + return []simsx.SimAccount{simAccount}, msg } } diff --git a/ignite/templates/typed/list/simulation.go b/ignite/templates/typed/list/simulation.go index 35416c7fd9..3dcf1a2d3c 100644 --- a/ignite/templates/typed/list/simulation.go +++ b/ignite/templates/typed/list/simulation.go @@ -41,12 +41,11 @@ func moduleSimulationModify(replacer placeholder.Replacer, opts *typed.Options) msgField, ) content := replacer.Replace(f.String(), typed.PlaceholderSimappGenesisState, replacementGs) - content = typed.ModuleSimulationMsgModify( replacer, content, - opts.ModuleName, opts.TypeName, + opts.MsgSigner, "Create", "Update", "Delete", ) diff --git a/ignite/templates/typed/map/files/messages/x/{{moduleName}}/types/messages_{{typeName}}.go.plush b/ignite/templates/typed/map/files/messages/x/{{moduleName}}/types/messages_{{typeName}}.go.plush index a6ffc57d10..0289b504bd 100644 --- a/ignite/templates/typed/map/files/messages/x/{{moduleName}}/types/messages_{{typeName}}.go.plush +++ b/ignite/templates/typed/map/files/messages/x/{{moduleName}}/types/messages_{{typeName}}.go.plush @@ -1,5 +1,7 @@ package types +import sdk "github.com/cosmos/cosmos-sdk/types" + func NewMsgCreate<%= TypeName.UpperCamel %>( <%= MsgSigner.LowerCamel %> string, <%= Index.Name.LowerCamel %> <%= Index.DataType() %>, diff --git a/ignite/templates/typed/map/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush b/ignite/templates/typed/map/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush index e80e9bfdf0..782d4c2318 100644 --- a/ignite/templates/typed/map/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush +++ b/ignite/templates/typed/map/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush @@ -4,122 +4,80 @@ import ( "math/rand" "strconv" + "github.com/cosmos/cosmos-sdk/simsx" + sdk "github.com/cosmos/cosmos-sdk/types" + "<%= ModulePath %>/x/<%= ModuleName %>/keeper" "<%= ModulePath %>/x/<%= ModuleName %>/types" - sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/simulation" ) -// Prevent strconv unused error +// prevent strconv unused error var _ = strconv.IntSize -func SimulateMsgCreate<%= TypeName.UpperCamel %>( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, - txGen client.TxConfig, -) simtypes.Operation { - return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - - i := r.Int() +func MsgCreate<%= TypeName.UpperCamel %>Factory(k keeper.Keeper) simsx.SimMsgFactoryFn[*types.MsgCreate<%= TypeName.UpperCamel %>] { + return func(ctx context.Context, testData *simsx.ChainDataSource, reporter simsx.SimulationReporter) ([]simsx.SimAccount, *types.MsgCreate<%= TypeName.UpperCamel %>) { + from := testData.AnyAccount(reporter) + + i := testData.Rand().Int() msg := &types.MsgCreate<%= TypeName.UpperCamel %>{ - <%= MsgSigner.UpperCamel %>: simAccount.Address.String(), + <%= MsgSigner.UpperCamel %>: from.AddressBech32, <%= Index.Name.UpperCamel %>: <%= Index.ValueLoop() %>, } - found, err := k.<%= TypeName.UpperCamel %>.Has(ctx, msg.<%= Index.Name.UpperCamel %>) if err == nil && found { - return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= TypeName.UpperCamel %> already exist"), nil, nil + reporter.Skip("<%= TypeName.UpperCamel %> already exist") + return nil, nil + } else if err != nil { + reporter.Skip(err.Error()) + return nil, nil } - txCtx := simulation.OperationInput{ - R: r, - App: app, - TxGen: txGen, - Cdc: nil, - Msg: msg, - Context: ctx, - SimAccount: simAccount, - ModuleName: types.ModuleName, - CoinsSpentInMsg: sdk.NewCoins(), - AccountKeeper: ak, - Bankkeeper: bk, - } - return simulation.GenAndDeliverTxWithRandFees(txCtx) + return []simsx.SimAccount{from}, msg } } -func SimulateMsgUpdate<%= TypeName.UpperCamel %>( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, - txGen client.TxConfig, -) simtypes.Operation { - return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { +func MsgUpdate<%= TypeName.UpperCamel %>Factory(k keeper.Keeper) simsx.SimMsgFactoryFn[*types.MsgUpdate<%= TypeName.UpperCamel %>] { + return func(ctx context.Context, testData *simsx.ChainDataSource, reporter simsx.SimulationReporter) ([]simsx.SimAccount, *types.MsgUpdate<%= TypeName.UpperCamel %>) { var ( - simAccount = simtypes.Account{} <%= TypeName.LowerCamel %> = types.<%= TypeName.UpperCamel %>{} msg = &types.MsgUpdate<%= TypeName.UpperCamel %>{} - found = false ) - + var all<%= TypeName.UpperCamel %> []types.<%= TypeName.UpperCamel %> err := k.<%= TypeName.UpperCamel %>.Walk(ctx, nil, func(key <%= Index.DataType() %>, value types.<%= TypeName.UpperCamel %>) (stop bool, err error) { all<%= TypeName.UpperCamel %> = append(all<%= TypeName.UpperCamel %>, value) return false, nil }) if err != nil { - panic(err) + reporter.Skip(err.Error()) + return nil, nil } + simAccount := simsx.SimAccount{} for _, obj := range all<%= TypeName.UpperCamel %> { - simAccount, found = FindAccount(accs, obj.<%= MsgSigner.UpperCamel %>) - if found { + if ok := testData.HasAccount(obj.<%= MsgSigner.UpperCamel %>); ok { + simAccount = testData.GetAccount(reporter, obj.<%= MsgSigner.UpperCamel %>) <%= TypeName.LowerCamel %> = obj break } } - if !found { - return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= TypeName.LowerCamel %> <%= MsgSigner.LowerCamel %> not found"), nil, nil + if simAccount.Address.Empty() { + reporter.Skip("<%= TypeName.LowerCamel %> <%= MsgSigner.LowerCamel %> not found") + return nil, nil } - msg.<%= MsgSigner.UpperCamel %> = simAccount.Address.String() + + msg.<%= MsgSigner.UpperCamel %> = simAccount.AddressBech32 msg.<%= Index.Name.UpperCamel %> = <%= TypeName.LowerCamel %>.<%= Index.Name.UpperCamel %> - txCtx := simulation.OperationInput{ - R: r, - App: app, - TxGen: txGen, - Cdc: nil, - Msg: msg, - Context: ctx, - SimAccount: simAccount, - ModuleName: types.ModuleName, - CoinsSpentInMsg: sdk.NewCoins(), - AccountKeeper: ak, - Bankkeeper: bk, - } - return simulation.GenAndDeliverTxWithRandFees(txCtx) + return []simsx.SimAccount{simAccount}, msg } } -func SimulateMsgDelete<%= TypeName.UpperCamel %>( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, - txGen client.TxConfig, -) simtypes.Operation { - return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { +func MsgDelete<%= TypeName.UpperCamel %>Factory(k keeper.Keeper) simsx.SimMsgFactoryFn[*types.MsgDelete<%= TypeName.UpperCamel %>] { + return func(ctx context.Context, testData *simsx.ChainDataSource, reporter simsx.SimulationReporter) ([]simsx.SimAccount, *types.MsgDelete<%= TypeName.UpperCamel %>) { var ( - simAccount = simtypes.Account{} <%= TypeName.LowerCamel %> = types.<%= TypeName.UpperCamel %>{} - msg = &types.MsgUpdate<%= TypeName.UpperCamel %>{} - found = false + msg = &types.MsgDelete<%= TypeName.UpperCamel %>{} ) var all<%= TypeName.UpperCamel %> []types.<%= TypeName.UpperCamel %> @@ -128,35 +86,26 @@ func SimulateMsgDelete<%= TypeName.UpperCamel %>( return false, nil }) if err != nil { - panic(err) + reporter.Skip(err.Error()) + return nil, nil } + simAccount := simsx.SimAccount{} for _, obj := range all<%= TypeName.UpperCamel %> { - simAccount, found = FindAccount(accs, obj.<%= MsgSigner.UpperCamel %>) - if found { + if ok := testData.HasAccount(obj.<%= MsgSigner.UpperCamel %>); ok { + simAccount = testData.GetAccount(reporter, obj.<%= MsgSigner.UpperCamel %>) <%= TypeName.LowerCamel %> = obj break } } - if !found { - return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= TypeName.LowerCamel %> <%= MsgSigner.LowerCamel %> not found"), nil, nil + if simAccount.Address.Empty() { + reporter.Skip("<%= TypeName.LowerCamel %> <%= MsgSigner.LowerCamel %> not found") + return nil, nil } - msg.<%= MsgSigner.UpperCamel %> = simAccount.Address.String() + + msg.<%= MsgSigner.UpperCamel %> = simAccount.AddressBech32 msg.<%= Index.Name.UpperCamel %> = <%= TypeName.LowerCamel %>.<%= Index.Name.UpperCamel %> - txCtx := simulation.OperationInput{ - R: r, - App: app, - TxGen: txGen, - Cdc: nil, - Msg: msg, - Context: ctx, - SimAccount: simAccount, - ModuleName: types.ModuleName, - CoinsSpentInMsg: sdk.NewCoins(), - AccountKeeper: ak, - Bankkeeper: bk, - } - return simulation.GenAndDeliverTxWithRandFees(txCtx) + return []simsx.SimAccount{simAccount}, msg } } diff --git a/ignite/templates/typed/map/simulation.go b/ignite/templates/typed/map/simulation.go index 0b342e66e9..f9bc4da530 100644 --- a/ignite/templates/typed/map/simulation.go +++ b/ignite/templates/typed/map/simulation.go @@ -45,8 +45,8 @@ func moduleSimulationModify(replacer placeholder.Replacer, opts *typed.Options) content = typed.ModuleSimulationMsgModify( replacer, content, - opts.ModuleName, opts.TypeName, + opts.MsgSigner, "Create", "Update", "Delete", ) diff --git a/ignite/templates/typed/placeholders.go b/ignite/templates/typed/placeholders.go index f574119b87..085790320a 100644 --- a/ignite/templates/typed/placeholders.go +++ b/ignite/templates/typed/placeholders.go @@ -12,10 +12,9 @@ const ( PlaceholderGenesisModuleInit = "// this line is used by starport scaffolding # genesis/module/init" PlaceholderGenesisModuleExport = "// this line is used by starport scaffolding # genesis/module/export" - PlaceholderSimappConst = "// this line is used by starport scaffolding # simapp/module/const" - PlaceholderSimappGenesisState = "// this line is used by starport scaffolding # simapp/module/genesisState" - PlaceholderSimappOperation = "// this line is used by starport scaffolding # simapp/module/operation" - PlaceholderSimappOperationMsg = "// this line is used by starport scaffolding # simapp/module/OpMsg" + PlaceholderSimappGenesisState = "// this line is used by starport scaffolding # simapp/module/genesisState" + PlaceholderSimappOperation = "// this line is used by starport scaffolding # simapp/module/operation" + PlaceholderSimappOperationProposalSimulation = "// this line is used by starport scaffolding # simapp/module/proposalSimulation" // Placeholders AutoCLI PlaceholderAutoCLIQuery = "// this line is used by ignite scaffolding # autocli/query" diff --git a/ignite/templates/typed/simapp.go b/ignite/templates/typed/simapp.go deleted file mode 100644 index a860983ce4..0000000000 --- a/ignite/templates/typed/simapp.go +++ /dev/null @@ -1,62 +0,0 @@ -package typed - -import ( - "fmt" - "strings" - - "github.com/ignite/cli/v29/ignite/pkg/multiformatname" - "github.com/ignite/cli/v29/ignite/pkg/placeholder" -) - -func ModuleSimulationMsgModify( - replacer placeholder.Replacer, - content, - moduleName string, - typeName multiformatname.Name, - msgs ...string, -) string { - if len(msgs) == 0 { - msgs = append(msgs, "") - } - for _, msg := range msgs { - // simulation constants - templateConst := `opWeightMsg%[2]v%[3]v = "op_weight_msg_%[4]v" - // TODO: Determine the simulation weight value - defaultWeightMsg%[2]v%[3]v int = 100 - - %[1]v` - replacementConst := fmt.Sprintf(templateConst, PlaceholderSimappConst, msg, typeName.UpperCamel, typeName.Snake) - content = replacer.Replace(content, PlaceholderSimappConst, replacementConst) - - // simulation operations - templateOp := `var weightMsg%[2]v%[3]v int - simState.AppParams.GetOrGenerate(opWeightMsg%[2]v%[3]v, &weightMsg%[2]v%[3]v, nil, - func(_ *rand.Rand) { - weightMsg%[2]v%[3]v = defaultWeightMsg%[2]v%[3]v - }, - ) - operations = append(operations, simulation.NewWeightedOperation( - weightMsg%[2]v%[3]v, - %[4]vsimulation.SimulateMsg%[2]v%[3]v(am.accountKeeper, am.bankKeeper, am.keeper, simState.TxConfig), - )) - - %[1]v` - replacementOp := fmt.Sprintf(templateOp, PlaceholderSimappOperation, msg, typeName.UpperCamel, moduleName) - content = replacer.Replace(content, PlaceholderSimappOperation, replacementOp) - - if strings.Contains(content, PlaceholderSimappOperationMsg) { - templateOpMsg := `simulation.NewWeightedProposalMsg( - opWeightMsg%[2]v%[3]v, - defaultWeightMsg%[2]v%[3]v, - func(r *rand.Rand, accs []simtypes.Account, cdc address.Codec) (sdk.Msg, error) { - %[4]vsimulation.SimulateMsg%[2]v%[3]v(am.accountKeeper, am.bankKeeper, am.keeper, simState.TxConfig) - return nil, nil - }, -), -%[1]v` - replacementOpMsg := fmt.Sprintf(templateOpMsg, PlaceholderSimappOperationMsg, msg, typeName.UpperCamel, moduleName) - content = replacer.Replace(content, PlaceholderSimappOperationMsg, replacementOpMsg) - } - } - return content -} diff --git a/ignite/templates/typed/simulation.go b/ignite/templates/typed/simulation.go new file mode 100644 index 0000000000..dc5e4c0dbb --- /dev/null +++ b/ignite/templates/typed/simulation.go @@ -0,0 +1,38 @@ +package typed + +import ( + "fmt" + "strings" + + "github.com/ignite/cli/v29/ignite/pkg/multiformatname" + "github.com/ignite/cli/v29/ignite/pkg/placeholder" +) + +func ModuleSimulationMsgModify( + replacer placeholder.Replacer, + content string, + typeName, msgSigner multiformatname.Name, + msgs ...string, +) string { + if len(msgs) == 0 { + msgs = append(msgs, "") + } + + for _, msg := range msgs { + // simulation operations + templateOp := `reg.Add(weights.Get("msg_%[4]v", 100 /* determine the simulation weight value */), simulation.Msg%[2]v%[3]vFactory(am.keeper)) + %[1]v` + replacementOp := fmt.Sprintf(templateOp, PlaceholderSimappOperation, msg, typeName.UpperCamel, fmt.Sprintf("%s_%s", strings.ToLower(msg), typeName.Snake)) + content = replacer.Replace(content, PlaceholderSimappOperation, replacementOp) + + // add proposal simulation operations for msgs having an authority as signer. + if strings.Contains(content, PlaceholderSimappOperationProposalSimulation) && strings.EqualFold(msgSigner.Original, "authority") { + templateOpMsg := `reg.Add(weights.Get("msg_%[4]v", 100), simulation.Msg%[2]v%[3]vFactory(am.keeper)) + %[1]v` + replacementOpMsg := fmt.Sprintf(templateOpMsg, PlaceholderSimappOperationProposalSimulation, msg, typeName.UpperCamel, fmt.Sprintf("%s_%s", strings.ToLower(msg), typeName.Snake)) + content = replacer.Replace(content, PlaceholderSimappOperationProposalSimulation, replacementOpMsg) + } + } + + return content +} diff --git a/ignite/templates/typed/singleton/files/messages/x/{{moduleName}}/types/messages_{{typeName}}.go.plush b/ignite/templates/typed/singleton/files/messages/x/{{moduleName}}/types/messages_{{typeName}}.go.plush index f8547d0a15..429c473aa0 100644 --- a/ignite/templates/typed/singleton/files/messages/x/{{moduleName}}/types/messages_{{typeName}}.go.plush +++ b/ignite/templates/typed/singleton/files/messages/x/{{moduleName}}/types/messages_{{typeName}}.go.plush @@ -1,5 +1,7 @@ package types +import sdk "github.com/cosmos/cosmos-sdk/types" + func NewMsgCreate<%= TypeName.UpperCamel %>(<%= MsgSigner.LowerCamel %> string<%= for (field) in Fields { %>, <%= field.Name.LowerCamel %> <%= field.DataType() %><% } %>) *MsgCreate<%= TypeName.UpperCamel %> { return &MsgCreate<%= TypeName.UpperCamel %>{ <%= MsgSigner.UpperCamel %>: <%= MsgSigner.LowerCamel %>,<%= for (field) in Fields { %> diff --git a/ignite/templates/typed/singleton/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush b/ignite/templates/typed/singleton/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush index f36c3a7f62..9dde029545 100644 --- a/ignite/templates/typed/singleton/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush +++ b/ignite/templates/typed/singleton/files/simapp/x/{{moduleName}}/simulation/{{typeName}}.go.plush @@ -3,126 +3,67 @@ package simulation import ( "math/rand" - "cosmossdk.io/collections" + "github.com/cosmos/cosmos-sdk/simsx" + sdk "github.com/cosmos/cosmos-sdk/types" "<%= ModulePath %>/x/<%= ModuleName %>/keeper" "<%= ModulePath %>/x/<%= ModuleName %>/types" - sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/simulation" ) -func SimulateMsgCreate<%= TypeName.UpperCamel %>( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, - txGen client.TxConfig, -) simtypes.Operation { - return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - +func MsgCreate<%= TypeName.UpperCamel %>Factory(k keeper.Keeper) simsx.SimMsgFactoryFn[*types.MsgCreate<%= TypeName.UpperCamel %>] { + return func(ctx context.Context, testData *simsx.ChainDataSource, reporter simsx.SimulationReporter) ([]simsx.SimAccount, *types.MsgCreate<%= TypeName.UpperCamel %>) { + from := testData.AnyAccount(reporter) msg := &types.MsgCreate<%= TypeName.UpperCamel %>{ - <%= MsgSigner.UpperCamel %>: simAccount.Address.String(), + <%= MsgSigner.UpperCamel %>: from.AddressBech32, } found, err := k.<%= TypeName.UpperCamel %>.Has(ctx) if err == nil && found { - return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= TypeName.UpperCamel %> already exist"), nil, nil + reporter.Skip("<%= TypeName.UpperCamel %> already exist") + return nil, nil + } else if err != nil { + reporter.Skip(err.Error()) + return nil, nil } - txCtx := simulation.OperationInput{ - R: r, - App: app, - TxGen: txGen, - Cdc: nil, - Msg: msg, - Context: ctx, - SimAccount: simAccount, - ModuleName: types.ModuleName, - CoinsSpentInMsg: sdk.NewCoins(), - AccountKeeper: ak, - Bankkeeper: bk, - } - return simulation.GenAndDeliverTxWithRandFees(txCtx) + return []simsx.SimAccount{from}, msg } } -func SimulateMsgUpdate<%= TypeName.UpperCamel %>( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, - txGen client.TxConfig, -) simtypes.Operation { - return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { +func MsgUpdate<%= TypeName.UpperCamel %>Factory(k keeper.Keeper) simsx.SimMsgFactoryFn[*types.MsgUpdate<%= TypeName.UpperCamel %>] { + return func(ctx context.Context, testData *simsx.ChainDataSource, reporter simsx.SimulationReporter) ([]simsx.SimAccount, *types.MsgUpdate<%= TypeName.UpperCamel %>) { var ( - simAccount = simtypes.Account{} msg = &types.MsgUpdate<%= TypeName.UpperCamel %>{} - <%= TypeName.LowerCamel %>, err = k.<%= TypeName.UpperCamel %>.Get(ctx) ) + + <%= TypeName.LowerCamel %>, err := k.<%= TypeName.UpperCamel %>.Get(ctx) if err != nil { - return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= TypeName.LowerCamel %> store is empty"), nil, nil - } - simAccount, found := FindAccount(accs, <%= TypeName.LowerCamel %>.<%= MsgSigner.UpperCamel %>) - if !found { - return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= TypeName.LowerCamel %> <%= MsgSigner.LowerCamel %> not found"), nil, nil + reporter.Skip("<%= TypeName.LowerCamel %> store is empty") + return nil, nil } - msg.<%= MsgSigner.UpperCamel %> = simAccount.Address.String() - txCtx := simulation.OperationInput{ - R: r, - App: app, - TxGen: txGen, - Cdc: nil, - Msg: msg, - Context: ctx, - SimAccount: simAccount, - ModuleName: types.ModuleName, - CoinsSpentInMsg: sdk.NewCoins(), - AccountKeeper: ak, - Bankkeeper: bk, - } - return simulation.GenAndDeliverTxWithRandFees(txCtx) + simAccount := testData.GetAccount(reporter, <%= TypeName.LowerCamel %>.<%= MsgSigner.UpperCamel %>) + msg.<%= MsgSigner.UpperCamel %> = simAccount.AddressBech32 + + return []simsx.SimAccount{simAccount}, msg } } -func SimulateMsgDelete<%= TypeName.UpperCamel %>( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, - txGen client.TxConfig, -) simtypes.Operation { - return func(r *rand.Rand, app simtypes.AppEntrypoint, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { +func MsgDelete<%= TypeName.UpperCamel %>Factory(k keeper.Keeper) simsx.SimMsgFactoryFn[*types.MsgDelete<%= TypeName.UpperCamel %>] { + return func(ctx context.Context, testData *simsx.ChainDataSource, reporter simsx.SimulationReporter) ([]simsx.SimAccount, *types.MsgDelete<%= TypeName.UpperCamel %>) { var ( - simAccount = simtypes.Account{} - msg = &types.MsgUpdate<%= TypeName.UpperCamel %>{} - <%= TypeName.LowerCamel %>, err = k.<%= TypeName.UpperCamel %>.Get(ctx) + msg = &types.MsgDelete<%= TypeName.UpperCamel %>{} ) + + <%= TypeName.LowerCamel %>, err := k.<%= TypeName.UpperCamel %>.Get(ctx) if err != nil { - return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= TypeName.LowerCamel %> store is empty"), nil, nil + reporter.Skip("<%= TypeName.LowerCamel %> store is empty") + return nil, nil } - simAccount, found := FindAccount(accs, <%= TypeName.LowerCamel %>.<%= MsgSigner.UpperCamel %>) - if !found { - return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "<%= TypeName.LowerCamel %> <%= MsgSigner.LowerCamel %> not found"), nil, nil - } - msg.<%= MsgSigner.UpperCamel %> = simAccount.Address.String() - txCtx := simulation.OperationInput{ - R: r, - App: app, - TxGen: txGen, - Cdc: nil, - Msg: msg, - Context: ctx, - SimAccount: simAccount, - ModuleName: types.ModuleName, - CoinsSpentInMsg: sdk.NewCoins(), - AccountKeeper: ak, - Bankkeeper: bk, - } - return simulation.GenAndDeliverTxWithRandFees(txCtx) + simAccount := testData.GetAccount(reporter, <%= TypeName.LowerCamel %>.<%= MsgSigner.UpperCamel %>) + msg.<%= MsgSigner.UpperCamel %> = simAccount.AddressBech32 + + return []simsx.SimAccount{simAccount}, msg } } diff --git a/ignite/templates/typed/singleton/simulation.go b/ignite/templates/typed/singleton/simulation.go index 7db6cdb6ed..833fd36b53 100644 --- a/ignite/templates/typed/singleton/simulation.go +++ b/ignite/templates/typed/singleton/simulation.go @@ -20,8 +20,8 @@ func moduleSimulationModify(replacer placeholder.Replacer, opts *typed.Options) content := typed.ModuleSimulationMsgModify( replacer, f.String(), - opts.ModuleName, opts.TypeName, + opts.MsgSigner, "Create", "Update", "Delete", )