def get_test_contract(name):
    contract_path = os.path.abspath(
        os.path.join(os.path.dirname(__file__), "..", "smart_contracts", name)
    )
    contracts = compile_files_cwd([contract_path])

    return contract_path, contracts
def encode(self):
        return {
            'af': ip_address(self.gaddr).vapi_af,
            'grp_address': {
                ip_address(self.gaddr).vapi_af_name: self.gaddr
            },
            'src_address': {
                ip_address(self.saddr).vapi_af_name: self.saddr
            },
            'grp_address_length': self.glen,
        }