From 034a5f8b42d61b9e17804a247439691cf938e1f3 Mon Sep 17 00:00:00 2001 From: mattverse Date: Fri, 21 Apr 2023 16:47:39 +0900 Subject: [PATCH 1/4] Add lock id to return value --- proto/osmosis/superfluid/tx.proto | 7 +- x/superfluid/keeper/msg_server.go | 4 +- x/superfluid/types/tx.pb.go | 157 +++++++++++++++++++----------- 3 files changed, 106 insertions(+), 62 deletions(-) diff --git a/proto/osmosis/superfluid/tx.proto b/proto/osmosis/superfluid/tx.proto index e1816af1aa7..953a6b56e4d 100644 --- a/proto/osmosis/superfluid/tx.proto +++ b/proto/osmosis/superfluid/tx.proto @@ -71,7 +71,12 @@ message MsgSuperfluidUndelegateAndUnbondLock { cosmos.base.v1beta1.Coin coin = 3 [ (gogoproto.moretags) = "yaml:\"coin\"", (gogoproto.nullable) = false ]; } -message MsgSuperfluidUndelegateAndUnbondLockResponse {} +message MsgSuperfluidUndelegateAndUnbondLockResponse { + // lock id of the new lock created for the remaining amount. + // returns the original lockid if the unlocked amount is eqaul to the + // original lock's amount. + uint64 lock_id = 1; +} // message MsgSuperfluidRedelegate { // string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; diff --git a/x/superfluid/keeper/msg_server.go b/x/superfluid/keeper/msg_server.go index b40f4a9601e..836ea7e4393 100644 --- a/x/superfluid/keeper/msg_server.go +++ b/x/superfluid/keeper/msg_server.go @@ -96,11 +96,11 @@ func (server msgServer) SuperfluidUndelegateAndUnbondLock(goCtx context.Context, ) { ctx := sdk.UnwrapSDKContext(goCtx) - _, err := server.keeper.SuperfluidUndelegateAndUnbondLock(ctx, msg.LockId, msg.Sender, msg.Coin.Amount) + lockId, err := server.keeper.SuperfluidUndelegateAndUnbondLock(ctx, msg.LockId, msg.Sender, msg.Coin.Amount) if err == nil { events.EmitSuperfluidUndelegateAndUnbondLockEvent(ctx, msg.LockId) } - return &types.MsgSuperfluidUndelegateAndUnbondLockResponse{}, err + return &types.MsgSuperfluidUndelegateAndUnbondLockResponse{LockId: lockId}, err } // LockAndSuperfluidDelegate locks and superfluid delegates given tokens in a single message. diff --git a/x/superfluid/types/tx.pb.go b/x/superfluid/types/tx.pb.go index fc5f056d92c..803e5539031 100644 --- a/x/superfluid/types/tx.pb.go +++ b/x/superfluid/types/tx.pb.go @@ -368,6 +368,10 @@ func (m *MsgSuperfluidUndelegateAndUnbondLock) GetCoin() types.Coin { } type MsgSuperfluidUndelegateAndUnbondLockResponse struct { + // lock id of the new lock created for the remaining amount. + // returns the original lockid if the unlocked amount is eqaul to the + // original lock's amount. + LockId uint64 `protobuf:"varint,1,opt,name=lock_id,json=lockId,proto3" json:"lock_id,omitempty"` } func (m *MsgSuperfluidUndelegateAndUnbondLockResponse) Reset() { @@ -407,6 +411,13 @@ func (m *MsgSuperfluidUndelegateAndUnbondLockResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSuperfluidUndelegateAndUnbondLockResponse proto.InternalMessageInfo +func (m *MsgSuperfluidUndelegateAndUnbondLockResponse) GetLockId() uint64 { + if m != nil { + return m.LockId + } + return 0 +} + // MsgLockAndSuperfluidDelegate locks coins with the unbonding period duration, // and then does a superfluid lock from the newly created lockup, to the // specified validator addr. @@ -755,65 +766,66 @@ func init() { func init() { proto.RegisterFile("osmosis/superfluid/tx.proto", fileDescriptor_55b645f187d22814) } var fileDescriptor_55b645f187d22814 = []byte{ - // 926 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0xdb, 0x36, - 0x14, 0x8f, 0x62, 0xcf, 0x6e, 0x59, 0xf4, 0x4f, 0xb4, 0x16, 0x55, 0xb4, 0xce, 0x72, 0xb9, 0xa1, - 0xf0, 0xd0, 0x56, 0x8a, 0xdb, 0xb5, 0x08, 0x76, 0x4a, 0x1c, 0x63, 0x80, 0x8b, 0x18, 0x08, 0xd4, - 0x04, 0x03, 0x0a, 0x0c, 0x86, 0x2c, 0x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0x1f, 0x7f, 0xf5, 0x67, 0x05, 0xdc, 0x3d, 0x7f, 0xb4, 0xad, 0xcf, 0x21, 0x6a, 0xa2, 0x52, - 0xdf, 0x58, 0xb4, 0x32, 0x63, 0xf8, 0x93, 0x02, 0x56, 0xf3, 0x67, 0xd3, 0x5a, 0x0e, 0x7e, 0x6e, - 0x85, 0xbe, 0x3e, 0x6f, 0x45, 0xc6, 0xe4, 0x47, 0x70, 0x6b, 0xfa, 0x8c, 0x78, 0x90, 0x03, 0x39, - 0x35, 0x5b, 0xff, 0x72, 0x9e, 0xec, 0xac, 0xf9, 0x5f, 0x0a, 0x78, 0xb2, 0xd8, 0x03, 0xbf, 0x9d, - 0xdb, 0x6f, 0x01, 0x34, 0x7d, 0xf7, 0x22, 0xd1, 0x52, 0x75, 0x8d, 0x9d, 0xd7, 0x47, 0x15, 0xe5, - 0xcd, 0x51, 0x45, 0xf9, 0xfb, 0xa8, 0xa2, 0xbc, 0x3a, 0xae, 0x2c, 0xbd, 0x39, 0xae, 0x2c, 0xfd, - 0x71, 0x5c, 0x59, 0x7a, 0xf1, 0xf4, 0x9d, 0xd7, 0x4b, 0x76, 0x7e, 0xe8, 0x3b, 0x5d, 0x96, 0x2e, - 0xac, 0x41, 0xfd, 0x89, 0x35, 0x9c, 0xf8, 0x37, 0x40, 0xbc, 0x68, 0xdd, 0x52, 0xfc, 0x08, 0x3d, - 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x99, 0x74, 0xc7, 0x1f, 0x29, 0x0c, 0x00, 0x00, + // 930 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x36, 0x2d, 0x57, 0x4a, 0x36, 0xc8, 0x8f, 0xd9, 0x04, 0xa1, 0xd9, 0x54, 0x54, 0xb6, 0x45, + 0xa0, 0x22, 0x09, 0x69, 0x25, 0x4d,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b, 0xe7, 0x42, 0x8d, 0x9c, 0xf5, 0xc7, 0x33, 0x38, 0xe7, 0x65, 0xce, 0x76, 0xcd, 0x34, 0x99, + 0x53, 0xe7, 0xa9, 0x32, 0x9f, 0xda, 0x0a, 0xbf, 0x28, 0xe0, 0xee, 0xf9, 0x3b, 0x6f, 0x6d, 0x06, + 0x51, 0x63, 0x91, 0xfa, 0xfa, 0xbc, 0x91, 0x19, 0xc3, 0x9f, 0x15, 0xb0, 0x92, 0xbf, 0x9b, 0x56, + 0x73, 0xf0, 0x73, 0x23, 0xf4, 0xb5, 0x59, 0x23, 0x32, 0x26, 0x3f, 0x81, 0x5b, 0x93, 0x77, 0xc4, + 0x83, 0x1c, 0xc8, 0x89, 0xde, 0xfa, 0x97, 0xb3, 0x78, 0x67, 0xc9, 0xff, 0x56, 0xc0, 0x93, 0xf9, + 0x1e, 0xf8, 0xad, 0xdc, 0x7c, 0x73, 0xa0, 0xe9, 0x3b, 0x17, 0x89, 0x96, 0xaa, 0xab, 0x6f, 0xbf, + 0x3e, 0x2c, 0x2b, 0x6f, 0x0e, 0xcb, 0xca, 0x3f, 0x87, 0x65, 0xe5, 0xd5, 0x51, 0x79, 0xe1, 0xcd, + 0x51, 0x79, 0xe1, 0xcf, 0xa3, 0xf2, 0xc2, 0x8b, 0xa7, 0x27, 0x5e, 0x2f, 0x99, 0xf9, 0xa1, 0xef, + 0x74, 0x58, 0x7a, 0xb0, 0xfa, 0xb5, 0x27, 0xd6, 0x60, 0xec, 0xff, 0x03, 0xf1, 0xa2, 0x75, 0x8a, + 0xf1, 0x23, 0xf4, 0xf8, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x36, 0xc7, 0xd5, 0xbd, 0x42, 0x0c, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1370,6 +1382,11 @@ func (m *MsgSuperfluidUndelegateAndUnbondLockResponse) MarshalToSizedBuffer(dAtA _ = i var l int _ = l + if m.LockId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.LockId)) + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } @@ -1748,6 +1765,9 @@ func (m *MsgSuperfluidUndelegateAndUnbondLockResponse) Size() (n int) { } var l int _ = l + if m.LockId != 0 { + n += 1 + sovTx(uint64(m.LockId)) + } return n } @@ -2507,6 +2527,25 @@ func (m *MsgSuperfluidUndelegateAndUnbondLockResponse) Unmarshal(dAtA []byte) er return fmt.Errorf("proto: MsgSuperfluidUndelegateAndUnbondLockResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LockId", wireType) + } + m.LockId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LockId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From 2554ad01129a5a19298e72a6c7bab91d3dd258f9 Mon Sep 17 00:00:00 2001 From: mattverse Date: Fri, 21 Apr 2023 16:51:44 +0900 Subject: [PATCH 2/4] Add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc3fad7c8e8..2e15ef6071e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#4892](https://github.com/osmosis-labs/osmosis/pull/4847) Update Golang to 1.20 * [#4893](https://github.com/osmosis-labs/osmosis/pull/4893) Update alpine docker base image to `alpine:3.17` * [#4912](https://github.com/osmosis-labs/osmosis/pull/4912) Export Position_lock_id mappings to GenesisState + * [#4974](https://github.com/osmosis-labs/osmosis/pull/4974) Add lock id to `MsgSuperfluidUndelegateAndUnbondLockResponse` ### API breaks From be044e354d1078095a655bc821f66bb6241130d3 Mon Sep 17 00:00:00 2001 From: "Matt, Park" <45252226+mattverse@users.noreply.github.com> Date: Sun, 23 Apr 2023 14:57:58 +0900 Subject: [PATCH 3/4] Update proto/osmosis/superfluid/tx.proto Co-authored-by: Sishir Giri --- proto/osmosis/superfluid/tx.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/osmosis/superfluid/tx.proto b/proto/osmosis/superfluid/tx.proto index 953a6b56e4d..936cd9a88a3 100644 --- a/proto/osmosis/superfluid/tx.proto +++ b/proto/osmosis/superfluid/tx.proto @@ -73,7 +73,7 @@ message MsgSuperfluidUndelegateAndUnbondLock { } message MsgSuperfluidUndelegateAndUnbondLockResponse { // lock id of the new lock created for the remaining amount. - // returns the original lockid if the unlocked amount is eqaul to the + // returns the original lockid if the unlocked amount is equal to the // original lock's amount. uint64 lock_id = 1; } From e67f805f6d4d28de58308bfcae36af4e1975f0af Mon Sep 17 00:00:00 2001 From: mattverse Date: Sun, 23 Apr 2023 15:06:45 +0900 Subject: [PATCH 4/4] Proto make --- x/superfluid/types/tx.pb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/superfluid/types/tx.pb.go b/x/superfluid/types/tx.pb.go index 803e5539031..67021e775e6 100644 --- a/x/superfluid/types/tx.pb.go +++ b/x/superfluid/types/tx.pb.go @@ -369,7 +369,7 @@ func (m *MsgSuperfluidUndelegateAndUnbondLock) GetCoin() types.Coin { type MsgSuperfluidUndelegateAndUnbondLockResponse struct { // lock id of the new lock created for the remaining amount. - // returns the original lockid if the unlocked amount is eqaul to the + // returns the original lockid if the unlocked amount is equal to the // original lock's amount. LockId uint64 `protobuf:"varint,1,opt,name=lock_id,json=lockId,proto3" json:"lock_id,omitempty"` }