Skip to content

Commit

Permalink
Revert "wip"
Browse files Browse the repository at this point in the history
This reverts commit 9f73b3a.
  • Loading branch information
cboh4 committed Feb 26, 2025
1 parent 9f73b3a commit 3ee1e2d
Show file tree
Hide file tree
Showing 44 changed files with 1,327 additions and 331 deletions.
4 changes: 0 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ import (
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
crontypes "github.com/scrtlabs/SecretNetwork/x/cron/types"

"cosmossdk.io/log"
upgradetypes "cosmossdk.io/x/upgrade/types"
Expand Down Expand Up @@ -581,7 +580,6 @@ func SetOrderBeginBlockers(app *SecretNetworkApp) {
compute.ModuleName,
reg.ModuleName,
ibcswitchtypes.ModuleName,
crontypes.ModuleName,
)
}

Expand Down Expand Up @@ -615,7 +613,6 @@ func SetOrderInitGenesis(app *SecretNetworkApp) {

ibcfeetypes.ModuleName,
feegrant.ModuleName,
crontypes.ModuleName,
)
}

Expand Down Expand Up @@ -645,6 +642,5 @@ func SetOrderEndBlockers(app *SecretNetworkApp) {
compute.ModuleName,
reg.ModuleName,
ibcswitchtypes.ModuleName,
crontypes.ModuleName,
)
}
2 changes: 0 additions & 2 deletions app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"github.com/cosmos/ibc-go/v8/modules/apps/transfer"
ibc "github.com/cosmos/ibc-go/v8/modules/core"
ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
"github.com/scrtlabs/SecretNetwork/x/cron"
ibcswitch "github.com/scrtlabs/SecretNetwork/x/emergencybutton"

