Skip to content

Commit 1c463af

Browse files
Format Rust code using rustfmt
1 parent f409607 commit 1c463af

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/dao.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::eth::{BlockNumberOrTag, EthError, Filter as EthFilter, Provider};
22
use alloy::rpc::types::request::{TransactionInput, TransactionRequest};
3-
use alloy_primitives::{Address, Bytes, FixedBytes, U256, B256, keccak256};
3+
use alloy_primitives::{keccak256, Address, Bytes, FixedBytes, B256, U256};
44
use alloy_sol_macro::sol;
55
use alloy_sol_types::{SolCall, SolEvent};
66

@@ -109,20 +109,23 @@ impl DaoContracts {
109109

110110
/// Fetch role IDs from the timelock.
111111
pub fn roles(&self) -> Result<(FixedBytes<32>, FixedBytes<32>, FixedBytes<32>), EthError> {
112-
let proposer = self.call_view(self.timelock, TimelockController::PROPOSER_ROLECall {})?._0;
113-
let executor = self.call_view(self.timelock, TimelockController::EXECUTOR_ROLECall {})?._0;
114-
let canceller = self.call_view(self.timelock, TimelockController::CANCELLER_ROLECall {})?._0;
112+
let proposer = self
113+
.call_view(self.timelock, TimelockController::PROPOSER_ROLECall {})?
114+
._0;
115+
let executor = self
116+
.call_view(self.timelock, TimelockController::EXECUTOR_ROLECall {})?
117+
._0;
118+
let canceller = self
119+
.call_view(self.timelock, TimelockController::CANCELLER_ROLECall {})?
120+
._0;
115121
Ok((proposer, executor, canceller))
116122
}
117123

118124
/// Check if an account has a specific timelock role.
119125
pub fn has_role(&self, role: FixedBytes<32>, account: Address) -> Result<bool, EthError> {
120126
let res = self.call_view(
121127
self.timelock,
122-
TimelockController::hasRoleCall {
123-
role,
124-
account,
125-
},
128+
TimelockController::hasRoleCall { role, account },
126129
)?;
127130
Ok(res._0)
128131
}
@@ -290,9 +293,7 @@ impl DaoContracts {
290293
let mut out = Vec::new();
291294
for log in logs {
292295
let prim_log = log.inner.clone();
293-
if let Ok(decoded) =
294-
HyperwareGovernor::ProposalCreated::decode_log(&prim_log, true)
295-
{
296+
if let Ok(decoded) = HyperwareGovernor::ProposalCreated::decode_log(&prim_log, true) {
296297
out.push(ProposalCreatedEvent {
297298
proposal_id: decoded.proposalId,
298299
proposer: decoded.proposer,

0 commit comments

Comments
 (0)