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

Ethereum Error: Provider does not support subscriptions: HDWalletProvider

I am making a flash loan request using web3 , truffle and keep getting the error in an event listener: The current provider doesn’t support subscriptions: HDWalletProvider. I am using the code below to connect to get emitted events in a smart contract: const web3 = new Web3(); const eventProvider = new Web3.providers.WebsocketProvider(wss); eventProvider.on(‘error’, e […]

Categories
Cryptocurrency Ethereum Mastering Development

Solidity function calls from javascript work locally but fail on ropsten,kovan etc with Error: Returned values aren’t valid, did it run Out of Gas?

I have a smart contract whose function calls works fine when called locally using javascript and ganache. But when I deploy to ropsten and others, the calls to its functions fail with Error: Returned values aren’t valid, did it run Out of Gas? Since I was calling Orfeed’s getExchangeRate function, I initially thought it was […]

Categories
Cryptocurrency Ethereum Mastering Development

Truffle stuck when deploy smart contract

I have a little problem deploying smart contract with ledger nano s as provider on ropsten. The script just remain stuck at first migration Starting migrations… ====================== > Network name: ‘ropsten’ > Network id: 3 > Block gas limit: 8000029 (0x7a121d) 1_initial_migration.js ====================== Deploying ‘Migrations’ ———————- > transaction hash: 0x1b85c85699b9f40798b5892a7492c303048915e80ac69803f94e617744769865 ⠋ Blocks: 211 Seconds: 2829 […]

Categories
Cryptocurrency Ethereum Mastering Development

mnemonic.includes in not a function

I’ve been trying to compile my solidity smart contracts So I’d be able to deploy them on the Ropsten Test network when I run truffle compile I get this error : TypeError: mnemonic.includes is not a function at normalizePrivateKeys I don’t understand what this typeError means here’s the full message: TypeError: mnemonic.includes is not a […]

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 Ethereum Mastering Development

How to act as another wallet when using Truffle exec scripts?

I am writing a seed to add data on the smart contract after I deploy it. I’m using ropsten network, setted up like this in truffle-config: ropsten: { provider: function () { return new HDWalletProvider(MNEMONIC, INFURA_KEY) }, network_id: 3, gas: 8000000 //make sure this gas allocation isn’t over 8M, which is the max } After […]

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

Categories
Cryptocurrency Development Ethereum

“truffle migrate –network ropsten” stuck after compiling

I am trying to redeploy a contract on Ropsten Testnet using the command: truffle migrate –reset -f 1567182283 –network ropsten Here, “1567182283” is the prefix of my migration file. Upon executing, it gets stuck after compiling the contract: Compiling your contracts… =========================== > Everything is up to date, there is nothing to compile. I even […]

Categories
Cryptocurrency Development Ethereum

Truffle to Ropsten Testnet Deployment Issue: No migration

I am trying to deploy my contract on Ropsten test network through Truffle Framework. I use the command truffle migrate –network ropsten. Following is my truffle-config.js: const HDWalletProvider = require(‘truffle-hdwallet-provider’); const fs = require(‘fs’); const mnemonic = fs.readFileSync(“.secret”).toString().trim(); module.exports = { // rpc: { // host: “localhost”, // port: 8545 // }, networks: { development: […]