solcjs doesn't appear to do anything on Windows
See original GitHub issueEither I’m doing something wrong (the usage instructions are unclear), or there’s a bug:
I just installed latest solcjs npm install -g solcjs
on my Windows 10 machine, trying to compile a simple script.
Running
solcjs --bin Coin.sol
thinks for a bit, and doesn’t actually do anything, where Coin.sol is the following file:
pragma solidity ^0.4.0;
contract Coin {
// The keyword "public" makes those variables
// readable from outside.
address public minter;
mapping (address => uint) public balances;
// Events allow light clients to react on
// changes efficiently.
event Sent(address from, address to, uint amount);
// This is the constructor whose code is
// run only when the contract is created.
function Coin() {
minter = msg.sender;
}
function mint(address receiver, uint amount) {
if (msg.sender != minter) return;
balances[receiver] += amount;
}
function send(address receiver, uint amount) {
if (balances[msg.sender] < amount) return;
balances[msg.sender] -= amount;
balances[receiver] += amount;
Sent(msg.sender, receiver, amount);
}
}
solcjs version is 0.4.11+commit.68ef5810.Emscripten.clang
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Solidity compiler command-line utility (solcjs) various problems
First I noticed that I cannot use a backslash, i.e., can only use a slash (I should emphasize that I am running on...
Read more >Installing the Solidity Compiler — Solidity 0.8.16 documentation
The commandline options of solcjs are not compatible with solc and tools (such as geth ) expecting the behaviour of solc will not...
Read more >Cant compile solidity files using correct Solc version
It seems that you have two copies of solcjs - one v0.5.16 (dependency of truffle) and one v0.8.4 (separately installed package). Can you ......
Read more >Solidity Documentation - Read the Docs
This contract does not do much yet apart from (due to the infrastructure ... you will not see anything when you look at...
Read more >How to Install Solidity in Windows? - GeeksforGeeks
With the help of this feature, we can run the Ubuntu terminal on the Windows machine. Below are the steps to setup Solidity...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry,
solcjs
actually writes a file and doesn’t show anything on screen. You should have a fileCoin.sol:Coin.bin
.I believe it is indeed an invalid filename. It is odd that an error isn’t detected though.
On Tue, Jul 11, 2017 at 1:00 PM, chriseth notifications@github.com wrote: