We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pragma solidity ^0.4.24; import "./B.sol"; contract A { B kid; constructor() public { kid = new B(); } }
pragma solidity ^0.4.24; import "./A.sol"; contract B { A mom; constructor() publicv{ mom = A(msg.sender); } }
def unfold_imports(imports, infile): buffer = [] if infile not in imports: # should add to traversed paths here. imports.append(infile) with open(infile, "r+") as f: for line in f: # Remove the pragma line in all imports if "pragma" in line[:6]: continue # Read the imports if "import" in line[:6]: match = re.search(r".*[\'|\"](.*)[\'|\"]", line) if match: dirname = os.path.dirname(infile) file = os.path.join(dirname, match.group(1)) absfile = os.path.abspath(file) buffer.append(unfold_imports(imports, absfile)) # imports.append(absfile) else: print("There's syntax error of import in {}".format(infile)) sys.exit(-3) else: buffer.append(line) return ''.join(buffer)
The text was updated successfully, but these errors were encountered:
最近寫合約真的有用到這支程式!!有用有推
Sorry, something went wrong.
No branches or pull requests
Reproduce
Recommend fix
The text was updated successfully, but these errors were encountered: