Skip to content
New issue

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

Error in ./compile.py #1

Open
MRANASSPRO opened this issue Apr 30, 2018 · 3 comments
Open

Error in ./compile.py #1

MRANASSPRO opened this issue Apr 30, 2018 · 3 comments

Comments

@MRANASSPRO
Copy link

MRANASSPRO commented Apr 30, 2018

Could you tell me what is not working here, this is the error message :

Traceback (most recent call last): File "./compile.py", line 78, in <module> main() File "./compile.py", line 73, in main contract = format_contract(contract_json_string, contract_file_name) File "./compile.py", line 16, in format_contract contract = json.loads(contract) File "/usr/lib/python2.7/json/__init__.py", line 339, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

Thank you!

@fernandolobato
Copy link
Owner

fernandolobato commented May 2, 2018

Hey,

The python script that I wrote to compile is essentially a wrapper over the solc compiler. It compiles, gets the ABI definition of the contract and places it in a useful folder.

I am pretty sure that your problem is not having the solc compiler. Please make sure you have it installed.

You can test this by running:

solc --version

I am currently in the process of moving the project to the Truffle framework and packaging the web app as a docker container to make the experience better. Right now things are a bit hackish.

Please let me know if this fixes your problem so I can close the issue :)

Also if you could pull from master that would also help. I modified some details that could be related to your issue.

@MRANASSPRO
Copy link
Author

thanks,

I have installed the solc compiler, now solc --version gives the output : Version: 0.4.23-develop.2018.4.19+commit.6f0fbcf8.Linux.g++

Now I run ./compile.py and I get the following output :

Warning: This is a pre-release compiler version, please do not use it in production.
contracts/SECP256K1.sol:53:13: Warning: The use of labels is deprecated. Please use "if", "switch", "for" or function calls instead.
            loop:
            ^--^
contracts/SECP256K1.sol:53:13: Warning: Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
            loop:
            ^--^
contracts/SECP256K1.sol:54:17: Warning: Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
                jumpi(end, iszero(bit))
                ^---------------------^
contracts/SECP256K1.sol:372:9: Error: Type uint256[3] memory is not implicitly convertible to expected type uint256.
        uint X = _double(PREC[0]);
        ^-----------------------^
contracts/SECP256K1.sol:373:29: Error: Invalid type for argument in function call. Invalid implicit conversion from uint256 to uint256[3] memory requested.
        PREC[1] = _addMixed(X, P);
                            ^
contracts/SECP256K1.sol:374:24: Error: Invalid type for argument in function call. Invalid implicit conversion from uint256 to uint256[3] memory requested.
        PREC[2] = _add(X, PREC[1]);
                       ^
contracts/SECP256K1.sol:375:24: Error: Invalid type for argument in function call. Invalid implicit conversion from uint256 to uint256[3] memory requested.
        PREC[3] = _add(X, PREC[2]);

@fernandolobato
Copy link
Owner

I see,

This project had some specific and complex cryptographic requirements. For this I used an open source library for performing mathematic operations on the SECP256K1 curve. This code was not written by me. solidity is changing fast and what was valid one day is not valid today. I will look to see if it is this library has been updated. In the meantime you could look at the file and see against what version of the solc compiler its working and try to get that specific version. Sorry I took so long, I have been fully packed at work.

Repository owner deleted a comment from mrpanday93 Feb 15, 2024
Repository owner deleted a comment from Pappyskull1 Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants