Example #1
0
def test_interfaceconstructor_call(tester):
    interface = InterfaceContainer(None)
    interface._add("Test", [{"type": "foo"}])

    contract = interface.Test(tester.address)

    assert isinstance(contract, Contract)
    assert contract.abi == [{"type": "foo"}]
Example #2
0
def test_interface_is_not_persisted(network):
    network.connect("mainnet")
    interface = InterfaceContainer(None)
    interface._add("Test", [{"type": "foo"}])

    address = "0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e"
    interface.Test(address)
    assert _get_deployment(address) == (None, None)