Skip to content

Commit

Permalink
- use upstream wasm message server
Browse files Browse the repository at this point in the history
- use empty gas prices for sim tests
  • Loading branch information
StrathCole committed Oct 11, 2024
1 parent 553d870 commit 79b8b25
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 1 addition & 2 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ import (

taxbank "github.com/classic-terra/core/v3/x/tax/modules/bank"
taxmarket "github.com/classic-terra/core/v3/x/tax/modules/market"
taxwasm "github.com/classic-terra/core/v3/x/tax/modules/wasm"
taxtypes "github.com/classic-terra/core/v3/x/tax/types"

// unnamed import of statik for swagger UI support
Expand Down Expand Up @@ -188,7 +187,7 @@ func appModules(
taxmarket.NewAppModule(appCodec, app.MarketKeeper, app.AccountKeeper, app.TreasuryKeeper, app.BankKeeper, app.OracleKeeper, app.TaxKeeper),
oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper),
treasury.NewAppModule(appCodec, app.TreasuryKeeper),
taxwasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.AccountKeeper, app.TreasuryKeeper, app.TaxKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
dyncomm.NewAppModule(appCodec, app.DyncommKeeper, app.StakingKeeper),
ibchooks.NewAppModule(app.AccountKeeper),
consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper),
Expand Down
4 changes: 4 additions & 0 deletions x/tax/handlers/wasm_msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
)

// THIS FILE IS NOT USED CURRENTLY IN THE TAX MODULE
// this is due to the fact that it would cause issues with contracts
// the handling is done in the wasm module / the message handlers a contract executes

type WasmMsgServer struct {
wasmtypes.UnimplementedMsgServer
taxKeeper taxkeeper.Keeper
Expand Down
2 changes: 1 addition & 1 deletion x/tax/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) {
taxGenesis := types.DefaultGenesis()
params := types.DefaultParams()
params.BurnTaxRate = sdk.NewDecWithPrec(1, 2)
params.GasPrices = sdk.NewDecCoins(sdk.NewDecCoinFromDec("uluna", sdk.NewDecWithPrec(28325, 4)))
params.GasPrices = sdk.NewDecCoins() // no gas prices because tests always rely on 0 min gas price
taxGenesis.Params = params
bz, err := json.MarshalIndent(&taxGenesis, "", " ")
if err != nil {
Expand Down
5 changes: 2 additions & 3 deletions x/tax/modules/wasm/wasm_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,18 @@ func NewAppModule(
cdc codec.Codec,
keeper *keeper.Keeper,
validatorSetSource keeper.ValidatorSetSource,
ak types.AccountKeeper,
accountKeeper types.AccountKeeper,
treasuryKeeper treasurykeeper.Keeper,
taxKeeper taxkeeper.Keeper,
bankKeeper bankkeeper.Keeper,
router *baseapp.MsgServiceRouter,
ss exported.Subspace,
) AppModule {
bm := wasm.NewAppModule(cdc, keeper, validatorSetSource, ak, bankKeeper, router, ss)
bm := wasm.NewAppModule(cdc, keeper, validatorSetSource, accountKeeper, bankKeeper, router, ss)
return AppModule{
AppModule: &bm,
keeper: keeper,
accountKeeper: ak,
accountKeeper: accountKeeper,
treasuryKeeper: treasuryKeeper,
taxKeeper: taxKeeper,
bankKeeper: bankKeeper,
Expand Down

0 comments on commit 79b8b25

Please sign in to comment.