Skip to content

Commit

Permalink
fix python lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Jan 4, 2024
1 parent a7113f7 commit 7299413
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions tests/integration_tests/test_tracers.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,10 @@ def test_custom_js_tracers(ethermint):
eth_rpc = w3.provider

from_addr = ADDRS["validator"]
to_addr = ADDRS["community"]

contract, _ = deploy_contract(w3, CONTRACTS["Greeter"])
w3_wait_for_new_blocks(w3, 1, sleep=0.1)

topic = Web3.keccak(text="ChangeGreeting(address,string)")
tx = contract.functions.setGreeting("world").build_transaction()

tx = {
Expand All @@ -227,11 +225,11 @@ def test_custom_js_tracers(ethermint):
}

tracer = """{
data: [],
fault: function(log) {},
step: function(log) {
if(log.op.toString() == "POP") this.data.push(log.stack.peek(0));
},
data: [],
fault: function(log) {},
step: function(log) {
if(log.op.toString() == "POP") this.data.push(log.stack.peek(0));
},
result: function() { return this.data; }
}"""
tx_res = eth_rpc.make_request("debug_traceCall", [tx, "latest", {"tracer": tracer}])
Expand Down Expand Up @@ -399,7 +397,8 @@ def test_debug_tracecall_state_overrides(ethermint_rpc_ws):
w3: Web3 = ethermint_rpc_ws.w3
eth_rpc = w3.provider

# generate random address, set balance in stateOverrides, use prestateTracer to check balance
# generate random address, set balance in stateOverrides,
# use prestateTracer to check balance
balance = "0xffffffff"

address = w3.eth.account.create().address
Expand Down Expand Up @@ -453,5 +452,5 @@ def test_debug_tracecall_return_revert_data_when_call_failed(ethermint):
tx_res = tx_res["result"]
assert (
tx_res["returnValue"]
== "08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a46756e6374696f6e20686173206265656e207265766572746564000000000000"
) # noqa: E501
== "08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a46756e6374696f6e20686173206265656e207265766572746564000000000000" # noqa: E501
)

Check failure on line 456 in tests/integration_tests/test_tracers.py

View workflow job for this annotation

GitHub Actions / Run flake8 on python integration tests

./tests/integration_tests/test_tracers.py:456:6: W291 trailing whitespace

0 comments on commit 7299413

Please sign in to comment.