Here is the code
from solcx import compile_standard, install_solc
import json
with open("./SimpleStorage.sol", "r") as file:
simple_storage_file = file.read()
install_solc("0.6.0")
compiled_sol = compile_standard(
{
"language": "Solidity",
"sources": {"SimpleStorage.sol": {"content": simple_storage_file}},
"settings": {
"outputSelection": {
"*": {"*": ["abi", "metadata", "evm.bytecode", "evm.sourceMap"]}
}
},
},
solc_version="0.6.0",
)
with open("compiled_code.json", "w") as file:
json.dump(compiled_sol, file)
In the terminal, I have ran the commands of: pip3 install py-solc-x and pip install solc and get a response that the requirement is already satisfied separately for both commands.
I also get the error of INFO: Could not find files for the given pattern(s). when I run the command of python deploy.py
This is how by VS Code folder looks like on my Local Disk: the python source file and SOL file are in the same folder
As you can probably tell, I am very new as I'm taking freeCodeCamps beginners course. Any and all help is great appreciated, thank you in advance.
