Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
shekohex committed Aug 1, 2022
1 parent 0f6ee35 commit d433569
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 34 deletions.
8 changes: 6 additions & 2 deletions src/evm/contract/protocol_solidity/anchor_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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) =
<EdgeIndexCall as ethers::core::abi::AbiDecode>::decode(
Expand Down
8 changes: 6 additions & 2 deletions src/evm/contract/protocol_solidity/anchor_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
<GetUpdateRecordCall as ethers::core::abi::AbiDecode>::decode(
data.as_ref(),
)
{
return Ok(AnchorHandlerContractCalls::GetUpdateRecord(decoded));
return Ok(AnchorHandlerContractCalls::GetUpdateRecord(
decoded,
));
}
if let Ok(decoded) =
<MigrateBridgeCall as ethers::core::abi::AbiDecode>::decode(
Expand Down
56 changes: 37 additions & 19 deletions src/evm/contract/protocol_solidity/governed_token_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
<MinterRoleCall as ethers::core::abi::AbiDecode>::decode(
Expand Down Expand Up @@ -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) =
<DecimalsCall as ethers::core::abi::AbiDecode>::decode(
data.as_ref(),
)
{
return Ok(GovernedTokenWrapperContractCalls::Decimals(decoded));
return Ok(GovernedTokenWrapperContractCalls::Decimals(
decoded,
));
}
if let Ok(decoded) =
<DecreaseAllowanceCall as ethers::core::abi::AbiDecode>::decode(
Expand Down Expand Up @@ -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) =
<GetRoleAdminCall as ethers::core::abi::AbiDecode>::decode(
Expand Down Expand Up @@ -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) =
<GrantRoleCall as ethers::core::abi::AbiDecode>::decode(
Expand All @@ -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) =
<IncreaseAllowanceCall as ethers::core::abi::AbiDecode>::decode(
Expand Down Expand Up @@ -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) =
<SupportsInterfaceCall as ethers::core::abi::AbiDecode>::decode(
Expand Down Expand Up @@ -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) =
<TransferFromCall as ethers::core::abi::AbiDecode>::decode(
Expand Down Expand Up @@ -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) =
<WrappingLimitCall as ethers::core::abi::AbiDecode>::decode(
Expand Down
8 changes: 6 additions & 2 deletions src/evm/contract/protocol_solidity/signature_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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) =
<ProposerSetRootCall as ethers::core::abi::AbiDecode>::decode(
Expand Down
12 changes: 9 additions & 3 deletions src/evm/contract/protocol_solidity/token_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
<MinterRoleCall as ethers::core::abi::AbiDecode>::decode(
Expand Down Expand Up @@ -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) =
<GetRoleAdminCall as ethers::core::abi::AbiDecode>::decode(
Expand Down Expand Up @@ -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())
}
Expand Down
8 changes: 5 additions & 3 deletions src/evm/contract/protocol_solidity/token_wrapper_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
Expand Down
12 changes: 9 additions & 3 deletions src/evm/contract/protocol_solidity/treasury_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
Expand All @@ -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) =
<ExecuteProposalCall as ethers::core::abi::AbiDecode>::decode(
Expand All @@ -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) =
<SetResourceCall as ethers::core::abi::AbiDecode>::decode(
Expand Down

0 comments on commit d433569

Please sign in to comment.