Skip to content

Commit

Permalink
chore: adds test for retrieving contract by abi
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwise-constructs committed Aug 21, 2024
1 parent fc378fb commit 94aa7d0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/functional/test_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,12 @@ def test_set_pending_timestamp_failure(chain):
def test_set_balance(chain, owner):
with pytest.raises(APINotImplementedError):
chain.set_balance(owner, "1000 ETH")


def test_get_contract_by_abi(chain, vyper_contract_instance):
contract = chain.contracts.instance_at(
vyper_contract_instance.address, abi=vyper_contract_instance.contract_type.abi
)

assert contract.address == vyper_contract_instance.address
assert contract.contract_type.abi == vyper_contract_instance.contract_type.abi

0 comments on commit 94aa7d0

Please sign in to comment.