diff --git a/proto/secret/cron/schedule.proto b/proto/secret/cron/schedule.proto index d5c8aaabf..804669e6a 100644 --- a/proto/secret/cron/schedule.proto +++ b/proto/secret/cron/schedule.proto @@ -23,8 +23,6 @@ message Schedule { repeated MsgExecuteContract msgs = 3 [(gogoproto.nullable) = false]; // Last execution's block height uint64 last_execute_height = 4; - // Stage when messages will be executed - // ExecutionStage execution_stage = 5; } // Defines the contract and the message to pass diff --git a/proto/secret/cron/tx.proto b/proto/secret/cron/tx.proto index 43b177fa3..4e95ec02d 100644 --- a/proto/secret/cron/tx.proto +++ b/proto/secret/cron/tx.proto @@ -38,8 +38,6 @@ message MsgAddSchedule { uint64 period = 3; // Msgs that will be executed every certain number of blocks, specified in the `period` field repeated MsgExecuteContract msgs = 4 [(gogoproto.nullable) = false]; - // Stage when messages will be executed - ExecutionStage execution_stage = 5; } // Defines the response structure for executing a MsgAddSchedule message. diff --git a/x/cron/keeper/msg_server_test.go b/x/cron/keeper/msg_server_test.go index a5f969179..2622fb874 100644 --- a/x/cron/keeper/msg_server_test.go +++ b/x/cron/keeper/msg_server_test.go @@ -33,7 +33,6 @@ func TestMsgAddScheduleValidate(t *testing.T) { Msg: "msg", }, }, - ExecutionStage: types.ExecutionStage_EXECUTION_STAGE_BEGIN_BLOCKER, }, "authority is invalid", }, @@ -49,7 +48,6 @@ func TestMsgAddScheduleValidate(t *testing.T) { Msg: "msg", }, }, - ExecutionStage: types.ExecutionStage_EXECUTION_STAGE_BEGIN_BLOCKER, }, "authority is invalid", }, @@ -65,7 +63,6 @@ func TestMsgAddScheduleValidate(t *testing.T) { Msg: "msg", }, }, - ExecutionStage: types.ExecutionStage_EXECUTION_STAGE_BEGIN_BLOCKER, }, "name is invalid", }, @@ -81,18 +78,16 @@ func TestMsgAddScheduleValidate(t *testing.T) { Msg: "msg", }, }, - ExecutionStage: types.ExecutionStage_EXECUTION_STAGE_BEGIN_BLOCKER, }, "period is invalid", }, { "empty msgs", types.MsgAddSchedule{ - Authority: k.GetAuthority(), - Name: "name", - Period: 3, - Msgs: []types.MsgExecuteContract{}, - ExecutionStage: types.ExecutionStage_EXECUTION_STAGE_BEGIN_BLOCKER, + Authority: k.GetAuthority(), + Name: "name", + Period: 3, + Msgs: []types.MsgExecuteContract{}, }, "msgs should not be empty", }, @@ -108,7 +103,6 @@ func TestMsgAddScheduleValidate(t *testing.T) { Msg: "msg", }, }, - ExecutionStage: 7, }, "execution stage is invalid", }, diff --git a/x/cron/types/tx.go b/x/cron/types/tx.go index 27b4ceec4..1bca78a71 100644 --- a/x/cron/types/tx.go +++ b/x/cron/types/tx.go @@ -45,10 +45,6 @@ func (msg *MsgAddSchedule) Validate() error { return errors.Wrap(sdkerrors.ErrInvalidRequest, "msgs should not be empty") } - if _, ok := ExecutionStage_name[int32(msg.ExecutionStage)]; !ok { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "execution stage is invalid") - } - return nil } diff --git a/x/cron/types/tx.pb.go b/x/cron/types/tx.pb.go index 1b502c253..303eb5530 100644 --- a/x/cron/types/tx.pb.go +++ b/x/cron/types/tx.pb.go @@ -41,8 +41,6 @@ type MsgAddSchedule struct { Period uint64 `protobuf:"varint,3,opt,name=period,proto3" json:"period,omitempty"` // Msgs that will be executed every certain number of blocks, specified in the `period` field Msgs []MsgExecuteContract `protobuf:"bytes,4,rep,name=msgs,proto3" json:"msgs"` - // Stage when messages will be executed - ExecutionStage ExecutionStage `protobuf:"varint,5,opt,name=execution_stage,json=executionStage,proto3,enum=secret.cron.ExecutionStage" json:"execution_stage,omitempty"` } func (m *MsgAddSchedule) Reset() { *m = MsgAddSchedule{} } @@ -106,13 +104,6 @@ func (m *MsgAddSchedule) GetMsgs() []MsgExecuteContract { return nil } -func (m *MsgAddSchedule) GetExecutionStage() ExecutionStage { - if m != nil { - return m.ExecutionStage - } - return ExecutionStage_EXECUTION_STAGE_END_BLOCKER -} - // Defines the response structure for executing a MsgAddSchedule message. type MsgAddScheduleResponse struct { } @@ -352,43 +343,40 @@ func init() { func init() { proto.RegisterFile("secret/cron/tx.proto", fileDescriptor_dc5dfbc481f4f7b1) } var fileDescriptor_dc5dfbc481f4f7b1 = []byte{ - // 561 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x41, 0x8b, 0xd3, 0x40, - 0x14, 0xc7, 0x9b, 0x6d, 0xb7, 0xd0, 0xa9, 0x74, 0xd9, 0x6c, 0xe9, 0xa6, 0xa9, 0x64, 0x4b, 0x95, - 0xb5, 0x16, 0x4c, 0xb0, 0xc2, 0x82, 0xbd, 0x6d, 0x75, 0xc1, 0x4b, 0x55, 0x52, 0x04, 0xf1, 0xb2, - 0xa4, 0xc9, 0x30, 0x0d, 0x6e, 0x32, 0x61, 0xde, 0x74, 0xed, 0xde, 0xc4, 0xe3, 0x7a, 0xf1, 0x0b, - 0x78, 0x17, 0x4f, 0x3d, 0xf8, 0x21, 0xf6, 0xb8, 0x78, 0xf2, 0x24, 0xd2, 0x1e, 0xfa, 0x35, 0x24, - 0x93, 0x64, 0x37, 0x69, 0xa1, 0x07, 0xc1, 0x4b, 0x32, 0xef, 0xfd, 0xde, 0x7b, 0xf3, 0x9f, 0x37, - 0x8f, 0x41, 0x55, 0xc0, 0x36, 0xc3, 0xdc, 0xb0, 0x19, 0xf5, 0x0d, 0x3e, 0xd5, 0x03, 0x46, 0x39, - 0x95, 0xcb, 0x91, 0x57, 0x0f, 0xbd, 0xea, 0xae, 0xe5, 0xb9, 0x3e, 0x35, 0xc4, 0x37, 0xe2, 0xea, - 0xbe, 0x4d, 0xc1, 0xa3, 0x60, 0x78, 0x40, 0x8c, 0xf3, 0xc7, 0xe1, 0x2f, 0x06, 0xf5, 0x08, 0x9c, - 0x0a, 0xcb, 0x88, 0x8c, 0x18, 0x55, 0x09, 0x25, 0x34, 0xf2, 0x87, 0xab, 0xd8, 0xab, 0xa4, 0xf7, - 0x0f, 0x2c, 0x66, 0x79, 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, - 0xf2, 0x4b, 0xcc, 0x3f, 0x50, 0xf6, 0xde, 0x98, 0xc6, 0xcf, 0xd4, 0x45, 0x80, 0x61, 0x54, 0x14, - 0x4f, 0xc1, 0x93, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x28, 0x09, 0xad, 0x41, 0xc2, 0x04, 0x00, - 0x00, + // 528 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0xcf, 0x8b, 0xd3, 0x40, + 0x14, 0xc7, 0x3b, 0xdb, 0x5a, 0xe8, 0x54, 0x56, 0x36, 0x5b, 0xba, 0x69, 0x56, 0xb2, 0xa5, 0xca, + 0x5a, 0x0b, 0x26, 0x58, 0x61, 0xc1, 0xde, 0xb6, 0x22, 0x78, 0x89, 0x4a, 0x8a, 0x20, 0x5e, 0x24, + 0x4d, 0x86, 0x69, 0x70, 0x93, 0x09, 0xf3, 0xa6, 0x6b, 0xf7, 0x26, 0x1e, 0xd7, 0x8b, 0x7f, 0x86, + 0x78, 0xea, 0xc1, 0x3f, 0x62, 0x8f, 0x8b, 0x17, 0x3d, 0x89, 0xb4, 0x87, 0xfe, 0x1b, 0x92, 0x5f, + 0xbb, 0x49, 0x0a, 0x3d, 0x08, 0x7b, 0x49, 0x66, 0xbe, 0x9f, 0x79, 0x6f, 0xbe, 0xef, 0xcd, 0x24, + 0xb8, 0x01, 0xc4, 0xe6, 0x44, 0xe8, 0x36, 0x67, 0xbe, 0x2e, 0x66, 0x5a, 0xc0, 0x99, 0x60, 0x52, + 0x3d, 0x56, 0xb5, 0x50, 0x55, 0x76, 0x2c, 0xcf, 0xf5, 0x99, 0x1e, 0x3d, 0x63, 0xae, 0xec, 0xd9, + 0x0c, 0x3c, 0x06, 0xba, 0x07, 0x54, 0x3f, 0x7d, 0x1c, 0xbe, 0x12, 0xd0, 0x8a, 0xc1, 0xfb, 0x68, + 0xa6, 0xc7, 0x93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x04, 0xc6, 0xd5, 0xe8, + 0x23, 0x7e, 0xf2, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x23, 0xcd, 0x89, 0x2b, 0x7c, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -569,11 +557,6 @@ func (m *MsgAddSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.ExecutionStage != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.ExecutionStage)) - i-- - dAtA[i] = 0x28 - } if len(m.Msgs) > 0 { for iNdEx := len(m.Msgs) - 1; iNdEx >= 0; iNdEx-- { { @@ -790,9 +773,6 @@ func (m *MsgAddSchedule) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } - if m.ExecutionStage != 0 { - n += 1 + sovTx(uint64(m.ExecutionStage)) - } return n } @@ -1007,25 +987,6 @@ func (m *MsgAddSchedule) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutionStage", wireType) - } - m.ExecutionStage = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExecutionStage |= ExecutionStage(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:])