Skip to content

Commit

Permalink
reinforce document
Browse files Browse the repository at this point in the history
  • Loading branch information
tarmac-dunamu authored and fselmo committed Aug 15, 2023
1 parent d6277d7 commit 7b675b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ If you're on this page, you're likely looking for an answer to this question:
weth_contract = w3.eth.contract(address=WETH_ADDRESS, abi=WETH_ABI)
# fetch transfer events in the last block
params = {"fromBlock": w3.eth.block_number}
logs = weth_contract.events.Transfer().get_logs(params)
logs = weth_contract.events.Transfer().get_logs(fromBlock=w3.eth.block_number)
for log in logs:
print(f"Transfer of {w3.from_wei(log.args.wad, 'ether')} WETH from {log.args.src} to {log.args.dst}")
Expand Down

1 comment on commit 7b675b3

@fightnyy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.