From d433569fb715c5071a9500880be19797a55359ba Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Mon, 1 Aug 2022 18:20:28 +0200 Subject: [PATCH] cargo fmt --- .../contract/protocol_solidity/anchor_base.rs | 8 ++- .../protocol_solidity/anchor_handler.rs | 8 ++- .../governed_token_wrapper.rs | 56 ++++++++++++------- .../protocol_solidity/signature_bridge.rs | 8 ++- .../protocol_solidity/token_wrapper.rs | 12 +++- .../token_wrapper_handler.rs | 8 ++- .../protocol_solidity/treasury_handler.rs | 12 +++- 7 files changed, 78 insertions(+), 34 deletions(-) diff --git a/src/evm/contract/protocol_solidity/anchor_base.rs b/src/evm/contract/protocol_solidity/anchor_base.rs index a847341..06f8fa2 100644 --- a/src/evm/contract/protocol_solidity/anchor_base.rs +++ b/src/evm/contract/protocol_solidity/anchor_base.rs @@ -578,7 +578,9 @@ pub mod anchor_base_contract { return Ok(AnchorBaseContractEvents::EdgeUpdateFilter(decoded)); } if let Ok(decoded) = InitializedFilter::decode_log(log) { - return Ok(AnchorBaseContractEvents::InitializedFilter(decoded)); + return Ok(AnchorBaseContractEvents::InitializedFilter( + decoded, + )); } if let Ok(decoded) = InsertionFilter::decode_log(log) { return Ok(AnchorBaseContractEvents::InsertionFilter(decoded)); @@ -1287,7 +1289,9 @@ pub mod anchor_base_contract { data.as_ref(), ) { - return Ok(AnchorBaseContractCalls::EdgeExistsForChain(decoded)); + return Ok(AnchorBaseContractCalls::EdgeExistsForChain( + decoded, + )); } if let Ok(decoded) = ::decode( diff --git a/src/evm/contract/protocol_solidity/anchor_handler.rs b/src/evm/contract/protocol_solidity/anchor_handler.rs index 3d15297..9953637 100644 --- a/src/evm/contract/protocol_solidity/anchor_handler.rs +++ b/src/evm/contract/protocol_solidity/anchor_handler.rs @@ -375,14 +375,18 @@ pub mod anchor_handler_contract { data.as_ref(), ) { - return Ok(AnchorHandlerContractCalls::ExecuteProposal(decoded)); + return Ok(AnchorHandlerContractCalls::ExecuteProposal( + decoded, + )); } if let Ok(decoded) = ::decode( data.as_ref(), ) { - return Ok(AnchorHandlerContractCalls::GetUpdateRecord(decoded)); + return Ok(AnchorHandlerContractCalls::GetUpdateRecord( + decoded, + )); } if let Ok(decoded) = ::decode( diff --git a/src/evm/contract/protocol_solidity/governed_token_wrapper.rs b/src/evm/contract/protocol_solidity/governed_token_wrapper.rs index bd667e3..696cfe7 100644 --- a/src/evm/contract/protocol_solidity/governed_token_wrapper.rs +++ b/src/evm/contract/protocol_solidity/governed_token_wrapper.rs @@ -1795,9 +1795,11 @@ pub mod governed_token_wrapper_contract { data.as_ref(), ) { - return Ok(GovernedTokenWrapperContractCalls::DefaultAdminRole( - decoded, - )); + return Ok( + GovernedTokenWrapperContractCalls::DefaultAdminRole( + decoded, + ), + ); } if let Ok(decoded) = ::decode( @@ -1859,14 +1861,18 @@ pub mod governed_token_wrapper_contract { data.as_ref(), ) { - return Ok(GovernedTokenWrapperContractCalls::BurnFrom(decoded)); + return Ok(GovernedTokenWrapperContractCalls::BurnFrom( + decoded, + )); } if let Ok(decoded) = ::decode( data.as_ref(), ) { - return Ok(GovernedTokenWrapperContractCalls::Decimals(decoded)); + return Ok(GovernedTokenWrapperContractCalls::Decimals( + decoded, + )); } if let Ok(decoded) = ::decode( @@ -1909,9 +1915,11 @@ pub mod governed_token_wrapper_contract { data.as_ref(), ) { - return Ok(GovernedTokenWrapperContractCalls::GetFeeFromAmount( - decoded, - )); + return Ok( + GovernedTokenWrapperContractCalls::GetFeeFromAmount( + decoded, + ), + ); } if let Ok(decoded) = ::decode( @@ -1956,7 +1964,9 @@ pub mod governed_token_wrapper_contract { data.as_ref(), ) { - return Ok(GovernedTokenWrapperContractCalls::Governor(decoded)); + return Ok(GovernedTokenWrapperContractCalls::Governor( + decoded, + )); } if let Ok(decoded) = ::decode( @@ -1979,9 +1989,11 @@ pub mod governed_token_wrapper_contract { data.as_ref(), ) { - return Ok(GovernedTokenWrapperContractCalls::HistoricalTokens( - decoded, - )); + return Ok( + GovernedTokenWrapperContractCalls::HistoricalTokens( + decoded, + ), + ); } if let Ok(decoded) = ::decode( @@ -2095,9 +2107,11 @@ pub mod governed_token_wrapper_contract { data.as_ref(), ) { - return Ok(GovernedTokenWrapperContractCalls::SetNativeAllowed( - decoded, - )); + return Ok( + GovernedTokenWrapperContractCalls::SetNativeAllowed( + decoded, + ), + ); } if let Ok(decoded) = ::decode( @@ -2138,7 +2152,9 @@ pub mod governed_token_wrapper_contract { data.as_ref(), ) { - return Ok(GovernedTokenWrapperContractCalls::Transfer(decoded)); + return Ok(GovernedTokenWrapperContractCalls::Transfer( + decoded, + )); } if let Ok(decoded) = ::decode( @@ -2209,9 +2225,11 @@ pub mod governed_token_wrapper_contract { data.as_ref(), ) { - return Ok(GovernedTokenWrapperContractCalls::WrapForAndSendTo( - decoded, - )); + return Ok( + GovernedTokenWrapperContractCalls::WrapForAndSendTo( + decoded, + ), + ); } if let Ok(decoded) = ::decode( diff --git a/src/evm/contract/protocol_solidity/signature_bridge.rs b/src/evm/contract/protocol_solidity/signature_bridge.rs index 183626f..85a84a4 100644 --- a/src/evm/contract/protocol_solidity/signature_bridge.rs +++ b/src/evm/contract/protocol_solidity/signature_bridge.rs @@ -466,7 +466,9 @@ pub mod signature_bridge_contract { return Ok (SignatureBridgeContractEvents :: GovernanceOwnershipTransferredFilter (decoded)); } if let Ok(decoded) = PausedFilter::decode_log(log) { - return Ok(SignatureBridgeContractEvents::PausedFilter(decoded)); + return Ok(SignatureBridgeContractEvents::PausedFilter( + decoded, + )); } if let Ok(decoded) = RecoveredAddressFilter::decode_log(log) { return Ok( @@ -1015,7 +1017,9 @@ pub mod signature_bridge_contract { data.as_ref(), ) { - return Ok(SignatureBridgeContractCalls::ProposalNonce(decoded)); + return Ok(SignatureBridgeContractCalls::ProposalNonce( + decoded, + )); } if let Ok(decoded) = ::decode( diff --git a/src/evm/contract/protocol_solidity/token_wrapper.rs b/src/evm/contract/protocol_solidity/token_wrapper.rs index 3e1683a..e8f4dfd 100644 --- a/src/evm/contract/protocol_solidity/token_wrapper.rs +++ b/src/evm/contract/protocol_solidity/token_wrapper.rs @@ -1410,7 +1410,9 @@ pub mod token_wrapper_contract { data.as_ref(), ) { - return Ok(TokenWrapperContractCalls::DefaultAdminRole(decoded)); + return Ok(TokenWrapperContractCalls::DefaultAdminRole( + decoded, + )); } if let Ok(decoded) = ::decode( @@ -1496,7 +1498,9 @@ pub mod token_wrapper_contract { data.as_ref(), ) { - return Ok(TokenWrapperContractCalls::GetFeeFromAmount(decoded)); + return Ok(TokenWrapperContractCalls::GetFeeFromAmount( + decoded, + )); } if let Ok(decoded) = ::decode( @@ -1677,7 +1681,9 @@ pub mod token_wrapper_contract { data.as_ref(), ) { - return Ok(TokenWrapperContractCalls::WrapForAndSendTo(decoded)); + return Ok(TokenWrapperContractCalls::WrapForAndSendTo( + decoded, + )); } Err(ethers::core::abi::Error::InvalidData.into()) } diff --git a/src/evm/contract/protocol_solidity/token_wrapper_handler.rs b/src/evm/contract/protocol_solidity/token_wrapper_handler.rs index eb7a2dd..a18f533 100644 --- a/src/evm/contract/protocol_solidity/token_wrapper_handler.rs +++ b/src/evm/contract/protocol_solidity/token_wrapper_handler.rs @@ -361,9 +361,11 @@ pub mod token_wrapper_handler_contract { data.as_ref(), ) { - return Ok(TokenWrapperHandlerContractCalls::ContractWhitelist( - decoded, - )); + return Ok( + TokenWrapperHandlerContractCalls::ContractWhitelist( + decoded, + ), + ); } if let Ok (decoded) = < ResourceIDToContractAddressCall as ethers :: core :: abi :: AbiDecode > :: decode (data . as_ref ()) { return Ok (TokenWrapperHandlerContractCalls :: ResourceIDToContractAddress (decoded)) } if let Ok(decoded) = diff --git a/src/evm/contract/protocol_solidity/treasury_handler.rs b/src/evm/contract/protocol_solidity/treasury_handler.rs index f96905a..92085ee 100644 --- a/src/evm/contract/protocol_solidity/treasury_handler.rs +++ b/src/evm/contract/protocol_solidity/treasury_handler.rs @@ -351,7 +351,9 @@ pub mod treasury_handler_contract { data.as_ref(), ) { - return Ok(TreasuryHandlerContractCalls::BridgeAddress(decoded)); + return Ok(TreasuryHandlerContractCalls::BridgeAddress( + decoded, + )); } if let Ok (decoded) = < ContractAddressToResourceIDCall as ethers :: core :: abi :: AbiDecode > :: decode (data . as_ref ()) { return Ok (TreasuryHandlerContractCalls :: ContractAddressToResourceID (decoded)) } if let Ok(decoded) = @@ -369,7 +371,9 @@ pub mod treasury_handler_contract { data.as_ref(), ) { - return Ok(TreasuryHandlerContractCalls::UpdateRecords(decoded)); + return Ok(TreasuryHandlerContractCalls::UpdateRecords( + decoded, + )); } if let Ok(decoded) = ::decode( @@ -394,7 +398,9 @@ pub mod treasury_handler_contract { data.as_ref(), ) { - return Ok(TreasuryHandlerContractCalls::MigrateBridge(decoded)); + return Ok(TreasuryHandlerContractCalls::MigrateBridge( + decoded, + )); } if let Ok(decoded) = ::decode(