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

Add amino proto annotations #4629

Merged
merged 10 commits into from
May 20, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Features

* [#4659](https://github.com/osmosis-labs/osmosis/pull/4659) implement AllPools query in x/poolmanager.
* [#4659](https://github.com/osmosis-labs/osmosis/pull/4659) implement AllPools query in x/poolmanager.
* [#4629](https://github.com/osmosis-labs/osmosis/pull/4629) add amino proto annotations

### Misc Improvements

Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ require (
github.com/tidwall/btree v1.6.0
go.uber.org/multierr v1.10.0
golang.org/x/exp v0.0.0-20221212164502-fae10dda9338
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef
google.golang.org/grpc v1.52.0
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f
google.golang.org/grpc v1.53.0
gopkg.in/yaml.v2 v2.4.0
mvdan.cc/gofumpt v0.4.0
)
Expand Down Expand Up @@ -314,8 +314,8 @@ replace (
github.com/CosmWasm/wasmd => github.com/osmosis-labs/wasmd v0.30.0-osmo-v15
// dragonberry
github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0
// Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk, current branch: v16.x. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/4f857c6a941a3e3849aad40aae1781e80f8e1dda
github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20230313061712-4f857c6a941a
// Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk, current branch: v16.x. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/14238df02ba5e9f75cc37a64df94bdef5fc5e42a
github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20230315103109-14238df02ba5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant find this commit on the v15.x or 16.x branch

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the commit osmosis-labs/cosmos-sdk@14238df

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this to a more recent version of sdk v16.x, osmosis-labs/cosmos-sdk@6ed904c

// use cosmos-compatible protobufs
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
// Informal Tendermint fork
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,8 @@ github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh
github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA=
github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY=
github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM=
github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20230313061712-4f857c6a941a h1:ycdLQR3ZhY0wmPEzgh4iLQB7GWsxTK+Y0/DClc7zStA=
github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20230313061712-4f857c6a941a/go.mod h1:rud0OaBIuq3+qOqtwT4SR7Q7iSzRp7w41fjninTjfnQ=
github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20230315103109-14238df02ba5 h1:5jQGdyeytUOrLir3ZO/BBGDMVXioTZcA/4Ze4v1mAa4=
github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20230315103109-14238df02ba5/go.mod h1:ILTC8cOyw92qHFWVTP2b5dSgRYSePN4OP59q1qatAoY=
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 h1:YlmchqTmlwdWSmrRmXKR+PcU96ntOd8u10vTaTZdcNY=
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI=
github.com/osmosis-labs/osmosis/osmomath v0.0.3-dev.0.20230316203321-2edd49875f80 h1:MqSb3Q5Uqb2r3PcyijgFL0lcIe57PqncqyfkRtyyn6E=
Expand Down Expand Up @@ -1749,8 +1749,8 @@ google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY=
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
Expand Down
4 changes: 2 additions & 2 deletions osmomath/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ require (
)

replace (
// Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk, current branch: v16.x. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/4f857c6a941a3e3849aad40aae1781e80f8e1dda
github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20230313061712-4f857c6a941a
// Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk, current branch: v15.x. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/14238df02ba5e9f75cc37a64df94bdef5fc5e42a
github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20230315103109-14238df02ba5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above, fixing the comment to be 16.x though

// use cosmos-compatible protobufs
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
// use grpc compatible with cosmos protobufs
Expand Down
4 changes: 2 additions & 2 deletions osmoutils/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ require (
)

replace (
// Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk, current branch: v16.x. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/4f857c6a941a3e3849aad40aae1781e80f8e1dda
github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20230313061712-4f857c6a941a
// Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk, current branch: v16.x. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/14238df02ba5e9f75cc37a64df94bdef5fc5e42a
github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20230315103109-14238df02ba5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above,

// use cosmos-compatible protobufs
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
// use grpc compatible with cosmos protobufs
Expand Down
80 changes: 80 additions & 0 deletions proto/amino/amino.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
syntax = "proto3";

package amino;

import "google/protobuf/descriptor.proto";

// TODO(fdymylja): once we fully migrate to protov2 the go_package needs to be
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is fdymylja?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must have been ported together from the cherry pick, erasing this

// updated. We need this right now because gogoproto codegen needs to import the
// extension.
option go_package = "github.com/cosmos/cosmos-sdk/types/tx/amino";

extend google.protobuf.MessageOptions {
// name is the string used when registering a concrete
// type into the Amino type registry, via the Amino codec's
// `RegisterConcrete()` method. This string MUST be at most 39
// characters long, or else the message will be rejected by the
// Ledger hardware device.
string name = 11110001;

// encoding describes the encoding format used by Amino for the given
// message. The field type is chosen to be a string for
// flexibility, but it should ideally be short and expected to be
// machine-readable, for example "base64" or "utf8_json". We
// highly recommend to use underscores for word separation instead of spaces.
//
// If left empty, then the Amino encoding is expected to be the same as the
// Protobuf one.
//
// This annotation should not be confused with the `encoding`
// one which operates on the field level.
string message_encoding = 11110002;
}

extend google.protobuf.FieldOptions {
// encoding describes the encoding format used by Amino for
// the given field. The field type is chosen to be a string for
// flexibility, but it should ideally be short and expected to be
// machine-readable, for example "base64" or "utf8_json". We
// highly recommend to use underscores for word separation instead of spaces.
//
// If left empty, then the Amino encoding is expected to be the same as the
// Protobuf one.
//
// This annotation should not be confused with the
// `message_encoding` one which operates on the message level.
string encoding = 11110003;

// field_name sets a different field name (i.e. key name) in
// the amino JSON object for the given field.
//
// Example:
//
// message Foo {
// string bar = 1 [(amino.field_name) = "baz"];
// }
//
// Then the Amino encoding of Foo will be:
// `{"baz":"some value"}`
string field_name = 11110004;

// dont_omitempty sets the field in the JSON object even if
// its value is empty, i.e. equal to the Golang zero value. To learn what
// the zero values are, see https://go.dev/ref/spec#The_zero_value.
//
// Fields default to `omitempty`, which is the default behavior when this
// annotation is unset. When set to true, then the field value in the
// JSON object will be set, i.e. not `undefined`.
//
// Example:
//
// message Foo {
// string bar = 1;
// string baz = 2 [(amino.dont_omitempty) = true];
// }
//
// f := Foo{};
// out := AminoJSONEncoder(&f);
// out == {"baz":""}
bool dont_omitempty = 11110005;
}
4 changes: 4 additions & 0 deletions proto/osmosis/gamm/pool-models/balancer/balancerPool.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package osmosis.gamm.v1beta1;

import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "amino/amino.proto";

import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
Expand Down Expand Up @@ -74,6 +75,8 @@ message SmoothWeightChangeParams {
// governance. Instead they will be managed by the token holders of the pool.
// The pool's token holders are specified in future_pool_governor.
message PoolParams {
option (amino.name) = "osmosis/gamm/BalancerPoolParams";

string swap_fee = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"swap_fee\"",
Expand Down Expand Up @@ -111,6 +114,7 @@ message Pool {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (cosmos_proto.implements_interface) = "PoolI";
option (amino.name) = "osmosis/gamm/BalancerPool";

string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
uint64 id = 2;
Expand Down
3 changes: 3 additions & 0 deletions proto/osmosis/gamm/pool-models/balancer/tx/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package osmosis.gamm.poolmodels.balancer.v1beta1;

import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "osmosis/gamm/pool-models/balancer/balancerPool.proto";
import "cosmos/base/v1beta1/coin.proto";
import "google/protobuf/timestamp.proto";
Expand All @@ -18,6 +19,8 @@ service Msg {

// ===================== MsgCreatePool
message MsgCreateBalancerPool {
option (amino.name) = "osmosis/gamm/create-balancer-pool";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];

osmosis.gamm.v1beta1.PoolParams pool_params = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package osmosis.gamm.poolmodels.stableswap.v1beta1;

import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "amino/amino.proto";

import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
Expand All @@ -17,6 +18,8 @@ option go_package = "github.com/osmosis-labs/osmosis/v15/x/gamm/pool-models/stab
// governance. Instead they will be managed by the token holders of the pool.
// The pool's token holders are specified in future_pool_governor.
message PoolParams {
option (amino.name) = "osmosis/gamm/StableswapPoolParams";

string swap_fee = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"swap_fee\"",
Expand All @@ -34,6 +37,7 @@ message Pool {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (cosmos_proto.implements_interface) = "PoolI";
option (amino.name) = "osmosis/gamm/StableswapPool";

string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
uint64 id = 2;
Expand Down
5 changes: 5 additions & 0 deletions proto/osmosis/gamm/pool-models/stableswap/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package osmosis.gamm.poolmodels.stableswap.v1beta1;

import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "osmosis/gamm/pool-models/stableswap/stableswap_pool.proto";

option go_package = "github.com/osmosis-labs/osmosis/v15/x/gamm/pool-models/stableswap";
Expand All @@ -16,6 +17,8 @@ service Msg {

// ===================== MsgCreatePool
message MsgCreateStableswapPool {
option (amino.name) = "osmosis/gamm/create-stableswap-pool";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];

PoolParams pool_params = 2 [ (gogoproto.moretags) = "yaml:\"pool_params\"" ];
Expand Down Expand Up @@ -43,6 +46,8 @@ message MsgCreateStableswapPoolResponse {
// Sender must be the pool's scaling_factor_governor in order for the tx to
// succeed. Adjusts stableswap scaling factors.
message MsgStableSwapAdjustScalingFactors {
option (amino.name) = "osmosis/gamm/stableswap-adjust-scaling-factors";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.customname) = "PoolID" ];

Expand Down
17 changes: 17 additions & 0 deletions proto/osmosis/gamm/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package osmosis.gamm.v1beta1;

import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "cosmos/base/v1beta1/coin.proto";
import "osmosis/poolmanager/v1beta1/swap_route.proto";

Expand All @@ -27,6 +28,8 @@ service Msg {
// ===================== MsgJoinPool
// This is really MsgJoinPoolNoSwap
message MsgJoinPool {
option (amino.name) = "osmosis/gamm/join-pool";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
string share_out_amount = 3 [
Expand Down Expand Up @@ -54,6 +57,8 @@ message MsgJoinPoolResponse {

// ===================== MsgExitPool
message MsgExitPool {
option (amino.name) = "osmosis/gamm/exit-pool";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
string share_in_amount = 3 [
Expand All @@ -77,6 +82,8 @@ message MsgExitPoolResponse {

// ===================== MsgSwapExactAmountIn
message MsgSwapExactAmountIn {
option (amino.name) = "osmosis/gamm/exit-pool";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
repeated osmosis.poolmanager.v1beta1.SwapAmountInRoute routes = 2
[ (gogoproto.nullable) = false ];
Expand All @@ -100,6 +107,8 @@ message MsgSwapExactAmountInResponse {
}

message MsgSwapExactAmountOut {
option (amino.name) = "osmosis/gamm/swap-exact-amount-out";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
repeated osmosis.poolmanager.v1beta1.SwapAmountOutRoute routes = 2
[ (gogoproto.nullable) = false ];
Expand All @@ -125,6 +134,8 @@ message MsgSwapExactAmountOutResponse {
// ===================== MsgJoinSwapExternAmountIn
// TODO: Rename to MsgJoinSwapExactAmountIn
message MsgJoinSwapExternAmountIn {
option (amino.name) = "osmosis/gamm/join-swap-extern-amount-in";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
cosmos.base.v1beta1.Coin token_in = 3 [
Expand Down Expand Up @@ -152,6 +163,8 @@ message MsgJoinSwapExternAmountInResponse {

// ===================== MsgJoinSwapShareAmountOut
message MsgJoinSwapShareAmountOut {
option (amino.name) = "osmosis/gamm/join-swap-share-amount-out";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
string token_in_denom = 3
Expand All @@ -178,6 +191,8 @@ message MsgJoinSwapShareAmountOutResponse {

// ===================== MsgExitSwapShareAmountIn
message MsgExitSwapShareAmountIn {
option (amino.name) = "osmosis/gamm/exit-swap-share-amount-in";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
string token_out_denom = 3
Expand All @@ -204,6 +219,8 @@ message MsgExitSwapShareAmountInResponse {

// ===================== MsgExitSwapExternAmountOut
message MsgExitSwapExternAmountOut {
option (amino.name) = "osmosis/gamm/exit-swap-extern-amount-out";

string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ];
cosmos.base.v1beta1.Coin token_out = 3 [
Expand Down
5 changes: 5 additions & 0 deletions proto/osmosis/incentives/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package osmosis.incentives;

import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "google/protobuf/timestamp.proto";
import "cosmos/base/v1beta1/coin.proto";
import "osmosis/incentives/gauge.proto";
Expand All @@ -16,6 +17,8 @@ service Msg {

// MsgCreateGauge creates a gague to distribute rewards to users
message MsgCreateGauge {
option (amino.name) = "osmosis/incentives/create-gauge";

// is_perpetual shows if it's a perpetual or non-perpetual gauge
// Non-perpetual gauges distribute their tokens equally per epoch while the
// gauge is in the active period. Perpetual gauges distribute all their tokens
Expand Down Expand Up @@ -47,6 +50,8 @@ message MsgCreateGaugeResponse {}

// MsgAddToGauge adds coins to a previously created gauge
message MsgAddToGauge {
option (amino.name) = "osmosis/incentives/add-to-gauge";

// owner is the gauge owner's address
string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ];
// gauge_id is the ID of gauge that rewards are getting added to
Expand Down
7 changes: 7 additions & 0 deletions proto/osmosis/lockup/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package osmosis.lockup;

import "gogoproto/gogo.proto";
import "amino/amino.proto";
import "google/protobuf/duration.proto";
import "cosmos/base/v1beta1/coin.proto";
import "osmosis/lockup/lock.proto";
Expand All @@ -23,6 +24,8 @@ service Msg {
}

message MsgLockTokens {
option (amino.name) = "osmosis/lockup/lock-tokens";

string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ];
google.protobuf.Duration duration = 2 [
(gogoproto.nullable) = false,
Expand All @@ -38,11 +41,15 @@ message MsgLockTokens {
message MsgLockTokensResponse { uint64 ID = 1; }

message MsgBeginUnlockingAll {
option (amino.name) = "osmosis/lockup/begin-unlock-tokens";

string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ];
}
message MsgBeginUnlockingAllResponse { repeated PeriodLock unlocks = 1; }

message MsgBeginUnlocking {
option (amino.name) = "osmosis/lockup/begin-unlock-period-lock";

string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ];
uint64 ID = 2;
// Amount of unlocking coins. Unlock all if not set.
Expand Down
Loading