Skip to content

Commit 11811d5

Browse files
committed
Revert removal of coin.proto
1 parent 808c8ec commit 11811d5

File tree

3 files changed

+107
-55
lines changed

3 files changed

+107
-55
lines changed

proto/sifnode/dispensation/v1/types.proto

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ syntax = "proto3";
22
package sifnode.dispensation.v1;
33

44
import "gogoproto/gogo.proto";
5+
import "cosmos/base/coin.proto";
56

67
option go_package = "github.com/Sifchain/sifnode/x/dispensation/types";
78

@@ -32,7 +33,8 @@ message DistributionRecord {
3233
ClaimStatus claim_status = 1;
3334
string distribution_name = 2;
3435
string recipient_address = 3;
35-
repeated string coins = 4 [
36+
repeated cosmos.base.v1beta1.Coin coins = 4 [
37+
(gogoproto.nullable) = false,
3638
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
3739
(gogoproto.moretags) = "yaml:\"coins\""
3840
];
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
syntax = "proto3";
2+
package cosmos.base.v1beta1;
3+
4+
import "gogoproto/gogo.proto";
5+
6+
option go_package = "github.com/cosmos/cosmos-sdk/types";
7+
option (gogoproto.goproto_stringer_all) = false;
8+
option (gogoproto.stringer_all) = false;
9+
10+
// Coin defines a token with a denomination and an amount.
11+
//
12+
// NOTE: The amount field is an Int which implements the custom method
13+
// signatures required by gogoproto.
14+
message Coin {
15+
option (gogoproto.equal) = true;
16+
17+
string denom = 1;
18+
string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
19+
}
20+
21+
// DecCoin defines a token with a denomination and a decimal amount.
22+
//
23+
// NOTE: The amount field is an Dec which implements the custom method
24+
// signatures required by gogoproto.
25+
message DecCoin {
26+
option (gogoproto.equal) = true;
27+
28+
string denom = 1;
29+
string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
30+
}
31+
32+
// IntProto defines a Protobuf wrapper around an Int object.
33+
message IntProto {
34+
string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
35+
}
36+
37+
// DecProto defines a Protobuf wrapper around a Dec object.
38+
message DecProto {
39+
string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
40+
}

x/dispensation/types/types.pb.go

+64-54
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)