The Stack Overflow podcast is back! Listen to an interview with our new CEO.
12

If you're using ^v5.0.0 (including beta releases), you can bring your own compiler by adding this in your truffle config file (in this example it's set to 0.4.25): module.exports = { ... compilers: { solc: { version: "0.4.25", }, }, ... }; You can query the list of available compiler versions by running this: truffle compile --list


3

Just for reference, as of Truffle v5, truffle-config.js is now the default (and only file that is created) when initializing a new project.


3

There is an issue in a way you use HDWalletProvider when configuring development network in truffle-config.js. You should add it like: provider: () => new HDWalletProvider('your mnemonic', 'http://127.0.0.1:7545') For me, it helped. Additional info can be found here.


2

This is tracked by Truffle issue #1879. (Not entirely sure what the code flow would be after its implementation, but getTruffleConfig.js might be a good place to start having a poke around if you're feeling brave.)


2

Ganache is a development chain which is not able to use a different consensus mechanism. Ganache accepts all incoming transactions immediately and creates one block for each by default. You could describe it as proof-of-authority chain with just one node. Ganache does not use a genesis.json file. The chain is defined by the options you pass to Ganache. The ...


1

If your on Linux, type which truffle I get this /home/dave/.nvm/versions/node/v8.11.1/bin/truffle then open that file in a text editor, and find the variable called defaultEtherBalance, I found it on line 581569. Save and restart truffle develop!


1

In the latest truffle after 5.x.x, it is possible to specify compiler version in truffle-config.js: module.exports = { networks: { ... etc ... }, compilers: { solc: { version: <string> // ex: "0.4.20". (Default: Truffle's installed solc) } } }; Reference: https://github.com/trufflesuite/truffle/releases/tag/v5.0.0-beta....


1

On your project root directory, there's a file named "truffle-config.js" Inside this file, you can find a solc config, and uncomment version line, and then put your prefer version. (ex: 0.5.7) compilers: { solc: { version: "0.5.7", // Fetch exact version from solc-bin (default: truffle's version) // docker: true, // Use "0.5.1" ...


1

The above did not work for me. This worked: web3.eth.getAccounts( (err,res) => {first=res[0]; web3.eth.personal.unlockAccount(first, "123456", 15000, (err,res)=>{console.log(err,res);} ) } );


Only top voted, non community-wiki answers of a minimum length are eligible