Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Issue using latest truffle migrate #6202

Open
etherbase404 opened this issue Oct 8, 2023 · 4 comments
Open

Issue using latest truffle migrate #6202

etherbase404 opened this issue Oct 8, 2023 · 4 comments

Comments

@etherbase404
Copy link

etherbase404 commented Oct 8, 2023

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........
@MadelineMurray
Copy link

hi @etherbase404 - Truffle is being sunset. For more information and migration options, click here.

@TechnicallyWeb3
Copy link

TechnicallyWeb3 commented Jan 28, 2024

@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.

@AhsanHafeez2525
Copy link

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

@8dci
Copy link

8dci commented Feb 14, 2024

Hello, can you help me? The same problem appeared and I did not find a solution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants