PatrickAlphaC / web3_py_simple_storage

47 stars 78 forks source link

Issue deploying Simple Storage in terminal-VSCode #18

Closed oliveruf42 closed 2 years ago

oliveruf42 commented 2 years ago

Traceback (most recent call last): File "/Users/eddiebraddock/demos/web3_py_simple_storage/deploy.py", line 8, in compiled_sol = compile_standard( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/solcx/main.py", line 391, in compile_standard raise SolcError( solcx.exceptions.SolcError: Only "Solidity" or "Yul" is supported as a language.

command: /Users/eddiebraddock/.solcx/solc-v0.6.0 --standard-json return code: 0 stdout: {"errors":[{"component":"general","formattedMessage":"Only \"Solidity\" or \"Yul\" is supported as a language.","message":"Only \"Solidity\" or \"Yul\" is supported as a language.","severity":"error","type":"JSONError"}]}

stderr:

Can anyone point me in the right direction on this? I'm fairly new to coding , but i have tried all suggestions on Stack Overflow. I have tried virtual envirioment, using Python3 to deploy, etc. Any help would be greatly appreciated. Thanks

tracen80 commented 2 years ago

This is what I have

from solcx import compile_standard

with open("./SimpleStorage.sol", "r") as file: simple_storage_file = file.read()

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", ) print(compiled_sol)

PatrickAlphaC commented 2 years ago

Can you ask in the main repo? Thank you! https://github.com/smartcontractkit/full-blockchain-solidity-course-py