#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SystemContract {
ChainConfig = 0,
ChainQuery = 1,
CertManage = 2,
Governance = 3,
MultiSign = 4,
ContractManage = 5,
PrivateCompute = 6,
DposErc20 = 7,
DposStake = 8,
SubscribeManage = 9,
ArchiveManage = 10,
CrossTransaction = 11,
PubkeyManage = 12,
AccountManager = 13,
RelayCross = 17,
TransactionManager = 18,
T = 99,
}
impl SystemContract {
pub fn as_str_name(&self) -> &'static str {
match self {
SystemContract::ChainConfig => "CHAIN_CONFIG",
SystemContract::ChainQuery => "CHAIN_QUERY",
SystemContract::CertManage => "CERT_MANAGE",
SystemContract::Governance => "GOVERNANCE",
SystemContract::MultiSign => "MULTI_SIGN",
SystemContract::ContractManage => "CONTRACT_MANAGE",
SystemContract::PrivateCompute => "PRIVATE_COMPUTE",
SystemContract::DposErc20 => "DPOS_ERC20",
SystemContract::DposStake => "DPOS_STAKE",
SystemContract::SubscribeManage => "SUBSCRIBE_MANAGE",
SystemContract::ArchiveManage => "ARCHIVE_MANAGE",
SystemContract::CrossTransaction => "CROSS_TRANSACTION",
SystemContract::PubkeyManage => "PUBKEY_MANAGE",
SystemContract::AccountManager => "ACCOUNT_MANAGER",
SystemContract::RelayCross => "RELAY_CROSS",
SystemContract::TransactionManager => "TRANSACTION_MANAGER",
SystemContract::T => "T",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CHAIN_CONFIG" => Some(Self::ChainConfig),
"CHAIN_QUERY" => Some(Self::ChainQuery),
"CERT_MANAGE" => Some(Self::CertManage),
"GOVERNANCE" => Some(Self::Governance),
"MULTI_SIGN" => Some(Self::MultiSign),
"CONTRACT_MANAGE" => Some(Self::ContractManage),
"PRIVATE_COMPUTE" => Some(Self::PrivateCompute),
"DPOS_ERC20" => Some(Self::DposErc20),
"DPOS_STAKE" => Some(Self::DposStake),
"SUBSCRIBE_MANAGE" => Some(Self::SubscribeManage),
"ARCHIVE_MANAGE" => Some(Self::ArchiveManage),
"CROSS_TRANSACTION" => Some(Self::CrossTransaction),
"PUBKEY_MANAGE" => Some(Self::PubkeyManage),
"ACCOUNT_MANAGER" => Some(Self::AccountManager),
"RELAY_CROSS" => Some(Self::RelayCross),
"TRANSACTION_MANAGER" => Some(Self::TransactionManager),
"T" => Some(Self::T),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ChainQueryFunction {
GetBlockByTxId = 0,
GetTxByTxId = 1,
GetBlockByHeight = 2,
GetChainInfo = 3,
GetLastConfigBlock = 4,
GetBlockByHash = 5,
GetNodeChainList = 6,
GetGovernanceContract = 7,
GetBlockWithTxrwsetsByHeight = 8,
GetBlockWithTxrwsetsByHash = 9,
GetLastBlock = 10,
GetFullBlockByHeight = 11,
GetBlockHeightByTxId = 12,
GetBlockHeightByHash = 13,
GetBlockHeaderByHeight = 14,
GetArchivedBlockHeight = 15,
GetAllContracts = 16,
GetMerklePathByTxId = 17,
GetArchiveStatus = 18,
}
impl ChainQueryFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
ChainQueryFunction::GetBlockByTxId => "GET_BLOCK_BY_TX_ID",
ChainQueryFunction::GetTxByTxId => "GET_TX_BY_TX_ID",
ChainQueryFunction::GetBlockByHeight => "GET_BLOCK_BY_HEIGHT",
ChainQueryFunction::GetChainInfo => "GET_CHAIN_INFO",
ChainQueryFunction::GetLastConfigBlock => "GET_LAST_CONFIG_BLOCK",
ChainQueryFunction::GetBlockByHash => "GET_BLOCK_BY_HASH",
ChainQueryFunction::GetNodeChainList => "GET_NODE_CHAIN_LIST",
ChainQueryFunction::GetGovernanceContract => "GET_GOVERNANCE_CONTRACT",
ChainQueryFunction::GetBlockWithTxrwsetsByHeight => "GET_BLOCK_WITH_TXRWSETS_BY_HEIGHT",
ChainQueryFunction::GetBlockWithTxrwsetsByHash => "GET_BLOCK_WITH_TXRWSETS_BY_HASH",
ChainQueryFunction::GetLastBlock => "GET_LAST_BLOCK",
ChainQueryFunction::GetFullBlockByHeight => "GET_FULL_BLOCK_BY_HEIGHT",
ChainQueryFunction::GetBlockHeightByTxId => "GET_BLOCK_HEIGHT_BY_TX_ID",
ChainQueryFunction::GetBlockHeightByHash => "GET_BLOCK_HEIGHT_BY_HASH",
ChainQueryFunction::GetBlockHeaderByHeight => "GET_BLOCK_HEADER_BY_HEIGHT",
ChainQueryFunction::GetArchivedBlockHeight => "GET_ARCHIVED_BLOCK_HEIGHT",
ChainQueryFunction::GetAllContracts => "GET_ALL_CONTRACTS",
ChainQueryFunction::GetMerklePathByTxId => "GET_MERKLE_PATH_BY_TX_ID",
ChainQueryFunction::GetArchiveStatus => "GET_ARCHIVE_STATUS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GET_BLOCK_BY_TX_ID" => Some(Self::GetBlockByTxId),
"GET_TX_BY_TX_ID" => Some(Self::GetTxByTxId),
"GET_BLOCK_BY_HEIGHT" => Some(Self::GetBlockByHeight),
"GET_CHAIN_INFO" => Some(Self::GetChainInfo),
"GET_LAST_CONFIG_BLOCK" => Some(Self::GetLastConfigBlock),
"GET_BLOCK_BY_HASH" => Some(Self::GetBlockByHash),
"GET_NODE_CHAIN_LIST" => Some(Self::GetNodeChainList),
"GET_GOVERNANCE_CONTRACT" => Some(Self::GetGovernanceContract),
"GET_BLOCK_WITH_TXRWSETS_BY_HEIGHT" => Some(Self::GetBlockWithTxrwsetsByHeight),
"GET_BLOCK_WITH_TXRWSETS_BY_HASH" => Some(Self::GetBlockWithTxrwsetsByHash),
"GET_LAST_BLOCK" => Some(Self::GetLastBlock),
"GET_FULL_BLOCK_BY_HEIGHT" => Some(Self::GetFullBlockByHeight),
"GET_BLOCK_HEIGHT_BY_TX_ID" => Some(Self::GetBlockHeightByTxId),
"GET_BLOCK_HEIGHT_BY_HASH" => Some(Self::GetBlockHeightByHash),
"GET_BLOCK_HEADER_BY_HEIGHT" => Some(Self::GetBlockHeaderByHeight),
"GET_ARCHIVED_BLOCK_HEIGHT" => Some(Self::GetArchivedBlockHeight),
"GET_ALL_CONTRACTS" => Some(Self::GetAllContracts),
"GET_MERKLE_PATH_BY_TX_ID" => Some(Self::GetMerklePathByTxId),
"GET_ARCHIVE_STATUS" => Some(Self::GetArchiveStatus),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveBlock {}
pub mod archive_block {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
BlockHeight = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::BlockHeight => "BLOCK_HEIGHT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BLOCK_HEIGHT" => Some(Self::BlockHeight),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreBlock {}
pub mod restore_block {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
FullBlock = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::FullBlock => "FULL_BLOCK",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FULL_BLOCK" => Some(Self::FullBlock),
_ => None,
}
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ArchiveFunction {
ArchiveBlock = 0,
RestoreBlock = 1,
}
impl ArchiveFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
ArchiveFunction::ArchiveBlock => "ARCHIVE_BLOCK",
ArchiveFunction::RestoreBlock => "RESTORE_BLOCK",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ARCHIVE_BLOCK" => Some(Self::ArchiveBlock),
"RESTORE_BLOCK" => Some(Self::RestoreBlock),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TestContractFunction {
P = 0,
G = 1,
N = 2,
D = 3,
}
impl TestContractFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
TestContractFunction::P => "P",
TestContractFunction::G => "G",
TestContractFunction::N => "N",
TestContractFunction::D => "D",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"P" => Some(Self::P),
"G" => Some(Self::G),
"N" => Some(Self::N),
"D" => Some(Self::D),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PubkeyManageFunction {
PubkeyAdd = 0,
PubkeyDelete = 1,
PubkeyQuery = 2,
}
impl PubkeyManageFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
PubkeyManageFunction::PubkeyAdd => "PUBKEY_ADD",
PubkeyManageFunction::PubkeyDelete => "PUBKEY_DELETE",
PubkeyManageFunction::PubkeyQuery => "PUBKEY_QUERY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PUBKEY_ADD" => Some(Self::PubkeyAdd),
"PUBKEY_DELETE" => Some(Self::PubkeyDelete),
"PUBKEY_QUERY" => Some(Self::PubkeyQuery),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeBlock {}
pub mod subscribe_block {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
StartBlock = 0,
EndBlock = 1,
WithRwset = 2,
OnlyHeader = 3,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::StartBlock => "START_BLOCK",
Parameter::EndBlock => "END_BLOCK",
Parameter::WithRwset => "WITH_RWSET",
Parameter::OnlyHeader => "ONLY_HEADER",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"START_BLOCK" => Some(Self::StartBlock),
"END_BLOCK" => Some(Self::EndBlock),
"WITH_RWSET" => Some(Self::WithRwset),
"ONLY_HEADER" => Some(Self::OnlyHeader),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeTx {}
pub mod subscribe_tx {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
StartBlock = 0,
EndBlock = 1,
ContractName = 2,
TxIds = 3,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::StartBlock => "START_BLOCK",
Parameter::EndBlock => "END_BLOCK",
Parameter::ContractName => "CONTRACT_NAME",
Parameter::TxIds => "TX_IDS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"START_BLOCK" => Some(Self::StartBlock),
"END_BLOCK" => Some(Self::EndBlock),
"CONTRACT_NAME" => Some(Self::ContractName),
"TX_IDS" => Some(Self::TxIds),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeContractEvent {}
pub mod subscribe_contract_event {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
Topic = 0,
ContractName = 1,
StartBlock = 2,
EndBlock = 3,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::Topic => "TOPIC",
Parameter::ContractName => "CONTRACT_NAME",
Parameter::StartBlock => "START_BLOCK",
Parameter::EndBlock => "END_BLOCK",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TOPIC" => Some(Self::Topic),
"CONTRACT_NAME" => Some(Self::ContractName),
"START_BLOCK" => Some(Self::StartBlock),
"END_BLOCK" => Some(Self::EndBlock),
_ => None,
}
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SubscribeFunction {
SubscribeBlock = 0,
SubscribeTx = 1,
SubscribeContractEvent = 2,
}
impl SubscribeFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
SubscribeFunction::SubscribeBlock => "SUBSCRIBE_BLOCK",
SubscribeFunction::SubscribeTx => "SUBSCRIBE_TX",
SubscribeFunction::SubscribeContractEvent => "SUBSCRIBE_CONTRACT_EVENT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SUBSCRIBE_BLOCK" => Some(Self::SubscribeBlock),
"SUBSCRIBE_TX" => Some(Self::SubscribeTx),
"SUBSCRIBE_CONTRACT_EVENT" => Some(Self::SubscribeContractEvent),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TransactionManagerFunction {
AddBlacklistTxIds = 0,
DeleteBlacklistTxIds = 1,
GetBlacklistTxIds = 2,
}
impl TransactionManagerFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
TransactionManagerFunction::AddBlacklistTxIds => "ADD_BLACKLIST_TX_IDS",
TransactionManagerFunction::DeleteBlacklistTxIds => "DELETE_BLACKLIST_TX_IDS",
TransactionManagerFunction::GetBlacklistTxIds => "GET_BLACKLIST_TX_IDS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ADD_BLACKLIST_TX_IDS" => Some(Self::AddBlacklistTxIds),
"DELETE_BLACKLIST_TX_IDS" => Some(Self::DeleteBlacklistTxIds),
"GET_BLACKLIST_TX_IDS" => Some(Self::GetBlacklistTxIds),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoteAttestationRequest {
#[prost(message, repeated, tag = "1")]
pub sign_pair: ::prost::alloc::vec::Vec<SignInfo>,
#[prost(message, optional, tag = "2")]
pub payload: ::core::option::Option<RemoteAttestationPayload>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoteAttestationPayload {
#[prost(string, tag = "1")]
pub challenge: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub org_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateDeployRequest {
#[prost(message, repeated, tag = "1")]
pub sign_pair: ::prost::alloc::vec::Vec<SignInfo>,
#[prost(message, optional, tag = "2")]
pub payload: ::core::option::Option<PrivateDeployPayload>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateDeployPayload {
#[prost(string, tag = "1")]
pub code_bytes: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub private_rlp_data: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub passwd: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub sig_algo: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub contract_name: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub contract_version: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub code_hash: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "8")]
pub org_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "9")]
pub time_stamp: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateComputeRequest {
#[prost(message, repeated, tag = "1")]
pub sign_pair: ::prost::alloc::vec::Vec<SignInfo>,
#[prost(message, optional, tag = "2")]
pub payload: ::core::option::Option<PrivateComputePayload>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateComputePayload {
#[prost(string, tag = "1")]
pub private_rlp_data: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub passwd: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub sig_algo: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub contract_name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub code_hash: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "6")]
pub org_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "7")]
pub time_stamp: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignInfo {
#[prost(string, tag = "1")]
pub client_sign: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cert: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PrivateComputeFunction {
GetContract = 0,
GetData = 1,
SaveCaCert = 2,
SaveDir = 3,
SaveData = 4,
SaveEnclaveReport = 5,
GetEnclaveProof = 6,
GetCaCert = 7,
GetDir = 8,
CheckCallerCertAuth = 9,
GetEnclaveEncryptPubKey = 10,
GetEnclaveVerificationPubKey = 11,
GetEnclaveReport = 12,
GetEnclaveChallenge = 13,
GetEnclaveSignature = 14,
SaveRemoteAttestation = 15,
}
impl PrivateComputeFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
PrivateComputeFunction::GetContract => "GET_CONTRACT",
PrivateComputeFunction::GetData => "GET_DATA",
PrivateComputeFunction::SaveCaCert => "SAVE_CA_CERT",
PrivateComputeFunction::SaveDir => "SAVE_DIR",
PrivateComputeFunction::SaveData => "SAVE_DATA",
PrivateComputeFunction::SaveEnclaveReport => "SAVE_ENCLAVE_REPORT",
PrivateComputeFunction::GetEnclaveProof => "GET_ENCLAVE_PROOF",
PrivateComputeFunction::GetCaCert => "GET_CA_CERT",
PrivateComputeFunction::GetDir => "GET_DIR",
PrivateComputeFunction::CheckCallerCertAuth => "CHECK_CALLER_CERT_AUTH",
PrivateComputeFunction::GetEnclaveEncryptPubKey => "GET_ENCLAVE_ENCRYPT_PUB_KEY",
PrivateComputeFunction::GetEnclaveVerificationPubKey => {
"GET_ENCLAVE_VERIFICATION_PUB_KEY"
}
PrivateComputeFunction::GetEnclaveReport => "GET_ENCLAVE_REPORT",
PrivateComputeFunction::GetEnclaveChallenge => "GET_ENCLAVE_CHALLENGE",
PrivateComputeFunction::GetEnclaveSignature => "GET_ENCLAVE_SIGNATURE",
PrivateComputeFunction::SaveRemoteAttestation => "SAVE_REMOTE_ATTESTATION",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GET_CONTRACT" => Some(Self::GetContract),
"GET_DATA" => Some(Self::GetData),
"SAVE_CA_CERT" => Some(Self::SaveCaCert),
"SAVE_DIR" => Some(Self::SaveDir),
"SAVE_DATA" => Some(Self::SaveData),
"SAVE_ENCLAVE_REPORT" => Some(Self::SaveEnclaveReport),
"GET_ENCLAVE_PROOF" => Some(Self::GetEnclaveProof),
"GET_CA_CERT" => Some(Self::GetCaCert),
"GET_DIR" => Some(Self::GetDir),
"CHECK_CALLER_CERT_AUTH" => Some(Self::CheckCallerCertAuth),
"GET_ENCLAVE_ENCRYPT_PUB_KEY" => Some(Self::GetEnclaveEncryptPubKey),
"GET_ENCLAVE_VERIFICATION_PUB_KEY" => Some(Self::GetEnclaveVerificationPubKey),
"GET_ENCLAVE_REPORT" => Some(Self::GetEnclaveReport),
"GET_ENCLAVE_CHALLENGE" => Some(Self::GetEnclaveChallenge),
"GET_ENCLAVE_SIGNATURE" => Some(Self::GetEnclaveSignature),
"SAVE_REMOTE_ATTESTATION" => Some(Self::SaveRemoteAttestation),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SaveGateway {}
pub mod save_gateway {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
GatewayInfoByte = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::GatewayInfoByte => "GATEWAY_INFO_BYTE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GATEWAY_INFO_BYTE" => Some(Self::GatewayInfoByte),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateGateway {}
pub mod update_gateway {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
GatewayId = 0,
GatewayInfoByte = 1,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::GatewayId => "GATEWAY_ID",
Parameter::GatewayInfoByte => "GATEWAY_INFO_BYTE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GATEWAY_ID" => Some(Self::GatewayId),
"GATEWAY_INFO_BYTE" => Some(Self::GatewayInfoByte),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGateway {}
pub mod get_gateway {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
GatewayId = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::GatewayId => "GATEWAY_ID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GATEWAY_ID" => Some(Self::GatewayId),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGatewayByRange {}
pub mod get_gateway_by_range {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
StartGatewayId = 0,
StopGatewayId = 1,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::StartGatewayId => "START_GATEWAY_ID",
Parameter::StopGatewayId => "STOP_GATEWAY_ID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"START_GATEWAY_ID" => Some(Self::StartGatewayId),
"STOP_GATEWAY_ID" => Some(Self::StopGatewayId),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SaveCrossChainInfo {}
pub mod save_cross_chain_info {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
CrossChainInfoByte = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::CrossChainInfoByte => "CROSS_CHAIN_INFO_BYTE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CROSS_CHAIN_INFO_BYTE" => Some(Self::CrossChainInfoByte),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCrossChainTry {}
pub mod update_cross_chain_try {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
CrossChainId = 0,
CrossChainTxByte = 1,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::CrossChainId => "CROSS_CHAIN_ID",
Parameter::CrossChainTxByte => "CROSS_CHAIN_TX_BYTE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CROSS_CHAIN_ID" => Some(Self::CrossChainId),
"CROSS_CHAIN_TX_BYTE" => Some(Self::CrossChainTxByte),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCrossChainResult {}
pub mod update_cross_chain_result {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
CrossChainId = 0,
CrossChainResult = 1,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::CrossChainId => "CROSS_CHAIN_ID",
Parameter::CrossChainResult => "CROSS_CHAIN_RESULT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CROSS_CHAIN_ID" => Some(Self::CrossChainId),
"CROSS_CHAIN_RESULT" => Some(Self::CrossChainResult),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteErrorCrossChainTxList {}
pub mod delete_error_cross_chain_tx_list {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
CrossChainId = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::CrossChainId => "CROSS_CHAIN_ID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CROSS_CHAIN_ID" => Some(Self::CrossChainId),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCrossChainConfirm {}
pub mod update_cross_chain_confirm {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
CrossChainId = 0,
CrossChainConfirmByte = 1,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::CrossChainId => "CROSS_CHAIN_ID",
Parameter::CrossChainConfirmByte => "CROSS_CHAIN_CONFIRM_BYTE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CROSS_CHAIN_ID" => Some(Self::CrossChainId),
"CROSS_CHAIN_CONFIRM_BYTE" => Some(Self::CrossChainConfirmByte),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSrcGatewayConfirm {}
pub mod update_src_gateway_confirm {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
CrossChainId = 0,
ConfirmResult = 1,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::CrossChainId => "CROSS_CHAIN_ID",
Parameter::ConfirmResult => "CONFIRM_RESULT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CROSS_CHAIN_ID" => Some(Self::CrossChainId),
"CONFIRM_RESULT" => Some(Self::ConfirmResult),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCrossChainInfo {}
pub mod get_cross_chain_info {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
CrossChainId = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::CrossChainId => "CROSS_CHAIN_ID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CROSS_CHAIN_ID" => Some(Self::CrossChainId),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCrossChainInfoByRange {}
pub mod get_cross_chain_info_by_range {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
StartCrossChainId = 0,
StopCrossChainId = 1,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::StartCrossChainId => "START_CROSS_CHAIN_ID",
Parameter::StopCrossChainId => "STOP_CROSS_CHAIN_ID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"START_CROSS_CHAIN_ID" => Some(Self::StartCrossChainId),
"STOP_CROSS_CHAIN_ID" => Some(Self::StopCrossChainId),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventDataType {}
pub mod event_data_type {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
String = 0,
Map = 1,
Byte = 2,
Bool = 3,
Int = 4,
Float = 5,
Array = 6,
Hash = 7,
Address = 8,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::String => "STRING",
Parameter::Map => "MAP",
Parameter::Byte => "BYTE",
Parameter::Bool => "BOOL",
Parameter::Int => "INT",
Parameter::Float => "FLOAT",
Parameter::Array => "ARRAY",
Parameter::Hash => "HASH",
Parameter::Address => "ADDRESS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STRING" => Some(Self::String),
"MAP" => Some(Self::Map),
"BYTE" => Some(Self::Byte),
"BOOL" => Some(Self::Bool),
"INT" => Some(Self::Int),
"FLOAT" => Some(Self::Float),
"ARRAY" => Some(Self::Array),
"HASH" => Some(Self::Hash),
"ADDRESS" => Some(Self::Address),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Code {}
pub mod code {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
GatewaySuccess = 0,
GatewayTimeout = 1,
InvalidParameter = 2,
TxProveError = 3,
ContractFail = 4,
InternalError = 5,
RelayChainError = 6,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::GatewaySuccess => "GATEWAY_SUCCESS",
Parameter::GatewayTimeout => "GATEWAY_TIMEOUT",
Parameter::InvalidParameter => "INVALID_PARAMETER",
Parameter::TxProveError => "TX_PROVE_ERROR",
Parameter::ContractFail => "CONTRACT_FAIL",
Parameter::InternalError => "INTERNAL_ERROR",
Parameter::RelayChainError => "RELAY_CHAIN_ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GATEWAY_SUCCESS" => Some(Self::GatewaySuccess),
"GATEWAY_TIMEOUT" => Some(Self::GatewayTimeout),
"INVALID_PARAMETER" => Some(Self::InvalidParameter),
"TX_PROVE_ERROR" => Some(Self::TxProveError),
"CONTRACT_FAIL" => Some(Self::ContractFail),
"INTERNAL_ERROR" => Some(Self::InternalError),
"RELAY_CHAIN_ERROR" => Some(Self::RelayChainError),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossType {}
pub mod cross_type {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
Query = 0,
Invoke = 1,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::Query => "QUERY",
Parameter::Invoke => "INVOKE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"QUERY" => Some(Self::Query),
"INVOKE" => Some(Self::Invoke),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxResultValue {}
pub mod tx_result_value {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
TxSuccess = 0,
TxTimeout = 1,
TxFail = 2,
TxNotExist = 3,
TxNoPermissions = 4,
GatewayNotFound = 5,
GatewayPingpongError = 6,
ChainPingError = 7,
SrcGatewayGetError = 8,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::TxSuccess => "TX_SUCCESS",
Parameter::TxTimeout => "TX_TIMEOUT",
Parameter::TxFail => "TX_FAIL",
Parameter::TxNotExist => "TX_NOT_EXIST",
Parameter::TxNoPermissions => "TX_NO_PERMISSIONS",
Parameter::GatewayNotFound => "GATEWAY_NOT_FOUND",
Parameter::GatewayPingpongError => "GATEWAY_PINGPONG_ERROR",
Parameter::ChainPingError => "CHAIN_PING_ERROR",
Parameter::SrcGatewayGetError => "SRC_GATEWAY_GET_ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TX_SUCCESS" => Some(Self::TxSuccess),
"TX_TIMEOUT" => Some(Self::TxTimeout),
"TX_FAIL" => Some(Self::TxFail),
"TX_NOT_EXIST" => Some(Self::TxNotExist),
"TX_NO_PERMISSIONS" => Some(Self::TxNoPermissions),
"GATEWAY_NOT_FOUND" => Some(Self::GatewayNotFound),
"GATEWAY_PINGPONG_ERROR" => Some(Self::GatewayPingpongError),
"CHAIN_PING_ERROR" => Some(Self::ChainPingError),
"SRC_GATEWAY_GET_ERROR" => Some(Self::SrcGatewayGetError),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxVerifyRsult {}
pub mod tx_verify_rsult {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
VerifySuccess = 0,
VerifyInvalid = 1,
VerifyNotNeed = 2,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::VerifySuccess => "VERIFY_SUCCESS",
Parameter::VerifyInvalid => "VERIFY_INVALID",
Parameter::VerifyNotNeed => "VERIFY_NOT_NEED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VERIFY_SUCCESS" => Some(Self::VerifySuccess),
"VERIFY_INVALID" => Some(Self::VerifyInvalid),
"VERIFY_NOT_NEED" => Some(Self::VerifyNotNeed),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainStateValue {}
pub mod cross_chain_state_value {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
New = 0,
WaitExecute = 1,
WaitConfirm = 2,
ConfirmEnd = 3,
CancelEnd = 4,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::New => "NEW",
Parameter::WaitExecute => "WAIT_EXECUTE",
Parameter::WaitConfirm => "WAIT_CONFIRM",
Parameter::ConfirmEnd => "CONFIRM_END",
Parameter::CancelEnd => "CANCEL_END",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NEW" => Some(Self::New),
"WAIT_EXECUTE" => Some(Self::WaitExecute),
"WAIT_CONFIRM" => Some(Self::WaitConfirm),
"CONFIRM_END" => Some(Self::ConfirmEnd),
"CANCEL_END" => Some(Self::CancelEnd),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventName {}
pub mod event_name {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
NewCrossChain = 0,
CrossChainTryEnd = 1,
UpadateResultEnd = 2,
GatewayConfirmEnd = 3,
SrcGatewayConfirmEnd = 4,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::NewCrossChain => "NEW_CROSS_CHAIN",
Parameter::CrossChainTryEnd => "CROSS_CHAIN_TRY_END",
Parameter::UpadateResultEnd => "UPADATE_RESULT_END",
Parameter::GatewayConfirmEnd => "GATEWAY_CONFIRM_END",
Parameter::SrcGatewayConfirmEnd => "SRC_GATEWAY_CONFIRM_END",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NEW_CROSS_CHAIN" => Some(Self::NewCrossChain),
"CROSS_CHAIN_TRY_END" => Some(Self::CrossChainTryEnd),
"UPADATE_RESULT_END" => Some(Self::UpadateResultEnd),
"GATEWAY_CONFIRM_END" => Some(Self::GatewayConfirmEnd),
"SRC_GATEWAY_CONFIRM_END" => Some(Self::SrcGatewayConfirmEnd),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainInfo {
#[prost(string, tag = "1")]
pub cross_chain_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cross_chain_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub cross_chain_flag: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub from: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub cross_chain_msg: ::prost::alloc::vec::Vec<CrossChainMsg>,
#[prost(message, optional, tag = "6")]
pub first_tx_content: ::core::option::Option<TxContentWithVerify>,
#[prost(message, repeated, tag = "7")]
pub cross_chain_tx_content: ::prost::alloc::vec::Vec<TxContentWithVerify>,
#[prost(bool, tag = "8")]
pub cross_chain_result: bool,
#[prost(message, repeated, tag = "9")]
pub gateway_confirm_result: ::prost::alloc::vec::Vec<CrossChainConfirm>,
#[prost(enumeration = "cross_chain_state_value::Parameter", tag = "10")]
pub state: i32,
#[prost(message, optional, tag = "11")]
pub confirm_info: ::core::option::Option<ConfirmInfo>,
#[prost(message, optional, tag = "12")]
pub cancel_info: ::core::option::Option<CancelInfo>,
#[prost(message, optional, tag = "13")]
pub confirm_result: ::core::option::Option<CrossChainConfirm>,
#[prost(int64, tag = "14")]
pub timeout: i64,
#[prost(enumeration = "cross_type::Parameter", tag = "19")]
pub cross_type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainMsg {
#[prost(string, tag = "1")]
pub gateway_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub chain_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub contract_name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub method: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "5")]
pub identity: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "6")]
pub parameter: ::prost::alloc::string::String,
#[prost(int32, repeated, tag = "7")]
pub param_data: ::prost::alloc::vec::Vec<i32>,
#[prost(enumeration = "event_data_type::Parameter", repeated, tag = "8")]
pub param_data_type: ::prost::alloc::vec::Vec<i32>,
#[prost(string, tag = "9")]
pub extra_data: ::prost::alloc::string::String,
#[prost(message, optional, tag = "10")]
pub confirm_info: ::core::option::Option<ConfirmInfo>,
#[prost(message, optional, tag = "11")]
pub cancel_info: ::core::option::Option<CancelInfo>,
#[prost(string, tag = "12")]
pub abi: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxContentWithVerify {
#[prost(message, optional, tag = "1")]
pub tx_content: ::core::option::Option<TxContent>,
#[prost(string, repeated, tag = "2")]
pub try_result: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "tx_verify_rsult::Parameter", tag = "3")]
pub tx_verify_result: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfirmInfo {
#[prost(string, tag = "2")]
pub chain_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub contract_name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub method: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub parameter: ::prost::alloc::string::String,
#[prost(int32, repeated, tag = "6")]
pub param_data: ::prost::alloc::vec::Vec<i32>,
#[prost(enumeration = "event_data_type::Parameter", repeated, tag = "7")]
pub param_data_type: ::prost::alloc::vec::Vec<i32>,
#[prost(string, tag = "8")]
pub extra_data: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub abi: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainConfirm {
#[prost(enumeration = "code::Parameter", tag = "1")]
pub code: i32,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxContent {
#[prost(string, tag = "1")]
pub tx_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub tx: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "tx_result_value::Parameter", tag = "3")]
pub tx_result: i32,
#[prost(string, tag = "4")]
pub gateway_id: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub chain_rid: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub tx_prove: ::prost::alloc::string::String,
#[prost(int64, tag = "7")]
pub block_height: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelInfo {
#[prost(string, tag = "2")]
pub chain_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub contract_name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub method: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub parameter: ::prost::alloc::string::String,
#[prost(int32, repeated, tag = "6")]
pub param_data: ::prost::alloc::vec::Vec<i32>,
#[prost(enumeration = "event_data_type::Parameter", repeated, tag = "7")]
pub param_data_type: ::prost::alloc::vec::Vec<i32>,
#[prost(string, tag = "8")]
pub extra_data: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub abi: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainTxUpChain {
#[prost(int32, tag = "1")]
pub index: i32,
#[prost(message, optional, tag = "2")]
pub tx_content_with_verify: ::core::option::Option<TxContentWithVerify>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainConfirmUpChain {
#[prost(int32, tag = "1")]
pub index: i32,
#[prost(message, optional, tag = "2")]
pub cross_chain_confirm: ::core::option::Option<CrossChainConfirm>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RelayCrossFunction {
SaveGateway = 0,
UpdateGateway = 1,
SaveCrossChainInfo = 2,
GetErrorCrossChainTxList = 3,
DeleteErrorCrossChainTxList = 4,
UpdateCrossChainTry = 5,
UpdateCrossChainResult = 6,
UpdateCrossChainConfirm = 7,
UpdateSrcGatewayConfirm = 8,
GetGatewayNum = 9,
GetGateway = 10,
GetGatewayByRange = 11,
GetCrossChainNum = 12,
GetCrossChainInfo = 13,
GetCrossChainInfoByRange = 14,
GetNotEndCrossChianIdList = 15,
}
impl RelayCrossFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
RelayCrossFunction::SaveGateway => "SAVE_GATEWAY",
RelayCrossFunction::UpdateGateway => "UPDATE_GATEWAY",
RelayCrossFunction::SaveCrossChainInfo => "SAVE_CROSS_CHAIN_INFO",
RelayCrossFunction::GetErrorCrossChainTxList => "GET_ERROR_CROSS_CHAIN_TX_LIST",
RelayCrossFunction::DeleteErrorCrossChainTxList => "DELETE_ERROR_CROSS_CHAIN_TX_LIST",
RelayCrossFunction::UpdateCrossChainTry => "UPDATE_CROSS_CHAIN_TRY",
RelayCrossFunction::UpdateCrossChainResult => "UPDATE_CROSS_CHAIN_RESULT",
RelayCrossFunction::UpdateCrossChainConfirm => "UPDATE_CROSS_CHAIN_CONFIRM",
RelayCrossFunction::UpdateSrcGatewayConfirm => "UPDATE_SRC_GATEWAY_CONFIRM",
RelayCrossFunction::GetGatewayNum => "GET_GATEWAY_NUM",
RelayCrossFunction::GetGateway => "GET_GATEWAY",
RelayCrossFunction::GetGatewayByRange => "GET_GATEWAY_BY_RANGE",
RelayCrossFunction::GetCrossChainNum => "GET_CROSS_CHAIN_NUM",
RelayCrossFunction::GetCrossChainInfo => "GET_CROSS_CHAIN_INFO",
RelayCrossFunction::GetCrossChainInfoByRange => "GET_CROSS_CHAIN_INFO_BY_RANGE",
RelayCrossFunction::GetNotEndCrossChianIdList => "GET_NOT_END_CROSS_CHIAN_ID_LIST",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SAVE_GATEWAY" => Some(Self::SaveGateway),
"UPDATE_GATEWAY" => Some(Self::UpdateGateway),
"SAVE_CROSS_CHAIN_INFO" => Some(Self::SaveCrossChainInfo),
"GET_ERROR_CROSS_CHAIN_TX_LIST" => Some(Self::GetErrorCrossChainTxList),
"DELETE_ERROR_CROSS_CHAIN_TX_LIST" => Some(Self::DeleteErrorCrossChainTxList),
"UPDATE_CROSS_CHAIN_TRY" => Some(Self::UpdateCrossChainTry),
"UPDATE_CROSS_CHAIN_RESULT" => Some(Self::UpdateCrossChainResult),
"UPDATE_CROSS_CHAIN_CONFIRM" => Some(Self::UpdateCrossChainConfirm),
"UPDATE_SRC_GATEWAY_CONFIRM" => Some(Self::UpdateSrcGatewayConfirm),
"GET_GATEWAY_NUM" => Some(Self::GetGatewayNum),
"GET_GATEWAY" => Some(Self::GetGateway),
"GET_GATEWAY_BY_RANGE" => Some(Self::GetGatewayByRange),
"GET_CROSS_CHAIN_NUM" => Some(Self::GetCrossChainNum),
"GET_CROSS_CHAIN_INFO" => Some(Self::GetCrossChainInfo),
"GET_CROSS_CHAIN_INFO_BY_RANGE" => Some(Self::GetCrossChainInfoByRange),
"GET_NOT_END_CROSS_CHIAN_ID_LIST" => Some(Self::GetNotEndCrossChianIdList),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiSignInfo {
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<super::common::Payload>,
#[prost(string, tag = "2")]
pub contract_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub method: ::prost::alloc::string::String,
#[prost(enumeration = "MultiSignStatus", tag = "4")]
pub status: i32,
#[prost(message, repeated, tag = "5")]
pub vote_infos: ::prost::alloc::vec::Vec<MultiSignVoteInfo>,
#[prost(string, tag = "6")]
pub message: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "7")]
pub result: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiSignVoteInfo {
#[prost(enumeration = "VoteStatus", tag = "1")]
pub vote: i32,
#[prost(message, optional, tag = "2")]
pub endorsement: ::core::option::Option<super::common::EndorsementEntry>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiReq {}
pub mod multi_req {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
SysContractName = 0,
SysMethod = 1,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::SysContractName => "SYS_CONTRACT_NAME",
Parameter::SysMethod => "SYS_METHOD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SYS_CONTRACT_NAME" => Some(Self::SysContractName),
"SYS_METHOD" => Some(Self::SysMethod),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiVote {}
pub mod multi_vote {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
VoteInfo = 0,
TxId = 1,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::VoteInfo => "VOTE_INFO",
Parameter::TxId => "TX_ID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VOTE_INFO" => Some(Self::VoteInfo),
"TX_ID" => Some(Self::TxId),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiQuery {}
pub mod multi_query {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
TxId = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::TxId => "TX_ID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TX_ID" => Some(Self::TxId),
_ => None,
}
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MultiSignFunction {
Req = 0,
Vote = 1,
Query = 2,
Trig = 3,
}
impl MultiSignFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
MultiSignFunction::Req => "REQ",
MultiSignFunction::Vote => "VOTE",
MultiSignFunction::Query => "QUERY",
MultiSignFunction::Trig => "TRIG",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REQ" => Some(Self::Req),
"VOTE" => Some(Self::Vote),
"QUERY" => Some(Self::Query),
"TRIG" => Some(Self::Trig),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum VoteStatus {
Agree = 0,
Reject = 1,
}
impl VoteStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
VoteStatus::Agree => "AGREE",
VoteStatus::Reject => "REJECT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AGREE" => Some(Self::Agree),
"REJECT" => Some(Self::Reject),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MultiSignStatus {
Processing = 0,
Adopted = 1,
Refused = 2,
Failed = 3,
Passed = 4,
}
impl MultiSignStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
MultiSignStatus::Processing => "PROCESSING",
MultiSignStatus::Adopted => "ADOPTED",
MultiSignStatus::Refused => "REFUSED",
MultiSignStatus::Failed => "FAILED",
MultiSignStatus::Passed => "PASSED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PROCESSING" => Some(Self::Processing),
"ADOPTED" => Some(Self::Adopted),
"REFUSED" => Some(Self::Refused),
"FAILED" => Some(Self::Failed),
"PASSED" => Some(Self::Passed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContractStatus {
Normal = 0,
Frozen = 1,
Revoked = 2,
}
impl ContractStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
ContractStatus::Normal => "NORMAL",
ContractStatus::Frozen => "FROZEN",
ContractStatus::Revoked => "REVOKED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NORMAL" => Some(Self::Normal),
"FROZEN" => Some(Self::Frozen),
"REVOKED" => Some(Self::Revoked),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitContract {}
pub mod init_contract {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
ContractName = 0,
ContractRuntimeType = 1,
ContractVersion = 2,
ContractBytecode = 3,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::ContractName => "CONTRACT_NAME",
Parameter::ContractRuntimeType => "CONTRACT_RUNTIME_TYPE",
Parameter::ContractVersion => "CONTRACT_VERSION",
Parameter::ContractBytecode => "CONTRACT_BYTECODE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONTRACT_NAME" => Some(Self::ContractName),
"CONTRACT_RUNTIME_TYPE" => Some(Self::ContractRuntimeType),
"CONTRACT_VERSION" => Some(Self::ContractVersion),
"CONTRACT_BYTECODE" => Some(Self::ContractBytecode),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpgradeContract {}
pub mod upgrade_contract {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
ContractName = 0,
ContractRuntimeType = 1,
ContractVersion = 2,
ContractBytecode = 3,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::ContractName => "CONTRACT_NAME",
Parameter::ContractRuntimeType => "CONTRACT_RUNTIME_TYPE",
Parameter::ContractVersion => "CONTRACT_VERSION",
Parameter::ContractBytecode => "CONTRACT_BYTECODE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONTRACT_NAME" => Some(Self::ContractName),
"CONTRACT_RUNTIME_TYPE" => Some(Self::ContractRuntimeType),
"CONTRACT_VERSION" => Some(Self::ContractVersion),
"CONTRACT_BYTECODE" => Some(Self::ContractBytecode),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FreezeContract {}
pub mod freeze_contract {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
ContractName = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::ContractName => "CONTRACT_NAME",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONTRACT_NAME" => Some(Self::ContractName),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnfreezeContract {}
pub mod unfreeze_contract {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
ContractName = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::ContractName => "CONTRACT_NAME",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONTRACT_NAME" => Some(Self::ContractName),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevokeContract {}
pub mod revoke_contract {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
ContractName = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::ContractName => "CONTRACT_NAME",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONTRACT_NAME" => Some(Self::ContractName),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetContractInfo {}
pub mod get_contract_info {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
ContractName = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::ContractName => "CONTRACT_NAME",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONTRACT_NAME" => Some(Self::ContractName),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractAccess {}
pub mod contract_access {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Parameter {
NativeContractName = 0,
}
impl Parameter {
pub fn as_str_name(&self) -> &'static str {
match self {
Parameter::NativeContractName => "NATIVE_CONTRACT_NAME",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NATIVE_CONTRACT_NAME" => Some(Self::NativeContractName),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractInfo {
#[prost(message, repeated, tag = "1")]
pub contract_transaction: ::prost::alloc::vec::Vec<ContractTransaction>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractTransaction {
#[prost(message, optional, tag = "1")]
pub contract: ::core::option::Option<super::common::Contract>,
#[prost(string, tag = "2")]
pub tx_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContractManageFunction {
InitContract = 0,
UpgradeContract = 1,
FreezeContract = 2,
UnfreezeContract = 3,
RevokeContract = 4,
GrantContractAccess = 5,
RevokeContractAccess = 6,
VerifyContractAccess = 7,
InitNewNativeContract = 8,
}
impl ContractManageFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
ContractManageFunction::InitContract => "INIT_CONTRACT",
ContractManageFunction::UpgradeContract => "UPGRADE_CONTRACT",
ContractManageFunction::FreezeContract => "FREEZE_CONTRACT",
ContractManageFunction::UnfreezeContract => "UNFREEZE_CONTRACT",
ContractManageFunction::RevokeContract => "REVOKE_CONTRACT",
ContractManageFunction::GrantContractAccess => "GRANT_CONTRACT_ACCESS",
ContractManageFunction::RevokeContractAccess => "REVOKE_CONTRACT_ACCESS",
ContractManageFunction::VerifyContractAccess => "VERIFY_CONTRACT_ACCESS",
ContractManageFunction::InitNewNativeContract => "INIT_NEW_NATIVE_CONTRACT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INIT_CONTRACT" => Some(Self::InitContract),
"UPGRADE_CONTRACT" => Some(Self::UpgradeContract),
"FREEZE_CONTRACT" => Some(Self::FreezeContract),
"UNFREEZE_CONTRACT" => Some(Self::UnfreezeContract),
"REVOKE_CONTRACT" => Some(Self::RevokeContract),
"GRANT_CONTRACT_ACCESS" => Some(Self::GrantContractAccess),
"REVOKE_CONTRACT_ACCESS" => Some(Self::RevokeContractAccess),
"VERIFY_CONTRACT_ACCESS" => Some(Self::VerifyContractAccess),
"INIT_NEW_NATIVE_CONTRACT" => Some(Self::InitNewNativeContract),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContractQueryFunction {
GetContractInfo = 0,
GetContractBytecode = 1,
GetContractList = 2,
GetDisabledContractList = 3,
}
impl ContractQueryFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
ContractQueryFunction::GetContractInfo => "GET_CONTRACT_INFO",
ContractQueryFunction::GetContractBytecode => "GET_CONTRACT_BYTECODE",
ContractQueryFunction::GetContractList => "GET_CONTRACT_LIST",
ContractQueryFunction::GetDisabledContractList => "GET_DISABLED_CONTRACT_LIST",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GET_CONTRACT_INFO" => Some(Self::GetContractInfo),
"GET_CONTRACT_BYTECODE" => Some(Self::GetContractBytecode),
"GET_CONTRACT_LIST" => Some(Self::GetContractList),
"GET_DISABLED_CONTRACT_LIST" => Some(Self::GetDisabledContractList),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountMultiSign {
#[prost(bytes = "vec", tag = "1")]
pub payloads: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub client_sign: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub public_key_info: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountMultiSignsReq {
#[prost(message, repeated, tag = "1")]
pub gas_multi_signs: ::prost::alloc::vec::Vec<AccountMultiSign>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RechargeGas {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub gas_amount: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RechargeGasReq {
#[prost(message, repeated, tag = "1")]
pub batch_recharge_gas: ::prost::alloc::vec::Vec<RechargeGas>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum GasAccountFunction {
SetAdmin = 0,
GetAdmin = 1,
RechargeGas = 2,
GetBalance = 3,
ChargeGas = 4,
FrozenAccount = 5,
UnfrozenAccount = 6,
AccountStatus = 7,
RefundGas = 8,
RefundGasVm = 9,
ChargeGasForMultiAccount = 10,
}
impl GasAccountFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
GasAccountFunction::SetAdmin => "SET_ADMIN",
GasAccountFunction::GetAdmin => "GET_ADMIN",
GasAccountFunction::RechargeGas => "RECHARGE_GAS",
GasAccountFunction::GetBalance => "GET_BALANCE",
GasAccountFunction::ChargeGas => "CHARGE_GAS",
GasAccountFunction::FrozenAccount => "FROZEN_ACCOUNT",
GasAccountFunction::UnfrozenAccount => "UNFROZEN_ACCOUNT",
GasAccountFunction::AccountStatus => "ACCOUNT_STATUS",
GasAccountFunction::RefundGas => "REFUND_GAS",
GasAccountFunction::RefundGasVm => "REFUND_GAS_VM",
GasAccountFunction::ChargeGasForMultiAccount => "CHARGE_GAS_FOR_MULTI_ACCOUNT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SET_ADMIN" => Some(Self::SetAdmin),
"GET_ADMIN" => Some(Self::GetAdmin),
"RECHARGE_GAS" => Some(Self::RechargeGas),
"GET_BALANCE" => Some(Self::GetBalance),
"CHARGE_GAS" => Some(Self::ChargeGas),
"FROZEN_ACCOUNT" => Some(Self::FrozenAccount),
"UNFROZEN_ACCOUNT" => Some(Self::UnfrozenAccount),
"ACCOUNT_STATUS" => Some(Self::AccountStatus),
"REFUND_GAS" => Some(Self::RefundGas),
"REFUND_GAS_VM" => Some(Self::RefundGasVm),
"CHARGE_GAS_FOR_MULTI_ACCOUNT" => Some(Self::ChargeGasForMultiAccount),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DPoSerc20Function {
GetOwner = 0,
GetDecimals = 1,
Transfer = 2,
TransferFrom = 3,
GetBalanceof = 4,
Approve = 5,
GetAllowance = 6,
Burn = 7,
Mint = 8,
TransferOwnership = 9,
GetTotalSupply = 10,
}
impl DPoSerc20Function {
pub fn as_str_name(&self) -> &'static str {
match self {
DPoSerc20Function::GetOwner => "GET_OWNER",
DPoSerc20Function::GetDecimals => "GET_DECIMALS",
DPoSerc20Function::Transfer => "TRANSFER",
DPoSerc20Function::TransferFrom => "TRANSFER_FROM",
DPoSerc20Function::GetBalanceof => "GET_BALANCEOF",
DPoSerc20Function::Approve => "APPROVE",
DPoSerc20Function::GetAllowance => "GET_ALLOWANCE",
DPoSerc20Function::Burn => "BURN",
DPoSerc20Function::Mint => "MINT",
DPoSerc20Function::TransferOwnership => "TRANSFER_OWNERSHIP",
DPoSerc20Function::GetTotalSupply => "GET_TOTAL_SUPPLY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GET_OWNER" => Some(Self::GetOwner),
"GET_DECIMALS" => Some(Self::GetDecimals),
"TRANSFER" => Some(Self::Transfer),
"TRANSFER_FROM" => Some(Self::TransferFrom),
"GET_BALANCEOF" => Some(Self::GetBalanceof),
"APPROVE" => Some(Self::Approve),
"GET_ALLOWANCE" => Some(Self::GetAllowance),
"BURN" => Some(Self::Burn),
"MINT" => Some(Self::Mint),
"TRANSFER_OWNERSHIP" => Some(Self::TransferOwnership),
"GET_TOTAL_SUPPLY" => Some(Self::GetTotalSupply),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Epoch {
#[prost(uint64, tag = "1")]
pub epoch_id: u64,
#[prost(string, repeated, tag = "2")]
pub proposer_vector: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint64, tag = "3")]
pub next_epoch_create_height: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Validator {
#[prost(string, tag = "1")]
pub validator_address: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub jailed: bool,
#[prost(enumeration = "BondStatus", tag = "3")]
pub status: i32,
#[prost(string, tag = "4")]
pub tokens: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub delegator_shares: ::prost::alloc::string::String,
#[prost(uint64, tag = "6")]
pub unbonding_epoch_id: u64,
#[prost(uint64, tag = "7")]
pub unbonding_completion_epoch_id: u64,
#[prost(string, tag = "8")]
pub self_delegation: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Delegation {
#[prost(string, tag = "1")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub validator_address: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub shares: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnbondingDelegation {
#[prost(string, tag = "1")]
pub epoch_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub validator_address: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub entries: ::prost::alloc::vec::Vec<UnbondingDelegationEntry>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnbondingDelegationEntry {
#[prost(uint64, tag = "1")]
pub creation_epoch_id: u64,
#[prost(uint64, tag = "2")]
pub completion_epoch_id: u64,
#[prost(string, tag = "3")]
pub amount: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorVector {
#[prost(string, repeated, tag = "1")]
pub vector: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelegationInfo {
#[prost(message, repeated, tag = "1")]
pub infos: ::prost::alloc::vec::Vec<Delegation>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DPoSStakeFunction {
GetAllCandidates = 0,
GetValidatorByAddress = 1,
Delegate = 2,
GetDelegationsByAddress = 3,
GetUserDelegationByValidator = 4,
Undelegate = 5,
ReadEpochById = 6,
ReadLatestEpoch = 7,
SetNodeId = 8,
GetNodeId = 9,
UpdateMinSelfDelegation = 10,
ReadMinSelfDelegation = 11,
UpdateEpochValidatorNumber = 12,
ReadEpochValidatorNumber = 13,
UpdateEpochBlockNumber = 14,
ReadEpochBlockNumber = 15,
ReadCompleteUnboundingEpochNumber = 16,
ReadSystemContractAddr = 18,
}
impl DPoSStakeFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
DPoSStakeFunction::GetAllCandidates => "GET_ALL_CANDIDATES",
DPoSStakeFunction::GetValidatorByAddress => "GET_VALIDATOR_BY_ADDRESS",
DPoSStakeFunction::Delegate => "DELEGATE",
DPoSStakeFunction::GetDelegationsByAddress => "GET_DELEGATIONS_BY_ADDRESS",
DPoSStakeFunction::GetUserDelegationByValidator => "GET_USER_DELEGATION_BY_VALIDATOR",
DPoSStakeFunction::Undelegate => "UNDELEGATE",
DPoSStakeFunction::ReadEpochById => "READ_EPOCH_BY_ID",
DPoSStakeFunction::ReadLatestEpoch => "READ_LATEST_EPOCH",
DPoSStakeFunction::SetNodeId => "SET_NODE_ID",
DPoSStakeFunction::GetNodeId => "GET_NODE_ID",
DPoSStakeFunction::UpdateMinSelfDelegation => "UPDATE_MIN_SELF_DELEGATION",
DPoSStakeFunction::ReadMinSelfDelegation => "READ_MIN_SELF_DELEGATION",
DPoSStakeFunction::UpdateEpochValidatorNumber => "UPDATE_EPOCH_VALIDATOR_NUMBER",
DPoSStakeFunction::ReadEpochValidatorNumber => "READ_EPOCH_VALIDATOR_NUMBER",
DPoSStakeFunction::UpdateEpochBlockNumber => "UPDATE_EPOCH_BLOCK_NUMBER",
DPoSStakeFunction::ReadEpochBlockNumber => "READ_EPOCH_BLOCK_NUMBER",
DPoSStakeFunction::ReadCompleteUnboundingEpochNumber => {
"READ_COMPLETE_UNBOUNDING_EPOCH_NUMBER"
}
DPoSStakeFunction::ReadSystemContractAddr => "READ_SYSTEM_CONTRACT_ADDR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GET_ALL_CANDIDATES" => Some(Self::GetAllCandidates),
"GET_VALIDATOR_BY_ADDRESS" => Some(Self::GetValidatorByAddress),
"DELEGATE" => Some(Self::Delegate),
"GET_DELEGATIONS_BY_ADDRESS" => Some(Self::GetDelegationsByAddress),
"GET_USER_DELEGATION_BY_VALIDATOR" => Some(Self::GetUserDelegationByValidator),
"UNDELEGATE" => Some(Self::Undelegate),
"READ_EPOCH_BY_ID" => Some(Self::ReadEpochById),
"READ_LATEST_EPOCH" => Some(Self::ReadLatestEpoch),
"SET_NODE_ID" => Some(Self::SetNodeId),
"GET_NODE_ID" => Some(Self::GetNodeId),
"UPDATE_MIN_SELF_DELEGATION" => Some(Self::UpdateMinSelfDelegation),
"READ_MIN_SELF_DELEGATION" => Some(Self::ReadMinSelfDelegation),
"UPDATE_EPOCH_VALIDATOR_NUMBER" => Some(Self::UpdateEpochValidatorNumber),
"READ_EPOCH_VALIDATOR_NUMBER" => Some(Self::ReadEpochValidatorNumber),
"UPDATE_EPOCH_BLOCK_NUMBER" => Some(Self::UpdateEpochBlockNumber),
"READ_EPOCH_BLOCK_NUMBER" => Some(Self::ReadEpochBlockNumber),
"READ_COMPLETE_UNBOUNDING_EPOCH_NUMBER" => {
Some(Self::ReadCompleteUnboundingEpochNumber)
}
"READ_SYSTEM_CONTRACT_ADDR" => Some(Self::ReadSystemContractAddr),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BondStatus {
Bonded = 0,
Unbonding = 1,
Unbonded = 2,
}
impl BondStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
BondStatus::Bonded => "BONDED",
BondStatus::Unbonding => "UNBONDING",
BondStatus::Unbonded => "UNBONDED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BONDED" => Some(Self::Bonded),
"UNBONDING" => Some(Self::Unbonding),
"UNBONDED" => Some(Self::Unbonded),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossState {
#[prost(enumeration = "CrossTxState", tag = "1")]
pub state: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CrossTransactionFunction {
Execute = 0,
Commit = 1,
Rollback = 2,
ReadState = 3,
SaveProof = 4,
ReadProof = 5,
Arbitrate = 6,
}
impl CrossTransactionFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
CrossTransactionFunction::Execute => "EXECUTE",
CrossTransactionFunction::Commit => "COMMIT",
CrossTransactionFunction::Rollback => "ROLLBACK",
CrossTransactionFunction::ReadState => "READ_STATE",
CrossTransactionFunction::SaveProof => "SAVE_PROOF",
CrossTransactionFunction::ReadProof => "READ_PROOF",
CrossTransactionFunction::Arbitrate => "ARBITRATE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EXECUTE" => Some(Self::Execute),
"COMMIT" => Some(Self::Commit),
"ROLLBACK" => Some(Self::Rollback),
"READ_STATE" => Some(Self::ReadState),
"SAVE_PROOF" => Some(Self::SaveProof),
"READ_PROOF" => Some(Self::ReadProof),
"ARBITRATE" => Some(Self::Arbitrate),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CrossTxState {
NonExist = 0,
Init = 1,
ExecuteOk = 2,
ExecuteFail = 3,
CommitOk = 4,
CommitFail = 5,
RollbackOk = 6,
RollbackFail = 7,
}
impl CrossTxState {
pub fn as_str_name(&self) -> &'static str {
match self {
CrossTxState::NonExist => "NON_EXIST",
CrossTxState::Init => "INIT",
CrossTxState::ExecuteOk => "EXECUTE_OK",
CrossTxState::ExecuteFail => "EXECUTE_FAIL",
CrossTxState::CommitOk => "COMMIT_OK",
CrossTxState::CommitFail => "COMMIT_FAIL",
CrossTxState::RollbackOk => "ROLLBACK_OK",
CrossTxState::RollbackFail => "ROLLBACK_FAIL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NON_EXIST" => Some(Self::NonExist),
"INIT" => Some(Self::Init),
"EXECUTE_OK" => Some(Self::ExecuteOk),
"EXECUTE_FAIL" => Some(Self::ExecuteFail),
"COMMIT_OK" => Some(Self::CommitOk),
"COMMIT_FAIL" => Some(Self::CommitFail),
"ROLLBACK_OK" => Some(Self::RollbackOk),
"ROLLBACK_FAIL" => Some(Self::RollbackFail),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CrossArbitrateCmd {
AutoCmd = 0,
ExecuteCmd = 1,
CommitCmd = 2,
RollbackCmd = 3,
}
impl CrossArbitrateCmd {
pub fn as_str_name(&self) -> &'static str {
match self {
CrossArbitrateCmd::AutoCmd => "AUTO_CMD",
CrossArbitrateCmd::ExecuteCmd => "EXECUTE_CMD",
CrossArbitrateCmd::CommitCmd => "COMMIT_CMD",
CrossArbitrateCmd::RollbackCmd => "ROLLBACK_CMD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AUTO_CMD" => Some(Self::AutoCmd),
"EXECUTE_CMD" => Some(Self::ExecuteCmd),
"COMMIT_CMD" => Some(Self::CommitCmd),
"ROLLBACK_CMD" => Some(Self::RollbackCmd),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CallType {
Direct = 0,
Cross = 1,
}
impl CallType {
pub fn as_str_name(&self) -> &'static str {
match self {
CallType::Direct => "DIRECT",
CallType::Cross => "CROSS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DIRECT" => Some(Self::Direct),
"CROSS" => Some(Self::Cross),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CrossParams {
Creator = 0,
Sender = 1,
CallType = 2,
}
impl CrossParams {
pub fn as_str_name(&self) -> &'static str {
match self {
CrossParams::Creator => "CREATOR",
CrossParams::Sender => "SENDER",
CrossParams::CallType => "CALL_TYPE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CREATOR" => Some(Self::Creator),
"SENDER" => Some(Self::Sender),
"CALL_TYPE" => Some(Self::CallType),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ChainConfigFunction {
GetChainConfig = 0,
GetChainConfigAt = 1,
CoreUpdate = 2,
BlockUpdate = 3,
TrustRootAdd = 4,
TrustRootUpdate = 5,
TrustRootDelete = 6,
NodeAddrAdd = 7,
NodeAddrUpdate = 8,
NodeAddrDelete = 9,
NodeOrgAdd = 10,
NodeOrgUpdate = 11,
NodeOrgDelete = 12,
ConsensusExtAdd = 13,
ConsensusExtUpdate = 14,
ConsensusExtDelete = 15,
PermissionAdd = 16,
PermissionUpdate = 17,
PermissionDelete = 18,
NodeIdAdd = 19,
NodeIdUpdate = 20,
NodeIdDelete = 21,
TrustMemberAdd = 22,
TrustMemberUpdate = 23,
TrustMemberDelete = 24,
AlterAddrType = 25,
EnableOrDisableGas = 26,
SetInvokeBaseGas = 27,
SetAccountManagerAdmin = 28,
PermissionList = 29,
UpdateVersion = 30,
MultiSignEnableManualRun = 31,
EnableOnlyCreatorUpgrade = 32,
DisableOnlyCreatorUpgrade = 33,
SetInvokeGasPrice = 34,
SetInstallBaseGas = 35,
SetInstallGasPrice = 36,
}
impl ChainConfigFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
ChainConfigFunction::GetChainConfig => "GET_CHAIN_CONFIG",
ChainConfigFunction::GetChainConfigAt => "GET_CHAIN_CONFIG_AT",
ChainConfigFunction::CoreUpdate => "CORE_UPDATE",
ChainConfigFunction::BlockUpdate => "BLOCK_UPDATE",
ChainConfigFunction::TrustRootAdd => "TRUST_ROOT_ADD",
ChainConfigFunction::TrustRootUpdate => "TRUST_ROOT_UPDATE",
ChainConfigFunction::TrustRootDelete => "TRUST_ROOT_DELETE",
ChainConfigFunction::NodeAddrAdd => "NODE_ADDR_ADD",
ChainConfigFunction::NodeAddrUpdate => "NODE_ADDR_UPDATE",
ChainConfigFunction::NodeAddrDelete => "NODE_ADDR_DELETE",
ChainConfigFunction::NodeOrgAdd => "NODE_ORG_ADD",
ChainConfigFunction::NodeOrgUpdate => "NODE_ORG_UPDATE",
ChainConfigFunction::NodeOrgDelete => "NODE_ORG_DELETE",
ChainConfigFunction::ConsensusExtAdd => "CONSENSUS_EXT_ADD",
ChainConfigFunction::ConsensusExtUpdate => "CONSENSUS_EXT_UPDATE",
ChainConfigFunction::ConsensusExtDelete => "CONSENSUS_EXT_DELETE",
ChainConfigFunction::PermissionAdd => "PERMISSION_ADD",
ChainConfigFunction::PermissionUpdate => "PERMISSION_UPDATE",
ChainConfigFunction::PermissionDelete => "PERMISSION_DELETE",
ChainConfigFunction::NodeIdAdd => "NODE_ID_ADD",
ChainConfigFunction::NodeIdUpdate => "NODE_ID_UPDATE",
ChainConfigFunction::NodeIdDelete => "NODE_ID_DELETE",
ChainConfigFunction::TrustMemberAdd => "TRUST_MEMBER_ADD",
ChainConfigFunction::TrustMemberUpdate => "TRUST_MEMBER_UPDATE",
ChainConfigFunction::TrustMemberDelete => "TRUST_MEMBER_DELETE",
ChainConfigFunction::AlterAddrType => "ALTER_ADDR_TYPE",
ChainConfigFunction::EnableOrDisableGas => "ENABLE_OR_DISABLE_GAS",
ChainConfigFunction::SetInvokeBaseGas => "SET_INVOKE_BASE_GAS",
ChainConfigFunction::SetAccountManagerAdmin => "SET_ACCOUNT_MANAGER_ADMIN",
ChainConfigFunction::PermissionList => "PERMISSION_LIST",
ChainConfigFunction::UpdateVersion => "UPDATE_VERSION",
ChainConfigFunction::MultiSignEnableManualRun => "MULTI_SIGN_ENABLE_MANUAL_RUN",
ChainConfigFunction::EnableOnlyCreatorUpgrade => "ENABLE_ONLY_CREATOR_UPGRADE",
ChainConfigFunction::DisableOnlyCreatorUpgrade => "DISABLE_ONLY_CREATOR_UPGRADE",
ChainConfigFunction::SetInvokeGasPrice => "SET_INVOKE_GAS_PRICE",
ChainConfigFunction::SetInstallBaseGas => "SET_INSTALL_BASE_GAS",
ChainConfigFunction::SetInstallGasPrice => "SET_INSTALL_GAS_PRICE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GET_CHAIN_CONFIG" => Some(Self::GetChainConfig),
"GET_CHAIN_CONFIG_AT" => Some(Self::GetChainConfigAt),
"CORE_UPDATE" => Some(Self::CoreUpdate),
"BLOCK_UPDATE" => Some(Self::BlockUpdate),
"TRUST_ROOT_ADD" => Some(Self::TrustRootAdd),
"TRUST_ROOT_UPDATE" => Some(Self::TrustRootUpdate),
"TRUST_ROOT_DELETE" => Some(Self::TrustRootDelete),
"NODE_ADDR_ADD" => Some(Self::NodeAddrAdd),
"NODE_ADDR_UPDATE" => Some(Self::NodeAddrUpdate),
"NODE_ADDR_DELETE" => Some(Self::NodeAddrDelete),
"NODE_ORG_ADD" => Some(Self::NodeOrgAdd),
"NODE_ORG_UPDATE" => Some(Self::NodeOrgUpdate),
"NODE_ORG_DELETE" => Some(Self::NodeOrgDelete),
"CONSENSUS_EXT_ADD" => Some(Self::ConsensusExtAdd),
"CONSENSUS_EXT_UPDATE" => Some(Self::ConsensusExtUpdate),
"CONSENSUS_EXT_DELETE" => Some(Self::ConsensusExtDelete),
"PERMISSION_ADD" => Some(Self::PermissionAdd),
"PERMISSION_UPDATE" => Some(Self::PermissionUpdate),
"PERMISSION_DELETE" => Some(Self::PermissionDelete),
"NODE_ID_ADD" => Some(Self::NodeIdAdd),
"NODE_ID_UPDATE" => Some(Self::NodeIdUpdate),
"NODE_ID_DELETE" => Some(Self::NodeIdDelete),
"TRUST_MEMBER_ADD" => Some(Self::TrustMemberAdd),
"TRUST_MEMBER_UPDATE" => Some(Self::TrustMemberUpdate),
"TRUST_MEMBER_DELETE" => Some(Self::TrustMemberDelete),
"ALTER_ADDR_TYPE" => Some(Self::AlterAddrType),
"ENABLE_OR_DISABLE_GAS" => Some(Self::EnableOrDisableGas),
"SET_INVOKE_BASE_GAS" => Some(Self::SetInvokeBaseGas),
"SET_ACCOUNT_MANAGER_ADMIN" => Some(Self::SetAccountManagerAdmin),
"PERMISSION_LIST" => Some(Self::PermissionList),
"UPDATE_VERSION" => Some(Self::UpdateVersion),
"MULTI_SIGN_ENABLE_MANUAL_RUN" => Some(Self::MultiSignEnableManualRun),
"ENABLE_ONLY_CREATOR_UPGRADE" => Some(Self::EnableOnlyCreatorUpgrade),
"DISABLE_ONLY_CREATOR_UPGRADE" => Some(Self::DisableOnlyCreatorUpgrade),
"SET_INVOKE_GAS_PRICE" => Some(Self::SetInvokeGasPrice),
"SET_INSTALL_BASE_GAS" => Some(Self::SetInstallBaseGas),
"SET_INSTALL_GAS_PRICE" => Some(Self::SetInstallGasPrice),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CertManageFunction {
CertAdd = 0,
CertsDelete = 1,
CertsQuery = 2,
CertsFreeze = 3,
CertsUnfreeze = 4,
CertsRevoke = 5,
CertAliasAdd = 6,
CertAliasUpdate = 7,
CertsAliasDelete = 8,
CertsAliasQuery = 9,
}
impl CertManageFunction {
pub fn as_str_name(&self) -> &'static str {
match self {
CertManageFunction::CertAdd => "CERT_ADD",
CertManageFunction::CertsDelete => "CERTS_DELETE",
CertManageFunction::CertsQuery => "CERTS_QUERY",
CertManageFunction::CertsFreeze => "CERTS_FREEZE",
CertManageFunction::CertsUnfreeze => "CERTS_UNFREEZE",
CertManageFunction::CertsRevoke => "CERTS_REVOKE",
CertManageFunction::CertAliasAdd => "CERT_ALIAS_ADD",
CertManageFunction::CertAliasUpdate => "CERT_ALIAS_UPDATE",
CertManageFunction::CertsAliasDelete => "CERTS_ALIAS_DELETE",
CertManageFunction::CertsAliasQuery => "CERTS_ALIAS_QUERY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CERT_ADD" => Some(Self::CertAdd),
"CERTS_DELETE" => Some(Self::CertsDelete),
"CERTS_QUERY" => Some(Self::CertsQuery),
"CERTS_FREEZE" => Some(Self::CertsFreeze),
"CERTS_UNFREEZE" => Some(Self::CertsUnfreeze),
"CERTS_REVOKE" => Some(Self::CertsRevoke),
"CERT_ALIAS_ADD" => Some(Self::CertAliasAdd),
"CERT_ALIAS_UPDATE" => Some(Self::CertAliasUpdate),
"CERTS_ALIAS_DELETE" => Some(Self::CertsAliasDelete),
"CERTS_ALIAS_QUERY" => Some(Self::CertsAliasQuery),
_ => None,
}
}
}