Skip to content

Commit

Permalink
chore: del astnode stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Jan 5, 2024
1 parent b36eb89 commit ad61b40
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions ape_solidity/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,17 +520,8 @@ def compile(
if source_id in str(input_file_path):
input_contract_names.append(name)

def classify_ast(_node: ASTNode):
if _node.ast_type in ("FunctionDefinition", "FunctionDefinitionNode"):
_node.classification = ASTClassification.FUNCTION

for child in _node.children:
classify_ast(child)

for source_id, contracts_out in contracts.items():
ast_data = output["sources"][source_id]["ast"]
ast = ASTNode.model_validate(ast_data)
classify_ast(ast)
# ast_data = output["sources"][source_id]["ast"]

for contract_name, ct_data in contracts_out.items():
contract_path = base_path / source_id
Expand Down Expand Up @@ -578,7 +569,6 @@ def classify_ast(_node: ASTNode):
ct_data["userdoc"] = load_dict(ct_data["userdoc"])
ct_data["devdoc"] = load_dict(ct_data["devdoc"])
ct_data["sourcemap"] = evm_data["bytecode"]["sourceMap"]
ct_data["ast"] = ast
contract_type = ContractType.model_validate(ct_data)
contract_types.append(contract_type)
contract_versions[contract_name] = solc_version
Expand Down

0 comments on commit ad61b40

Please sign in to comment.