1#![allow(dead_code)]
2use ::ethbridge_structs::*;
3#[doc = "Container type for all input parameters for the `currentBridgeValidatorSetHash` function with signature `currentBridgeValidatorSetHash()` and selector `0x7379d426`"]
4#[derive(
5 Clone,
6 :: ethers_contract :: EthCall,
7 :: ethers_contract :: EthDisplay,
8 Default,
9 Debug,
10 PartialEq,
11 Eq,
12 Hash,
13)]
14#[ethcall(
15 name = "currentBridgeValidatorSetHash",
16 abi = "currentBridgeValidatorSetHash()"
17)]
18pub struct CurrentBridgeValidatorSetHashCall;
19#[doc = "Container type for all input parameters for the `currentGovernanceValidatorSetHash` function with signature `currentGovernanceValidatorSetHash()` and selector `0x0df6a752`"]
20#[derive(
21 Clone,
22 :: ethers_contract :: EthCall,
23 :: ethers_contract :: EthDisplay,
24 Default,
25 Debug,
26 PartialEq,
27 Eq,
28 Hash,
29)]
30#[ethcall(
31 name = "currentGovernanceValidatorSetHash",
32 abi = "currentGovernanceValidatorSetHash()"
33)]
34pub struct CurrentGovernanceValidatorSetHashCall;
35#[doc = "Container type for all input parameters for the `nextBridgeValidatorSetHash` function with signature `nextBridgeValidatorSetHash()` and selector `0xf5cd6594`"]
36#[derive(
37 Clone,
38 :: ethers_contract :: EthCall,
39 :: ethers_contract :: EthDisplay,
40 Default,
41 Debug,
42 PartialEq,
43 Eq,
44 Hash,
45)]
46#[ethcall(
47 name = "nextBridgeValidatorSetHash",
48 abi = "nextBridgeValidatorSetHash()"
49)]
50pub struct NextBridgeValidatorSetHashCall;
51#[doc = "Container type for all input parameters for the `nextGovernanceValidatorSetHash` function with signature `nextGovernanceValidatorSetHash()` and selector `0x1c461a91`"]
52#[derive(
53 Clone,
54 :: ethers_contract :: EthCall,
55 :: ethers_contract :: EthDisplay,
56 Default,
57 Debug,
58 PartialEq,
59 Eq,
60 Hash,
61)]
62#[ethcall(
63 name = "nextGovernanceValidatorSetHash",
64 abi = "nextGovernanceValidatorSetHash()"
65)]
66pub struct NextGovernanceValidatorSetHashCall;
67#[doc = "Container type for all input parameters for the `transferToChain` function with signature `transferToChain((uint256,address,string)[],uint256)` and selector `0x224738eb`"]
68#[derive(
69 Clone,
70 :: ethers_contract :: EthCall,
71 :: ethers_contract :: EthDisplay,
72 Default,
73 Debug,
74 PartialEq,
75 Eq,
76 Hash,
77)]
78#[ethcall(
79 name = "transferToChain",
80 abi = "transferToChain((uint256,address,string)[],uint256)"
81)]
82pub struct TransferToChainCall {
83 pub transfers: ::std::vec::Vec<ChainTransfer>,
84 pub confirmations: ::ethers::core::types::U256,
85}
86#[doc = "Container type for all input parameters for the `transferToChainNonce` function with signature `transferToChainNonce()` and selector `0x21b1eb5f`"]
87#[derive(
88 Clone,
89 :: ethers_contract :: EthCall,
90 :: ethers_contract :: EthDisplay,
91 Default,
92 Debug,
93 PartialEq,
94 Eq,
95 Hash,
96)]
97#[ethcall(name = "transferToChainNonce", abi = "transferToChainNonce()")]
98pub struct TransferToChainNonceCall;
99#[doc = "Container type for all input parameters for the `transferToErc` function with signature `transferToErc((bytes32[],uint256),(bytes32,bytes32,uint8)[],((bytes32,uint256,address,address)[],bytes32,bytes32[],bool[],uint256,string))` and selector `0x998c0030`"]
100#[derive(
101 Clone,
102 :: ethers_contract :: EthCall,
103 :: ethers_contract :: EthDisplay,
104 Default,
105 Debug,
106 PartialEq,
107 Eq,
108 Hash,
109)]
110#[ethcall(
111 name = "transferToErc",
112 abi = "transferToErc((bytes32[],uint256),(bytes32,bytes32,uint8)[],((bytes32,uint256,address,address)[],bytes32,bytes32[],bool[],uint256,string))"
113)]
114pub struct TransferToErcCall {
115 pub validator_set_args: ValidatorSetArgs,
116 pub signatures: ::std::vec::Vec<Signature>,
117 pub relay_proof: RelayProof,
118}
119#[doc = "Container type for all input parameters for the `transferToErc20Nonce` function with signature `transferToErc20Nonce()` and selector `0x5f9fd577`"]
120#[derive(
121 Clone,
122 :: ethers_contract :: EthCall,
123 :: ethers_contract :: EthDisplay,
124 Default,
125 Debug,
126 PartialEq,
127 Eq,
128 Hash,
129)]
130#[ethcall(name = "transferToErc20Nonce", abi = "transferToErc20Nonce()")]
131pub struct TransferToErc20NonceCall;
132#[doc = "Container type for all input parameters for the `updateValidatorSet` function with signature `updateValidatorSet((bytes32[],uint256),bytes32,bytes32,(bytes32,bytes32,uint8)[])` and selector `0xfd48739e`"]
133#[derive(
134 Clone,
135 :: ethers_contract :: EthCall,
136 :: ethers_contract :: EthDisplay,
137 Default,
138 Debug,
139 PartialEq,
140 Eq,
141 Hash,
142)]
143#[ethcall(
144 name = "updateValidatorSet",
145 abi = "updateValidatorSet((bytes32[],uint256),bytes32,bytes32,(bytes32,bytes32,uint8)[])"
146)]
147pub struct UpdateValidatorSetCall {
148 pub current_validator_set_args: ValidatorSetArgs,
149 pub bridge_validator_set_hash: [u8; 32],
150 pub governance_validator_set_hash: [u8; 32],
151 pub signatures: ::std::vec::Vec<Signature>,
152}
153#[doc = "Container type for all input parameters for the `upgrade` function with signature `upgrade((bytes32[],uint256),(bytes32,bytes32,uint8)[],address,uint256)` and selector `0xc3203d76`"]
154#[derive(
155 Clone,
156 :: ethers_contract :: EthCall,
157 :: ethers_contract :: EthDisplay,
158 Default,
159 Debug,
160 PartialEq,
161 Eq,
162 Hash,
163)]
164#[ethcall(
165 name = "upgrade",
166 abi = "upgrade((bytes32[],uint256),(bytes32,bytes32,uint8)[],address,uint256)"
167)]
168pub struct UpgradeCall {
169 pub current_validator_set_args: ValidatorSetArgs,
170 pub signatures: ::std::vec::Vec<Signature>,
171 pub to: ::ethers::core::types::Address,
172 pub nonce: ::ethers::core::types::U256,
173}
174#[doc = "Container type for all input parameters for the `upgradeNonce` function with signature `upgradeNonce()` and selector `0x1af628b9`"]
175#[derive(
176 Clone,
177 :: ethers_contract :: EthCall,
178 :: ethers_contract :: EthDisplay,
179 Default,
180 Debug,
181 PartialEq,
182 Eq,
183 Hash,
184)]
185#[ethcall(name = "upgradeNonce", abi = "upgradeNonce()")]
186pub struct UpgradeNonceCall;
187#[doc = "Container type for all input parameters for the `validatorSetNonce` function with signature `validatorSetNonce()` and selector `0x486f2e46`"]
188#[derive(
189 Clone,
190 :: ethers_contract :: EthCall,
191 :: ethers_contract :: EthDisplay,
192 Default,
193 Debug,
194 PartialEq,
195 Eq,
196 Hash,
197)]
198#[ethcall(name = "validatorSetNonce", abi = "validatorSetNonce()")]
199pub struct ValidatorSetNonceCall;
200#[doc = "Container type for all input parameters for the `withdraw` function with signature `withdraw((bytes32[],uint256),(bytes32,uint256,address,address)[],(bytes32,bytes32,uint8)[],uint256)` and selector `0x43d80041`"]
201#[derive(
202 Clone,
203 :: ethers_contract :: EthCall,
204 :: ethers_contract :: EthDisplay,
205 Default,
206 Debug,
207 PartialEq,
208 Eq,
209 Hash,
210)]
211#[ethcall(
212 name = "withdraw",
213 abi = "withdraw((bytes32[],uint256),(bytes32,uint256,address,address)[],(bytes32,bytes32,uint8)[],uint256)"
214)]
215pub struct WithdrawCall {
216 pub current_validator_set_args: ValidatorSetArgs,
217 pub transfers: ::std::vec::Vec<Erc20Transfer>,
218 pub signatures: ::std::vec::Vec<Signature>,
219 pub nonce: ::ethers::core::types::U256,
220}
221#[doc = "Container type for all input parameters for the `withdrawNonce` function with signature `withdrawNonce()` and selector `0xb8a4e151`"]
222#[derive(
223 Clone,
224 :: ethers_contract :: EthCall,
225 :: ethers_contract :: EthDisplay,
226 Default,
227 Debug,
228 PartialEq,
229 Eq,
230 Hash,
231)]
232#[ethcall(name = "withdrawNonce", abi = "withdrawNonce()")]
233pub struct WithdrawNonceCall;
234#[doc = "Container type for all of the contract's call "]
235#[derive(Clone, :: ethers_contract :: EthAbiType, Debug, PartialEq, Eq, Hash)]
236pub enum BridgeCalls {
237 CurrentBridgeValidatorSetHash(CurrentBridgeValidatorSetHashCall),
238 CurrentGovernanceValidatorSetHash(CurrentGovernanceValidatorSetHashCall),
239 NextBridgeValidatorSetHash(NextBridgeValidatorSetHashCall),
240 NextGovernanceValidatorSetHash(NextGovernanceValidatorSetHashCall),
241 TransferToChain(TransferToChainCall),
242 TransferToChainNonce(TransferToChainNonceCall),
243 TransferToErc(TransferToErcCall),
244 TransferToErc20Nonce(TransferToErc20NonceCall),
245 UpdateValidatorSet(UpdateValidatorSetCall),
246 Upgrade(UpgradeCall),
247 UpgradeNonce(UpgradeNonceCall),
248 ValidatorSetNonce(ValidatorSetNonceCall),
249 Withdraw(WithdrawCall),
250 WithdrawNonce(WithdrawNonceCall),
251}
252impl ::ethers::core::abi::AbiDecode for BridgeCalls {
253 fn decode(
254 data: impl AsRef<[u8]>,
255 ) -> ::core::result::Result<Self, ::ethers::core::abi::AbiError> {
256 let data = data.as_ref();
257 if let Ok(decoded) =
258 <CurrentBridgeValidatorSetHashCall as ::ethers::core::abi::AbiDecode>::decode(data)
259 {
260 return Ok(Self::CurrentBridgeValidatorSetHash(decoded));
261 }
262 if let Ok(decoded) =
263 <CurrentGovernanceValidatorSetHashCall as ::ethers::core::abi::AbiDecode>::decode(data)
264 {
265 return Ok(Self::CurrentGovernanceValidatorSetHash(decoded));
266 }
267 if let Ok(decoded) =
268 <NextBridgeValidatorSetHashCall as ::ethers::core::abi::AbiDecode>::decode(data)
269 {
270 return Ok(Self::NextBridgeValidatorSetHash(decoded));
271 }
272 if let Ok(decoded) =
273 <NextGovernanceValidatorSetHashCall as ::ethers::core::abi::AbiDecode>::decode(data)
274 {
275 return Ok(Self::NextGovernanceValidatorSetHash(decoded));
276 }
277 if let Ok(decoded) = <TransferToChainCall as ::ethers::core::abi::AbiDecode>::decode(data) {
278 return Ok(Self::TransferToChain(decoded));
279 }
280 if let Ok(decoded) =
281 <TransferToChainNonceCall as ::ethers::core::abi::AbiDecode>::decode(data)
282 {
283 return Ok(Self::TransferToChainNonce(decoded));
284 }
285 if let Ok(decoded) = <TransferToErcCall as ::ethers::core::abi::AbiDecode>::decode(data) {
286 return Ok(Self::TransferToErc(decoded));
287 }
288 if let Ok(decoded) =
289 <TransferToErc20NonceCall as ::ethers::core::abi::AbiDecode>::decode(data)
290 {
291 return Ok(Self::TransferToErc20Nonce(decoded));
292 }
293 if let Ok(decoded) =
294 <UpdateValidatorSetCall as ::ethers::core::abi::AbiDecode>::decode(data)
295 {
296 return Ok(Self::UpdateValidatorSet(decoded));
297 }
298 if let Ok(decoded) = <UpgradeCall as ::ethers::core::abi::AbiDecode>::decode(data) {
299 return Ok(Self::Upgrade(decoded));
300 }
301 if let Ok(decoded) = <UpgradeNonceCall as ::ethers::core::abi::AbiDecode>::decode(data) {
302 return Ok(Self::UpgradeNonce(decoded));
303 }
304 if let Ok(decoded) = <ValidatorSetNonceCall as ::ethers::core::abi::AbiDecode>::decode(data)
305 {
306 return Ok(Self::ValidatorSetNonce(decoded));
307 }
308 if let Ok(decoded) = <WithdrawCall as ::ethers::core::abi::AbiDecode>::decode(data) {
309 return Ok(Self::Withdraw(decoded));
310 }
311 if let Ok(decoded) = <WithdrawNonceCall as ::ethers::core::abi::AbiDecode>::decode(data) {
312 return Ok(Self::WithdrawNonce(decoded));
313 }
314 Err(::ethers::core::abi::Error::InvalidData.into())
315 }
316}
317impl ::ethers::core::abi::AbiEncode for BridgeCalls {
318 fn encode(self) -> Vec<u8> {
319 match self {
320 Self::CurrentBridgeValidatorSetHash(element) => {
321 ::ethers::core::abi::AbiEncode::encode(element)
322 }
323 Self::CurrentGovernanceValidatorSetHash(element) => {
324 ::ethers::core::abi::AbiEncode::encode(element)
325 }
326 Self::NextBridgeValidatorSetHash(element) => {
327 ::ethers::core::abi::AbiEncode::encode(element)
328 }
329 Self::NextGovernanceValidatorSetHash(element) => {
330 ::ethers::core::abi::AbiEncode::encode(element)
331 }
332 Self::TransferToChain(element) => ::ethers::core::abi::AbiEncode::encode(element),
333 Self::TransferToChainNonce(element) => ::ethers::core::abi::AbiEncode::encode(element),
334 Self::TransferToErc(element) => ::ethers::core::abi::AbiEncode::encode(element),
335 Self::TransferToErc20Nonce(element) => ::ethers::core::abi::AbiEncode::encode(element),
336 Self::UpdateValidatorSet(element) => ::ethers::core::abi::AbiEncode::encode(element),
337 Self::Upgrade(element) => ::ethers::core::abi::AbiEncode::encode(element),
338 Self::UpgradeNonce(element) => ::ethers::core::abi::AbiEncode::encode(element),
339 Self::ValidatorSetNonce(element) => ::ethers::core::abi::AbiEncode::encode(element),
340 Self::Withdraw(element) => ::ethers::core::abi::AbiEncode::encode(element),
341 Self::WithdrawNonce(element) => ::ethers::core::abi::AbiEncode::encode(element),
342 }
343 }
344}
345impl ::core::fmt::Display for BridgeCalls {
346 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
347 match self {
348 Self::CurrentBridgeValidatorSetHash(element) => ::core::fmt::Display::fmt(element, f),
349 Self::CurrentGovernanceValidatorSetHash(element) => {
350 ::core::fmt::Display::fmt(element, f)
351 }
352 Self::NextBridgeValidatorSetHash(element) => ::core::fmt::Display::fmt(element, f),
353 Self::NextGovernanceValidatorSetHash(element) => ::core::fmt::Display::fmt(element, f),
354 Self::TransferToChain(element) => ::core::fmt::Display::fmt(element, f),
355 Self::TransferToChainNonce(element) => ::core::fmt::Display::fmt(element, f),
356 Self::TransferToErc(element) => ::core::fmt::Display::fmt(element, f),
357 Self::TransferToErc20Nonce(element) => ::core::fmt::Display::fmt(element, f),
358 Self::UpdateValidatorSet(element) => ::core::fmt::Display::fmt(element, f),
359 Self::Upgrade(element) => ::core::fmt::Display::fmt(element, f),
360 Self::UpgradeNonce(element) => ::core::fmt::Display::fmt(element, f),
361 Self::ValidatorSetNonce(element) => ::core::fmt::Display::fmt(element, f),
362 Self::Withdraw(element) => ::core::fmt::Display::fmt(element, f),
363 Self::WithdrawNonce(element) => ::core::fmt::Display::fmt(element, f),
364 }
365 }
366}
367impl ::core::convert::From<CurrentBridgeValidatorSetHashCall> for BridgeCalls {
368 fn from(value: CurrentBridgeValidatorSetHashCall) -> Self {
369 Self::CurrentBridgeValidatorSetHash(value)
370 }
371}
372impl ::core::convert::From<CurrentGovernanceValidatorSetHashCall> for BridgeCalls {
373 fn from(value: CurrentGovernanceValidatorSetHashCall) -> Self {
374 Self::CurrentGovernanceValidatorSetHash(value)
375 }
376}
377impl ::core::convert::From<NextBridgeValidatorSetHashCall> for BridgeCalls {
378 fn from(value: NextBridgeValidatorSetHashCall) -> Self {
379 Self::NextBridgeValidatorSetHash(value)
380 }
381}
382impl ::core::convert::From<NextGovernanceValidatorSetHashCall> for BridgeCalls {
383 fn from(value: NextGovernanceValidatorSetHashCall) -> Self {
384 Self::NextGovernanceValidatorSetHash(value)
385 }
386}
387impl ::core::convert::From<TransferToChainCall> for BridgeCalls {
388 fn from(value: TransferToChainCall) -> Self {
389 Self::TransferToChain(value)
390 }
391}
392impl ::core::convert::From<TransferToChainNonceCall> for BridgeCalls {
393 fn from(value: TransferToChainNonceCall) -> Self {
394 Self::TransferToChainNonce(value)
395 }
396}
397impl ::core::convert::From<TransferToErcCall> for BridgeCalls {
398 fn from(value: TransferToErcCall) -> Self {
399 Self::TransferToErc(value)
400 }
401}
402impl ::core::convert::From<TransferToErc20NonceCall> for BridgeCalls {
403 fn from(value: TransferToErc20NonceCall) -> Self {
404 Self::TransferToErc20Nonce(value)
405 }
406}
407impl ::core::convert::From<UpdateValidatorSetCall> for BridgeCalls {
408 fn from(value: UpdateValidatorSetCall) -> Self {
409 Self::UpdateValidatorSet(value)
410 }
411}
412impl ::core::convert::From<UpgradeCall> for BridgeCalls {
413 fn from(value: UpgradeCall) -> Self {
414 Self::Upgrade(value)
415 }
416}
417impl ::core::convert::From<UpgradeNonceCall> for BridgeCalls {
418 fn from(value: UpgradeNonceCall) -> Self {
419 Self::UpgradeNonce(value)
420 }
421}
422impl ::core::convert::From<ValidatorSetNonceCall> for BridgeCalls {
423 fn from(value: ValidatorSetNonceCall) -> Self {
424 Self::ValidatorSetNonce(value)
425 }
426}
427impl ::core::convert::From<WithdrawCall> for BridgeCalls {
428 fn from(value: WithdrawCall) -> Self {
429 Self::Withdraw(value)
430 }
431}
432impl ::core::convert::From<WithdrawNonceCall> for BridgeCalls {
433 fn from(value: WithdrawNonceCall) -> Self {
434 Self::WithdrawNonce(value)
435 }
436}
437#[doc = "Container type for all return fields from the `currentBridgeValidatorSetHash` function with signature `currentBridgeValidatorSetHash()` and selector `0x7379d426`"]
438#[derive(
439 Clone,
440 :: ethers_contract :: EthAbiType,
441 :: ethers_contract :: EthAbiCodec,
442 Default,
443 Debug,
444 PartialEq,
445 Eq,
446 Hash,
447)]
448pub struct CurrentBridgeValidatorSetHashReturn(pub [u8; 32]);
449#[doc = "Container type for all return fields from the `currentGovernanceValidatorSetHash` function with signature `currentGovernanceValidatorSetHash()` and selector `0x0df6a752`"]
450#[derive(
451 Clone,
452 :: ethers_contract :: EthAbiType,
453 :: ethers_contract :: EthAbiCodec,
454 Default,
455 Debug,
456 PartialEq,
457 Eq,
458 Hash,
459)]
460pub struct CurrentGovernanceValidatorSetHashReturn(pub [u8; 32]);
461#[doc = "Container type for all return fields from the `nextBridgeValidatorSetHash` function with signature `nextBridgeValidatorSetHash()` and selector `0xf5cd6594`"]
462#[derive(
463 Clone,
464 :: ethers_contract :: EthAbiType,
465 :: ethers_contract :: EthAbiCodec,
466 Default,
467 Debug,
468 PartialEq,
469 Eq,
470 Hash,
471)]
472pub struct NextBridgeValidatorSetHashReturn(pub [u8; 32]);
473#[doc = "Container type for all return fields from the `nextGovernanceValidatorSetHash` function with signature `nextGovernanceValidatorSetHash()` and selector `0x1c461a91`"]
474#[derive(
475 Clone,
476 :: ethers_contract :: EthAbiType,
477 :: ethers_contract :: EthAbiCodec,
478 Default,
479 Debug,
480 PartialEq,
481 Eq,
482 Hash,
483)]
484pub struct NextGovernanceValidatorSetHashReturn(pub [u8; 32]);
485#[doc = "Container type for all return fields from the `transferToChainNonce` function with signature `transferToChainNonce()` and selector `0x21b1eb5f`"]
486#[derive(
487 Clone,
488 :: ethers_contract :: EthAbiType,
489 :: ethers_contract :: EthAbiCodec,
490 Default,
491 Debug,
492 PartialEq,
493 Eq,
494 Hash,
495)]
496pub struct TransferToChainNonceReturn(pub ::ethers::core::types::U256);
497#[doc = "Container type for all return fields from the `transferToErc20Nonce` function with signature `transferToErc20Nonce()` and selector `0x5f9fd577`"]
498#[derive(
499 Clone,
500 :: ethers_contract :: EthAbiType,
501 :: ethers_contract :: EthAbiCodec,
502 Default,
503 Debug,
504 PartialEq,
505 Eq,
506 Hash,
507)]
508pub struct TransferToErc20NonceReturn(pub ::ethers::core::types::U256);
509#[doc = "Container type for all return fields from the `upgradeNonce` function with signature `upgradeNonce()` and selector `0x1af628b9`"]
510#[derive(
511 Clone,
512 :: ethers_contract :: EthAbiType,
513 :: ethers_contract :: EthAbiCodec,
514 Default,
515 Debug,
516 PartialEq,
517 Eq,
518 Hash,
519)]
520pub struct UpgradeNonceReturn(pub ::ethers::core::types::U256);
521#[doc = "Container type for all return fields from the `validatorSetNonce` function with signature `validatorSetNonce()` and selector `0x486f2e46`"]
522#[derive(
523 Clone,
524 :: ethers_contract :: EthAbiType,
525 :: ethers_contract :: EthAbiCodec,
526 Default,
527 Debug,
528 PartialEq,
529 Eq,
530 Hash,
531)]
532pub struct ValidatorSetNonceReturn(pub ::ethers::core::types::U256);
533#[doc = "Container type for all return fields from the `withdrawNonce` function with signature `withdrawNonce()` and selector `0xb8a4e151`"]
534#[derive(
535 Clone,
536 :: ethers_contract :: EthAbiType,
537 :: ethers_contract :: EthAbiCodec,
538 Default,
539 Debug,
540 PartialEq,
541 Eq,
542 Hash,
543)]
544pub struct WithdrawNonceReturn(pub ::ethers::core::types::U256);