truffle
truffle copied to clipboard
Issue using latest truffle migrate
Truffle v5.11.5 (core: 5.11.5) Solidity - 0.8.21 (solc-js) Node v20.8.0 Web3.js v1.10.0
I am using a geth private node for testing, I can send requests to the node from web3.py without any issues. I am trying to deploy a smart contract on it using truffle but nothing happens.
truffle migrate --network private
Happening:
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
Network up to date.
I looked everywhere online and cant find any solution :S
My truffle config:
const HDWalletProvider = require('@truffle/hdwallet-provider');
const mnemonicPhrase = "** ** ** ** ** ** ** ** ** ** ** **"; //I got the mnemonic phrase from MetaMask (First Account - ETH Mainnet)
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: "8986",
network_id: "83711",
},
private: {
provider: () => new HDWalletProvider(mnemonicPhrase, "http://127.0.0.1:8986"),
network_id: "83711"
}
},
mocha: {
},
compilers: {
solc: {
version: "0.8.21",
}
},
};
My deploy contract migration:
var MyToken = artifacts.require("MyToken");
module.exports = function(deployer) {
deployer.deploy(MyToken);
};
I checked if anything was deployed on the private chain and it shows nothing..
Expected:
Deploying 'MyToken'
--------------------
> transaction hash: 0x.........
> contract address: 0x........
hi @etherbase404 - Truffle is being sunset. For more information and migration options, click here.
@etherbase404
Truffle v5.11.5 (core: 5.11.5) Solidity - 0.8.21 (solc-js) Node v20.8.0 Web3.js v1.10.0
I've noticed versions solc 0.8.19 is the highest that doesn't fail.
I face same issue,
Try change your pragma and solc version
Migrations.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0;
truffle-config.js
compilers: { solc: { version: "0.5.1" } Sometimes, solc works for me with 0.8.20 or 0.7.3
Hello, can you help me? The same problem appeared and I did not find a solution