codectypes "github.com/cosmos/cosmos-sdk/codec/types"
Expand Down Expand Up @@ -79,7 +78,6 @@ var mbasics = module.NewBasicManager(
ica.AppModuleBasic{},
packetforwardrouter.AppModuleBasic{},
ibcfee.AppModuleBasic{},
cron.AppModuleBasic{},
},
// our stuff
customModuleBasics()...,
Expand Down
17 changes: 0 additions & 17 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ import (
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
"github.com/scrtlabs/SecretNetwork/x/compute"
cronkeeper "github.com/scrtlabs/SecretNetwork/x/cron/keeper"
crontypes "github.com/scrtlabs/SecretNetwork/x/cron/types"

reg "github.com/scrtlabs/SecretNetwork/x/registration"

ibcpacketforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/keeper"
Expand All @@ -83,7 +80,6 @@ type SecretAppKeepers struct {
AuthzKeeper *authzkeeper.Keeper
BankKeeper *bankkeeper.BaseKeeper
CapabilityKeeper *capabilitykeeper.Keeper
CronKeeper *cronkeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
SlashingKeeper *slashingkeeper.Keeper
MintKeeper *mintkeeper.Keeper
Expand Down Expand Up @@ -244,15 +240,6 @@ func (ak *SecretAppKeepers) InitSdkKeepers(
)
ak.CrisisKeeper = crisisKeeper

cronKeeper := cronkeeper.NewKeeper(
appCodec,
ak.keys[crontypes.StoreKey],
ak.memKeys[crontypes.StoreKey],
ak.AccountKeeper,
authtypes.NewModuleAddress(crontypes.ModuleName).String(),
)
ak.CronKeeper = cronKeeper

feegrantKeeper := feegrantkeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(ak.keys[feegrant.StoreKey]),
Expand Down Expand Up @@ -556,8 +543,6 @@ func (ak *SecretAppKeepers) InitCustomKeepers(
ak.ComputeKeeper = &computeKeeper
wasmHooks.ContractKeeper = ak.ComputeKeeper

ak.CronKeeper.WasmMsgServer = compute.NewMsgServerImpl(*ak.ComputeKeeper)

// Compute receive: Switch -> Fee -> Packet Forward -> WASM Hooks
var computeStack porttypes.IBCModule
computeStack = compute.NewIBCHandler(ak.ComputeKeeper, ak.IbcKeeper.ChannelKeeper, ak.IbcFeeKeeper)
Expand Down Expand Up @@ -611,7 +596,6 @@ func (ak *SecretAppKeepers) InitKeys() {
ibcswitch.StoreKey,
ibchookstypes.StoreKey,
crisistypes.StoreKey,
crontypes.StoreKey,
)

ak.tKeys = storetypes.NewTransientStoreKeys(paramstypes.TStoreKey)
Expand All @@ -637,7 +621,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(reg.ModuleName)
paramsKeeper.Subspace(ibcpacketforwardtypes.ModuleName).WithKeyTable(ibcpacketforwardtypes.ParamKeyTable())
paramsKeeper.Subspace(ibcswitch.ModuleName).WithKeyTable(ibcswitchtypes.ParamKeyTable())
paramsKeeper.Subspace(crontypes.ModuleName)

return paramsKeeper
}
4 changes: 0 additions & 4 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ import (
ibc "github.com/cosmos/ibc-go/v8/modules/core"
ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
"github.com/scrtlabs/SecretNetwork/x/compute"
"github.com/scrtlabs/SecretNetwork/x/cron"
crontypes "github.com/scrtlabs/SecretNetwork/x/cron/types"
ibcswitch "github.com/scrtlabs/SecretNetwork/x/emergencybutton"
reg "github.com/scrtlabs/SecretNetwork/x/registration"
)
Expand All @@ -58,7 +56,6 @@ var ModuleAccountPermissions = map[string][]string{
ibcfeetypes.ModuleName: nil,
ibcswitch.ModuleName: nil,
compute.ModuleName: {authtypes.Burner},
crontypes.ModuleName: nil,
}

func Modules(
Expand Down Expand Up @@ -93,6 +90,5 @@ func Modules(
packetforward.NewAppModule(app.AppKeepers.PacketForwardKeeper, app.AppKeepers.GetSubspace(packetforwardtypes.ModuleName)),
ibcfee.NewAppModule(app.AppKeepers.IbcFeeKeeper),
ibcswitch.NewAppModule(app.AppKeepers.IbcSwitchKeeper, app.AppKeepers.GetSubspace(ibcswitch.ModuleName)),
cron.NewAppModule(app.appCodec, *app.AppKeepers.CronKeeper),
}
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,8 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/rosetta v0.50.4
github.com/gogo/protobuf v1.3.2
github.com/hashicorp/go-metrics v0.5.3
github.com/scrtlabs/tm-secret-enclave v1.11.8
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028
gopkg.in/yaml.v2 v2.4.0
)

require (
Expand Down Expand Up @@ -154,6 +152,7 @@ require (
github.com/hashicorp/go-getter v1.7.4 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-metrics v0.5.3 // indirect
github.com/hashicorp/go-plugin v1.5.2 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
Expand Down Expand Up @@ -225,6 +224,7 @@ require (
google.golang.org/api v0.186.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/v3 v3.5.1 // indirect
nhooyr.io/websocket v1.8.6 // indirect
Expand Down
8 changes: 4 additions & 4 deletions proto/secret/cron/genesis.proto
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
syntax = "proto3";
package secret.cron;
package neutron.cron;

import "gogoproto/gogo.proto";
import "secret/cron/params.proto";
import "secret/cron/schedule.proto";
import "neutron/cron/params.proto";
import "neutron/cron/schedule.proto";
// this line is used by starport scaffolding # genesis/proto/import

option go_package = "github.com/scrtlabs/SecretNetwork/x/cron/types";
option go_package = "github.com/neutron-org/neutron/v5/x/cron/types";

// Defines the cron module's genesis state.
message GenesisState {
Expand Down
4 changes: 2 additions & 2 deletions proto/secret/cron/params.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
syntax = "proto3";
package secret.cron;
package neutron.cron;

import "gogoproto/gogo.proto";

option go_package = "github.com/scrtlabs/SecretNetwork/x/cron/types";
option go_package = "github.com/neutron-org/neutron/v5/x/cron/types";

// Defines the parameters for the module.
message Params {
Expand Down
14 changes: 7 additions & 7 deletions proto/secret/cron/query.proto
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
syntax = "proto3";
package secret.cron;
package neutron.cron;

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "secret/cron/params.proto";
import "secret/cron/schedule.proto";
import "neutron/cron/params.proto";
import "neutron/cron/schedule.proto";
// this line is used by starport scaffolding # 1

option go_package = "github.com/scrtlabs/SecretNetwork/x/cron/types";
option go_package = "github.com/neutron-org/neutron/v5/x/cron/types";

// Defines the gRPC querier service.
service Query {
// Queries the parameters of the module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/secret/cron/params";
option (google.api.http).get = "/neutron/cron/params";
}

// Queries a Schedule by name.
rpc Schedule(QueryGetScheduleRequest) returns (QueryGetScheduleResponse) {
option (google.api.http).get = "/secret/cron/schedule/{name}";
option (google.api.http).get = "/neutron/cron/schedule/{name}";
}

// Queries a list of Schedule items.
rpc Schedules(QuerySchedulesRequest) returns (QuerySchedulesResponse) {
option (google.api.http).get = "/secret/cron/schedule";
option (google.api.http).get = "/neutron/cron/schedule";
}

// this line is used by starport scaffolding # 2
Expand Down
4 changes: 2 additions & 2 deletions proto/secret/cron/schedule.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
syntax = "proto3";
package secret.cron;
package neutron.cron;

import "gogoproto/gogo.proto";

option go_package = "github.com/scrtlabs/SecretNetwork/x/cron/types";
option go_package = "github.com/neutron-org/neutron/v5/x/cron/types";

// Defines when messages will be executed in the block
enum ExecutionStage {
Expand Down
8 changes: 4 additions & 4 deletions proto/secret/cron/tx.proto
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
syntax = "proto3";
package secret.cron;
package neutron.cron;

import "amino/amino.proto";
import "cosmos/msg/v1/msg.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "secret/cron/params.proto";
import "secret/cron/schedule.proto";
import "neutron/cron/params.proto";
import "neutron/cron/schedule.proto";

// this line is used by starport scaffolding # proto/tx/import

option go_package = "github.com/scrtlabs/SecretNetwork/x/cron/types";
option go_package = "github.com/neutron-org/neutron/v5/x/cron/types";

// Defines the Msg service.
service Msg {
Expand Down
4 changes: 2 additions & 2 deletions proto/secret/cron/v1/schedule.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
syntax = "proto3";
package secret.cron.v1;
package neutron.cron.v1;

import "gogoproto/gogo.proto";

option go_package = "github.com/scrtlabs/SecretNetwork/x/cron/types/v1";
option go_package = "github.com/neutron-org/neutron/v5/x/cron/types/v1";

// Defines the schedule for execution
message Schedule {
Expand Down
2 changes: 1 addition & 1 deletion x/cron/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/cosmos/cosmos-sdk/client"

"github.com/scrtlabs/SecretNetwork/x/cron/types"
"github.com/neutron-org/neutron/v5/x/cron/types"
)

// GetQueryCmd returns the cli query commands for this module
Expand Down
3 changes: 2 additions & 1 deletion x/cron/client/cli/query_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/scrtlabs/SecretNetwork/x/cron/types"
"github.com/spf13/cobra"

"github.com/neutron-org/neutron/v5/x/cron/types"
)

func CmdQueryParams() *cobra.Command {
Expand Down
2 changes: 1 addition & 1 deletion x/cron/client/cli/query_schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/spf13/cobra"

"github.com/scrtlabs/SecretNetwork/x/cron/types"
"github.com/neutron-org/neutron/v5/x/cron/types"
)

func CmdListSchedule() *cobra.Command {
Expand Down
Loading

0 comments on commit 3ee1e2d

Please sign in to comment.