-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(message-types.ts): added new provenance exchange message types
- Loading branch information
1 parent
4902d88
commit 8e5d3bf
Showing
23 changed files
with
1,091 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
third_party/proto/provenance/exchange/v1/commitments.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
syntax = "proto3"; | ||
package provenance.exchange.v1; | ||
|
||
option go_package = "github.com/provenance-io/provenance/x/exchange"; | ||
|
||
option java_package = "io.provenance.exchange.v1"; | ||
option java_multiple_files = true; | ||
|
||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
import "gogoproto/gogo.proto"; | ||
|
||
// Commitment contains information on committed funds. | ||
message Commitment { | ||
// account is the bech32 address string with the committed funds. | ||
string account = 1; | ||
// market_id is the numeric identifier of the market the funds are committed to. | ||
uint32 market_id = 2; | ||
// amount is the funds that have been committed by the account to the market. | ||
repeated cosmos.base.v1beta1.Coin amount = 3 | ||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; | ||
} | ||
|
||
// AccountAmount associates an account with a coins amount. | ||
message AccountAmount { | ||
option (gogoproto.goproto_stringer) = false; | ||
// account is the bech32 address string of the account associated with the amount. | ||
string account = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; | ||
// amount is the funds associated with the address. | ||
repeated cosmos.base.v1beta1.Coin amount = 2 | ||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; | ||
} | ||
|
||
// MarketAmount associates a market with a coins amount. | ||
message MarketAmount { | ||
option (gogoproto.goproto_stringer) = false; | ||
// market_id is the numeric identifier the amount has been committed to. | ||
uint32 market_id = 1; | ||
// amount is the funds associated with the address. | ||
repeated cosmos.base.v1beta1.Coin amount = 2 | ||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; | ||
} | ||
|
||
// NetAssetPrice is an association of assets and price used to record the value of things. | ||
// It is related to the NetAssetValue message from the x/marker module, and is therefore often referred to as "a NAV". | ||
message NetAssetPrice { | ||
option (gogoproto.goproto_stringer) = false; | ||
// assets is the volume and denom that has been bought or sold. | ||
cosmos.base.v1beta1.Coin assets = 1 [(gogoproto.nullable) = false]; | ||
// price is what was paid for the assets. | ||
cosmos.base.v1beta1.Coin price = 2 [(gogoproto.nullable) = false]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.