Skip to content

Commit

Permalink
add comments for proto files
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Apr 24, 2024
1 parent 48d1e88 commit 0aa02a6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions proto/observer/observer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ enum ObserverUpdateReason {
AdminUpdate = 2;
}

// Deprecated: Use ObserverSet instead to get the list of observers
message ObserverMapper {
string index = 1;
chains.Chain observer_chain = 2;
Expand Down
20 changes: 15 additions & 5 deletions proto/pkg/chains/chains.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ enum ReceiveStatus {
Success = 1;
Failed = 2;
}

// ChainName represents the name of the chain
enum ChainName {
option (gogoproto.goproto_enum_stringer) = true;
empty = 0;
Expand All @@ -33,7 +33,7 @@ enum ChainName {
btc_regtest = 15;
amoy_testnet = 16;
}

// Network represents the network type of the chain
enum Network {
option (gogoproto.goproto_enum_stringer) = true;
ETH = 0;
Expand All @@ -42,28 +42,38 @@ enum Network {
POLYGON = 3;
BSC = 4;
}

// NetworkType represents the network type of the chain
enum NetworkType {
option (gogoproto.goproto_enum_stringer) = true;
MAINNET = 0;
TESTNET = 1;
PRIVNET = 2;
DEVNET = 3;
}

// Vm represents the virtual machine type of the chain to support smart contracts
enum Vm {
option (gogoproto.goproto_enum_stringer) = true;
NO_VM = 0;
EVM = 1;
}

// Consensus represents the consensus algorithm used by the chain
enum Consensus {
option (gogoproto.goproto_enum_stringer) = true;
Ethereum = 0;
Tendermint = 1;
Bitcoin = 2;
}

// Chain represents a blockchain network with its unique chain ID
// ChainName is the name of the chain
// ChainId is the unique identifier of the chain
// Network is the network type of the chain , this can be ZETA, ETH, BSC, BTC, POLYGON
// NetworkType is the network type of the chain, this can be MAINNET, TESTNET, DEVNET, PRIVNET
// Vm is the virtual machine type of the chain to support smart contracts, this can be EVM, NO_VM
// Consensus is the consensus algorithm used by the chain, this can be Tendermint, Ethereum, Bitcoin
// IsExternal is a boolean value to determine if the chain is external to Zeta
// IsHeaderSupported is a boolean value to determine if the chain supports headers

message Chain {
ChainName chain_name = 1;
int64 chain_id = 2;
Expand Down

0 comments on commit 0aa02a6

Please sign in to comment.