def test_forwarder_to_good_code(accounts, web3): factory = compile_source(factory_code).Vyper.deploy({"from": accounts[0]}) target = compile_source(good_code).Vyper.deploy({"from": accounts[0]}) tx = factory.make_forwarder(target, {"from": accounts[0]}) bytecode = web3.eth.get_code(tx.return_value) assert is_cacheable_bytecode(web3, bytecode)
def test_factory(accounts, web3): factory = compile_source(factory_code).Vyper.deploy({"from": accounts[0]}) assert is_cacheable_bytecode(web3, factory.bytecode)
def test_selfdestruct(accounts, web3): bytecode = compile_source(selfdestruct_code).Boom.deploy({ "from": accounts[0] }).bytecode assert not is_cacheable_bytecode(web3, bytecode)
def test_dynamic_delecatecall(accounts, web3): bytecode = compile_source(delegatecall_code).BadDecision.deploy({ "from": accounts[0] }).bytecode assert not is_cacheable_bytecode(web3, bytecode)
def test_good_code(accounts, web3): bytecode = compile_source(good_code).Vyper.deploy({ "from": accounts[0] }).bytecode assert is_cacheable_bytecode(web3, bytecode)