Exemplo n.º 1
0
def _mk_ast_dict(code, contract_name, interface_codes, source_id):
    o = {
        'contract_name': contract_name,
        'ast': ast_to_dict(parse_to_ast(code, source_id))
    }
    return o
Exemplo n.º 2
0
def build_ast_dict(compiler_data: CompilerData) -> dict:
    ast_dict = {
        "contract_name": compiler_data.contract_name,
        "ast": ast_to_dict(compiler_data.vyper_module),
    }
    return ast_dict