Questions tagged [truffle-migration]

Truffle Migrations are JavaScript files that help you deploy contracts to the Ethereum network. These files are responsible for staging your deployment tasks, and they're written under the assumption that your deployment needs will change over time. As your project evolves, you'll create new migration scripts to further this evolution on the blockchain.

Filter by
Sorted by
Tagged with
1 vote
0 answers
21 views

Truffle migration of an ownable contract

Initially, I deploy everything using REMIX IDE, currently I would like to try to deploy a contract that is ownable into local ganache blockchain using truffle migration: pragma solidity ^0.8.18; ...
tony's user avatar
  • 13
0 votes
1 answer
21 views

Controlling Contract

Using truffle and makes me use truffle console but I dont want to and wouldnt either. Is there any other way interact with contracts and controlling their propreties and everything with an app or ...
seojunchian's user avatar
2 votes
2 answers
20 views

When using truffle command "truffle migrate", previously deployed contracts are re-deployed, is there a way to prevent this?

i've been studying solidity/blockchain for a few months now and recently started development on a personal project. I have a few questions i kept running into, specifically when deploying contracts ...
pierre96's user avatar
1 vote
1 answer
54 views

Problems installing truffle

I've installed truffle multiple times, uninstall and installed again, all I get is command not found npm install -g truffle npm WARN deprecated [email protected]: testrpc has been renamed to ganache-cli, ...
ByteCypher's user avatar
0 votes
2 answers
24 views

TypeError: Member "add" not found or not visible after argument-dependent lookup in struct Chainlink.Request memory

I encounter this error when trying to compile and migrate to my blockchain EVM.The smart contract supposed to trigger a job from Chainlink from Ganache EVM. This is the code to it pragma solidity >=...
xopherwwl's user avatar
0 votes
0 answers
55 views

abortHandshake(this, req, `Unexpected server response: ${res.statusCode}`);

truffle migrate --network sepolia Compiling your contracts... Everything is up to date, there is nothing to compile. /mnt/c/pr0/bootcamp-completed/node_modules/ws/lib/websocket.js:542 abortHandshake(...
Soyaya's user avatar
  • 31
0 votes
0 answers
25 views

How to deploy a smart contract using CREATE2 with truffle?

How can I deploy a new smart contract using CREATE2 upcode (EIP-1014) with truffle?
Ehsan Khodarahmi's user avatar
0 votes
0 answers
24 views

Getting this error while deploying contract on truffle

I am using command {truffle migrate --network 'Network Name'} to deploy on truffle. I don't know where this error is comming from. Someone who has worked on truffle, kindly help.
Manav Notnani's user avatar
0 votes
1 answer
67 views

Truffle migrate Error: PollingBlockTracker

I'm trying to deploy a contract on Avalanche Fuji testnet using Truffle. Here is my truffle config: require('dotenv').config(); const mnemonic = process.env["MNEMONIC"]; const infuraUrl = ...
code_learner93's user avatar
0 votes
1 answer
389 views

truffle migrate error ""MyToken" hit an invalid opcode while deploying. Try:"

I am trying to deploy my first smart contract on ganache blockchain. The compilation of my NFT goes well but when I try the "truffle migrate" command it gives me the error in the pic. The ...
Andrea Lorenzetti's user avatar
0 votes
0 answers
15 views

Error relating to emittery package while running truffle migrate: when I am running truffle migrate following error comes. Can anyone help me on this

const mixin = emittery_1.default.mixin.bind(emittery_1.default); ^ TypeError: Cannot read properties of undefined (reading 'bind') at Object.call (C:\Users\...
MJT's user avatar
  • 1
1 vote
1 answer
18 views

Error in truffle initial migration file

I'm learning solidity with the book "Master etherum". I'm trying to use following program in truffle. https://github.com/ethereumbook/ethereumbook/blob/develop/code/Solidity/Faucet4.sol // ...
YaiMiChiLaoMa's user avatar
2 votes
0 answers
55 views

Truffle hit a require or revert statement in simple ERC777 constructor

I have incredibly simple code, taking straight from openzeppelin's ERC777 contract. When I run truffle migrate, however, I receive Replacing 'Implementation' -------------------------- *** ...
chriscrutt's user avatar
2 votes
1 answer
29 views

Two identical functions inside a truffle migration

The contract VestingWallet.sol from OpenZeppelin have two functions with the same name "vestedAmount", but different parameters to call a particular function. The first one: function ...
titoi's user avatar
  • 31
1 vote
0 answers
22 views

Deactivate clean-room environment in truffle

Everything is in the question, does anyone have a way to prevent the redeployment of the contract every time you run a test and keep using the same "contract" feature ? Edit : I've found it, ...
Raphael's user avatar
  • 41
0 votes
0 answers
669 views

Error: Expected private key to be an Uint8Array with length 32

const HDWalletProvider = require("@truffle/hdwallet-provider"); require('dotenv').config(); const privateKeys = [`0x${process.env.PRIVATE_KEY}`] this is my code in truffle-config.js but its ...
AmariS1's user avatar
  • 77
0 votes
0 answers
32 views

Truffle migrations - it doesn't recognize the network from external file, why?

1_initial_migration.js file: const Globals = require("../globals.js"); const Migrations = artifacts.require("Migrations"); const Test = artifacts.require("Test"); ...
Radek_pl's user avatar
  • 761
1 vote
0 answers
59 views

network ID error while deploying a truffle project to ganache cli. how do i resolve it

when I deploy my truffle project to ganache I get the error, network id are not the same. and when I checked the network id on ganache and truffle, i changed the network id of truffle to match that of ...
grog's user avatar
  • 11
0 votes
1 answer
14 views

How to create an instance of a contract in Truffle that deployed by another Ethereum node?

I set Truffle to my private network. Now, I need to interact to a contract (C1) that deployed by another node of this network and I need to do that by Truffle. As I understood, I should define C1 to ...
Alireza's user avatar
  • 533
0 votes
1 answer
206 views

Truffle Migrate Error: The network id specified in the truffle config (5777) does not match the one returned by the network (1)

I'm a bit new here and I've been trying to migrate truffle however I keep running into this error: Error: The network id specified in the truffle config (5777) does not match the one returned by the ...
Madds's user avatar
  • 11
0 votes
1 answer
83 views

Why doesn't my upgradeble contract upgrade properly?

I have an upgradeable contract, but when I upgrade it, it doesn't go to the same address. After I deploy the upgrade, the console shows TransparentUpgradeableProxy getting a new address, but that ...
Antheloth's user avatar
0 votes
1 answer
52 views

Deploying Multiple Contracts with Truffle

Hoping someone can answer a couple questions regarding deploying multiple contracts with truffle. 1.)I can create one contract in the the deploy, something like 2_deploy_contracts.js and all the ...
Blockpain's user avatar
  • 143
0 votes
1 answer
198 views

Truffle migrate - TypeError: migrations.setCompleted is not a function

I ran $ npx truffle migrate to deploy 2 contracts to Ganache but I got an error: This version of µWS is not compatible with your Node.js build: Error: Cannot find module './uws_darwin_x64_88.node' ...
aahd_fr's user avatar
2 votes
1 answer
646 views

why command Truffle init not creating Migrations.sol?

I created new folder in truffle with command truffle init version of truffle and others Truffle v5.5.30 (core: 5.5.30) Ganache v7.4.0 Solidity - 0.8.17 (solc-js) Node v16.16.0 Web3.js v1.7.4 but it ...
vishal's user avatar
  • 23
0 votes
2 answers
1k views

Console Goerli not functioning on Truffle - This version of µWS is not compatible with your Node.js build

When i try to run npx truffle console --network goerli to start the console and then migrate my contracts on goerli testnet using truffle, I get the following error. MacBook-Pro sample-nftrender % npx ...
SideChain Labs's user avatar
0 votes
2 answers
50 views

Truffle migration: invalid number of parameters

Truffle migrate: Invalid number of parameters I have got following two smart contracts (SCs): pragma solidity 0.5.16; contract Phishable { address public owner; constructor () public{ ...
zak100's user avatar
  • 1,416
0 votes
1 answer
63 views

Truffle: { Error: Invalid number of parameters for "undefined". Got 0 expected 1! at module.exports

I am trying to execute the following smart contract using Truffle: pragma solidity 0.5.16; contract Phishable { address public owner; constructor (address _owner) public{ owner = ...
zak100's user avatar
  • 1,416
0 votes
1 answer
235 views

Smart Contract deployment error

I am trying to deploy a smart contract on Rinkeby testnet and I am getting the following error truffle-config.js settings networks: { development: { host: "127.0.0.1", // ...
imhans4305's user avatar
1 vote
0 answers
160 views

Error deploying contract via Truffle to Polygon mainnet

When I try deploying with command npx truffle migrate --config=truffle-config.js --network polygon, I get the following error. Error [ERR_UNHANDLED_ERROR]: Unhandled error. ([object Object]) at ...
P A S H's user avatar
  • 138
0 votes
1 answer
46 views

Hardhat: Order of execution of Multiple scripts inside scripts folder?

In Truffle, we can have multiple deployment scripts inside the migrations folder, like 01_deploy.js, 02_deploy.js and truffle executes them in ascending order of the starting number, ie: 01_deploy.js,...
Somjit's user avatar
  • 265
0 votes
0 answers
393 views

How to increase an account nonce on web3js?

i'm running a script using web3js in which one i have my accounts[0] that is running 2 transactions. When i do: await web3.eth.getTransactionCount(accounts[0]) , i receive X (number) as a response. ...
Wallace's user avatar
0 votes
0 answers
40 views

Could not find artifacts for " + import_path + " from any sources"

I'm following this tutorial on creating my own nft and I came across this problem. Can someone help me PS C:\Users\caclc\contracts> truffle migrate Compiling your contracts... Everything is up to ...
IJC's user avatar
  • 1
0 votes
1 answer
218 views

Encountered an error while attempting to update latest block (error code 1020 on Polygon mainnet)

I'm trying to migrate a smart contract on Polygon (Matic) mainnet through truffle, but I get the following error: node_modules\@trufflesuite\web3-provider-engine\subproviders\rpc.js:57 const ...
Ehsan Khodarahmi's user avatar
1 vote
1 answer
299 views

truffle installed but not working

I'm using node version 12.20.2 and npm version 6.14.11 and installed truffle with cmd as administrator, the truffle framework version 5.5.12 has been installed but when I run any command in the vs ...
Prabhat Dongare's user avatar
0 votes
0 answers
61 views

Truffle with weird behavior dealing with uint type of variables

I´ve spent a couple weeks try to understanding what was heppening. The same solidity code worked great in REMIX but not in Truffle/Ganache. Let´s me explain. I wrote a code bases on Openzeppelin, but ...
p3cardoso's user avatar
0 votes
1 answer
242 views

concatenated string reason message in require() not displaying

I'm using Solidity 0.8.13 and Truffle 5.5.6. I'm just trying to debug a transaction call that fails then reverts when I do truffle migration. I temporarily changed my onlyOwner modifier to make the ...
CodeCalibre's user avatar
0 votes
0 answers
15 views

my transaction triplicates and all of them fail

I am new to creating smart contracts, I followed this video in order to create a simple to-do list. I needed to update some code in order to make it work since the video is more than 2 years old. This ...
Robert Vitoriano's user avatar
0 votes
0 answers
96 views

how to unlock my ethereum private network account in geth version 1.10.16

when I try to unlock my Ethereum private network account in go-Ethereum version 1.10.16, it show error like this, how could I overcome this? Error: Error: account unlock with HTTP access is forbidden ...
user97534's user avatar
0 votes
1 answer
399 views

Invalid number of parameters for "undefined". Got 3 expected 5!

I am using truffle 5.5.5 with Ganache as my dev blockchain. When I run truffle migrate I get the following error: > Compiled successfully using: - solc: 0.8.13+commit.abaa5c0e.Emscripten.clang ...
Carol.Kar's user avatar
  • 130
0 votes
1 answer
219 views

Truffle migrate: exited with an error (status 0): Please check that the transaction: satisfies all conditions set by Solidity `require` statements

I'm learning to use Truffle for the first time, and when I run migrate in the Truffle Develop console, I get the following error: 1_initial_migration.js: const FilePermissions = artifacts.require(&...
Spencer Goff's user avatar
0 votes
1 answer
4k views

How to fix "underflow"?

I am using Truffle v5.5.5 and solidity 0.8.0. I have the following constructor in my contract: contract rNFT is ERC721Enumerable, Ownable { using Strings for uint256; string baseURI; string ...
Carol.Kar's user avatar
  • 130
0 votes
1 answer
448 views

Deploying same contract with different owner using alchemy

I am trying to deploy contract to polygon mumbai testnet. It works with the first wallet address, but when i use a different wallet address it doesn't work. I am using the same alchemy rpc url truffle ...
Asif Alamgir's user avatar
0 votes
1 answer
89 views

Export contracts to two or more folders

I´m trying to automate as much as I could my truffle process and I wanna export the contracts during the "truffle migrate" command to two separate folders. Imagine that I have a frontend and ...
gustavomr's user avatar
0 votes
1 answer
89 views

Avoiding transaction failures in truffle migration to mainnet

I am trying to deploy my smart contract with truffle and an Infura HDWalletProvider. Here's my dry run (I edited/shortened it for brevity): Migrations dry-run (simulation) =============================...
wrightcode's user avatar
0 votes
1 answer
451 views

ERC721 contract deployed to mainnet gives enormous minting fees

I'm experiencing some weird behavior of the ERC721 contracts on the mainnet. I developed two very simple contracts using OpenZeppelin that are based on ERC721, ERC721URIStorage, and ERC721Enumerable. ...
Tali Oat's user avatar
0 votes
1 answer
616 views

Could not find artifacts for " + import_path + " from any sources

I'm working through a Solidity course on Udemy. I'm trying to run migrate on truffle. Here's my code: MyToken.sol // contracts/GLDToken.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; ...
DBWeinstein's user avatar
0 votes
1 answer
2k views

"Migrations" ran out of gas

I am trying to deploy 3 contracts to Avalanche. I have already deployed these same contracts to Ropsten, Rinkeby, and Ethereum mainnet. When I try to deploy to Avalanche, I get this error message: ...
Tom Blackstone's user avatar
2 votes
0 answers
182 views

Cannot deploy to polygon

Truffle migrate keeps my transaction stuck in pending forever. From my understanding I'm basically saying here "Whatever it takes, whatever it costs, just do it"; if i keep increasing the ...
shredding's user avatar
  • 199
0 votes
1 answer
426 views

Truffle deployment/migration error with Infura - contract got deployed once but could not be deployed again

I am stuck when deploying a Smart Contract to rinkeby testnet by running (on macOS 12.1) this: sudo truffle migrate --reset --network rinkeby The contract compiles and I can deploy it locally, but ...
DatamineR's user avatar
  • 101
0 votes
2 answers
933 views

Uncaught TypeError: contract.name is not a function

I`m trying to check if I correctly deploy a contract with truffle and ganache. I run truffle console and then contract = await Kryptobird.deployed(). But when I try to get the name of the contract I ...
Mariia Synelnyk's user avatar

1
2 3 4 5
10