Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jhernandezb committed Oct 17, 2023
2 parents 671e8d5 + a84bcf2 commit 3be1231
Show file tree
Hide file tree
Showing 46 changed files with 3,438 additions and 1,083 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ WORKDIR /code
COPY . /code/

# See https://github.com/CosmWasm/wasmvm/releases
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.4.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.a
RUN echo "8ea2e3b5fae83e671da2bb51115adc88591045953f509955ec38dc02ea5a7b94 /lib/libwasmvm_muslc.a" | sha256sum -c
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.4.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.a
RUN echo "324c1073cb988478d644861783ed5a7de21cfd090976ccc6b1de0559098fbbad /lib/libwasmvm_muslc.a" | sha256sum -c

# force it to use static lib (from above) not standard libgo_cosmwasm.so file
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build
Expand Down
38 changes: 7 additions & 31 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"net/http"
"os"
"path/filepath"
"strings"

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
Expand Down Expand Up @@ -120,7 +119,6 @@ import (
allocwasm "github.com/public-awesome/stargaze/v12/x/alloc/wasm"

cronmodule "github.com/public-awesome/stargaze/v12/x/cron"
cronclient "github.com/public-awesome/stargaze/v12/x/cron/client"
cronmodulekeeper "github.com/public-awesome/stargaze/v12/x/cron/keeper"
cronmoduletypes "github.com/public-awesome/stargaze/v12/x/cron/types"

Expand Down Expand Up @@ -165,25 +163,6 @@ var (
EmptyWasmOpts []wasmkeeper.Option
)

// this line is used by starport scaffolding # stargate/wasm/app/enabledProposals

// GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to
// produce a list of enabled proposals to pass into wasmd app.
func GetEnabledProposals() []wasm.ProposalType { //nolint:staticcheck
if EnableSpecificProposals == "" {
if ProposalsEnabled == "true" {
return wasm.EnableAllProposals //nolint:staticcheck
}
return wasm.DisableAllProposals //nolint:staticcheck
}
chunks := strings.Split(EnableSpecificProposals, ",")
proposals, err := wasm.ConvertToProposals(chunks) //nolint:staticcheck
if err != nil {
panic(err)
}
return proposals
}

func getGovProposalHandlers() []govclient.ProposalHandler {
govProposalHandlers := make([]govclient.ProposalHandler, 0)
// this line is used by starport scaffolding # stargate/app/govProposalHandlers
Expand All @@ -193,7 +172,6 @@ func getGovProposalHandlers() []govclient.ProposalHandler {
upgradeclient.LegacyProposalHandler,
upgradeclient.LegacyCancelProposalHandler,
ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler,
cronclient.SetPrivilegeProposalHandler, cronclient.UnsetPrivilegeProposalHandler,
// this line is used by starport scaffolding # stargate/app/govProposalHandler
)
return govProposalHandlers
Expand Down Expand Up @@ -351,7 +329,6 @@ func NewStargazeApp(
encodingConfig sgappparams.EncodingConfig,
appOpts servertypes.AppOptions,
wasmOpts []wasmkeeper.Option,
enabledProposals []wasm.ProposalType, //nolint:staticcheck
baseAppOptions ...func(*baseapp.BaseApp),
) *App {
appCodec, cdc := encodingConfig.Codec, encodingConfig.Amino
Expand Down Expand Up @@ -523,7 +500,6 @@ func NewStargazeApp(
govRouter := legacygovtypes.NewRouter()
govRouter.AddRoute(govtypes.RouterKey, legacygovtypes.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
// AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). // COME HERE
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(&app.UpgradeKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))

Expand Down Expand Up @@ -653,9 +629,14 @@ func NewStargazeApp(
app.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(app.WasmKeeper)
app.Ics20WasmHooks.ContractKeeper = &app.WasmKeeper

app.CronKeeper = *cronmodulekeeper.NewKeeper(appCodec, keys[cronmoduletypes.StoreKey], keys[cronmoduletypes.MemStoreKey], app.GetSubspace(cronmoduletypes.ModuleName), app.WasmKeeper)
app.CronKeeper = cronmodulekeeper.NewKeeper(
appCodec,
keys[cronmoduletypes.StoreKey],
keys[cronmoduletypes.MemStoreKey],
app.GetSubspace(cronmoduletypes.ModuleName),
app.WasmKeeper,
authtypes.NewModuleAddress(govtypes.ModuleName).String())
cronModule := cronmodule.NewAppModule(appCodec, app.CronKeeper, app.WasmKeeper)
govRouter.AddRoute(cronmoduletypes.RouterKey, cronmodulekeeper.NewProposalHandler(app.CronKeeper))

app.GlobalFeeKeeper = globalfeemodulekeeper.NewKeeper(
appCodec,
Expand All @@ -666,11 +647,6 @@ func NewStargazeApp(
)
globalfeeModule := globalfeemodule.NewAppModule(appCodec, app.GlobalFeeKeeper)

// The gov proposal types can be individually enabled
if len(enabledProposals) != 0 {
govRouter.AddRoute(wasmtypes.RouterKey, wasm.NewWasmProposalHandler(app.WasmKeeper, enabledProposals)) //nolint:staticcheck
}

ibcRouter.AddRoute(wasmtypes.ModuleName, wasm.NewIBCHandler(app.WasmKeeper, app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper))
app.IBCKeeper.SetRouter(ibcRouter)

Expand Down
2 changes: 0 additions & 2 deletions cmd/starsd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ func newApp(
encCfg,
appOpts,
wasmOpts,
app.GetEnabledProposals(),
baseapp.SetPruning(pruningOpts),
baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(server.FlagMinGasPrices))),
baseapp.SetHaltHeight(cast.ToUint64(appOpts.Get(server.FlagHaltHeight))),
Expand Down Expand Up @@ -288,7 +287,6 @@ func appExport(
encCfg,
appOpts,
emptyWasmOpts,
app.GetEnabledProposals(),
)

if height != -1 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/starsd/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
)

var LibwasmVersion = "1.4.0"
var LibwasmVersion = "1.4.1"

func CheckLibwasmVersion(_ *cobra.Command, _ []string) error {
version, err := wasmvmapi.LibwasmvmVersion()
Expand Down
Loading

0 comments on commit 3be1231

Please sign in to comment.