gravity_proto/
ethereum_claim.rs1pub trait EthereumClaim {
4 fn get_event_nonce(&self) -> u64;
9
10 fn get_eth_block_height(&self) -> u64;
15
16 fn get_claimer(&self) -> String;
21
22 fn get_type(&self) -> ClaimType;
24
25 }
35
36impl ToString for ClaimType {
37 fn to_string(&self) -> String {
38 match self {
39 ClaimType::Unspecified => "CLAIM_TYPE_UNSPECIFIED".to_string(),
40 ClaimType::SendToCosmos => "CLAIM_TYPE_SEND_TO_COSMOS".to_string(),
41 ClaimType::BatchSendToEth => "CLAIM_TYPE_BATCH_SEND_TO_ETH".to_string(),
42 ClaimType::Erc20Deployed => "CLAIM_TYPE_ERC20_DEPLOYED".to_string(),
43 ClaimType::LogicCallExecuted => "CLAIM_TYPE_LOGIC_CALL_EXECUTED".to_string(),
44 ClaimType::ValsetUpdated => "CLAIM_TYPE_VALSET_UPDATED".to_string(),
45 }
46 }
47}
48
49impl EthereumClaim for MsgSendToCosmosClaim {
50 fn get_event_nonce(&self) -> u64 {
51 self.event_nonce
52 }
53
54 fn get_eth_block_height(&self) -> u64 {
55 self.eth_block_height
56 }
57
58 fn get_claimer(&self) -> String {
59 self.orchestrator.clone()
60 }
61
62 fn get_type(&self) -> ClaimType {
63 ClaimType::SendToCosmos
64 }
65}
66impl EthereumClaim for MsgBatchSendToEthClaim {
67 fn get_event_nonce(&self) -> u64 {
68 self.event_nonce
69 }
70
71 fn get_eth_block_height(&self) -> u64 {
72 self.eth_block_height
73 }
74
75 fn get_claimer(&self) -> String {
76 self.orchestrator.clone()
77 }
78
79 fn get_type(&self) -> ClaimType {
80 ClaimType::BatchSendToEth
81 }
82}
83impl EthereumClaim for MsgErc20DeployedClaim {
84 fn get_event_nonce(&self) -> u64 {
85 self.event_nonce
86 }
87
88 fn get_eth_block_height(&self) -> u64 {
89 self.eth_block_height
90 }
91
92 fn get_claimer(&self) -> String {
93 self.orchestrator.clone()
94 }
95
96 fn get_type(&self) -> ClaimType {
97 ClaimType::Erc20Deployed
98 }
99}
100impl EthereumClaim for MsgLogicCallExecutedClaim {
101 fn get_event_nonce(&self) -> u64 {
102 self.event_nonce
103 }
104
105 fn get_eth_block_height(&self) -> u64 {
106 self.eth_block_height
107 }
108
109 fn get_claimer(&self) -> String {
110 self.orchestrator.clone()
111 }
112
113 fn get_type(&self) -> ClaimType {
114 ClaimType::LogicCallExecuted
115 }
116}
117impl EthereumClaim for MsgValsetUpdatedClaim {
118 fn get_event_nonce(&self) -> u64 {
119 self.event_nonce
120 }
121
122 fn get_eth_block_height(&self) -> u64 {
123 self.eth_block_height
124 }
125
126 fn get_claimer(&self) -> String {
127 self.orchestrator.clone()
128 }
129
130 fn get_type(&self) -> ClaimType {
131 ClaimType::ValsetUpdated
132 }
133}