From 001acb118494e86d4210242cf6861cf07bcec852 Mon Sep 17 00:00:00 2001 From: emidev98 Date: Sun, 15 Oct 2023 10:13:57 +0200 Subject: [PATCH 1/2] wip: contract execution --- app/app.go | 3 +- go.mod | 4 +- .../cosmwasmlifecycle/params.proto | 12 - .../cosmwasmlifecycle/tx.proto | 7 - .../{cosmwasmlifecycle => }/genesis.proto | 4 +- proto/cosmwasmlifecycle/params.proto | 36 + .../{cosmwasmlifecycle => }/query.proto | 6 +- proto/cosmwasmlifecycle/tx.proto | 35 + x/cosmwasmlifecycle/keeper/keeper.go | 48 +- x/cosmwasmlifecycle/keeper/msg_server.go | 18 +- x/cosmwasmlifecycle/keeper/params.go | 16 +- x/cosmwasmlifecycle/module.go | 20 +- x/cosmwasmlifecycle/types/errors.go | 2 +- x/cosmwasmlifecycle/types/expected_keepers.go | 21 +- x/cosmwasmlifecycle/types/genesis.pb.go | 40 +- x/cosmwasmlifecycle/types/keys.go | 5 + x/cosmwasmlifecycle/types/params.pb.go | 293 +++++- x/cosmwasmlifecycle/types/query.pb.go | 71 +- x/cosmwasmlifecycle/types/query.pb.gw.go | 4 +- x/cosmwasmlifecycle/types/tx.pb.go | 879 +++++++++++++++++- 20 files changed, 1356 insertions(+), 168 deletions(-) delete mode 100644 proto/cosmwasmlifecycle/cosmwasmlifecycle/params.proto delete mode 100644 proto/cosmwasmlifecycle/cosmwasmlifecycle/tx.proto rename proto/cosmwasmlifecycle/{cosmwasmlifecycle => }/genesis.proto (73%) create mode 100644 proto/cosmwasmlifecycle/params.proto rename proto/cosmwasmlifecycle/{cosmwasmlifecycle => }/query.proto (78%) create mode 100644 proto/cosmwasmlifecycle/tx.proto diff --git a/app/app.go b/app/app.go index 0c374fb..da46539 100644 --- a/app/app.go +++ b/app/app.go @@ -557,8 +557,7 @@ func New( app.CosmwasmlifecycleKeeper = *cosmwasmlifecyclemodulekeeper.NewKeeper( appCodec, keys[cosmwasmlifecyclemoduletypes.StoreKey], - keys[cosmwasmlifecyclemoduletypes.MemStoreKey], - app.GetSubspace(cosmwasmlifecyclemoduletypes.ModuleName), + app.WasmKeeper, ) cosmwasmlifecycleModule := cosmwasmlifecyclemodule.NewAppModule(appCodec, app.CosmwasmlifecycleKeeper, app.WasmKeeper) diff --git a/go.mod b/go.mod index 4e1f6c9..f9d73c6 100644 --- a/go.mod +++ b/go.mod @@ -4,9 +4,11 @@ go 1.19 require ( cosmossdk.io/api v0.3.1 + cosmossdk.io/errors v1.0.0 github.com/CosmWasm/wasmd v0.42.0 github.com/cometbft/cometbft v0.37.2 github.com/cometbft/cometbft-db v0.8.0 + github.com/cosmos/cosmos-proto v1.0.0-beta.2 github.com/cosmos/cosmos-sdk v0.47.5 github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-go/v7 v7.3.0 @@ -32,7 +34,6 @@ require ( cloud.google.com/go/storage v1.30.1 // indirect cosmossdk.io/core v0.5.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect - cosmossdk.io/errors v1.0.0 // indirect cosmossdk.io/log v1.2.1 // indirect cosmossdk.io/math v1.1.2 // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect @@ -58,7 +59,6 @@ require ( github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v0.20.1 // indirect diff --git a/proto/cosmwasmlifecycle/cosmwasmlifecycle/params.proto b/proto/cosmwasmlifecycle/cosmwasmlifecycle/params.proto deleted file mode 100644 index 2bf6e2b..0000000 --- a/proto/cosmwasmlifecycle/cosmwasmlifecycle/params.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package cosmwasmlifecycle.cosmwasmlifecycle; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types"; - -// Params defines the parameters for the module. -message Params { - option (gogoproto.goproto_stringer) = false; - -} diff --git a/proto/cosmwasmlifecycle/cosmwasmlifecycle/tx.proto b/proto/cosmwasmlifecycle/cosmwasmlifecycle/tx.proto deleted file mode 100644 index 3300dc2..0000000 --- a/proto/cosmwasmlifecycle/cosmwasmlifecycle/tx.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; -package cosmwasmlifecycle.cosmwasmlifecycle; - -option go_package = "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types"; - -// Msg defines the Msg service. -service Msg {} \ No newline at end of file diff --git a/proto/cosmwasmlifecycle/cosmwasmlifecycle/genesis.proto b/proto/cosmwasmlifecycle/genesis.proto similarity index 73% rename from proto/cosmwasmlifecycle/cosmwasmlifecycle/genesis.proto rename to proto/cosmwasmlifecycle/genesis.proto index f92d6e8..1f52cff 100644 --- a/proto/cosmwasmlifecycle/cosmwasmlifecycle/genesis.proto +++ b/proto/cosmwasmlifecycle/genesis.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package cosmwasmlifecycle.cosmwasmlifecycle; +package cosmwasmlifecycle; import "gogoproto/gogo.proto"; -import "cosmwasmlifecycle/cosmwasmlifecycle/params.proto"; +import "cosmwasmlifecycle/params.proto"; option go_package = "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types"; diff --git a/proto/cosmwasmlifecycle/params.proto b/proto/cosmwasmlifecycle/params.proto new file mode 100644 index 0000000..a2bc730 --- /dev/null +++ b/proto/cosmwasmlifecycle/params.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; +package cosmwasmlifecycle; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types"; + +// Params defines the parameters for the module. +message Params { + option (gogoproto.goproto_stringer) = false; + // Enable or disable executions + // at the begin and end of the block + bool is_enabled = 1; + + // Minimum deposit to enable contract execution at begin block and/or end block + // This deposit will be burned if the contract execution reaches the max strikes. + cosmos.base.v1beta1.Coin min_deposit = 2 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin" + ]; + + // Amount of strikes that the contract can hold before being + // disabled from end and beging block executions. + // When this happens the min_desposit will also be burned. + int64 strikes_to_disable_execution = 3; + + // Contract Addresses that will execute "{"begin_block": {}}" + // as sudo at the begining of each block + repeated string begin_block_execution = 4 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // Contract Addresses that will execute "{"end_block": {}}" + // as sudo at the end of each block + repeated string end_block_execution = 5 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} diff --git a/proto/cosmwasmlifecycle/cosmwasmlifecycle/query.proto b/proto/cosmwasmlifecycle/query.proto similarity index 78% rename from proto/cosmwasmlifecycle/cosmwasmlifecycle/query.proto rename to proto/cosmwasmlifecycle/query.proto index 705afa0..283e315 100644 --- a/proto/cosmwasmlifecycle/cosmwasmlifecycle/query.proto +++ b/proto/cosmwasmlifecycle/query.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package cosmwasmlifecycle.cosmwasmlifecycle; +package cosmwasmlifecycle; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmwasmlifecycle/cosmwasmlifecycle/params.proto"; +import "cosmwasmlifecycle/params.proto"; option go_package = "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types"; @@ -12,7 +12,7 @@ option go_package = "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/ service Query { // Parameters queries the parameters of the module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/emidev98/cosmwasm-lifecycle/cosmwasmlifecycle/params"; + option (google.api.http).get = "/cosmwasmlifecycle/params"; } } diff --git a/proto/cosmwasmlifecycle/tx.proto b/proto/cosmwasmlifecycle/tx.proto new file mode 100644 index 0000000..ed859a6 --- /dev/null +++ b/proto/cosmwasmlifecycle/tx.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; +package cosmwasmlifecycle; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types"; + +// Msg defines the Msg service. +service Msg { + rpc EnableBlockExecution(MsgEnableBlockExecution) returns (MsgEnableBlockExecutionResponse); + rpc DisableBlockExecution(MsgDisableBlockExecution) returns (MsgDisableBlockExecutionResponse); +} + +message MsgEnableBlockExecution { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string contract_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + ExecutionType execution = 2 [(gogoproto.nullable) = true]; +} +message MsgEnableBlockExecutionResponse {} + +message MsgDisableBlockExecution { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string contract_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + ExecutionType execution = 2 [(gogoproto.nullable) = true]; +} +message MsgDisableBlockExecutionResponse {} + +enum ExecutionType { + BEGIN_BLOCK = 0; + END_BLOCK = 1; +} \ No newline at end of file diff --git a/x/cosmwasmlifecycle/keeper/keeper.go b/x/cosmwasmlifecycle/keeper/keeper.go index afc4c5b..6761540 100644 --- a/x/cosmwasmlifecycle/keeper/keeper.go +++ b/x/cosmwasmlifecycle/keeper/keeper.go @@ -7,40 +7,50 @@ import ( "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types" ) -type ( - Keeper struct { - cdc codec.BinaryCodec - storeKey storetypes.StoreKey - memKey storetypes.StoreKey - paramstore paramtypes.Subspace - } -) +type Keeper struct { + cdc codec.BinaryCodec + storeKey storetypes.StoreKey + wasmKeeper types.WasmKeeper +} func NewKeeper( cdc codec.BinaryCodec, - storeKey, - memKey storetypes.StoreKey, - ps paramtypes.Subspace, - + storeKey storetypes.StoreKey, + wasmKeeper types.WasmKeeper, ) *Keeper { - // set KeyTable if it has not already been set - if !ps.HasKeyTable() { - ps = ps.WithKeyTable(types.ParamKeyTable()) - } return &Keeper{ cdc: cdc, storeKey: storeKey, - memKey: memKey, - paramstore: ps, + wasmKeeper: wasmKeeper, } } +func (k Keeper) BeginBlock(ctx sdk.Context) { + params := k.GetParams(ctx) + if params.IsEnabled { + for _, address := range params.BeginBlockExecution { + addr, err := sdk.AccAddressFromBech32(address) + if err != nil { + panic(err) + } + + _, err = k.wasmKeeper.Sudo(ctx, addr, []byte("{\"begin_block\": {}}")) + if err != nil { + + } + } + } +} + +func (k Keeper) EndBlock(ctx sdk.Context) { + +} + func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } diff --git a/x/cosmwasmlifecycle/keeper/msg_server.go b/x/cosmwasmlifecycle/keeper/msg_server.go index 2275a41..bcd29c1 100644 --- a/x/cosmwasmlifecycle/keeper/msg_server.go +++ b/x/cosmwasmlifecycle/keeper/msg_server.go @@ -1,6 +1,8 @@ package keeper import ( + "context" + "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types" ) @@ -11,7 +13,21 @@ type msgServer struct { // NewMsgServerImpl returns an implementation of the MsgServer interface // for the provided Keeper. func NewMsgServerImpl(keeper Keeper) types.MsgServer { - return &msgServer{Keeper: keeper} + return &msgServer{ + Keeper: keeper, + } } var _ types.MsgServer = msgServer{} + +// CreateContract defines a method for creating a contract +func (msgServer msgServer) EnableBlockExecution(ctx context.Context, msg *types.MsgEnableBlockExecution) (res *types.MsgEnableBlockExecutionResponse, err error) { + + return res, err +} + +// CreateContract defines a method for creating a contract +func (msgServer msgServer) DisableBlockExecution(ctx context.Context, msg *types.MsgDisableBlockExecution) (res *types.MsgDisableBlockExecutionResponse, err error) { + + return res, err +} diff --git a/x/cosmwasmlifecycle/keeper/params.go b/x/cosmwasmlifecycle/keeper/params.go index 9c7022d..84ee5c7 100644 --- a/x/cosmwasmlifecycle/keeper/params.go +++ b/x/cosmwasmlifecycle/keeper/params.go @@ -5,12 +5,18 @@ import ( "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types" ) -// GetParams get all parameters as types.Params -func (k Keeper) GetParams(ctx sdk.Context) types.Params { - return types.NewParams() +func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.ParamsKey) + if bz == nil { + return + } + k.cdc.MustUnmarshal(bz, ¶ms) + return } -// SetParams set the params func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { - k.paramstore.SetParamSet(ctx, ¶ms) + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(¶ms) + store.Set(types.ParamsKey, bz) } diff --git a/x/cosmwasmlifecycle/module.go b/x/cosmwasmlifecycle/module.go index 3e37e0e..92c9899 100644 --- a/x/cosmwasmlifecycle/module.go +++ b/x/cosmwasmlifecycle/module.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + // this line is used by starport scaffolding # 1 "github.com/grpc-ecosystem/grpc-gateway/runtime" @@ -91,22 +92,19 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { type AppModule struct { AppModuleBasic - keeper keeper.Keeper - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper + keeper keeper.Keeper + wasmKeeper types.WasmKeeper } func NewAppModule( cdc codec.Codec, keeper keeper.Keeper, - accountKeeper types.AccountKeeper, - bankKeeper types.BankKeeper, + wasmKeeper types.WasmKeeper, ) AppModule { return AppModule{ AppModuleBasic: NewAppModuleBasic(cdc), keeper: keeper, - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, + wasmKeeper: wasmKeeper, } } @@ -140,9 +138,13 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock contains the logic that is automatically triggered at the beginning of each block -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} +func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { + am.keeper.BeginBlock(ctx) +} // EndBlock contains the logic that is automatically triggered at the end of each block -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { + am.keeper.EndBlock(ctx) + return []abci.ValidatorUpdate{} } diff --git a/x/cosmwasmlifecycle/types/errors.go b/x/cosmwasmlifecycle/types/errors.go index 64c99dd..7b57a18 100644 --- a/x/cosmwasmlifecycle/types/errors.go +++ b/x/cosmwasmlifecycle/types/errors.go @@ -3,7 +3,7 @@ package types // DONTCOVER import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + sdkerrors "cosmossdk.io/errors" ) // x/cosmwasmlifecycle module sentinel errors diff --git a/x/cosmwasmlifecycle/types/expected_keepers.go b/x/cosmwasmlifecycle/types/expected_keepers.go index 6aa6e97..6eb53f2 100644 --- a/x/cosmwasmlifecycle/types/expected_keepers.go +++ b/x/cosmwasmlifecycle/types/expected_keepers.go @@ -2,17 +2,16 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/types" ) -// AccountKeeper defines the expected account keeper used for simulations (noalias) -type AccountKeeper interface { - GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI - // Methods imported from account should be defined here -} - -// BankKeeper defines the expected interface needed to retrieve account balances. -type BankKeeper interface { - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - // Methods imported from bank should be defined here +type WasmKeeper interface { + // Sudo allows privileged access to a contract. This can never be called by an external tx, but only by + // another native Go module directly, or on-chain governance (if sudo proposals are enabled). Thus, the keeper doesn't + // place any access controls on it, that is the responsibility or the app developer (who passes the wasm.Keeper in app.go) + // + // Sub-messages returned from the sudo call to the contract are executed with the default authorization policy. This can be + // customized though by passing a new policy with the context. See types.WithSubMsgAuthzPolicy. + // The policy will be read in msgServer.selectAuthorizationPolicy and used for sub-message executions. + // This is an extension point for some very advanced scenarios only. Use with care! + Sudo(ctx sdk.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error) } diff --git a/x/cosmwasmlifecycle/types/genesis.pb.go b/x/cosmwasmlifecycle/types/genesis.pb.go index b102c43..f6db6dd 100644 --- a/x/cosmwasmlifecycle/types/genesis.pb.go +++ b/x/cosmwasmlifecycle/types/genesis.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmwasmlifecycle/cosmwasmlifecycle/genesis.proto +// source: cosmwasmlifecycle/genesis.proto package types @@ -32,7 +32,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_288528e115c59bfa, []int{0} + return fileDescriptor_b4e03ab585a90b99, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -69,28 +69,26 @@ func (m *GenesisState) GetParams() Params { } func init() { - proto.RegisterType((*GenesisState)(nil), "cosmwasmlifecycle.cosmwasmlifecycle.GenesisState") + proto.RegisterType((*GenesisState)(nil), "cosmwasmlifecycle.GenesisState") } -func init() { - proto.RegisterFile("cosmwasmlifecycle/cosmwasmlifecycle/genesis.proto", fileDescriptor_288528e115c59bfa) -} +func init() { proto.RegisterFile("cosmwasmlifecycle/genesis.proto", fileDescriptor_b4e03ab585a90b99) } -var fileDescriptor_288528e115c59bfa = []byte{ - // 201 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 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0x00, 0xff, - 0xff, 0x59, 0xb7, 0x87, 0xd7, 0x5f, 0x01, 0x00, 0x00, +var fileDescriptor_b4e03ab585a90b99 = []byte{ + // 197 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce, + 0x2d, 0x4f, 0x2c, 0xce, 0xcd, 0xc9, 0x4c, 0x4b, 0x4d, 0xae, 0x4c, 0xce, 0x49, 0xd5, 0x4f, 0x4f, + 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xc4, 0x50, 0x20, + 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x96, 0xd5, 0x07, 0xb1, 0x20, 0x0a, 0xa5, 0xe4, 0x30, 0x4d, + 0x2a, 0x48, 0x2c, 0x4a, 0xcc, 0x85, 0x1a, 0xa4, 0xe4, 0xce, 0xc5, 0xe3, 0x0e, 0x31, 0x39, 0xb8, + 0x24, 0xb1, 0x24, 0x55, 0xc8, 0x9c, 0x8b, 0x0d, 0x22, 0x2f, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, + 0x24, 0xa9, 0x87, 0x61, 0x80, 0x5e, 0x00, 0x58, 0x81, 0x13, 0xcb, 0x89, 0x7b, 0xf2, 0x0c, 0x41, + 0x50, 0xe5, 0x4e, 0x51, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, + 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xe5, 0x90, + 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9a, 0x9b, 0x99, 0x92, 0x5a, + 0x66, 0x69, 0xa1, 0x0f, 0x33, 0x55, 0x17, 0xe1, 0xae, 0x0a, 0x7d, 0x4c, 0xb7, 0x96, 0x54, 0x16, + 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xdd, 0x6a, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x9e, 0x5a, + 0xf8, 0x17, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/cosmwasmlifecycle/types/keys.go b/x/cosmwasmlifecycle/types/keys.go index d628739..01d0d29 100644 --- a/x/cosmwasmlifecycle/types/keys.go +++ b/x/cosmwasmlifecycle/types/keys.go @@ -14,6 +14,11 @@ const ( MemStoreKey = "mem_cosmwasmlifecycle" ) +var ( + ParamsKey = []byte{0x01} + StrikesKey = []byte{0x02} +) + func KeyPrefix(p string) []byte { return []byte(p) } diff --git a/x/cosmwasmlifecycle/types/params.pb.go b/x/cosmwasmlifecycle/types/params.pb.go index 40fda08..ff89aff 100644 --- a/x/cosmwasmlifecycle/types/params.pb.go +++ b/x/cosmwasmlifecycle/types/params.pb.go @@ -1,10 +1,13 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmwasmlifecycle/cosmwasmlifecycle/params.proto +// source: cosmwasmlifecycle/params.proto package types import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -25,12 +28,28 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params defines the parameters for the module. type Params struct { + // Enable or disable executions + // at the begin and end of the block + IsEnabled bool `protobuf:"varint,1,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` + // Minimum deposit to enable contract execution at begin block and/or end block + // This deposit will be burned if the contract execution reaches the max strikes. + MinDeposit github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,2,opt,name=min_deposit,json=minDeposit,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"min_deposit"` + // Amount of strikes that the contract can hold before being + // disabled from end and beging block executions. + // When this happens the min_desposit will also be burned. + StrikesToDisableExecution int64 `protobuf:"varint,3,opt,name=strikes_to_disable_execution,json=strikesToDisableExecution,proto3" json:"strikes_to_disable_execution,omitempty"` + // Contract Addresses that will execute "{"begin_block": {}}" + // as sudo at the begining of each block + BeginBlockExecution []string `protobuf:"bytes,4,rep,name=begin_block_execution,json=beginBlockExecution,proto3" json:"begin_block_execution,omitempty"` + // Contract Addresses that will execute "{"end_block": {}}" + // as sudo at the end of each block + EndBlockExecution []string `protobuf:"bytes,5,rep,name=end_block_execution,json=endBlockExecution,proto3" json:"end_block_execution,omitempty"` } func (m *Params) Reset() { *m = Params{} } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_2d7bfad4338a9a5f, []int{0} + return fileDescriptor_d96aa1bf4f8b3eba, []int{0} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -59,26 +78,67 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo -func init() { - proto.RegisterType((*Params)(nil), "cosmwasmlifecycle.cosmwasmlifecycle.Params") +func (m *Params) GetIsEnabled() bool { + if m != nil { + return m.IsEnabled + } + return false +} + +func (m *Params) GetStrikesToDisableExecution() int64 { + if m != nil { + return m.StrikesToDisableExecution + } + return 0 +} + +func (m *Params) GetBeginBlockExecution() []string { + if m != nil { + return m.BeginBlockExecution + } + return nil +} + +func (m *Params) GetEndBlockExecution() []string { + if m != nil { + return m.EndBlockExecution + } + return nil } func init() { - proto.RegisterFile("cosmwasmlifecycle/cosmwasmlifecycle/params.proto", fileDescriptor_2d7bfad4338a9a5f) + proto.RegisterType((*Params)(nil), "cosmwasmlifecycle.Params") } -var fileDescriptor_2d7bfad4338a9a5f = []byte{ - // 159 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x48, 0xce, 0x2f, 0xce, - 0x2d, 0x4f, 0x2c, 0xce, 0xcd, 0xc9, 0x4c, 0x4b, 0x4d, 0xae, 0x4c, 0xce, 0x49, 0xd5, 0xc7, 0x14, - 0x29, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0xc6, 0x90, - 0xd7, 0xc3, 0x10, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd7, 0x07, 0xb1, 0x20, 0x5a, - 0x95, 0xf8, 0xb8, 0xd8, 0x02, 0xc0, 0x46, 0x59, 0xb1, 0xcc, 0x58, 0x20, 0xcf, 0xe0, 0x14, 0x75, - 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, - 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x0e, 0xe9, 0x99, 0x25, 0x19, 0xa5, - 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xa9, 0xb9, 0x99, 0x29, 0xa9, 0x65, 0x96, 0x16, 0x70, 0x87, - 0xe9, 0x22, 0x5c, 0x56, 0x81, 0xc5, 0xb5, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0x2b, - 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x3d, 0x4c, 0xdd, 0xe1, 0x00, 0x00, 0x00, +func init() { proto.RegisterFile("cosmwasmlifecycle/params.proto", fileDescriptor_d96aa1bf4f8b3eba) } + +var fileDescriptor_d96aa1bf4f8b3eba = []byte{ + // 400 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xb1, 0x8e, 0xd3, 0x40, + 0x10, 0x86, 0xed, 0xcb, 0x71, 0xe2, 0xf6, 0xaa, 0x73, 0x82, 0xe4, 0x44, 0xb0, 0xb1, 0x68, 0x70, + 0x13, 0xaf, 0x02, 0x0d, 0xd0, 0x00, 0x26, 0x91, 0x28, 0x28, 0x90, 0xa1, 0x4a, 0x63, 0xd9, 0xde, + 0xc1, 0xac, 0x6c, 0xef, 0x5a, 0xde, 0x4d, 0x48, 0xde, 0x82, 0x92, 0x92, 0x87, 0xe0, 0x21, 0x52, + 0x46, 0x54, 0x88, 0x22, 0x42, 0xc9, 0x23, 0xf0, 0x02, 0xc8, 0x5e, 0x47, 0x09, 0x4a, 0x41, 0x65, + 0x8f, 0xff, 0xff, 0xff, 0x66, 0x34, 0x1e, 0x84, 0x13, 0x21, 0x8b, 0xcf, 0x91, 0x2c, 0x72, 0xf6, + 0x11, 0x92, 0x55, 0x92, 0x03, 0x29, 0xa3, 0x2a, 0x2a, 0xa4, 0x57, 0x56, 0x42, 0x09, 0xeb, 0xf6, + 0x4c, 0x1f, 0xf4, 0x52, 0x91, 0x8a, 0x46, 0x25, 0xf5, 0x9b, 0x36, 0x0e, 0xfa, 0xb5, 0x51, 0xc8, + 0x50, 0x0b, 0xba, 0x68, 0x25, 0xac, 0x2b, 0x12, 0x47, 0x12, 0xc8, 0x62, 0x1c, 0x83, 0x8a, 0xc6, + 0x24, 0x11, 0x8c, 0x6b, 0xfd, 0xe1, 0x9f, 0x0b, 0x74, 0xf5, 0xae, 0x69, 0x6a, 0x3d, 0x40, 0x88, + 0xc9, 0x10, 0x78, 0x14, 0xe7, 0x40, 0x6d, 0xd3, 0x31, 0xdd, 0xbb, 0xc1, 0x35, 0x93, 0x53, 0xfd, + 0xc1, 0xca, 0xd0, 0x4d, 0xc1, 0x78, 0x48, 0xa1, 0x14, 0x92, 0x29, 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 0xf6, + 0x94, 0x1c, 0xee, 0x60, 0x74, 0x3c, 0x94, 0x25, 0x39, 0x3f, 0x9e, 0x66, 0x97, 0xf1, 0x55, 0xf3, + 0x63, 0x9f, 0xfc, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x45, 0xd3, 0x5d, 0x5e, 0x02, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -101,6 +161,49 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.EndBlockExecution) > 0 { + for iNdEx := len(m.EndBlockExecution) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.EndBlockExecution[iNdEx]) + copy(dAtA[i:], m.EndBlockExecution[iNdEx]) + i = encodeVarintParams(dAtA, i, uint64(len(m.EndBlockExecution[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.BeginBlockExecution) > 0 { + for iNdEx := len(m.BeginBlockExecution) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.BeginBlockExecution[iNdEx]) + copy(dAtA[i:], m.BeginBlockExecution[iNdEx]) + i = encodeVarintParams(dAtA, i, uint64(len(m.BeginBlockExecution[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if m.StrikesToDisableExecution != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StrikesToDisableExecution)) + i-- + dAtA[i] = 0x18 + } + { + size := m.MinDeposit.Size() + i -= size + if _, err := m.MinDeposit.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.IsEnabled { + i-- + if m.IsEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } @@ -121,6 +224,26 @@ func (m *Params) Size() (n int) { } var l int _ = l + if m.IsEnabled { + n += 2 + } + l = m.MinDeposit.Size() + n += 1 + l + sovParams(uint64(l)) + if m.StrikesToDisableExecution != 0 { + n += 1 + sovParams(uint64(m.StrikesToDisableExecution)) + } + if len(m.BeginBlockExecution) > 0 { + for _, s := range m.BeginBlockExecution { + l = len(s) + n += 1 + l + sovParams(uint64(l)) + } + } + if len(m.EndBlockExecution) > 0 { + for _, s := range m.EndBlockExecution { + l = len(s) + n += 1 + l + sovParams(uint64(l)) + } + } return n } @@ -159,6 +282,142 @@ func (m *Params) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEnabled = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StrikesToDisableExecution", wireType) + } + m.StrikesToDisableExecution = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StrikesToDisableExecution |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BeginBlockExecution", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BeginBlockExecution = append(m.BeginBlockExecution, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndBlockExecution", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EndBlockExecution = append(m.EndBlockExecution, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/cosmwasmlifecycle/types/query.pb.go b/x/cosmwasmlifecycle/types/query.pb.go index ae857b5..370b0d6 100644 --- a/x/cosmwasmlifecycle/types/query.pb.go +++ b/x/cosmwasmlifecycle/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmwasmlifecycle/cosmwasmlifecycle/query.proto +// source: cosmwasmlifecycle/query.proto package types @@ -38,7 +38,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_91327fb6dc4b6ffb, []int{0} + return fileDescriptor_cd5a0233d17791d5, []int{0} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_91327fb6dc4b6ffb, []int{1} + return fileDescriptor_cd5a0233d17791d5, []int{1} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -114,36 +114,33 @@ func (m *QueryParamsResponse) GetParams() Params { } func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "cosmwasmlifecycle.cosmwasmlifecycle.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasmlifecycle.cosmwasmlifecycle.QueryParamsResponse") -} - -func init() { - proto.RegisterFile("cosmwasmlifecycle/cosmwasmlifecycle/query.proto", fileDescriptor_91327fb6dc4b6ffb) -} - -var fileDescriptor_91327fb6dc4b6ffb = []byte{ - // 310 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4f, 0xce, 0x2f, 0xce, - 0x2d, 0x4f, 0x2c, 0xce, 0xcd, 0xc9, 0x4c, 0x4b, 0x4d, 0xae, 0x4c, 0xce, 0x49, 0xc5, 0x22, 0x52, - 0x58, 0x9a, 0x5a, 0x54, 0xa9, 0x57, 0x50, 0x94, 0x5f, 0x92, 0x2f, 0xa4, 0x8c, 0x21, 0xad, 0x87, - 0x21, 0x22, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, 0xaf, 0x0f, 0x62, 0x41, 0xb4, 0x4a, 0xc9, - 0xa4, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, 0xea, 0x27, 0x16, 0x64, 0xea, 0x27, 0xe6, 0xe5, 0xe5, 0x97, - 0x24, 0x96, 0x64, 0xe6, 0xe7, 0x15, 0x43, 0x65, 0xb5, 0x40, 0xc6, 0xe4, 0x17, 0xeb, 0x27, 0x25, - 0x16, 0x43, 0x6d, 0xd4, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0x48, 0x4c, 0xcf, - 0xcc, 0x03, 0x2b, 0x86, 0xaa, 0x35, 0x20, 0xc6, 0xd5, 0x05, 0x89, 0x45, 0x89, 0xb9, 0x50, 0xd3, - 0x95, 0x44, 0xb8, 0x84, 0x02, 0x41, 0x66, 0x06, 0x80, 0x05, 0x83, 0x52, 0x0b, 0x4b, 0x53, 0x8b, - 0x4b, 0x94, 0x12, 0xb8, 0x84, 0x51, 0x44, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0x3c, 0xb9, - 0xd8, 0x20, 0x9a, 0x25, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0xb4, 0xf5, 0x88, 0xf0, 0xb4, 0x1e, - 0xc4, 0x10, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xa0, 0x06, 0x18, 0x1d, 0x61, 0xe4, 0x62, - 0x05, 0x5b, 0x21, 0xb4, 0x8b, 0x91, 0x8b, 0x0d, 0xa2, 0x44, 0xc8, 0x9c, 0x28, 0xf3, 0x30, 0xdd, - 0x2b, 0x65, 0x41, 0xba, 0x46, 0x88, 0x97, 0x94, 0x6c, 0x9b, 0x2e, 0x3f, 0x99, 0xcc, 0x64, 0x2e, - 0x64, 0xaa, 0x9f, 0x9a, 0x9b, 0x99, 0x92, 0x5a, 0x66, 0x69, 0x01, 0x0f, 0x31, 0x5d, 0xc2, 0x81, - 0xe8, 0x14, 0x75, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, - 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x0e, 0xe9, 0x99, - 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0x78, 0x8d, 0xae, 0xc0, 0x62, 0x78, 0x49, 0x65, - 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x86, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x37, - 0xb9, 0xbc, 0x8b, 0x02, 0x00, 0x00, + proto.RegisterType((*QueryParamsRequest)(nil), "cosmwasmlifecycle.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasmlifecycle.QueryParamsResponse") +} + +func init() { proto.RegisterFile("cosmwasmlifecycle/query.proto", fileDescriptor_cd5a0233d17791d5) } + +var fileDescriptor_cd5a0233d17791d5 = []byte{ + // 303 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0xce, 0x2f, 0xce, + 0x2d, 0x4f, 0x2c, 0xce, 0xcd, 0xc9, 0x4c, 0x4b, 0x4d, 0xae, 0x4c, 0xce, 0x49, 0xd5, 0x2f, 0x2c, + 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xc4, 0x90, 0x96, 0x12, 0x49, + 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xea, 0x83, 0x58, 0x10, 0x85, 0x52, 0x32, 0xe9, 0xf9, 0xf9, 0xe9, + 0x39, 0xa9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0x89, 0x79, 0x79, 0xf9, 0x25, 0x89, 0x25, 0x99, 0xf9, + 0x79, 0xc5, 0x50, 0x59, 0x2d, 0x90, 0x31, 0xf9, 0xc5, 0xfa, 0x49, 0x89, 0xc5, 0x50, 0xf3, 0xf5, + 0xcb, 0x0c, 0x93, 0x52, 0x4b, 0x12, 0x0d, 0xf5, 0x0b, 0x12, 0xd3, 0x33, 0xf3, 0xc0, 0x8a, 0xa1, + 0x6a, 0xe5, 0x30, 0x5d, 0x54, 0x90, 0x58, 0x94, 0x98, 0x0b, 0x35, 0x4b, 0x49, 0x84, 0x4b, 0x28, + 0x10, 0x64, 0x42, 0x00, 0x58, 0x30, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0xc9, 0x8f, 0x4b, + 0x18, 0x45, 0xb4, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0xc8, 0x9c, 0x8b, 0x0d, 0xa2, 0x59, 0x82, + 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x52, 0x0f, 0xc3, 0x74, 0x3d, 0x88, 0x16, 0x27, 0x96, 0x13, + 0xf7, 0xe4, 0x19, 0x82, 0xa0, 0xca, 0x8d, 0x9a, 0x19, 0xb9, 0x58, 0xc1, 0x06, 0x0a, 0x55, 0x71, + 0xb1, 0x41, 0x54, 0x08, 0xa9, 0x62, 0xd1, 0x8c, 0xe9, 0x14, 0x29, 0x35, 0x42, 0xca, 0x20, 0x6e, + 0x53, 0x52, 0x6c, 0xba, 0xfc, 0x64, 0x32, 0x93, 0xb4, 0x90, 0xa4, 0x3e, 0x2e, 0x1f, 0x3b, 0x45, + 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, + 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x43, 0x7a, 0x66, 0x49, 0x46, + 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x6a, 0x6e, 0x66, 0x4a, 0x6a, 0x99, 0xa5, 0x05, 0xdc, + 0x1c, 0x5d, 0x84, 0x41, 0x15, 0x58, 0x0c, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0x07, + 0xa7, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xee, 0x04, 0x5f, 0x34, 0x02, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -172,7 +169,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmwasmlifecycle.cosmwasmlifecycle.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/cosmwasmlifecycle.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -207,7 +204,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmwasmlifecycle.cosmwasmlifecycle.Query/Params", + FullMethod: "/cosmwasmlifecycle.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -216,7 +213,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmwasmlifecycle.cosmwasmlifecycle.Query", + ServiceName: "cosmwasmlifecycle.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -225,7 +222,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "cosmwasmlifecycle/cosmwasmlifecycle/query.proto", + Metadata: "cosmwasmlifecycle/query.proto", } func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { diff --git a/x/cosmwasmlifecycle/types/query.pb.gw.go b/x/cosmwasmlifecycle/types/query.pb.gw.go index eaaf34c..5ee574a 100644 --- a/x/cosmwasmlifecycle/types/query.pb.gw.go +++ b/x/cosmwasmlifecycle/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: cosmwasmlifecycle/cosmwasmlifecycle/query.proto +// source: cosmwasmlifecycle/query.proto /* Package types is a reverse proxy. @@ -145,7 +145,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"emidev98", "cosmwasm-lifecycle", "cosmwasmlifecycle", "params"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"cosmwasmlifecycle", "params"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/x/cosmwasmlifecycle/types/tx.pb.go b/x/cosmwasmlifecycle/types/tx.pb.go index 87af36d..2bf43e1 100644 --- a/x/cosmwasmlifecycle/types/tx.pb.go +++ b/x/cosmwasmlifecycle/types/tx.pb.go @@ -1,15 +1,21 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmwasmlifecycle/cosmwasmlifecycle/tx.proto +// source: cosmwasmlifecycle/tx.proto package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -23,21 +29,216 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type ExecutionType int32 + +const ( + ExecutionType_BEGIN_BLOCK ExecutionType = 0 + ExecutionType_END_BLOCK ExecutionType = 1 +) + +var ExecutionType_name = map[int32]string{ + 0: "BEGIN_BLOCK", + 1: "END_BLOCK", +} + +var ExecutionType_value = map[string]int32{ + "BEGIN_BLOCK": 0, + "END_BLOCK": 1, +} + +func (x ExecutionType) String() string { + return proto.EnumName(ExecutionType_name, int32(x)) +} + +func (ExecutionType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5a8c9d0c2a02a50a, []int{0} +} + +type MsgEnableBlockExecution struct { + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + Execution ExecutionType `protobuf:"varint,2,opt,name=execution,proto3,enum=cosmwasmlifecycle.ExecutionType" json:"execution,omitempty"` +} + +func (m *MsgEnableBlockExecution) Reset() { *m = MsgEnableBlockExecution{} } +func (m *MsgEnableBlockExecution) String() string { return proto.CompactTextString(m) } +func (*MsgEnableBlockExecution) ProtoMessage() {} +func (*MsgEnableBlockExecution) Descriptor() ([]byte, []int) { + return fileDescriptor_5a8c9d0c2a02a50a, []int{0} +} +func (m *MsgEnableBlockExecution) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEnableBlockExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEnableBlockExecution.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEnableBlockExecution) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEnableBlockExecution.Merge(m, src) +} +func (m *MsgEnableBlockExecution) XXX_Size() int { + return m.Size() +} +func (m *MsgEnableBlockExecution) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEnableBlockExecution.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEnableBlockExecution proto.InternalMessageInfo + +type MsgEnableBlockExecutionResponse struct { +} + +func (m *MsgEnableBlockExecutionResponse) Reset() { *m = MsgEnableBlockExecutionResponse{} } +func (m *MsgEnableBlockExecutionResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEnableBlockExecutionResponse) ProtoMessage() {} +func (*MsgEnableBlockExecutionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5a8c9d0c2a02a50a, []int{1} +} +func (m *MsgEnableBlockExecutionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEnableBlockExecutionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEnableBlockExecutionResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEnableBlockExecutionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEnableBlockExecutionResponse.Merge(m, src) +} +func (m *MsgEnableBlockExecutionResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgEnableBlockExecutionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEnableBlockExecutionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEnableBlockExecutionResponse proto.InternalMessageInfo + +type MsgDisableBlockExecution struct { + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + Execution ExecutionType `protobuf:"varint,2,opt,name=execution,proto3,enum=cosmwasmlifecycle.ExecutionType" json:"execution,omitempty"` +} + +func (m *MsgDisableBlockExecution) Reset() { *m = MsgDisableBlockExecution{} } +func (m *MsgDisableBlockExecution) String() string { return proto.CompactTextString(m) } +func (*MsgDisableBlockExecution) ProtoMessage() {} +func (*MsgDisableBlockExecution) Descriptor() ([]byte, []int) { + return fileDescriptor_5a8c9d0c2a02a50a, []int{2} +} +func (m *MsgDisableBlockExecution) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDisableBlockExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDisableBlockExecution.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDisableBlockExecution) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDisableBlockExecution.Merge(m, src) +} +func (m *MsgDisableBlockExecution) XXX_Size() int { + return m.Size() +} +func (m *MsgDisableBlockExecution) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDisableBlockExecution.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDisableBlockExecution proto.InternalMessageInfo + +type MsgDisableBlockExecutionResponse struct { +} + +func (m *MsgDisableBlockExecutionResponse) Reset() { *m = MsgDisableBlockExecutionResponse{} } +func (m *MsgDisableBlockExecutionResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDisableBlockExecutionResponse) ProtoMessage() {} +func (*MsgDisableBlockExecutionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5a8c9d0c2a02a50a, []int{3} +} +func (m *MsgDisableBlockExecutionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDisableBlockExecutionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDisableBlockExecutionResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDisableBlockExecutionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDisableBlockExecutionResponse.Merge(m, src) +} +func (m *MsgDisableBlockExecutionResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDisableBlockExecutionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDisableBlockExecutionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDisableBlockExecutionResponse proto.InternalMessageInfo + func init() { - proto.RegisterFile("cosmwasmlifecycle/cosmwasmlifecycle/tx.proto", fileDescriptor_a5d49c94eb14ea68) + proto.RegisterEnum("cosmwasmlifecycle.ExecutionType", ExecutionType_name, ExecutionType_value) + proto.RegisterType((*MsgEnableBlockExecution)(nil), "cosmwasmlifecycle.MsgEnableBlockExecution") + proto.RegisterType((*MsgEnableBlockExecutionResponse)(nil), "cosmwasmlifecycle.MsgEnableBlockExecutionResponse") + proto.RegisterType((*MsgDisableBlockExecution)(nil), "cosmwasmlifecycle.MsgDisableBlockExecution") + proto.RegisterType((*MsgDisableBlockExecutionResponse)(nil), "cosmwasmlifecycle.MsgDisableBlockExecutionResponse") } -var fileDescriptor_a5d49c94eb14ea68 = []byte{ - // 135 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x49, 0xce, 0x2f, 0xce, - 0x2d, 0x4f, 0x2c, 0xce, 0xcd, 0xc9, 0x4c, 0x4b, 0x4d, 0xae, 0x4c, 0xce, 0x49, 0xd5, 0xc7, 0x14, - 0x29, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0xc6, 0x90, 0xd3, 0xc3, 0x10, 0x31, - 0x62, 0xe5, 0x62, 0xf6, 0x2d, 0x4e, 0x77, 0x8a, 0x3a, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, - 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, - 0x39, 0x86, 0x28, 0x87, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xd4, - 0xdc, 0xcc, 0x94, 0xd4, 0x32, 0x4b, 0x0b, 0xb8, 0xad, 0xba, 0x08, 0x6b, 0x2b, 0xb0, 0x39, 0xa5, - 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x1c, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3d, - 0x5b, 0x0f, 0x4c, 0xbe, 0x00, 0x00, 0x00, +func init() { proto.RegisterFile("cosmwasmlifecycle/tx.proto", fileDescriptor_5a8c9d0c2a02a50a) } + +var fileDescriptor_5a8c9d0c2a02a50a = []byte{ + // 389 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xce, 0x2f, 0xce, + 0x2d, 0x4f, 0x2c, 0xce, 0xcd, 0xc9, 0x4c, 0x4b, 0x4d, 0xae, 0x4c, 0xce, 0x49, 0xd5, 0x2f, 0xa9, + 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xc4, 0x90, 0x93, 0x12, 0x49, 0xcf, 0x4f, 0xcf, + 0x07, 0xcb, 0xea, 0x83, 0x58, 0x10, 0x85, 0x52, 0x92, 0x20, 0x85, 0xf9, 0xc5, 0xf1, 0x10, 0x09, + 0x08, 0x07, 0x22, 0xa5, 0xb4, 0x8e, 0x91, 0x4b, 0xdc, 0xb7, 0x38, 0xdd, 0x35, 0x2f, 0x31, 0x29, + 0x27, 0xd5, 0x29, 0x27, 0x3f, 0x39, 0xdb, 0xb5, 0x22, 0x35, 0xb9, 0xb4, 0x24, 0x33, 0x3f, 0x4f, + 0xc8, 0x99, 0x4b, 0x20, 0x39, 0x3f, 0xaf, 0xa4, 0x28, 0x31, 0xb9, 0x24, 0x3e, 0x31, 0x25, 0xa5, + 0x28, 0xb5, 0xb8, 0x58, 0x82, 0x51, 0x81, 0x51, 0x83, 0xd3, 0x49, 0xe2, 0xd2, 0x16, 0x5d, 0x11, + 0xa8, 0x39, 0x8e, 0x10, 0x99, 0xe0, 0x92, 0xa2, 0xcc, 0xbc,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0x63, + 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x1c, 0xd2, + 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x53, 0x73, 0x33, 0x53, 0x52, 0xcb, + 0x2c, 0x2d, 0xf4, 0x61, 0x36, 0xe8, 0x22, 0x32, 0x59, 0x85, 0x3e, 0x96, 0x8c, 0x57, 0x59, 0x90, + 0x5a, 0x9c, 0xc4, 0x06, 0xce, 0x38, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xf8, 0x8a, + 0x52, 0x9a, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -52,6 +253,8 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { + EnableBlockExecution(ctx context.Context, in *MsgEnableBlockExecution, opts ...grpc.CallOption) (*MsgEnableBlockExecutionResponse, error) + DisableBlockExecution(ctx context.Context, in *MsgDisableBlockExecution, opts ...grpc.CallOption) (*MsgDisableBlockExecutionResponse, error) } type msgClient struct { @@ -62,22 +265,664 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } +func (c *msgClient) EnableBlockExecution(ctx context.Context, in *MsgEnableBlockExecution, opts ...grpc.CallOption) (*MsgEnableBlockExecutionResponse, error) { + out := new(MsgEnableBlockExecutionResponse) + err := c.cc.Invoke(ctx, "/cosmwasmlifecycle.Msg/EnableBlockExecution", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DisableBlockExecution(ctx context.Context, in *MsgDisableBlockExecution, opts ...grpc.CallOption) (*MsgDisableBlockExecutionResponse, error) { + out := new(MsgDisableBlockExecutionResponse) + err := c.cc.Invoke(ctx, "/cosmwasmlifecycle.Msg/DisableBlockExecution", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { + EnableBlockExecution(context.Context, *MsgEnableBlockExecution) (*MsgEnableBlockExecutionResponse, error) + DisableBlockExecution(context.Context, *MsgDisableBlockExecution) (*MsgDisableBlockExecutionResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. type UnimplementedMsgServer struct { } +func (*UnimplementedMsgServer) EnableBlockExecution(ctx context.Context, req *MsgEnableBlockExecution) (*MsgEnableBlockExecutionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EnableBlockExecution not implemented") +} +func (*UnimplementedMsgServer) DisableBlockExecution(ctx context.Context, req *MsgDisableBlockExecution) (*MsgDisableBlockExecutionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DisableBlockExecution not implemented") +} + func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } +func _Msg_EnableBlockExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEnableBlockExecution) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).EnableBlockExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmwasmlifecycle.Msg/EnableBlockExecution", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).EnableBlockExecution(ctx, req.(*MsgEnableBlockExecution)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DisableBlockExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDisableBlockExecution) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DisableBlockExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmwasmlifecycle.Msg/DisableBlockExecution", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DisableBlockExecution(ctx, req.(*MsgDisableBlockExecution)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmwasmlifecycle.cosmwasmlifecycle.Msg", + ServiceName: "cosmwasmlifecycle.Msg", HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmwasmlifecycle/cosmwasmlifecycle/tx.proto", + Methods: []grpc.MethodDesc{ + { + MethodName: "EnableBlockExecution", + Handler: _Msg_EnableBlockExecution_Handler, + }, + { + MethodName: "DisableBlockExecution", + Handler: _Msg_DisableBlockExecution_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmwasmlifecycle/tx.proto", +} + +func (m *MsgEnableBlockExecution) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgEnableBlockExecution) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEnableBlockExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Execution != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Execution)) + i-- + dAtA[i] = 0x10 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgEnableBlockExecutionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgEnableBlockExecutionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEnableBlockExecutionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDisableBlockExecution) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDisableBlockExecution) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDisableBlockExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Execution != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Execution)) + i-- + dAtA[i] = 0x10 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDisableBlockExecutionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } + +func (m *MsgDisableBlockExecutionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDisableBlockExecutionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgEnableBlockExecution) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Execution != 0 { + n += 1 + sovTx(uint64(m.Execution)) + } + return n +} + +func (m *MsgEnableBlockExecutionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDisableBlockExecution) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Execution != 0 { + n += 1 + sovTx(uint64(m.Execution)) + } + return n +} + +func (m *MsgDisableBlockExecutionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgEnableBlockExecution) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEnableBlockExecution: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEnableBlockExecution: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Execution", wireType) + } + m.Execution = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Execution |= ExecutionType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgEnableBlockExecutionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEnableBlockExecutionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEnableBlockExecutionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDisableBlockExecution) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDisableBlockExecution: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDisableBlockExecution: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Execution", wireType) + } + m.Execution = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Execution |= ExecutionType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDisableBlockExecutionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDisableBlockExecutionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDisableBlockExecutionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) From 30970bb0310a62c745d4c701452cf6687d7a8965 Mon Sep 17 00:00:00 2001 From: emidev98 Date: Sun, 22 Oct 2023 15:24:28 +0200 Subject: [PATCH 2/2] wip: cosmwasm lifecycle --- app/app.go | 18 +- docs/logo.jpg | Bin 0 -> 44789 bytes proto/cosmwasmlifecycle/contract.proto | 24 + proto/cosmwasmlifecycle/events.proto | 17 + proto/cosmwasmlifecycle/execution_type.proto | 10 + proto/cosmwasmlifecycle/genesis.proto | 6 + proto/cosmwasmlifecycle/params.proto | 9 - proto/cosmwasmlifecycle/tx.proto | 30 +- readme.md | 14 +- testutil/keeper/cosmwasmlifecycle.go | 11 +- x/cosmwasmlifecycle/genesis.go | 23 - x/cosmwasmlifecycle/genesis_test.go | 29 - x/cosmwasmlifecycle/keeper/contract.go | 45 ++ x/cosmwasmlifecycle/keeper/events.go | 34 + x/cosmwasmlifecycle/keeper/genesis.go | 20 + x/cosmwasmlifecycle/keeper/keeper.go | 89 ++- x/cosmwasmlifecycle/keeper/msg_server.go | 8 +- x/cosmwasmlifecycle/keeper/params.go | 4 +- x/cosmwasmlifecycle/module.go | 17 +- x/cosmwasmlifecycle/types/contract.go | 17 + x/cosmwasmlifecycle/types/contract.pb.go | 397 ++++++++++ x/cosmwasmlifecycle/types/events.pb.go | 682 ++++++++++++++++++ .../types/execution_type.pb.go | 73 ++ x/cosmwasmlifecycle/types/expected_keepers.go | 6 + x/cosmwasmlifecycle/types/genesis.pb.go | 91 ++- x/cosmwasmlifecycle/types/keys.go | 14 +- x/cosmwasmlifecycle/types/params.pb.go | 163 +---- x/cosmwasmlifecycle/types/tx.pb.go | 387 +++++----- 28 files changed, 1804 insertions(+), 434 deletions(-) create mode 100644 docs/logo.jpg create mode 100644 proto/cosmwasmlifecycle/contract.proto create mode 100644 proto/cosmwasmlifecycle/events.proto create mode 100644 proto/cosmwasmlifecycle/execution_type.proto delete mode 100644 x/cosmwasmlifecycle/genesis.go delete mode 100644 x/cosmwasmlifecycle/genesis_test.go create mode 100644 x/cosmwasmlifecycle/keeper/contract.go create mode 100644 x/cosmwasmlifecycle/keeper/events.go create mode 100644 x/cosmwasmlifecycle/keeper/genesis.go create mode 100644 x/cosmwasmlifecycle/types/contract.go create mode 100644 x/cosmwasmlifecycle/types/contract.pb.go create mode 100644 x/cosmwasmlifecycle/types/events.pb.go create mode 100644 x/cosmwasmlifecycle/types/execution_type.pb.go diff --git a/app/app.go b/app/app.go index da46539..4ba9f42 100644 --- a/app/app.go +++ b/app/app.go @@ -185,14 +185,15 @@ var ( // module account permissions maccPerms = map[string][]string{ - authtypes.FeeCollectorName: nil, - distrtypes.ModuleName: nil, - icatypes.ModuleName: nil, - minttypes.ModuleName: {authtypes.Minter}, - stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, - stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, - govtypes.ModuleName: {authtypes.Burner}, - ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + authtypes.FeeCollectorName: nil, + distrtypes.ModuleName: nil, + icatypes.ModuleName: nil, + minttypes.ModuleName: {authtypes.Minter}, + stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, + stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, + govtypes.ModuleName: {authtypes.Burner}, + ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + cosmwasmlifecyclemoduletypes.ModuleName: {authtypes.Burner}, // this line is used by starport scaffolding # stargate/app/maccPerms } ) @@ -558,6 +559,7 @@ func New( appCodec, keys[cosmwasmlifecyclemoduletypes.StoreKey], app.WasmKeeper, + app.BankKeeper, ) cosmwasmlifecycleModule := cosmwasmlifecyclemodule.NewAppModule(appCodec, app.CosmwasmlifecycleKeeper, app.WasmKeeper) diff --git a/docs/logo.jpg b/docs/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..371420b2624a7b81fb5fd618de0af16d4cde9ea0 GIT binary patch literal 44789 zcmbrm2Rv6_{6GG-Ln=jOD+<{%viJYo zH%fg!-`{`fal7}v@408b&htE9Pil7v0TUEbQ#;a2js@ z+pK&{Z0xL1CMek0*k^IiUd6+^%6fzJ2J8Rpzr$J>{uxv^Oc)vpISdsa1q~nNumJ`K z^~69y{=ts_P*Bm(F)*>tVB_F|1VtBMs3>S?sOV@I80hFAwKI4QL&wLsc!Na{^OAx- z7P$oht9wx58498I9|#q@mMPgDJb!_WbNR|uB4R3P8d^Gfb`DOi+uS_D_e4a+#3dw^ zlvPyK)HO5>9zJ^f#L&pt(#qP#*3RC+R;@QBE_QAx=uscGpMnOOye zh@#?>(z5cp`i91jP0cNzx_f&2`UeJwhR4PyeoRhH&&cb3kB5{9BBCH7&lljFA6GP>04YPXLUbAAQY7N{sT4zo8mIz zgXdj1mnqrDs8*n+AzSwUtYI(yKeg<4!~V2u7bwhh5<==5f)er_+G?{&@l_g#b0BqeXd+eETRHWSKBf4tR7_y^wii zle$9YKpQby)CN?Oh%v%Jf4X|LPJj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NS891|NaYlyKH+4`UIIyN|W zJSJXB@pEQ90k_TydUw-5d9W018|ajO_93?_Zka!xWq*5z@v{1|I-YrdZl9`ZOU>5w ex3(zj$~OJ4*7Lvhq@WK +

CosmWasm Lifecycle Module

+ + +![IMG](./docs/logo.jpg) + +CosmWasm Lifecycle blockchain module leverages [CosmoSDK's lifecycle](https://docs.cosmos.network/main/build/building-modules/beginblock-endblock) to facilitate the execution of smart contracts at the initiation and conclusion of each block. Given the necessity for swift and resource-light execution in both stages, this module mandates [Gov](https://docs.cosmos.network/main/build/modules/gov) voting and demands a collateral deposit for each smart contract on an individual basis. This collateral deposit will be burned if the smart contract fails to execute multiple times. + + + + + + diff --git a/testutil/keeper/cosmwasmlifecycle.go b/testutil/keeper/cosmwasmlifecycle.go index d673373..c2c084e 100644 --- a/testutil/keeper/cosmwasmlifecycle.go +++ b/testutil/keeper/cosmwasmlifecycle.go @@ -11,7 +11,6 @@ import ( "github.com/cosmos/cosmos-sdk/store" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - typesparams "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/keeper" "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types" "github.com/stretchr/testify/require" @@ -30,17 +29,11 @@ func CosmwasmlifecycleKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { registry := codectypes.NewInterfaceRegistry() cdc := codec.NewProtoCodec(registry) - paramsSubspace := typesparams.NewSubspace(cdc, - types.Amino, - storeKey, - memStoreKey, - "CosmwasmlifecycleParams", - ) k := keeper.NewKeeper( cdc, storeKey, - memStoreKey, - paramsSubspace, + wasmKeeper, + bankKeeper, ) ctx := sdk.NewContext(stateStore, tmproto.Header{}, false, log.NewNopLogger()) diff --git a/x/cosmwasmlifecycle/genesis.go b/x/cosmwasmlifecycle/genesis.go deleted file mode 100644 index 78f2474..0000000 --- a/x/cosmwasmlifecycle/genesis.go +++ /dev/null @@ -1,23 +0,0 @@ -package cosmwasmlifecycle - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/keeper" - "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types" -) - -// InitGenesis initializes the module's state from a provided genesis state. -func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { - // this line is used by starport scaffolding # genesis/module/init - k.SetParams(ctx, genState.Params) -} - -// ExportGenesis returns the module's exported genesis -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { - genesis := types.DefaultGenesis() - genesis.Params = k.GetParams(ctx) - - // this line is used by starport scaffolding # genesis/module/export - - return genesis -} diff --git a/x/cosmwasmlifecycle/genesis_test.go b/x/cosmwasmlifecycle/genesis_test.go deleted file mode 100644 index 8081fdd..0000000 --- a/x/cosmwasmlifecycle/genesis_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package cosmwasmlifecycle_test - -import ( - "testing" - - keepertest "github.com/emidev98/cosmwasm-lifecycle/testutil/keeper" - "github.com/emidev98/cosmwasm-lifecycle/testutil/nullify" - "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle" - "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types" - "github.com/stretchr/testify/require" -) - -func TestGenesis(t *testing.T) { - genesisState := types.GenesisState{ - Params: types.DefaultParams(), - - // this line is used by starport scaffolding # genesis/test/state - } - - k, ctx := keepertest.CosmwasmlifecycleKeeper(t) - cosmwasmlifecycle.InitGenesis(ctx, *k, genesisState) - got := cosmwasmlifecycle.ExportGenesis(ctx, *k) - require.NotNil(t, got) - - nullify.Fill(&genesisState) - nullify.Fill(got) - - // this line is used by starport scaffolding # genesis/test/assert -} diff --git a/x/cosmwasmlifecycle/keeper/contract.go b/x/cosmwasmlifecycle/keeper/contract.go new file mode 100644 index 0000000..09d55bd --- /dev/null +++ b/x/cosmwasmlifecycle/keeper/contract.go @@ -0,0 +1,45 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types" +) + +func (k Keeper) GetContract(ctx sdk.Context, contractAddr sdk.AccAddress) (d types.Contract, found bool) { + key := types.GetContractKeyByAddress(contractAddr) + b := ctx.KVStore(k.storeKey).Get(key) + if b == nil { + return d, false + } + k.cdc.MustUnmarshal(b, &d) + return d, true +} + +func (k Keeper) SetContract(ctx sdk.Context, contractAddr sdk.AccAddress, contract types.Contract) { + key := types.GetContractKeyByAddress(contractAddr) + b := k.cdc.MustMarshal(&contract) + ctx.KVStore(k.storeKey).Set(key, b) +} + +func (k Keeper) DeleteContract(ctx sdk.Context, contractAddr sdk.AccAddress) { + key := types.GetContractKeyByAddress(contractAddr) + store := ctx.KVStore(k.storeKey) + store.Delete(key) +} + +func (k Keeper) IterateContracts(ctx sdk.Context, cb func(contractAddr sdk.AccAddress, contract types.Contract) error) (err error) { + store := ctx.KVStore(k.storeKey) + iter := sdk.KVStorePrefixIterator(store, types.ContractKey) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + var contract types.Contract + b := iter.Value() + k.cdc.MustUnmarshal(b, &contract) + err = cb(iter.Key(), contract) + if err != nil { + return err + } + } + + return nil +} diff --git a/x/cosmwasmlifecycle/keeper/events.go b/x/cosmwasmlifecycle/keeper/events.go new file mode 100644 index 0000000..1d43c71 --- /dev/null +++ b/x/cosmwasmlifecycle/keeper/events.go @@ -0,0 +1,34 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types" +) + +// Emits an event to notify that the contract has been striked +// including the address, current strike and the reason +func EmitContractStrikeEvent( + ctx sdk.Context, + contractAddress sdk.AccAddress, + currentStrike int64, + strikeReason error, +) error { + return ctx.EventManager().EmitTypedEvent(&types.ContractStrikeEvent{ + ModuleName: types.ModuleName, + ContractAddress: contractAddress.String(), + CurrentStrike: currentStrike, + StrikeReason: strikeReason.Error(), + }) +} + +// Emits an event to notify that the contract has been striked +// including the address, current strike and the reason +func EmitContractDeleteEvent( + ctx sdk.Context, + contractAddress sdk.AccAddress, +) error { + return ctx.EventManager().EmitTypedEvent(&types.ContractDeleteEvent{ + ModuleName: types.ModuleName, + ContractAddress: contractAddress.String(), + }) +} diff --git a/x/cosmwasmlifecycle/keeper/genesis.go b/x/cosmwasmlifecycle/keeper/genesis.go new file mode 100644 index 0000000..b492329 --- /dev/null +++ b/x/cosmwasmlifecycle/keeper/genesis.go @@ -0,0 +1,20 @@ +package keeper + +import ( + abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/emidev98/cosmwasm-lifecycle/x/cosmwasmlifecycle/types" +) + +func (k Keeper) InitGenesis(ctx sdk.Context, g types.GenesisState) []abci.ValidatorUpdate { + k.SetParams(ctx, g.Params) + // TODO: add contract to stores from genesis + return []abci.ValidatorUpdate{} +} + +func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { + genesis := types.DefaultGenesis() + genesis.Params = k.GetParams(ctx) + // TODO: export contracts from stores to genesis + return genesis +} diff --git a/x/cosmwasmlifecycle/keeper/keeper.go b/x/cosmwasmlifecycle/keeper/keeper.go index 6761540..baf42e7 100644 --- a/x/cosmwasmlifecycle/keeper/keeper.go +++ b/x/cosmwasmlifecycle/keeper/keeper.go @@ -15,40 +15,115 @@ type Keeper struct { cdc codec.BinaryCodec storeKey storetypes.StoreKey wasmKeeper types.WasmKeeper + bankKeeper types.BankKeeper } func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, wasmKeeper types.WasmKeeper, + bankKeeper types.BankKeeper, ) *Keeper { return &Keeper{ cdc: cdc, storeKey: storeKey, wasmKeeper: wasmKeeper, + bankKeeper: bankKeeper, } } -func (k Keeper) BeginBlock(ctx sdk.Context) { +// Function used to execute the begin_block as sudo of a contract +func (k Keeper) BeginBlock(ctx sdk.Context) (err error) { + // First gets the module params and check if the module is enabled params := k.GetParams(ctx) if params.IsEnabled { - for _, address := range params.BeginBlockExecution { - addr, err := sdk.AccAddressFromBech32(address) + // Iterate over all contracts and check if the contract can be executed in the current context + err = k.IterateContracts(ctx, func(contractAddr sdk.AccAddress, contract types.Contract) error { + return k.executeContract(ctx, contractAddr, contract, params, types.ExecutionType_BEGIN_BLOCK) + }) + + if err != nil { + return err + } + } + + return nil +} + +func (k Keeper) EndBlock(ctx sdk.Context) (err error) { + // First gets the module params and check if the module is enabled + params := k.GetParams(ctx) + if params.IsEnabled { + // Iterate over all contracts and check if the contract can be executed in the current context + err = k.IterateContracts(ctx, func(contractAddr sdk.AccAddress, contract types.Contract) error { + return k.executeContract(ctx, contractAddr, contract, params, types.ExecutionType_END_BLOCK) + }) + + if err != nil { + return err + } + } + + return nil +} + +// Function used to execute the contract as sudo +func (k Keeper) executeContract( + ctx sdk.Context, + contractAddr sdk.AccAddress, + contract types.Contract, + params types.Params, + executionType types.ExecutionType, +) error { + if contract.CanExecute(params, executionType) { + // Execute the begin_block as sudo and if this execution fails, + // increment the strikes of the contract and emit the ContractStrikeEvent + _, err := k.wasmKeeper.Sudo(ctx, contractAddr, []byte("{\"begin_block\": {}}")) + if err != nil { + contract.Strikes++ + err := EmitContractStrikeEvent(ctx, contractAddr, contract.Strikes, err) if err != nil { panic(err) } - _, err = k.wasmKeeper.Sudo(ctx, addr, []byte("{\"begin_block\": {}}")) - if err != nil { - + // If the contract has enough strikes to be disabled, + // it will be deleted form the store and the deposit + // will be burned + if contract.HasEnoughStrikesToDisableExecution(params.StrikesToDisableExecution) { + err := k.deleteContractAndBurnDeposit(ctx, contractAddr, contract.Deposit) + if err != nil { + return err + } + } else { + k.SetContract(ctx, contractAddr, contract) } } + } else { + err := k.deleteContractAndBurnDeposit(ctx, contractAddr, contract.Deposit) + if err != nil { + return err + } } + + return nil } -func (k Keeper) EndBlock(ctx sdk.Context) { +// Receives the contractAddr and the respective contract deposit +// to delete the contract from the store and burn the deposit +func (k Keeper) deleteContractAndBurnDeposit(ctx sdk.Context, contractAddr sdk.AccAddress, deposit sdk.Coin) (err error) { + k.DeleteContract(ctx, contractAddr) + err = k.bankKeeper.BurnCoins(ctx, types.ModuleName, sdk.NewCoins(deposit)) + if err != nil { + return err + } + + err = EmitContractDeleteEvent(ctx, contractAddr) + if err != nil { + return err + } + return err } func (k Keeper) Logger(ctx sdk.Context) log.Logger { diff --git a/x/cosmwasmlifecycle/keeper/msg_server.go b/x/cosmwasmlifecycle/keeper/msg_server.go index bcd29c1..c17a523 100644 --- a/x/cosmwasmlifecycle/keeper/msg_server.go +++ b/x/cosmwasmlifecycle/keeper/msg_server.go @@ -20,14 +20,14 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { var _ types.MsgServer = msgServer{} -// CreateContract defines a method for creating a contract -func (msgServer msgServer) EnableBlockExecution(ctx context.Context, msg *types.MsgEnableBlockExecution) (res *types.MsgEnableBlockExecutionResponse, err error) { +// Enable a contract execution. +func (msgServer msgServer) EnableContractBlockExecution(ctx context.Context, msg *types.MsgEnableContractBlockExecution) (res *types.MsgEnableContractBlockExecutionResponse, err error) { return res, err } -// CreateContract defines a method for creating a contract -func (msgServer msgServer) DisableBlockExecution(ctx context.Context, msg *types.MsgDisableBlockExecution) (res *types.MsgDisableBlockExecutionResponse, err error) { +// Disable a contract execution and return the funds to the external account. +func (msgServer msgServer) DisableContractBlockExecution(ctx context.Context, msg *types.MsgDisableContractBlockExecution) (res *types.MsgDisableContractBlockExecutionResponse, err error) { return res, err } diff --git a/x/cosmwasmlifecycle/keeper/params.go b/x/cosmwasmlifecycle/keeper/params.go index 84ee5c7..dee0006 100644 --- a/x/cosmwasmlifecycle/keeper/params.go +++ b/x/cosmwasmlifecycle/keeper/params.go @@ -7,7 +7,7 @@ import ( func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { store := ctx.KVStore(k.storeKey) - bz := store.Get(types.ParamsKey) + bz := store.Get(types.ParamKey) if bz == nil { return } @@ -18,5 +18,5 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(¶ms) - store.Set(types.ParamsKey, bz) + store.Set(types.ParamKey, bz) } diff --git a/x/cosmwasmlifecycle/module.go b/x/cosmwasmlifecycle/module.go index 92c9899..2bc050c 100644 --- a/x/cosmwasmlifecycle/module.go +++ b/x/cosmwasmlifecycle/module.go @@ -122,15 +122,12 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.Ra var genState types.GenesisState // Initialize global index to index in genesis state cdc.MustUnmarshalJSON(gs, &genState) - - InitGenesis(ctx, am.keeper, genState) - - return []abci.ValidatorUpdate{} + return am.keeper.InitGenesis(ctx, genState) } // ExportGenesis returns the module's exported genesis state as raw JSON bytes. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - genState := ExportGenesis(ctx, am.keeper) + genState := am.keeper.ExportGenesis(ctx) return cdc.MustMarshalJSON(genState) } @@ -139,12 +136,18 @@ func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock contains the logic that is automatically triggered at the beginning of each block func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { - am.keeper.BeginBlock(ctx) + err := am.keeper.BeginBlock(ctx) + if err != nil { + panic(err) + } } // EndBlock contains the logic that is automatically triggered at the end of each block func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - am.keeper.EndBlock(ctx) + err := am.keeper.EndBlock(ctx) + if err != nil { + panic(err) + } return []abci.ValidatorUpdate{} } diff --git a/x/cosmwasmlifecycle/types/contract.go b/x/cosmwasmlifecycle/types/contract.go new file mode 100644 index 0000000..997e084 --- /dev/null +++ b/x/cosmwasmlifecycle/types/contract.go @@ -0,0 +1,17 @@ +package types + +// Can Execute returns true if the contract can be executed +// based on the module parameters, strikes and available deposits +func (c *Contract) CanExecute(p Params, executionType ExecutionType) bool { + hasTooManyStrikes := c.Strikes >= p.StrikesToDisableExecution + hasEnoughDeposits := c.Deposit.IsGTE(p.MinDeposit) + hasExecutionType := c.ExecutionType == ExecutionType_BEGIN_AND_END_BLOCK || c.ExecutionType == executionType + + return hasTooManyStrikes && hasEnoughDeposits && hasExecutionType +} + +// Check if the contract has enough strikes to disable execution +// based on the params of the module +func (c *Contract) HasEnoughStrikesToDisableExecution(strikesToDisabeExecution int64) bool { + return c.Strikes >= strikesToDisabeExecution +} diff --git a/x/cosmwasmlifecycle/types/contract.pb.go b/x/cosmwasmlifecycle/types/contract.pb.go new file mode 100644 index 0000000..be48e65 --- /dev/null +++ b/x/cosmwasmlifecycle/types/contract.pb.go @@ -0,0 +1,397 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmwasmlifecycle/contract.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Contract defines the parameters for the module. +type Contract struct { + // Amount of strikes that the contract has at the moment. + Strikes int64 `protobuf:"varint,1,opt,name=strikes,proto3" json:"strikes,omitempty"` + // Contract's execution type + ExecutionType ExecutionType `protobuf:"varint,2,opt,name=execution_type,json=executionType,proto3,enum=cosmwasmlifecycle.ExecutionType" json:"execution_type,omitempty"` + // Collateral deposited to the contract. + Deposit github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,3,opt,name=deposit,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"deposit"` +} + +func (m *Contract) Reset() { *m = Contract{} } +func (m *Contract) String() string { return proto.CompactTextString(m) } +func (*Contract) ProtoMessage() {} +func (*Contract) Descriptor() ([]byte, []int) { + return fileDescriptor_59daeaab22a14127, []int{0} +} +func (m *Contract) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Contract.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Contract) XXX_Merge(src proto.Message) { + xxx_messageInfo_Contract.Merge(m, src) +} +func (m *Contract) XXX_Size() int { + return m.Size() +} +func (m *Contract) XXX_DiscardUnknown() { + xxx_messageInfo_Contract.DiscardUnknown(m) +} + +var xxx_messageInfo_Contract proto.InternalMessageInfo + +func (m *Contract) GetStrikes() int64 { + if m != nil { + return m.Strikes + } + return 0 +} + +func (m *Contract) GetExecutionType() ExecutionType { + if m != nil { + return m.ExecutionType + } + return ExecutionType_BEGIN_AND_END_BLOCK +} + +func init() { + proto.RegisterType((*Contract)(nil), "cosmwasmlifecycle.Contract") +} + +func init() { proto.RegisterFile("cosmwasmlifecycle/contract.proto", fileDescriptor_59daeaab22a14127) } + +var fileDescriptor_59daeaab22a14127 = []byte{ + // 311 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x50, 0xc1, 0x4e, 0xc2, 0x40, + 0x14, 0xec, 0x4a, 0x22, 0xa6, 0x46, 0x12, 0x1b, 0x0f, 0x85, 0xc3, 0xd2, 0x78, 0x50, 0x2e, 0xec, + 0x06, 0xbc, 0xe8, 0xcd, 0x40, 0x8c, 0x77, 0xe2, 0x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, 0x6f, + 0xf7, 0x6d, 0xeb, 0x7b, 0xdf, 0xbe, 0x9d, 0x4a, 0xfd, 0xb6, 0x0c, 0x98, 0xc0, 0xc8, 0x94, 0x60, + 0x9e, 0xae, 0x0a, 0x67, 0x3c, 0x73, 0xa3, 0xf2, 0x81, 0x51, 0xb9, 0x7a, 0x30, 0xde, 0x1e, 0x28, + 0xd9, 0x1d, 0x28, 0xf9, 0x39, 0x50, 0xf2, 0x91, 0x52, 0x6b, 0x97, 0x52, 0xeb, 0x2b, 0xa5, 0xd6, + 0xf8, 0xf1, 0x68, 0x17, 0x44, 0x32, 0x84, 0xd5, 0xc3, 0x3d, 0x2f, 0x33, 0x74, 0xff, 0xca, 0x5a, + 0xf3, 0x6a, 0x81, 0xf9, 0xa5, 0xe0, 0x34, 0x2f, 0xee, 0xee, 0x37, 0x00, 0x00, 0xff, 0xff, 0xba, + 0xec, 0x75, 0x06, 0xe8, 0x01, 0x00, 0x00, +} + +func (m *Contract) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Contract) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Contract) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Deposit.Size() + i -= size + if _, err := m.Deposit.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintContract(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.ExecutionType != 0 { + i = encodeVarintContract(dAtA, i, uint64(m.ExecutionType)) + i-- + dAtA[i] = 0x10 + } + if m.Strikes != 0 { + i = encodeVarintContract(dAtA, i, uint64(m.Strikes)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintContract(dAtA []byte, offset int, v uint64) int { + offset -= sovContract(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Contract) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Strikes != 0 { + n += 1 + sovContract(uint64(m.Strikes)) + } + if m.ExecutionType != 0 { + n += 1 + sovContract(uint64(m.ExecutionType)) + } + l = m.Deposit.Size() + n += 1 + l + sovContract(uint64(l)) + return n +} + +func sovContract(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozContract(x uint64) (n int) { + return sovContract(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Contract) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContract + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Contract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Contract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Strikes", wireType) + } + m.Strikes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContract + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Strikes |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionType", wireType) + } + m.ExecutionType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContract + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExecutionType |= ExecutionType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContract + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthContract + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthContract + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipContract(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthContract + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipContract(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowContract + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowContract + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowContract + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthContract + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupContract + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthContract + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthContract = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowContract = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupContract = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/cosmwasmlifecycle/types/events.pb.go b/x/cosmwasmlifecycle/types/events.pb.go new file mode 100644 index 0000000..72a9a2f --- /dev/null +++ b/x/cosmwasmlifecycle/types/events.pb.go @@ -0,0 +1,682 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmwasmlifecycle/events.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ContractDeleteEvent struct { + ModuleName string `protobuf:"bytes,1,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"` + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` +} + +func (m *ContractDeleteEvent) Reset() { *m = ContractDeleteEvent{} } +func (m *ContractDeleteEvent) String() string { return proto.CompactTextString(m) } +func (*ContractDeleteEvent) ProtoMessage() {} +func (*ContractDeleteEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_3208364976a7e08c, []int{0} +} +func (m *ContractDeleteEvent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContractDeleteEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContractDeleteEvent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ContractDeleteEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContractDeleteEvent.Merge(m, src) +} +func (m *ContractDeleteEvent) XXX_Size() int { + return m.Size() +} +func (m *ContractDeleteEvent) XXX_DiscardUnknown() { + xxx_messageInfo_ContractDeleteEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_ContractDeleteEvent proto.InternalMessageInfo + +func (m *ContractDeleteEvent) GetModuleName() string { + if m != nil { + return m.ModuleName + } + return "" +} + +func (m *ContractDeleteEvent) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +type ContractStrikeEvent struct { + ModuleName string `protobuf:"bytes,1,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"` + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + CurrentStrike int64 `protobuf:"varint,3,opt,name=current_strike,json=currentStrike,proto3" json:"current_strike,omitempty"` + StrikeReason string `protobuf:"bytes,4,opt,name=strike_reason,json=strikeReason,proto3" json:"strike_reason,omitempty"` +} + +func (m *ContractStrikeEvent) Reset() { *m = ContractStrikeEvent{} } +func (m *ContractStrikeEvent) String() string { return proto.CompactTextString(m) } +func (*ContractStrikeEvent) ProtoMessage() {} +func (*ContractStrikeEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_3208364976a7e08c, []int{1} +} +func (m *ContractStrikeEvent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContractStrikeEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContractStrikeEvent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ContractStrikeEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContractStrikeEvent.Merge(m, src) +} +func (m *ContractStrikeEvent) XXX_Size() int { + return m.Size() +} +func (m *ContractStrikeEvent) XXX_DiscardUnknown() { + xxx_messageInfo_ContractStrikeEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_ContractStrikeEvent proto.InternalMessageInfo + +func (m *ContractStrikeEvent) GetModuleName() string { + if m != nil { + return m.ModuleName + } + return "" +} + +func (m *ContractStrikeEvent) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +func (m *ContractStrikeEvent) GetCurrentStrike() int64 { + if m != nil { + return m.CurrentStrike + } + return 0 +} + +func (m *ContractStrikeEvent) GetStrikeReason() string { + if m != nil { + return m.StrikeReason + } + return "" +} + +func init() { + proto.RegisterType((*ContractDeleteEvent)(nil), "cosmwasmlifecycle.ContractDeleteEvent") + proto.RegisterType((*ContractStrikeEvent)(nil), "cosmwasmlifecycle.ContractStrikeEvent") +} + +func init() { proto.RegisterFile("cosmwasmlifecycle/events.proto", fileDescriptor_3208364976a7e08c) } + +var fileDescriptor_3208364976a7e08c = []byte{ + // 296 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x91, 0xbf, 0x4e, 0xc3, 0x30, + 0x18, 0xc4, 0x63, 0x8a, 0x90, 0x30, 0x94, 0x3f, 0x81, 0x21, 0x30, 0x98, 0xaa, 0x08, 0xa9, 0x4b, + 0x9b, 0x81, 0x05, 0x36, 0x68, 0x61, 0x65, 0x08, 0x5b, 0x97, 0xc8, 0x75, 0x3e, 0x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fa, 0xc3, 0xef, 0x82, 0xa0, 0x79, 0x41, 0xd0, 0x5f, 0x41, 0xd0, 0x47, + 0x49, 0xbc, 0x79, 0x49, 0xbc, 0xdf, 0x92, 0x78, 0xc3, 0x9b, 0x71, 0x6a, 0x9e, 0xf3, 0x51, 0x8f, + 0x49, 0x1e, 0x02, 0x4f, 0x13, 0x98, 0x5e, 0x5f, 0x85, 0x8b, 0x89, 0xba, 0xcb, 0x0d, 0xdf, 0xc2, + 0xd5, 0x5d, 0xcd, 0x6c, 0x02, 0x7a, 0xb4, 0x65, 0x97, 0xba, 0xfc, 0x0f, 0x00, 0x00, 0xff, 0xff, + 0x08, 0xb1, 0xb8, 0x52, 0xf9, 0x01, 0x00, 0x00, +} + +func (m *ContractDeleteEvent) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContractDeleteEvent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContractDeleteEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.ModuleName) > 0 { + i -= len(m.ModuleName) + copy(dAtA[i:], m.ModuleName) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ModuleName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ContractStrikeEvent) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContractStrikeEvent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContractStrikeEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.StrikeReason) > 0 { + i -= len(m.StrikeReason) + copy(dAtA[i:], m.StrikeReason) + i = encodeVarintEvents(dAtA, i, uint64(len(m.StrikeReason))) + i-- + dAtA[i] = 0x22 + } + if m.CurrentStrike != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.CurrentStrike)) + i-- + dAtA[i] = 0x18 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.ModuleName) > 0 { + i -= len(m.ModuleName) + copy(dAtA[i:], m.ModuleName) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ModuleName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ContractDeleteEvent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ModuleName) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *ContractStrikeEvent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ModuleName) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.CurrentStrike != 0 { + n += 1 + sovEvents(uint64(m.CurrentStrike)) + } + l = len(m.StrikeReason) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ContractDeleteEvent) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContractDeleteEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContractDeleteEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ModuleName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ModuleName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContractStrikeEvent) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContractStrikeEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContractStrikeEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ModuleName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ModuleName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentStrike", wireType) + } + m.CurrentStrike = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CurrentStrike |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrikeReason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StrikeReason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/cosmwasmlifecycle/types/execution_type.pb.go b/x/cosmwasmlifecycle/types/execution_type.pb.go new file mode 100644 index 0000000..9039804 --- /dev/null +++ b/x/cosmwasmlifecycle/types/execution_type.pb.go @@ -0,0 +1,73 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmwasmlifecycle/execution_type.proto + +package types + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ExecutionType int32 + +const ( + ExecutionType_BEGIN_AND_END_BLOCK ExecutionType = 0 + ExecutionType_BEGIN_BLOCK ExecutionType = 1 + ExecutionType_END_BLOCK ExecutionType = 2 +) + +var ExecutionType_name = map[int32]string{ + 0: "BEGIN_AND_END_BLOCK", + 1: "BEGIN_BLOCK", + 2: "END_BLOCK", +} + +var ExecutionType_value = map[string]int32{ + "BEGIN_AND_END_BLOCK": 0, + "BEGIN_BLOCK": 1, + "END_BLOCK": 2, +} + +func (x ExecutionType) String() string { + return proto.EnumName(ExecutionType_name, int32(x)) +} + +func (ExecutionType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3845c7938ab27315, []int{0} +} + +func init() { + proto.RegisterEnum("cosmwasmlifecycle.ExecutionType", ExecutionType_name, ExecutionType_value) +} + +func init() { + proto.RegisterFile("cosmwasmlifecycle/execution_type.proto", fileDescriptor_3845c7938ab27315) +} + +var fileDescriptor_3845c7938ab27315 = []byte{ + // 188 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xce, 0x2f, 0xce, + 0x2d, 0x4f, 0x2c, 0xce, 0xcd, 0xc9, 0x4c, 0x4b, 0x4d, 0xae, 0x4c, 0xce, 0x49, 0xd5, 0x4f, 0xad, + 0x48, 0x4d, 0x2e, 0x2d, 0xc9, 0xcc, 0xcf, 0x8b, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0x2b, 0x28, 0xca, + 0x2f, 0xc9, 0x17, 0x12, 0xc4, 0x50, 0xa7, 0xe5, 0xc1, 0xc5, 0xeb, 0x0a, 0x53, 0x1a, 0x52, 0x59, + 0x90, 0x2a, 0x24, 0xce, 0x25, 0xec, 0xe4, 0xea, 0xee, 0xe9, 0x17, 0xef, 0xe8, 0xe7, 0x12, 0xef, + 0xea, 0xe7, 0x12, 0xef, 0xe4, 0xe3, 0xef, 0xec, 0x2d, 0xc0, 0x20, 0xc4, 0xcf, 0xc5, 0x0d, 0x91, + 0x80, 0x08, 0x30, 0x0a, 0xf1, 0x72, 0x71, 0x22, 0xe4, 0x99, 0x9c, 0xa2, 0x4e, 0x3c, 0x92, 0x63, + 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, + 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x21, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, + 0x3f, 0x57, 0x3f, 0x35, 0x37, 0x33, 0x25, 0xb5, 0xcc, 0xd2, 0x42, 0x1f, 0xe6, 0x14, 0x5d, 0x84, + 0x9b, 0x2b, 0xf4, 0x31, 0xfd, 0x01, 0x72, 0x7d, 0x71, 0x12, 0x1b, 0xd8, 0xfd, 0xc6, 0x80, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x12, 0xe9, 0xcb, 0x19, 0xe9, 0x00, 0x00, 0x00, +} diff --git a/x/cosmwasmlifecycle/types/expected_keepers.go b/x/cosmwasmlifecycle/types/expected_keepers.go index 6eb53f2..693d624 100644 --- a/x/cosmwasmlifecycle/types/expected_keepers.go +++ b/x/cosmwasmlifecycle/types/expected_keepers.go @@ -15,3 +15,9 @@ type WasmKeeper interface { // This is an extension point for some very advanced scenarios only. Use with care! Sudo(ctx sdk.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error) } + +type BankKeeper interface { + // BurnCoins burns coins deletes coins from the balance of the module account. + // It will panic if the module account does not exist or is unauthorized. + BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error +} diff --git a/x/cosmwasmlifecycle/types/genesis.pb.go b/x/cosmwasmlifecycle/types/genesis.pb.go index f6db6dd..41c2258 100644 --- a/x/cosmwasmlifecycle/types/genesis.pb.go +++ b/x/cosmwasmlifecycle/types/genesis.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -26,6 +27,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the cosmwasmlifecycle module's genesis state. type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // Contracts with their current information + // about the execution state. + Contracts []*Contract `protobuf:"bytes,2,rep,name=contracts,proto3" json:"contracts,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -68,6 +72,13 @@ func (m *GenesisState) GetParams() Params { return Params{} } +func (m *GenesisState) GetContracts() []*Contract { + if m != nil { + return m.Contracts + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "cosmwasmlifecycle.GenesisState") } @@ -75,20 +86,24 @@ func init() { func init() { proto.RegisterFile("cosmwasmlifecycle/genesis.proto", fileDescriptor_b4e03ab585a90b99) } var fileDescriptor_b4e03ab585a90b99 = []byte{ - // 197 bytes of a gzipped FileDescriptorProto + // 268 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce, 0x2d, 0x4f, 0x2c, 0xce, 0xcd, 0xc9, 0x4c, 0x4b, 0x4d, 0xae, 0x4c, 0xce, 0x49, 0xd5, 0x4f, 0x4f, 0xcd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 0xe3, 0x21, 0x12, 0x10, 0x0e, 0x54, 0x4a, 0x0e, 0xd3, 0x92, 0x82, 0xc4, 0xa2, 0xc4, + 0x5c, 0x98, 0xbc, 0x02, 0xa6, 0x7c, 0x72, 0x7e, 0x5e, 0x49, 0x51, 0x62, 0x72, 0x09, 0x44, 0x85, + 0xd2, 0x1c, 0x46, 0x2e, 0x1e, 0x77, 0x88, 0xbb, 0x82, 0x4b, 0x12, 0x4b, 0x52, 0x85, 0xcc, 0xb9, + 0xd8, 0x20, 0x46, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x49, 0xea, 0x61, 0x98, 0xa1, 0x17, + 0x00, 0x56, 0xe0, 0xc4, 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x54, 0xb9, 0x50, 0x30, 0x17, 0x27, + 0xcc, 0xec, 0x62, 0x09, 0x26, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x69, 0x2c, 0x7a, 0x9d, 0xa1, 0x6a, + 0x9c, 0x24, 0x2e, 0x6d, 0xd1, 0x15, 0x81, 0xfa, 0xc6, 0x31, 0x25, 0xa5, 0x28, 0xb5, 0xb8, 0x38, + 0xb8, 0xa4, 0x28, 0x33, 0x2f, 0x3d, 0x08, 0x61, 0x8e, 0x53, 0xd4, 0x89, 0x47, 0x72, 0x8c, 0x17, + 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, + 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x39, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, + 0xea, 0xa7, 0xe6, 0x66, 0xa6, 0xa4, 0x96, 0x59, 0x5a, 0xe8, 0xc3, 0xac, 0xd3, 0x45, 0xf8, 0xb7, + 0x42, 0x1f, 0x33, 0x0c, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x21, 0x60, 0x0c, 0x08, + 0x00, 0x00, 0xff, 0xff, 0x87, 0xd0, 0xbc, 0xe4, 0xaa, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -111,6 +126,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Contracts) > 0 { + for iNdEx := len(m.Contracts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Contracts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -143,6 +172,12 @@ func (m *GenesisState) Size() (n int) { _ = l l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) + if len(m.Contracts) > 0 { + for _, e := range m.Contracts { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -214,6 +249,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Contracts = append(m.Contracts, &Contract{}) + if err := m.Contracts[len(m.Contracts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/cosmwasmlifecycle/types/keys.go b/x/cosmwasmlifecycle/types/keys.go index 01d0d29..bd6bc50 100644 --- a/x/cosmwasmlifecycle/types/keys.go +++ b/x/cosmwasmlifecycle/types/keys.go @@ -1,5 +1,10 @@ package types +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" +) + const ( // ModuleName defines the module name ModuleName = "cosmwasmlifecycle" @@ -15,10 +20,15 @@ const ( ) var ( - ParamsKey = []byte{0x01} - StrikesKey = []byte{0x02} + ParamKey = []byte{0x01} + ContractKey = []byte{0x02} ) func KeyPrefix(p string) []byte { return []byte(p) } + +// GetContractKeyByAddress returns the key for the contract +func GetContractKeyByAddress(contractAddr sdk.AccAddress) []byte { + return append(ContractKey, address.MustLengthPrefix(contractAddr)...) +} diff --git a/x/cosmwasmlifecycle/types/params.pb.go b/x/cosmwasmlifecycle/types/params.pb.go index ff89aff..f718f28 100644 --- a/x/cosmwasmlifecycle/types/params.pb.go +++ b/x/cosmwasmlifecycle/types/params.pb.go @@ -5,7 +5,6 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -38,12 +37,6 @@ type Params struct { // disabled from end and beging block executions. // When this happens the min_desposit will also be burned. StrikesToDisableExecution int64 `protobuf:"varint,3,opt,name=strikes_to_disable_execution,json=strikesToDisableExecution,proto3" json:"strikes_to_disable_execution,omitempty"` - // Contract Addresses that will execute "{"begin_block": {}}" - // as sudo at the begining of each block - BeginBlockExecution []string `protobuf:"bytes,4,rep,name=begin_block_execution,json=beginBlockExecution,proto3" json:"begin_block_execution,omitempty"` - // Contract Addresses that will execute "{"end_block": {}}" - // as sudo at the end of each block - EndBlockExecution []string `protobuf:"bytes,5,rep,name=end_block_execution,json=endBlockExecution,proto3" json:"end_block_execution,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -92,20 +85,6 @@ func (m *Params) GetStrikesToDisableExecution() int64 { return 0 } -func (m *Params) GetBeginBlockExecution() []string { - if m != nil { - return m.BeginBlockExecution - } - return nil -} - -func (m *Params) GetEndBlockExecution() []string { - if m != nil { - return m.EndBlockExecution - } - return nil -} - func init() { proto.RegisterType((*Params)(nil), "cosmwasmlifecycle.Params") } @@ -113,32 +92,28 @@ func init() { func init() { proto.RegisterFile("cosmwasmlifecycle/params.proto", fileDescriptor_d96aa1bf4f8b3eba) } var fileDescriptor_d96aa1bf4f8b3eba = []byte{ - // 400 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xb1, 0x8e, 0xd3, 0x40, - 0x10, 0x86, 0xed, 0xcb, 0x71, 0xe2, 0xf6, 0xaa, 0x73, 0x82, 0xe4, 0x44, 0xb0, 0xb1, 0x68, 0x70, - 0x13, 0xaf, 0x02, 0x0d, 0xd0, 0x00, 0x26, 0x91, 0x28, 0x28, 0x90, 0xa1, 0x4a, 0x63, 0xd9, 0xde, - 0xc1, 0xac, 0x6c, 0xef, 0x5a, 0xde, 0x4d, 0x48, 0xde, 0x82, 0x92, 0x92, 0x87, 0xe0, 0x21, 0x52, - 0x46, 0x54, 0x88, 0x22, 0x42, 0xc9, 0x23, 0xf0, 0x02, 0xc8, 0x5e, 0x47, 0x09, 0x4a, 0x41, 0x65, - 0x8f, 0xff, 0xff, 0xff, 0x66, 0x34, 0x1e, 0x84, 0x13, 0x21, 0x8b, 0xcf, 0x91, 0x2c, 0x72, 0xf6, - 0x11, 0x92, 0x55, 0x92, 0x03, 0x29, 0xa3, 0x2a, 0x2a, 0xa4, 0x57, 0x56, 0x42, 0x09, 0xeb, 0xf6, - 0x4c, 0x1f, 0xf4, 0x52, 0x91, 0x8a, 0x46, 0x25, 0xf5, 0x9b, 0x36, 0x0e, 0xfa, 0xb5, 0x51, 0xc8, - 0x50, 0x0b, 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0xf3, 0xeb, 0xd4, 0x91, 0xf6, 0x06, 0x75, 0x81, - 0xd3, 0x33, 0xd6, 0x9d, 0xff, 0xb0, 0x6e, 0x81, 0xd3, 0x7f, 0x49, 0xcf, 0x2f, 0xbf, 0x7e, 0x1b, - 0x1a, 0xfe, 0x6c, 0xbd, 0xc3, 0xe6, 0x66, 0x87, 0xcd, 0xdf, 0x3b, 0x6c, 0x7e, 0xd9, 0x63, 0x63, - 0xb3, 0xc7, 0xc6, 0xcf, 0x3d, 0x36, 0x66, 0x2f, 0x4f, 0xb6, 0x05, 0x05, 0xa3, 0xb0, 0x78, 0xf6, - 0x94, 0x1c, 0xee, 0x60, 0x74, 0x3c, 0x94, 0x25, 0x39, 0x3f, 0x9e, 0x66, 0x97, 0xf1, 0x55, 0xf3, - 0x63, 0x9f, 0xfc, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x45, 0xd3, 0x5d, 0x5e, 0x02, 0x00, 0x00, + // 321 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xbf, 0x4e, 0x32, 0x41, + 0x14, 0xc5, 0x77, 0x3e, 0xbe, 0x10, 0x1d, 0x2a, 0x37, 0x16, 0x40, 0x74, 0x20, 0x36, 0xd2, 0xb0, + 0x13, 0xb4, 0x51, 0x1b, 0x0d, 0x42, 0x6f, 0x88, 0x15, 0xcd, 0x66, 0xff, 0x8c, 0x78, 0x03, 0xb3, + 0x77, 0xc3, 0x1d, 0x10, 0xde, 0xc2, 0xd2, 0xd2, 0xc7, 0xa1, 0xa4, 0x34, 0x9a, 0x10, 0x03, 0x2f, + 0x62, 0xd8, 0x59, 0xa2, 0x09, 0xd5, 0x4c, 0xee, 0x39, 0xf7, 0x97, 0x93, 0x73, 0xb9, 0x88, 0x90, + 0xf4, 0x4b, 0x40, 0x7a, 0x04, 0x4f, 0x2a, 0x9a, 0x47, 0x23, 0x25, 0xd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ce, 0x72, 0x23, 0x9c, 0x8f, 0x8d, 0x70, 0xfa, 0x77, 0x7f, 0x52, 0x29, 0x0d, 0xb1, + 0x9a, 0x5e, 0x5f, 0xc9, 0x5d, 0xa9, 0xcd, 0xdf, 0xd6, 0x67, 0x72, 0xff, 0x12, 0x59, 0xe6, 0xb0, + 0x98, 0x15, 0x78, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x77, 0x33, 0x57, 0x6e, 0xab, 0x01, 0x00, + 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -161,24 +136,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.EndBlockExecution) > 0 { - for iNdEx := len(m.EndBlockExecution) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.EndBlockExecution[iNdEx]) - copy(dAtA[i:], m.EndBlockExecution[iNdEx]) - i = encodeVarintParams(dAtA, i, uint64(len(m.EndBlockExecution[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.BeginBlockExecution) > 0 { - for iNdEx := len(m.BeginBlockExecution) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.BeginBlockExecution[iNdEx]) - copy(dAtA[i:], m.BeginBlockExecution[iNdEx]) - i = encodeVarintParams(dAtA, i, uint64(len(m.BeginBlockExecution[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } if m.StrikesToDisableExecution != 0 { i = encodeVarintParams(dAtA, i, uint64(m.StrikesToDisableExecution)) i-- @@ -232,18 +189,6 @@ func (m *Params) Size() (n int) { if m.StrikesToDisableExecution != 0 { n += 1 + sovParams(uint64(m.StrikesToDisableExecution)) } - if len(m.BeginBlockExecution) > 0 { - for _, s := range m.BeginBlockExecution { - l = len(s) - n += 1 + l + sovParams(uint64(l)) - } - } - if len(m.EndBlockExecution) > 0 { - for _, s := range m.EndBlockExecution { - l = len(s) - n += 1 + l + sovParams(uint64(l)) - } - } return n } @@ -354,70 +299,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BeginBlockExecution", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BeginBlockExecution = append(m.BeginBlockExecution, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndBlockExecution", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EndBlockExecution = append(m.EndBlockExecution, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/cosmwasmlifecycle/types/tx.pb.go b/x/cosmwasmlifecycle/types/tx.pb.go index 2bf43e1..11b7a20 100644 --- a/x/cosmwasmlifecycle/types/tx.pb.go +++ b/x/cosmwasmlifecycle/types/tx.pb.go @@ -29,48 +29,23 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type ExecutionType int32 - -const ( - ExecutionType_BEGIN_BLOCK ExecutionType = 0 - ExecutionType_END_BLOCK ExecutionType = 1 -) - -var ExecutionType_name = map[int32]string{ - 0: "BEGIN_BLOCK", - 1: "END_BLOCK", -} - -var ExecutionType_value = map[string]int32{ - "BEGIN_BLOCK": 0, - "END_BLOCK": 1, -} - -func (x ExecutionType) String() string { - return proto.EnumName(ExecutionType_name, int32(x)) -} - -func (ExecutionType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5a8c9d0c2a02a50a, []int{0} -} - -type MsgEnableBlockExecution struct { +type MsgEnableContractBlockExecution struct { ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` Execution ExecutionType `protobuf:"varint,2,opt,name=execution,proto3,enum=cosmwasmlifecycle.ExecutionType" json:"execution,omitempty"` } -func (m *MsgEnableBlockExecution) Reset() { *m = MsgEnableBlockExecution{} } -func (m *MsgEnableBlockExecution) String() string { return proto.CompactTextString(m) } -func (*MsgEnableBlockExecution) ProtoMessage() {} -func (*MsgEnableBlockExecution) Descriptor() ([]byte, []int) { +func (m *MsgEnableContractBlockExecution) Reset() { *m = MsgEnableContractBlockExecution{} } +func (m *MsgEnableContractBlockExecution) String() string { return proto.CompactTextString(m) } +func (*MsgEnableContractBlockExecution) ProtoMessage() {} +func (*MsgEnableContractBlockExecution) Descriptor() ([]byte, []int) { return fileDescriptor_5a8c9d0c2a02a50a, []int{0} } -func (m *MsgEnableBlockExecution) XXX_Unmarshal(b []byte) error { +func (m *MsgEnableContractBlockExecution) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgEnableBlockExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgEnableContractBlockExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgEnableBlockExecution.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgEnableContractBlockExecution.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -80,33 +55,49 @@ func (m *MsgEnableBlockExecution) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *MsgEnableBlockExecution) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgEnableBlockExecution.Merge(m, src) +func (m *MsgEnableContractBlockExecution) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEnableContractBlockExecution.Merge(m, src) } -func (m *MsgEnableBlockExecution) XXX_Size() int { +func (m *MsgEnableContractBlockExecution) XXX_Size() int { return m.Size() } -func (m *MsgEnableBlockExecution) XXX_DiscardUnknown() { - xxx_messageInfo_MsgEnableBlockExecution.DiscardUnknown(m) +func (m *MsgEnableContractBlockExecution) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEnableContractBlockExecution.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEnableContractBlockExecution proto.InternalMessageInfo + +func (m *MsgEnableContractBlockExecution) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" } -var xxx_messageInfo_MsgEnableBlockExecution proto.InternalMessageInfo +func (m *MsgEnableContractBlockExecution) GetExecution() ExecutionType { + if m != nil { + return m.Execution + } + return ExecutionType_BEGIN_AND_END_BLOCK +} -type MsgEnableBlockExecutionResponse struct { +type MsgEnableContractBlockExecutionResponse struct { } -func (m *MsgEnableBlockExecutionResponse) Reset() { *m = MsgEnableBlockExecutionResponse{} } -func (m *MsgEnableBlockExecutionResponse) String() string { return proto.CompactTextString(m) } -func (*MsgEnableBlockExecutionResponse) ProtoMessage() {} -func (*MsgEnableBlockExecutionResponse) Descriptor() ([]byte, []int) { +func (m *MsgEnableContractBlockExecutionResponse) Reset() { + *m = MsgEnableContractBlockExecutionResponse{} +} +func (m *MsgEnableContractBlockExecutionResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEnableContractBlockExecutionResponse) ProtoMessage() {} +func (*MsgEnableContractBlockExecutionResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5a8c9d0c2a02a50a, []int{1} } -func (m *MsgEnableBlockExecutionResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgEnableContractBlockExecutionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgEnableBlockExecutionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgEnableContractBlockExecutionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgEnableBlockExecutionResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgEnableContractBlockExecutionResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -116,35 +107,35 @@ func (m *MsgEnableBlockExecutionResponse) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } -func (m *MsgEnableBlockExecutionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgEnableBlockExecutionResponse.Merge(m, src) +func (m *MsgEnableContractBlockExecutionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEnableContractBlockExecutionResponse.Merge(m, src) } -func (m *MsgEnableBlockExecutionResponse) XXX_Size() int { +func (m *MsgEnableContractBlockExecutionResponse) XXX_Size() int { return m.Size() } -func (m *MsgEnableBlockExecutionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgEnableBlockExecutionResponse.DiscardUnknown(m) +func (m *MsgEnableContractBlockExecutionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEnableContractBlockExecutionResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgEnableBlockExecutionResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgEnableContractBlockExecutionResponse proto.InternalMessageInfo -type MsgDisableBlockExecution struct { +type MsgDisableContractBlockExecution struct { ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` Execution ExecutionType `protobuf:"varint,2,opt,name=execution,proto3,enum=cosmwasmlifecycle.ExecutionType" json:"execution,omitempty"` } -func (m *MsgDisableBlockExecution) Reset() { *m = MsgDisableBlockExecution{} } -func (m *MsgDisableBlockExecution) String() string { return proto.CompactTextString(m) } -func (*MsgDisableBlockExecution) ProtoMessage() {} -func (*MsgDisableBlockExecution) Descriptor() ([]byte, []int) { +func (m *MsgDisableContractBlockExecution) Reset() { *m = MsgDisableContractBlockExecution{} } +func (m *MsgDisableContractBlockExecution) String() string { return proto.CompactTextString(m) } +func (*MsgDisableContractBlockExecution) ProtoMessage() {} +func (*MsgDisableContractBlockExecution) Descriptor() ([]byte, []int) { return fileDescriptor_5a8c9d0c2a02a50a, []int{2} } -func (m *MsgDisableBlockExecution) XXX_Unmarshal(b []byte) error { +func (m *MsgDisableContractBlockExecution) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgDisableBlockExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgDisableContractBlockExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgDisableBlockExecution.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgDisableContractBlockExecution.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -154,33 +145,49 @@ func (m *MsgDisableBlockExecution) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *MsgDisableBlockExecution) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDisableBlockExecution.Merge(m, src) +func (m *MsgDisableContractBlockExecution) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDisableContractBlockExecution.Merge(m, src) } -func (m *MsgDisableBlockExecution) XXX_Size() int { +func (m *MsgDisableContractBlockExecution) XXX_Size() int { return m.Size() } -func (m *MsgDisableBlockExecution) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDisableBlockExecution.DiscardUnknown(m) +func (m *MsgDisableContractBlockExecution) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDisableContractBlockExecution.DiscardUnknown(m) } -var xxx_messageInfo_MsgDisableBlockExecution proto.InternalMessageInfo +var xxx_messageInfo_MsgDisableContractBlockExecution proto.InternalMessageInfo -type MsgDisableBlockExecutionResponse struct { +func (m *MsgDisableContractBlockExecution) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" } -func (m *MsgDisableBlockExecutionResponse) Reset() { *m = MsgDisableBlockExecutionResponse{} } -func (m *MsgDisableBlockExecutionResponse) String() string { return proto.CompactTextString(m) } -func (*MsgDisableBlockExecutionResponse) ProtoMessage() {} -func (*MsgDisableBlockExecutionResponse) Descriptor() ([]byte, []int) { +func (m *MsgDisableContractBlockExecution) GetExecution() ExecutionType { + if m != nil { + return m.Execution + } + return ExecutionType_BEGIN_AND_END_BLOCK +} + +type MsgDisableContractBlockExecutionResponse struct { +} + +func (m *MsgDisableContractBlockExecutionResponse) Reset() { + *m = MsgDisableContractBlockExecutionResponse{} +} +func (m *MsgDisableContractBlockExecutionResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDisableContractBlockExecutionResponse) ProtoMessage() {} +func (*MsgDisableContractBlockExecutionResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5a8c9d0c2a02a50a, []int{3} } -func (m *MsgDisableBlockExecutionResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgDisableContractBlockExecutionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgDisableBlockExecutionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgDisableContractBlockExecutionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgDisableBlockExecutionResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgDisableContractBlockExecutionResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -190,55 +197,107 @@ func (m *MsgDisableBlockExecutionResponse) XXX_Marshal(b []byte, deterministic b return b[:n], nil } } -func (m *MsgDisableBlockExecutionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDisableBlockExecutionResponse.Merge(m, src) +func (m *MsgDisableContractBlockExecutionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDisableContractBlockExecutionResponse.Merge(m, src) } -func (m *MsgDisableBlockExecutionResponse) XXX_Size() int { +func (m *MsgDisableContractBlockExecutionResponse) XXX_Size() int { return m.Size() } -func (m *MsgDisableBlockExecutionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDisableBlockExecutionResponse.DiscardUnknown(m) +func (m *MsgDisableContractBlockExecutionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDisableContractBlockExecutionResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgDisableBlockExecutionResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgDisableContractBlockExecutionResponse proto.InternalMessageInfo func init() { - proto.RegisterEnum("cosmwasmlifecycle.ExecutionType", ExecutionType_name, ExecutionType_value) - proto.RegisterType((*MsgEnableBlockExecution)(nil), "cosmwasmlifecycle.MsgEnableBlockExecution") - proto.RegisterType((*MsgEnableBlockExecutionResponse)(nil), "cosmwasmlifecycle.MsgEnableBlockExecutionResponse") - proto.RegisterType((*MsgDisableBlockExecution)(nil), "cosmwasmlifecycle.MsgDisableBlockExecution") - proto.RegisterType((*MsgDisableBlockExecutionResponse)(nil), "cosmwasmlifecycle.MsgDisableBlockExecutionResponse") + proto.RegisterType((*MsgEnableContractBlockExecution)(nil), "cosmwasmlifecycle.MsgEnableContractBlockExecution") + proto.RegisterType((*MsgEnableContractBlockExecutionResponse)(nil), "cosmwasmlifecycle.MsgEnableContractBlockExecutionResponse") + proto.RegisterType((*MsgDisableContractBlockExecution)(nil), "cosmwasmlifecycle.MsgDisableContractBlockExecution") + proto.RegisterType((*MsgDisableContractBlockExecutionResponse)(nil), "cosmwasmlifecycle.MsgDisableContractBlockExecutionResponse") } func init() { proto.RegisterFile("cosmwasmlifecycle/tx.proto", fileDescriptor_5a8c9d0c2a02a50a) } var fileDescriptor_5a8c9d0c2a02a50a = []byte{ - // 389 bytes of a gzipped FileDescriptorProto + // 367 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xce, 0x2f, 0xce, 0x2d, 0x4f, 0x2c, 0xce, 0xcd, 0xc9, 0x4c, 0x4b, 0x4d, 0xae, 0x4c, 0xce, 0x49, 0xd5, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xc4, 0x90, 0x93, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xea, 0x83, 0x58, 0x10, 0x85, 0x52, 0x92, 0x20, 0x85, 0xf9, 0xc5, 0xf1, 0x10, 0x09, - 0x08, 0x07, 0x22, 0xa5, 0xb4, 0x8e, 0x91, 0x4b, 0xdc, 0xb7, 0x38, 0xdd, 0x35, 0x2f, 0x31, 0x29, - 0x27, 0xd5, 0x29, 0x27, 0x3f, 0x39, 0xdb, 0xb5, 0x22, 0x35, 0xb9, 0xb4, 0x24, 0x33, 0x3f, 0x4f, - 0xc8, 0x99, 0x4b, 0x20, 0x39, 0x3f, 0xaf, 0xa4, 0x28, 0x31, 0xb9, 0x24, 0x3e, 0x31, 0x25, 0xa5, - 0x28, 0xb5, 0xb8, 0x58, 0x82, 0x51, 0x81, 0x51, 0x83, 0xd3, 0x49, 0xe2, 0xd2, 0x16, 0x5d, 0x11, - 0xa8, 0x39, 0x8e, 0x10, 0x99, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x7e, 0x98, 0x0e, 0xa8, - 0xb0, 0x90, 0x0b, 0x17, 0x67, 0x2a, 0xcc, 0x44, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x3e, 0x23, 0x05, - 0x3d, 0x0c, 0x87, 0xeb, 0xc1, 0x6d, 0x0d, 0xa9, 0x2c, 0x48, 0x75, 0x62, 0x39, 0x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xf4, 0x61, 0x36, 0xe8, 0x22, 0x32, 0x59, 0x85, 0x3e, 0x96, 0x8c, 0x57, 0x59, 0x90, - 0x5a, 0x9c, 0xc4, 0x06, 0xce, 0x38, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xf8, 0x8a, - 0x52, 0x9a, 0x03, 0x00, 0x00, + 0x08, 0x07, 0x2a, 0xa5, 0x86, 0x69, 0x7e, 0x6a, 0x45, 0x6a, 0x72, 0x69, 0x49, 0x66, 0x7e, 0x5e, + 0x7c, 0x49, 0x65, 0x41, 0x2a, 0x44, 0x9d, 0xd2, 0x06, 0x46, 0x2e, 0x79, 0xdf, 0xe2, 0x74, 0xd7, + 0xbc, 0xc4, 0xa4, 0x9c, 0x54, 0xe7, 0xfc, 0xbc, 0x92, 0xa2, 0xc4, 0xe4, 0x12, 0xa7, 0x9c, 0xfc, + 0xe4, 0x6c, 0x57, 0x98, 0x72, 0x21, 0x67, 0x2e, 0x81, 0x64, 0xa8, 0x4c, 0x7c, 0x62, 0x4a, 0x4a, + 0x51, 0x6a, 0x71, 0xb1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xa7, 0x93, 0xc4, 0xa5, 0x2d, 0xba, 0x22, + 0x50, 0x7b, 0x1d, 0x21, 0x32, 0xc1, 0x25, 0x45, 0x99, 0x79, 0xe9, 0x41, 0xfc, 0x30, 0x1d, 0x50, + 0x61, 0x21, 0x3b, 0x2e, 0x4e, 0xb8, 0x03, 0x24, 0x98, 0x14, 0x18, 0x35, 0xf8, 0x8c, 0x14, 0xf4, + 0x30, 0x1c, 0xa9, 0x07, 0xb7, 0x35, 0xa4, 0xb2, 0x20, 0x35, 0x08, 0xa1, 0xc5, 0x8a, 0xa3, 0x63, + 0x81, 0x3c, 0xe3, 0x8b, 0x05, 0xf2, 0x8c, 0x4a, 0x9a, 0x5c, 0xea, 0x04, 0x5c, 0x1c, 0x94, 0x5a, + 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0xaa, 0xb4, 0x91, 0x91, 0x4b, 0xc1, 0xb7, 0x38, 0xdd, 0x25, 0xb3, + 0x78, 0xe8, 0x78, 0x4f, 0x8b, 0x4b, 0x83, 0x90, 0x93, 0x61, 0xfe, 0x33, 0x5a, 0xc5, 0xc4, 0xc5, + 0xec, 0x5b, 0x9c, 0x2e, 0xd4, 0xc7, 0xc8, 0x25, 0x83, 0x37, 0x0a, 0x8d, 0xb0, 0xb8, 0x85, 0x40, + 0x20, 0x4a, 0x59, 0x91, 0xae, 0x07, 0xe6, 0x30, 0xa1, 0x89, 0x8c, 0x5c, 0xb2, 0xf8, 0x43, 0xdd, + 0x18, 0xbb, 0xe9, 0x78, 0x35, 0x49, 0x59, 0x93, 0xa1, 0x09, 0xe6, 0x26, 0xa7, 0xa8, 0x13, 0x8f, + 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, + 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x72, 0x48, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, + 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcd, 0xcd, 0x4c, 0x49, 0x2d, 0xb3, 0xb4, 0xd0, 0x87, 0xd9, 0xa4, + 0x8b, 0xc8, 0x41, 0x15, 0xfa, 0x58, 0x72, 0x6d, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x37, + 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x98, 0x98, 0x96, 0xd8, 0xd7, 0x03, 0x00, 0x00, +} + +func (this *MsgEnableContractBlockExecution) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgEnableContractBlockExecution) + if !ok { + that2, ok := that.(MsgEnableContractBlockExecution) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ContractAddress != that1.ContractAddress { + return false + } + if this.Execution != that1.Execution { + return false + } + return true +} +func (this *MsgDisableContractBlockExecution) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgDisableContractBlockExecution) + if !ok { + that2, ok := that.(MsgDisableContractBlockExecution) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ContractAddress != that1.ContractAddress { + return false + } + if this.Execution != that1.Execution { + return false + } + return true } // Reference imports to suppress errors if they are not otherwise used. @@ -253,8 +312,8 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { - EnableBlockExecution(ctx context.Context, in *MsgEnableBlockExecution, opts ...grpc.CallOption) (*MsgEnableBlockExecutionResponse, error) - DisableBlockExecution(ctx context.Context, in *MsgDisableBlockExecution, opts ...grpc.CallOption) (*MsgDisableBlockExecutionResponse, error) + EnableContractBlockExecution(ctx context.Context, in *MsgEnableContractBlockExecution, opts ...grpc.CallOption) (*MsgEnableContractBlockExecutionResponse, error) + DisableContractBlockExecution(ctx context.Context, in *MsgDisableContractBlockExecution, opts ...grpc.CallOption) (*MsgDisableContractBlockExecutionResponse, error) } type msgClient struct { @@ -265,18 +324,18 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) EnableBlockExecution(ctx context.Context, in *MsgEnableBlockExecution, opts ...grpc.CallOption) (*MsgEnableBlockExecutionResponse, error) { - out := new(MsgEnableBlockExecutionResponse) - err := c.cc.Invoke(ctx, "/cosmwasmlifecycle.Msg/EnableBlockExecution", in, out, opts...) +func (c *msgClient) EnableContractBlockExecution(ctx context.Context, in *MsgEnableContractBlockExecution, opts ...grpc.CallOption) (*MsgEnableContractBlockExecutionResponse, error) { + out := new(MsgEnableContractBlockExecutionResponse) + err := c.cc.Invoke(ctx, "/cosmwasmlifecycle.Msg/EnableContractBlockExecution", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) DisableBlockExecution(ctx context.Context, in *MsgDisableBlockExecution, opts ...grpc.CallOption) (*MsgDisableBlockExecutionResponse, error) { - out := new(MsgDisableBlockExecutionResponse) - err := c.cc.Invoke(ctx, "/cosmwasmlifecycle.Msg/DisableBlockExecution", in, out, opts...) +func (c *msgClient) DisableContractBlockExecution(ctx context.Context, in *MsgDisableContractBlockExecution, opts ...grpc.CallOption) (*MsgDisableContractBlockExecutionResponse, error) { + out := new(MsgDisableContractBlockExecutionResponse) + err := c.cc.Invoke(ctx, "/cosmwasmlifecycle.Msg/DisableContractBlockExecution", in, out, opts...) if err != nil { return nil, err } @@ -285,57 +344,57 @@ func (c *msgClient) DisableBlockExecution(ctx context.Context, in *MsgDisableBlo // MsgServer is the server API for Msg service. type MsgServer interface { - EnableBlockExecution(context.Context, *MsgEnableBlockExecution) (*MsgEnableBlockExecutionResponse, error) - DisableBlockExecution(context.Context, *MsgDisableBlockExecution) (*MsgDisableBlockExecutionResponse, error) + EnableContractBlockExecution(context.Context, *MsgEnableContractBlockExecution) (*MsgEnableContractBlockExecutionResponse, error) + DisableContractBlockExecution(context.Context, *MsgDisableContractBlockExecution) (*MsgDisableContractBlockExecutionResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) EnableBlockExecution(ctx context.Context, req *MsgEnableBlockExecution) (*MsgEnableBlockExecutionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EnableBlockExecution not implemented") +func (*UnimplementedMsgServer) EnableContractBlockExecution(ctx context.Context, req *MsgEnableContractBlockExecution) (*MsgEnableContractBlockExecutionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EnableContractBlockExecution not implemented") } -func (*UnimplementedMsgServer) DisableBlockExecution(ctx context.Context, req *MsgDisableBlockExecution) (*MsgDisableBlockExecutionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DisableBlockExecution not implemented") +func (*UnimplementedMsgServer) DisableContractBlockExecution(ctx context.Context, req *MsgDisableContractBlockExecution) (*MsgDisableContractBlockExecutionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DisableContractBlockExecution not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } -func _Msg_EnableBlockExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgEnableBlockExecution) +func _Msg_EnableContractBlockExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEnableContractBlockExecution) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).EnableBlockExecution(ctx, in) + return srv.(MsgServer).EnableContractBlockExecution(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmwasmlifecycle.Msg/EnableBlockExecution", + FullMethod: "/cosmwasmlifecycle.Msg/EnableContractBlockExecution", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).EnableBlockExecution(ctx, req.(*MsgEnableBlockExecution)) + return srv.(MsgServer).EnableContractBlockExecution(ctx, req.(*MsgEnableContractBlockExecution)) } return interceptor(ctx, in, info, handler) } -func _Msg_DisableBlockExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDisableBlockExecution) +func _Msg_DisableContractBlockExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDisableContractBlockExecution) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).DisableBlockExecution(ctx, in) + return srv.(MsgServer).DisableContractBlockExecution(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmwasmlifecycle.Msg/DisableBlockExecution", + FullMethod: "/cosmwasmlifecycle.Msg/DisableContractBlockExecution", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DisableBlockExecution(ctx, req.(*MsgDisableBlockExecution)) + return srv.(MsgServer).DisableContractBlockExecution(ctx, req.(*MsgDisableContractBlockExecution)) } return interceptor(ctx, in, info, handler) } @@ -345,19 +404,19 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "EnableBlockExecution", - Handler: _Msg_EnableBlockExecution_Handler, + MethodName: "EnableContractBlockExecution", + Handler: _Msg_EnableContractBlockExecution_Handler, }, { - MethodName: "DisableBlockExecution", - Handler: _Msg_DisableBlockExecution_Handler, + MethodName: "DisableContractBlockExecution", + Handler: _Msg_DisableContractBlockExecution_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmwasmlifecycle/tx.proto", } -func (m *MsgEnableBlockExecution) Marshal() (dAtA []byte, err error) { +func (m *MsgEnableContractBlockExecution) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -367,12 +426,12 @@ func (m *MsgEnableBlockExecution) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgEnableBlockExecution) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgEnableContractBlockExecution) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgEnableBlockExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgEnableContractBlockExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -392,7 +451,7 @@ func (m *MsgEnableBlockExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgEnableBlockExecutionResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgEnableContractBlockExecutionResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -402,12 +461,12 @@ func (m *MsgEnableBlockExecutionResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgEnableBlockExecutionResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgEnableContractBlockExecutionResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgEnableBlockExecutionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgEnableContractBlockExecutionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -415,7 +474,7 @@ func (m *MsgEnableBlockExecutionResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } -func (m *MsgDisableBlockExecution) Marshal() (dAtA []byte, err error) { +func (m *MsgDisableContractBlockExecution) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -425,12 +484,12 @@ func (m *MsgDisableBlockExecution) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgDisableBlockExecution) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgDisableContractBlockExecution) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDisableBlockExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgDisableContractBlockExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -450,7 +509,7 @@ func (m *MsgDisableBlockExecution) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgDisableBlockExecutionResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgDisableContractBlockExecutionResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -460,12 +519,12 @@ func (m *MsgDisableBlockExecutionResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgDisableBlockExecutionResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgDisableContractBlockExecutionResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDisableBlockExecutionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgDisableContractBlockExecutionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -484,7 +543,7 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MsgEnableBlockExecution) Size() (n int) { +func (m *MsgEnableContractBlockExecution) Size() (n int) { if m == nil { return 0 } @@ -500,7 +559,7 @@ func (m *MsgEnableBlockExecution) Size() (n int) { return n } -func (m *MsgEnableBlockExecutionResponse) Size() (n int) { +func (m *MsgEnableContractBlockExecutionResponse) Size() (n int) { if m == nil { return 0 } @@ -509,7 +568,7 @@ func (m *MsgEnableBlockExecutionResponse) Size() (n int) { return n } -func (m *MsgDisableBlockExecution) Size() (n int) { +func (m *MsgDisableContractBlockExecution) Size() (n int) { if m == nil { return 0 } @@ -525,7 +584,7 @@ func (m *MsgDisableBlockExecution) Size() (n int) { return n } -func (m *MsgDisableBlockExecutionResponse) Size() (n int) { +func (m *MsgDisableContractBlockExecutionResponse) Size() (n int) { if m == nil { return 0 } @@ -540,7 +599,7 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *MsgEnableBlockExecution) Unmarshal(dAtA []byte) error { +func (m *MsgEnableContractBlockExecution) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -563,10 +622,10 @@ func (m *MsgEnableBlockExecution) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgEnableBlockExecution: wiretype end group for non-group") + return fmt.Errorf("proto: MsgEnableContractBlockExecution: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEnableBlockExecution: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgEnableContractBlockExecution: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -641,7 +700,7 @@ func (m *MsgEnableBlockExecution) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgEnableBlockExecutionResponse) Unmarshal(dAtA []byte) error { +func (m *MsgEnableContractBlockExecutionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -664,10 +723,10 @@ func (m *MsgEnableBlockExecutionResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgEnableBlockExecutionResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgEnableContractBlockExecutionResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEnableBlockExecutionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgEnableContractBlockExecutionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -691,7 +750,7 @@ func (m *MsgEnableBlockExecutionResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDisableBlockExecution) Unmarshal(dAtA []byte) error { +func (m *MsgDisableContractBlockExecution) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -714,10 +773,10 @@ func (m *MsgDisableBlockExecution) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDisableBlockExecution: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDisableContractBlockExecution: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDisableBlockExecution: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDisableContractBlockExecution: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -792,7 +851,7 @@ func (m *MsgDisableBlockExecution) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDisableBlockExecutionResponse) Unmarshal(dAtA []byte) error { +func (m *MsgDisableContractBlockExecutionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -815,10 +874,10 @@ func (m *MsgDisableBlockExecutionResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDisableBlockExecutionResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDisableContractBlockExecutionResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDisableBlockExecutionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDisableContractBlockExecutionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: