Categories
Cryptocurrency Ethereum Mastering Development

I am getting Error: Project ID is required deploying to ropsten in truffle

I am getting the following error: Error: PollingBlockTracker – encountered an error while attempting to update latest block: Error: project ID is required at C:\Users\myuser\Code Projects\sdfsd\node_modules@trufflesuite\web3-provider-engine\subproviders\provider.js:18:36 ropsten: { provider: new HDWalletProvider(mnemonic, "https://ropsten.infura.io/myropstenidhere"), network_id: 3, gas: 4000000 }, live: { provider: () => new HDWalletProvider(mnemonic,’https://mainnet.infura.io’), network_id: ‘*’, gasPrice: 25000000000, gas: 5000000, confirmations: 2 }

Categories
Cryptocurrency Ethereum Mastering Development

web3 in truffle.js file

I am trying to deploy my contracts with the specific account the user is using instead of hard coding it. But in this code, I get an error as such: Error: Cannot find module ‘web3’ the truffle-config.js file is as follows: const Web3 = require(‘web3’); const web3 = new Web3(new Web3.providers.HttpProvider(‘http://localhost:7545’)); var acc; web3.eth.getCoinbase(function(err, account) […]

Categories
Cryptocurrency Ethereum Mastering Development

Unable to deploy contract on Besu network(docker) using dynamic IP

I am stuck with a weird situation. I create a local Ethereum network with Hyperledger Besu in docker environment. I try to deploy contracts to a rpc node using Truffle(different container in same docker network). 1.) When I have static IP configured for Besu nodes in the docker-compose, and I use the service name in […]

Categories
Cryptocurrency Development Ethereum

TypeError: tests is not a function Error in Truffle

I am following an online tutorial, doing almost exactly like the instructor. I have the following error every time I try to run ‘truffle test’ my truffle-config file: module.exports = { // See <http://truffleframework.com/docs/advanced/configuration> // to customize your Truffle configuration! contracts_build_directory: path.join(__dirname, “client/src/contracts”), networks: { development: { host: “127.0.0.1”, port: 7545, network_id: “*”, // match […]

Categories
Cryptocurrency Development Ethereum

Cannot deploy to Ropsten with truffle

I keep getting an error when trying to deploy a project to ropsten. This is my config file. Any idea??? const HDWalletProvider = require(“@truffle/hdwallet-provider”); const infuraKey = “xxxxxlmaoxxxxx”; const fs = require(‘fs’); const mnemonic = fs.readFileSync(“.secret”).toString().trim(); module.exports = { networks: { development: { provider: () => new HDWalletProvider(mnemonic, “http://127.0.0.1:7545”), network_id: “” // Any network (default: […]