Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
sync simapp changes
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored and github-actions[bot] committed Jun 20, 2024
1 parent 7495412 commit 30f5efb
Show file tree
Hide file tree
Showing 36 changed files with 3,280 additions and 532 deletions.
2 changes: 1 addition & 1 deletion app/next/COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fe22e9a5da5dc7c130c679e536a95b8d1d4434e0
8ab643dc10a7742c0746dae11bd92778e231eeb1
2 changes: 1 addition & 1 deletion app/next/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"encoding/json"
"fmt"

abci "github.com/cometbft/cometbft/abci/types"
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"

"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
14 changes: 5 additions & 9 deletions app/next/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
"path/filepath"

abci "github.com/cometbft/cometbft/abci/types"
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/gogoproto/proto"
"github.com/spf13/cast"
Expand Down Expand Up @@ -171,7 +171,7 @@ type SimApp struct {
ConsensusParamsKeeper consensusparamkeeper.Keeper
CircuitKeeper circuitkeeper.Keeper
PoolKeeper poolkeeper.Keeper
EpochsKeeper epochskeeper.Keeper
EpochsKeeper *epochskeeper.Keeper

// managers
ModuleManager *module.Manager
Expand Down Expand Up @@ -203,12 +203,8 @@ func NewSimApp(
interfaceRegistry, _ := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{
ProtoFiles: proto.HybridResolver,
SigningOptions: signing.Options{
AddressCodec: address.Bech32Codec{
Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(),
},
ValidatorAddressCodec: address.Bech32Codec{
Bech32Prefix: sdk.GetConfig().GetBech32ValidatorAddrPrefix(),
},
AddressCodec: address.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()),
ValidatorAddressCodec: address.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()),
},
})
appCodec := codec.NewProtoCodec(interfaceRegistry)
Expand Down Expand Up @@ -357,7 +353,7 @@ func NewSimApp(

app.PoolKeeper = poolkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), logger.With(log.ModuleKey, "x/protocolpool")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String())

app.DistrKeeper = distrkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[distrtypes.StoreKey]), logger.With(log.ModuleKey, "x/distribution")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, app.PoolKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String())
app.DistrKeeper = distrkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[distrtypes.StoreKey]), logger.With(log.ModuleKey, "x/distribution")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, app.PoolKeeper, cometService, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String())

app.SlashingKeeper = slashingkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[slashingtypes.StoreKey]), logger.With(log.ModuleKey, "x/slashing")),
appCodec, legacyAmino, app.StakingKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(),
Expand Down
8 changes: 4 additions & 4 deletions app/next/app_di.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ type SimApp struct {
ConsensusParamsKeeper consensuskeeper.Keeper
CircuitBreakerKeeper circuitkeeper.Keeper
PoolKeeper poolkeeper.Keeper
EpochsKeeper epochskeeper.Keeper
EpochsKeeper *epochskeeper.Keeper

// simulation manager
sm *module.SimulationManager
Expand All @@ -111,7 +111,8 @@ func init() {
// AppConfig returns the default app config.
func AppConfig() depinject.Config {
return depinject.Configs(
appConfig, // Alternatively use appconfig.LoadYAML(AppConfigYAML)
appConfig, // Alternatively use appconfig.LoadYAML(AppConfigYAML)
depinject.Provide(ProvideExampleMintFn), // optional: override the mint module's mint function with epoched minting
)
}

Expand Down Expand Up @@ -174,8 +175,7 @@ func NewSimApp(
//

// For providing a custom inflation function for x/mint add here your
// custom function that implements the minttypes.InflationCalculationFn
// interface.
// custom function that implements the minttypes.MintFn interface.
),
)
)
Expand Down
2 changes: 1 addition & 1 deletion app/next/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"testing"

abci "github.com/cometbft/cometbft/abci/types"
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/gogoproto/proto"
Expand Down
74 changes: 37 additions & 37 deletions app/next/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
cosmossdk.io/x/circuit v0.0.0-20230613133644-0a778132a60f
cosmossdk.io/x/distribution v0.0.0-20240227221813-a248d05f70f4
cosmossdk.io/x/epochs v0.0.0-00010101000000-000000000000
cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337
cosmossdk.io/x/evidence v0.0.0-20230613133644-0a778132a60f
cosmossdk.io/x/feegrant v0.0.0-20230613133644-0a778132a60f
cosmossdk.io/x/gov v0.0.0-20231113122742-912390d5fc4a
Expand All @@ -35,17 +35,17 @@ require (
github.com/cosmos/cosmos-db v1.0.2
// this version is not used as it is always replaced by the latest Cosmos SDK version
github.com/cosmos/cosmos-sdk v0.51.0
github.com/cosmos/gogoproto v1.4.12
github.com/cosmos/gogoproto v1.5.0
github.com/golang/mock v1.6.0
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.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
google.golang.org/protobuf v1.34.1
google.golang.org/protobuf v1.34.2
)

require github.com/cometbft/cometbft/api v1.0.0-alpha.2.0.20240530055211-ae27f7eb3c08
require github.com/cometbft/cometbft/api v1.0.0-rc.1

require cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000

Expand Down Expand Up @@ -87,7 +87,7 @@ require (
github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/iavl v1.1.4 // indirect
github.com/cosmos/iavl v1.2.0 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
github.com/creachadair/atomicfile v0.3.4 // indirect
Expand Down Expand Up @@ -238,44 +238,44 @@ require (

// SimApp on main always tests the latest extracted SDK modules importing the sdk
replace (
cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240605221133-fe22e9a5da5d
cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/collections => cosmossdk.io/collections v0.4.1-0.20240605221133-fe22e9a5da5d
cosmossdk.io/core => cosmossdk.io/core v0.12.1-0.20240605221133-fe22e9a5da5d
cosmossdk.io/core/testing => cosmossdk.io/core/testing v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/depinject => cosmossdk.io/depinject v1.0.0-alpha.4.0.20240605221133-fe22e9a5da5d
cosmossdk.io/log => cosmossdk.io/log v1.3.2-0.20240605221133-fe22e9a5da5d
cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240605221133-fe22e9a5da5d
cosmossdk.io/tools/confix => cosmossdk.io/tools/confix v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/auth => cosmossdk.io/x/auth v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/x/tx => cosmossdk.io/x/tx v0.13.4-0.20240605221133-fe22e9a5da5d
cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20240605221133-fe22e9a5da5d
cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240619171957-8ab643dc10a7
cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/collections => cosmossdk.io/collections v0.4.1-0.20240619171957-8ab643dc10a7
cosmossdk.io/core => cosmossdk.io/core v0.12.1-0.20240619171957-8ab643dc10a7
cosmossdk.io/core/testing => cosmossdk.io/core/testing v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/depinject => cosmossdk.io/depinject v1.0.0-alpha.4.0.20240619171957-8ab643dc10a7
cosmossdk.io/log => cosmossdk.io/log v1.3.2-0.20240619171957-8ab643dc10a7
cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20240619171957-8ab643dc10a7
cosmossdk.io/tools/confix => cosmossdk.io/tools/confix v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/auth => cosmossdk.io/x/auth v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20240619171957-8ab643dc10a7
cosmossdk.io/x/tx => cosmossdk.io/x/tx v0.13.4-0.20240619171957-8ab643dc10a7
cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20240619171957-8ab643dc10a7
)

// Below are the long-lived replace of the SimApp
replace (
// use cosmos fork of keyring
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
// Simapp always use the latest version of the cosmos-sdk
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20240605221133-fe22e9a5da5d
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20240619171957-8ab643dc10a7
// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1
Expand Down
Loading

0 comments on commit 30f5efb

Please sign in to comment.