Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix integration test
Browse files Browse the repository at this point in the history
yihuang committed Nov 9, 2022
1 parent bc8cb99 commit 8d53994
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions integration_tests/test_upgrade.py
Original file line number Diff line number Diff line change
@@ -104,11 +104,9 @@ def test_cosmovisor_upgrade(custom_cronos: Cronos):
print("old values", old_height, old_balance, old_base_fee)

# estimateGas for an erc20 transfer tx
old_gas = (
contract.functions.transfer(ADDRS["community"], 100)
.buildTransaction({"from": ADDRS["validator"]})
.gas
)
old_gas = contract.functions.transfer(ADDRS["community"], 100).buildTransaction(
{"from": ADDRS["validator"]}
)["gas"]

plan_name = "v1.0.0"
rsp = cli.gov_propose_v0_7(
@@ -177,12 +175,12 @@ def test_cosmovisor_upgrade(custom_cronos: Cronos):
ADDRS["validator"]
)

assert not cli.evm_params()["extra_eips"]
assert not cli.evm_params()["params"]["extra_eips"]

# check the gas cost is lower after upgrade
assert (
old_gas - 3700
== contract.functions.transfer(ADDRS["community"], 100)
.buildTransaction({"from": ADDRS["validator"]})
.gas
== contract.functions.transfer(ADDRS["community"], 100).buildTransaction(
{"from": ADDRS["validator"]}
)["gas"]
)

0 comments on commit 8d53994

Please sign in to comment.