Questions tagged [py-solc-x]
The py-solc-x tag has no usage guidance.
13
questions
0
votes
0
answers
10
views
Smart contract compile with empty bytecode when using Interface
Given Solidity ^0.8.13 file X.sol, contains an interface of contract Y and contract X
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
interface YI{
// This is the interface of contract Y
...
1
vote
1
answer
108
views
Error in solcx python package
While deploying the following code:
from solcx import compile_standard, install_solc
import json
from web3 import Web3
install_solc("0.8.0")
with open("./SimpleStorage.sol", &...
0
votes
2
answers
123
views
How can I store a private key as an environmental variable and call it in my code?
import os
from dotenv import dotenv_value
.
.
.
private_key = os.getenv("PRIVATE_KEY")
.
.
print(private_key) //for testing purposes only
This is what I currently have to utilize my ...
0
votes
1
answer
41
views
solc_version not working on VS Code (Mac OSX)
I tried running the code below and gave me the error message (bottom of post).
with open("./SimpleStorage.sol", "r") as file:
simple_storage_file = file.read()
print(...
0
votes
0
answers
47
views
I am trying to print out the variable (compiled_sol), so I can deploy my smart contract, but I keep running at this error
INFO: Could not find files for the given pattern(s).
Traceback (most recent call last):
File "C:\Users\jethr\demos\web3_py_simple_storage\deploy.py", line 8, in <module>
...
0
votes
1
answer
121
views
How do I fix the 'Only "Solidity" or "Yul" is supported as a language' error from py-solc-x
this is the error I get after running this code
from solcx import compile_standard, install_solc
install_solc("0.6.0")
#from my crowdFund.sol file i call the whole file
with open("./...
0
votes
0
answers
19
views
Different opcode from Remix vs. py-solc-x
I am compiling my code in Remix and in py-solc-x and I am getting slightly different results in the opcodes (both times I used compiler version 0.6.0).
The solidity code that I tested it on is here:
...
0
votes
0
answers
49
views
How to add remappings in solc x
i'm getting error while compiling my solidity code using solc x = ParserError: Source "@openzeppelin-contracts/tree/v2.5.0/contracts/access/roles/WhitelistedRole.sol" not found: File outside ...
0
votes
2
answers
327
views
Issue with py-solc-x library
I don't really know what's wrong with my code or what's wrong about the way I installed and imported this library, but I just keep receiving this error and I don't really know how to handle it.
I ...
1
vote
0
answers
176
views
Compiled contract bytecode not matching deployed one with any solc version
As an academic exercise inspired by this post, I'm trying to verify the LINK token contract, comparing the one I get from Web3.py to the result that I get from compiling the source code using solcx. ...
19
votes
6
answers
10k
views
having a problem with solc-x version "solc 0.6.0 has not been installed"
I m trying to print out the variable (compiled_sol) as you will see in the code below of the python file named deploy.py so I can deploy my smart contract, but I keep running at this error
*****INFO: ...
0
votes
1
answer
457
views
solcx.exceptions.SolcError: Unknown key "*"
I'm learning how to deploy a smart contract using a Python script and I keep getting the following error:
> py deploy.py
INFO: Could not find files for the given pattern(s).
Traceback (most recent ...
1
vote
1
answer
499
views
SolcInstallationError: Downloaded binary would not execute, or returned unexpected output
I am attempting to do the 'brownie compile' but each time it processes I am provided with 'SolcInstallation Error' - Downloaded Library would not execute or returned unexpected output. I have gone ...