-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathcodec.proto
93 lines (89 loc) · 3.8 KB
/
codec.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
syntax = "proto3";
package app;
option go_package = "github.com/iov-one/weave/cmd/bnsd/app";
import "codec.proto";
import "gogoproto/gogo.proto";
import "cmd/bnsd/x/nft/username/codec.proto";
import "migration/codec.proto";
import "x/aswap/codec.proto";
import "x/cash/codec.proto";
import "x/currency/codec.proto";
import "x/distribution/codec.proto";
import "x/escrow/codec.proto";
import "x/multisig/codec.proto";
import "x/nft/codec.proto";
import "x/sigs/codec.proto";
import "x/validators/codec.proto";
// Tx contains the message.
//
// When extending Tx, follow the rules:
// - range 1-50 is reserved for middlewares,
// - range 51-inf is reserved for different message types,
// - keep the same numbers for the same message types in both bcpd and bnsd
// applications. For example, FeeInfo field is used by both and indexed at
// first position. Skip unused fields (leave index unused or comment out for
// clarity).
// When there is a gap in message sequence numbers - that most likely means some
// old fields got deprecated. This is done to maintain binary compatibility.
message Tx {
cash.FeeInfo fees = 1;
repeated sigs.StdSignature signatures = 2;
// ID of a multisig contract.
repeated bytes multisig = 4;
// msg is a sum type over all allowed messages on this chain.
oneof sum {
cash.SendMsg send_msg = 51;
escrow.CreateEscrowMsg create_escrow_msg = 52;
escrow.ReleaseEscrowMsg release_escrow_msg = 53;
escrow.ReturnEscrowMsg return_escrow_msg = 54;
escrow.UpdateEscrowPartiesMsg update_escrow_msg = 55;
multisig.CreateContractMsg create_contract_msg = 56;
multisig.UpdateContractMsg update_contract_msg = 57;
validators.SetValidatorsMsg set_validators_msg = 58;
currency.NewTokenInfoMsg new_token_info_msg = 59;
BatchMsg batch_msg = 60;
nft.AddApprovalMsg add_approval_msg = 61;
nft.RemoveApprovalMsg remove_approval_msg = 62;
username.IssueTokenMsg issue_username_nft_msg = 63;
username.AddChainAddressMsg add_username_address_nft_msg = 64;
username.RemoveChainAddressMsg remove_username_address_msg = 65;
distribution.NewRevenueMsg new_revenue_msg = 66;
distribution.DistributeMsg distribute_msg = 67;
distribution.ResetRevenueMsg reset_revenue_msg = 68;
migration.UpgradeSchemaMsg upgrade_schema_msg = 69;
aswap.CreateSwapMsg create_swap_msg = 70;
aswap.ReleaseSwapMsg release_swap_msg = 71;
aswap.ReturnSwapMsg return_swap_msg = 72;
}
}
// BatchMsg encapsulates multiple messages to support batch transaction
message BatchMsg {
message Union {
oneof sum {
cash.SendMsg send_msg = 51;
escrow.CreateEscrowMsg create_escrow_msg = 52;
escrow.ReleaseEscrowMsg release_escrow_msg = 53;
escrow.ReturnEscrowMsg return_escrow_msg = 54;
escrow.UpdateEscrowPartiesMsg update_escrow_msg = 55;
multisig.CreateContractMsg create_contract_msg = 56;
multisig.UpdateContractMsg update_contract_msg = 57;
validators.SetValidatorsMsg set_validators_msg = 58;
currency.NewTokenInfoMsg new_token_info_msg = 59;
// No recursive batches!
// BatchMsg batch_msg = 60;
nft.AddApprovalMsg add_approval_msg = 61;
nft.RemoveApprovalMsg remove_approval_msg = 62;
username.IssueTokenMsg issue_username_nft_msg = 63;
username.AddChainAddressMsg add_username_address_nft_msg = 64;
username.RemoveChainAddressMsg remove_username_address_msg = 65;
distribution.NewRevenueMsg new_revenue_msg = 66;
distribution.DistributeMsg distribute_msg = 67;
distribution.ResetRevenueMsg reset_revenue_msg = 68;
migration.UpgradeSchemaMsg upgrade_schema_msg = 69;
aswap.CreateSwapMsg create_swap_msg = 70;
aswap.ReleaseSwapMsg release_swap_msg = 71;
aswap.ReturnSwapMsg return_swap_msg = 72;
}
}
repeated Union messages = 1 [(gogoproto.nullable) = false];
}