Skip to content

Commit

Permalink
Simplify access-list creation
Browse files Browse the repository at this point in the history
  • Loading branch information
barak manos committed Apr 18, 2024
1 parent f6a4db3 commit e4acbf7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions fastlane_bot/helpers/txhelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,7 @@ def _update_transaction(self, tx: dict):
result = self.cfg.w3.eth.create_access_list(tx) # rarely throws an exception
if tx["gas"] > result["gasUsed"]:
tx["gas"] = result["gasUsed"]
tx["accessList"] = [
{
"address": access_item["address"],
"storageKeys": [storage_key.hex() for storage_key in access_item["storageKeys"]]
}
for access_item in result["accessList"]
]
tx["accessList"] = loads(self.cfg.w3.to_json(result["accessList"]))
tx.update(self.cfg.network.gas_strategy(self.cfg.w3))

def _sign_transaction(self, tx: dict) -> str:
Expand Down

0 comments on commit e4acbf7

Please sign in to comment.