New answers tagged

0

I got this error because I leave it running for too long. So I decided to change the command I'd used before ganache-cli --fork https://mainnet.infura.io/v3/{PROJECT-ID}@{BLOCK} to ganache-cli --fork https://mainnet.infura.io/v3/{PROJECT-ID}


1

Take a look at the documentation on Security about all known bugs. It is a list of bugs from 0.3.0 and up to today formatted in JSON with the information on when the bug was introduced, whether it has been fixed, when it has been fixed, what version of Solidity it impacts.


1

There are tools like Truffle and Hardhat, but sometimes they can be finicky with solc version. There is the main npm package 'solc'. You can install it locally like any other node package. Then write a .js script which uses the package's features, like below: const path = require("path"); const fs = require("fs"); const solc = require(&...


0

Try this inside your truffle-config.js file: compilers: { solc: { version: "pragma",//<-- this is the magic settings: { optimizer: { enabled: true, runs: 200 } } } }


0

I can't add much to this, except, that this also fixed the issue for me. The same solution was also suggested here: Try restarting your ganache-cli of the forked chain. If you leave it >running for too long this issue may come up. If that doesn't work, and you're using Cloudflare as an HTTP provider, >try using a different HTTP provider, like Infura....


1

For language you used a lower-case solidity, but it is required to be exactly Solidity. Here the official docs: https://docs.soliditylang.org/en/v0.8.11/using-the-compiler.html#input-description Here an js example for an input: https://github.com/gnosis/safe-contracts/blob/186a21a74b327f17fc41217a927dea7064f74604/test/utils/setup.ts#L99


0

You use of solc.compile is not correct. The second parameter is supposed to be a callback, therefore passing 1 is considered invalid and throws an error. A working example is available in the official solc-js GitHub Readme Note to the breaking changes: Solidity is following semantic versioning. Major version zero (0.y.z) is for initial development. Anything ...


Top 50 recent answers are included