Skip to content

Commit

Permalink
fix proto
Browse files Browse the repository at this point in the history
  • Loading branch information
tubackkhoa committed Jul 31, 2024
1 parent ddef02b commit e998d62
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 1,085 deletions.
16 changes: 11 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,11 @@ var maccPerms = map[string][]string{
govtypes.ModuleName: {authtypes.Burner},
nft.ModuleName: nil,
// non sdk modules
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibcfeetypes.ModuleName: nil,
icatypes.ModuleName: nil,
wasmtypes.ModuleName: {authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibcfeetypes.ModuleName: nil,
icatypes.ModuleName: nil,
wasmtypes.ModuleName: {authtypes.Burner},
tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
}

var (
Expand Down Expand Up @@ -356,7 +357,7 @@ func NewWasmApp(
// non sdk store keys
capabilitytypes.StoreKey, ibcexported.StoreKey, ibctransfertypes.StoreKey, ibcfeetypes.StoreKey,
wasmtypes.StoreKey, icahosttypes.StoreKey,
icacontrollertypes.StoreKey, clocktypes.StoreKey, ibchookstypes.StoreKey, packetforwardtypes.StoreKey,
icacontrollertypes.StoreKey, clocktypes.StoreKey, ibchookstypes.StoreKey, packetforwardtypes.StoreKey, tokenfactorytypes.StoreKey,
)

tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey)
Expand Down Expand Up @@ -822,6 +823,7 @@ func NewWasmApp(
clock.NewAppModule(appCodec, app.ClockKeeper),
ibchooks.NewAppModule(app.AccountKeeper, *app.IBCHooksKeeper),
packetforward.NewAppModule(app.PacketForwardKeeper, app.GetSubspace(packetforwardtypes.ModuleName)),
tokenfactory.NewAppModule(app.TokenFactoryKeeper, app.AccountKeeper, app.BankKeeper),
)

// BasicModuleManager defines the module BasicManager is in charge of setting up basic,
Expand Down Expand Up @@ -872,6 +874,7 @@ func NewWasmApp(
clocktypes.ModuleName,
ibchookstypes.ModuleName,
packetforwardtypes.ModuleName,
tokenfactorytypes.ModuleName,
)

app.ModuleManager.SetOrderEndBlockers(
Expand All @@ -891,6 +894,7 @@ func NewWasmApp(
clocktypes.ModuleName,
ibchookstypes.ModuleName,
packetforwardtypes.ModuleName,
tokenfactorytypes.ModuleName,
)

// NOTE: The genutils module must occur after staking so that pools are
Expand Down Expand Up @@ -919,6 +923,7 @@ func NewWasmApp(
clocktypes.ModuleName,
ibchookstypes.ModuleName,
packetforwardtypes.ModuleName,
tokenfactorytypes.ModuleName,
}
app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...)
app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...)
Expand Down Expand Up @@ -1299,5 +1304,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(clocktypes.ModuleName)
paramsKeeper.Subspace(ibchookstypes.ModuleName)
paramsKeeper.Subspace(packetforwardtypes.ModuleName).WithKeyTable(packetforwardtypes.ParamKeyTable())
paramsKeeper.Subspace(tokenfactorytypes.ModuleName)
return paramsKeeper
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
github.com/golang/protobuf v1.5.4
github.com/google/gofuzz v1.2.0
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.14-0.20240723150708-5b683bc62428
github.com/pkg/errors v0.9.1
Expand Down
12 changes: 2 additions & 10 deletions x/tokenfactory/bindings/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ import (
"os"
"testing"

"github.com/cosmos/cosmos-sdk/x/bank/testutil"
"github.com/stretchr/testify/require"

"github.com/cometbft/cometbft/crypto"
"github.com/cometbft/cometbft/crypto/ed25519"

"cosmossdk.io/math"

"cosmossdk.io/x/bank/testutil"
// "cosmossdk.io/x/bank/testutil"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/CosmWasm/wasmd/app"
Expand All @@ -24,13 +23,6 @@ func CreateTestInput(t *testing.T) (*app.WasmApp, sdk.Context) {
return osmosis, ctx
}

func FundAccount(t *testing.T, ctx sdk.Context, osmosis *app.WasmApp, acct sdk.AccAddress) {
err := testutil.FundAccount(ctx, osmosis.BankKeeper, acct, sdk.NewCoins(
sdk.NewCoin("uosmo", math.NewInt(10000000000)),
))
require.NoError(t, err)
}

// we need to make this deterministic (same every test run), as content might affect gas costs
func keyPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress) {
key := ed25519.GenPrivKey()
Expand Down
Loading

0 comments on commit e998d62

Please sign in to comment.