Skip to content

Commit

Permalink
no single variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
gakonst committed Jul 23, 2019
1 parent c2a96bc commit 92ee904
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ pub fn transfer_logs(
.map_err(move |err| error!("Got error when fetching transfer logs{:?}", err))
.and_then(move |logs| {
let mut ret = Vec::new();
for l in logs {
for log in logs {
// NOTE: From/to are indexed events.
// Amount is parsed directly from the data field.
let indexed = l.topics;
let indexed = log.topics;
let from = H160::from(indexed[1]);
let to = H160::from(indexed[2]);
let data = l.data;
let data = log.data;
let amount = U256::from_str(&hex::encode(data.0)).unwrap();
ret.push(ERC20Transfer {
tx_hash: l.transaction_hash.unwrap(),
tx_hash: log.transaction_hash.unwrap(),
from,
to,
amount,
Expand Down

0 comments on commit 92ee904

Please sign in to comment.