Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow depositing vesting tokens in the vault #174

Closed
wants to merge 18 commits into from
Closed
Prev Previous commit
Next Next commit
clean test file
neitdung committed Jul 14, 2024
commit be3a537c28bab9c74e0647148e96f00ebee62872
28 changes: 0 additions & 28 deletions docs/proto/proto-docs.md
Original file line number Diff line number Diff line change
@@ -15,8 +15,6 @@
- [Query](#osmosis.meshsecurityprovider.Query)

- [osmosis/meshsecurityprovider/tx.proto](#osmosis/meshsecurityprovider/tx.proto)
- [MsgTest](#osmosis.meshsecurityprovider.MsgTest)
- [MsgTestResponse](#osmosis.meshsecurityprovider.MsgTestResponse)
- [MsgUpdateParams](#osmosis.meshsecurityprovider.MsgUpdateParams)
- [MsgUpdateParamsResponse](#osmosis.meshsecurityprovider.MsgUpdateParamsResponse)

@@ -130,31 +128,6 @@ GenesisState defines the meshsecurityprovider module's genesis state.



<a name="osmosis.meshsecurityprovider.MsgTest"></a>

### MsgTest
===================== MsgTest


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | |






<a name="osmosis.meshsecurityprovider.MsgTestResponse"></a>

### MsgTestResponse







<a name="osmosis.meshsecurityprovider.MsgUpdateParams"></a>

### MsgUpdateParams
@@ -201,7 +174,6 @@ Since: cosmos-sdk 0.47

| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint |
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `Test` | [MsgTest](#osmosis.meshsecurityprovider.MsgTest) | [MsgTestResponse](#osmosis.meshsecurityprovider.MsgTestResponse) | | |
| `UpdateParams` | [MsgUpdateParams](#osmosis.meshsecurityprovider.MsgUpdateParams) | [MsgUpdateParamsResponse](#osmosis.meshsecurityprovider.MsgUpdateParamsResponse) | UpdateParams defines an operation for updating the module's parameters. Since: cosmos-sdk 0.47 | |

<!-- end services -->
9 changes: 0 additions & 9 deletions proto/osmosis/meshsecurityprovider/tx.proto
Original file line number Diff line number Diff line change
@@ -12,21 +12,12 @@ option go_package = "github.com/osmosis-labs/mesh-security-sdk/x/meshsecuritypro

service Msg {
option (cosmos.msg.v1.service) = true;

rpc Test(MsgTest) returns (MsgTestResponse);
// UpdateParams defines an operation for updating the module's
// parameters.
// Since: cosmos-sdk 0.47
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
}

// ===================== MsgTest
message MsgTest {
string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
}

message MsgTestResponse {}

// MsgUpdateParams is the Msg/UpdateParams request type.
//
// Since: cosmos-sdk 0.47
4 changes: 0 additions & 4 deletions x/meshsecurityprovider/keeper/msg_server.go
Original file line number Diff line number Diff line change
@@ -22,10 +22,6 @@ func NewMsgServerImpl(keeper *Keeper) types.MsgServer {

var _ types.MsgServer = msgServer{}

func (ms msgServer) Test(goCtx context.Context, msg *types.MsgTest) (*types.MsgTestResponse, error) {
return &types.MsgTestResponse{}, nil
}

func (ms msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

2 changes: 0 additions & 2 deletions x/meshsecurityprovider/types/codec.go
Original file line number Diff line number Diff line change
@@ -11,13 +11,11 @@ import (
// RegisterLegacyAminoCodec registers the necessary x/meshsecurityprovider interfaces and concrete types
// on the provided LegacyAmino codec. These types are used for Amino JSON serialization.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgTest{}, "meshsecurityprovider/MsgTest", nil)
}

func RegisterInterfaces(registry types.InterfaceRegistry) {
registry.RegisterImplementations(
(*sdk.Msg)(nil),
&MsgTest{},
)

msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
34 changes: 0 additions & 34 deletions x/meshsecurityprovider/types/msgs.go
Original file line number Diff line number Diff line change
@@ -1,35 +1 @@
package types

import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)

const (
TypeMsgTest = "test"
)

var _ sdk.Msg = &MsgTest{}

func (msg MsgTest) Route() string { return ModuleName }
func (msg MsgTest) Type() string { return TypeMsgTest }
func (msg MsgTest) ValidateBasic() error {
_, err := sdk.AccAddressFromBech32(msg.Sender)
if err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err)
}

return nil
}

func (msg MsgTest) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg))
}

func (msg MsgTest) GetSigners() []sdk.AccAddress {
sender, err := sdk.AccAddressFromBech32(msg.Sender)
if err != nil {
panic(err)
}
return []sdk.AccAddress{sender}
}
Loading