Categories
Cryptocurrency Ethereum Mastering Development

The network id specified in the truffle config (4447) does not match the one returned by the network (4777)

Please, the error messsage is in this imgur link, how’s that even possible? They are the same network, but I still cannot test my smart contract via Truffle. https://i.stack.imgur.com/vykIa.jpg Code of the truffle-config.js file: const path = require("path"); module.exports = {contracts_build_directory: path.join(_dirname, "client/src/contracts"), networks: { develop: { port: 7545, host: "127.0.0.1", network_id: 4777 } }, […]

Categories
Cryptocurrency Ethereum Mastering Development

Transaction underpriced at 5000000 gas but overpriced at 10000000

I’ve been developing a smart contract for a while on the Ropsten network using the Truffle framework, quite successfully. My truffle-config.js looks like this: const path = require("path"); const HDWalletProvider = require(‘@truffle/hdwallet-provider’); module.exports = { contracts_build_directory: path.join(__dirname, "client/src/contracts"), networks: { develop: { port: 8545, network_id: "*", host: "127.0.0.1" }, ropsten: { provider: new HDWalletProvider(mnemonic, ropsten), […]

Categories
Cryptocurrency Ethereum Mastering Development

Truffle deployment error while deploying with Infura (Error: Callback was already called)

I am trying to deploy a token smart contract to Ropsten test network with Infura, but I am always getting an error as I am using truffle migrate –reset –network ropsten_infura Compiling your contracts… =========================== > Everything is up to date, there is nothing to compile. /usr/local/lib/node_modules/truffle/build/webpack:/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358 callback(err); ^ Error: Callback was already called. at […]

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 […]