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
0 votes
0 answers
7 views

ganache-cli ganache-cli --fork after machine restart

I use ganache-cli to fork from mainnet and develop. But everytime I reset my computer, I need to restart the ganache-clie and changes that I have done on forked version are lost. Is there a way to ...
user avatar
  • 101
0 votes
0 answers
9 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 ...
user avatar
  • 1
0 votes
0 answers
20 views

Truffle test not running completely

I am a beginner in Solidity and truffle. Trying to create something from scratch so I am not using anything from openzeppelin. I created an ERC20 token smart contract and created a second smart ...
user avatar
0 votes
0 answers
7 views

New to coding. Trouble writing out truffle migrate —reset

So I am coding along with my teacher in Visual Studio Code and things are going pretty good, it’s only when I go to the terminal to compile the smart contracts we wrote out is where the problem comes ...
user avatar
0 votes
0 answers
10 views

Truffle init Problem

I am getting the following error while doing truffle init. C:\Users\ok\AppData\Roaming\nvm\v8.9.0\node_modules\truffle\build\231.bundled.js:54129 } catch { ^ SyntaxError: Unexpected token {...
user avatar
0 votes
0 answers
23 views

Deploy a crowdsale contract for a previously deployed ERC20 token

I have deployed an upgradable ERC20 token using ^0.8.4 and I would like to set up an AllocatedCrowdsale from OpenZeppelin for said token. I have set up a second project for the crowdsale using ^0.5.0 ...
user avatar
0 votes
1 answer
86 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 ...
user avatar
1 vote
0 answers
38 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 ...
user avatar
0 votes
0 answers
35 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 ...
user avatar
0 votes
1 answer
39 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 ...
user avatar
0 votes
0 answers
41 views

Does the BSC Testnet Faucet Supports only 1 RPC URL?

I'm trying to get tokens for the BSC testnet using: https://testnet.binance.org/faucet-smart Due to my truffle config I'm connecting to a different RPC URL which is: https://data-seed-prebsc-2-s2....
user avatar
0 votes
0 answers
14 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 ...
user avatar
0 votes
0 answers
4 views

Run a migration from a function instead of calling this command in terminal truffle migrate --network ropsten?

Is it possbile to run a migration from a function instead of calling this command in terminal truffle migrate --network ropsten? I would like to deploy a smart contract from just the interface instead ...
user avatar
0 votes
0 answers
87 views

MetaMask - RPC Error: VM execution error. (code: -32015)

inpage.js:1 MetaMask - RPC Error: VM execution error. {code: -32015, message: 'VM execution error.', data: 'Reverted 0x08c379a00000000000000000000000000000000…...
user avatar
0 votes
0 answers
19 views

How to deploy Smart Contract from RreactJS-App

To deploy my Smart Contracts to Ganache I was working with Truffle. Now I wanted to deploy the Smart Contracts via the ReactJS-app, so without typing "truffle migrate --reset" into the cmd. ...
user avatar
  • 29
0 votes
0 answers
27 views

TypeError: mnemonic.includes is not a function for kovan test net

I am executing the following code on my terminal " truffle migrate --reset --network kovan " to migrate my contracts to the test network. But I keep getting this eerror "TypeError: ...
user avatar
0 votes
0 answers
59 views

Why does Truffle migration to Rinkeby network gets stuck?

I am trying to migrate a smart contract to Rinkeby network, using truffle, everything worked fine on the local network. But, when I try to migrate to Rinkeby it gets stuck on 1_initial_migration.js ===...
user avatar
0 votes
0 answers
72 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 ...
user avatar
0 votes
1 answer
84 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 ...
user avatar
  • 120
0 votes
1 answer
84 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(&...
user avatar
0 votes
0 answers
24 views

I'm trying to migrate the second file but it can not find the artifacts file

Migrations file: const wallet = artifacts.require("wallet"); module.exports = async function (deployer, _network, accounts) { await deployer.deploy(Wallet, [accounts[0], accounts[1], ...
user avatar
0 votes
1 answer
804 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 ...
user avatar
  • 120
0 votes
1 answer
76 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 ...
user avatar
0 votes
0 answers
66 views

truffle migrate error -> Error: Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: -0x1

Error: Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: -0x1 I keep seeing this every time I try to truffle migrate. Does anyone know what ...
user avatar
0 votes
1 answer
24 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 ...
user avatar
0 votes
1 answer
58 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) =============================...
user avatar
0 votes
0 answers
10 views

"NFT" -- Invalid number of parameters for "undefined". Got 0 expected 1! [duplicate]

Here is my NFT.sol contract //SPDX-License-Identifier: MIT pragma solidity ^0.8.4; // we will bring in the openzeppelin ERC721 NFT functionality import '@openzeppelin/contracts/token/ERC721/ERC721....
user avatar
0 votes
1 answer
267 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. ...
user avatar
0 votes
1 answer
187 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; ...
user avatar
0 votes
1 answer
651 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: ...
user avatar
0 votes
0 answers
147 views

Error deploying on Mainnet (Binance Smart Chain) with Truffle

I'm trying to deploy my contract on BSC mainnet with Truffle, following this configuration: https://docs.binance.org/smart-chain/developer/deploy/truffle.html I have deployed contracts on mainnet ...
user avatar
  • 646
2 votes
0 answers
131 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 ...
user avatar
  • 149
0 votes
0 answers
20 views

Cannot deploy smart contract with truffle to smart chain (code: -32000, message: 'header not found') [duplicate]

I'm trying to deploy a smart contract to BSC. I can deploy it to test net in truffle and in remix (same smart contract). However when I try to deploy it to BSC I got this error. Odd thing is that the ...
user avatar
0 votes
1 answer
243 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 ...
user avatar
  • 101
0 votes
0 answers
172 views

Verify that your constructor params satisfy all require conditions

Smartcontract requires two addresses to be passed while deploying contract via truffle. I am deploying this contract on Ganache locally. Here's the smartcontract constructor. constructor (address ...
user avatar
0 votes
2 answers
388 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 ...
user avatar
0 votes
1 answer
206 views

Truffle-upgrades - deployProxy - Type/values mismatch despite correct syntax

Asking my first question here, hope it's in the right format. I'm trying to deploy my contract using a transparent proxy, using OpenZeppelin's truffle-upgrades, as they explain here. However, I keep ...
user avatar
0 votes
1 answer
65 views

"Election" hit an invalid opcode while deploying. truffle migrate

I'm just getting started with Solidity and ran into a problem that I can't solve. The error below displays when you try to migrate truffle migrate --reset 2_deploy_contracts.js ===================== ...
user avatar
0 votes
0 answers
21 views

truffle migrate unknown network

I am using $ truffle migrate --network development but the compiler returns Compiling your contracts Everything is up to date, there is nothing to compile. Unknown network "development". See ...
user avatar
0 votes
1 answer
299 views

Error: Returned error: VM Exception while processing transaction: revert (moralis tutorial)

how are you guys? i was watching this video tutorial, https://www.youtube.com/watch?v=y519kGkAQd8&list=RDCMUCgWS9Q3P5AxCWyQLT2kQhBw&t=235s and when i execute this command truffle migrate --...
user avatar
0 votes
0 answers
60 views

Cannot deploy ERC721 contract to Rinkeby network - address is not whitelisted. How can that be fixed?

I cannot deploy to Rinkeby because the address of my future contract ERC721 is not whitelisted..... How can I fix it? I am specifically using the OpenSea template for the contract which supposedly ...
user avatar
0 votes
0 answers
418 views

Truffle deploy on testnet successful but transaction never confirms on mainnet

I'm trying to deploy a contract to Polygon Mainnet. It works perfectly on Mumbai, usually confirming within a couple of seconds but I haven't been able to get a single transaction to confirm. They all ...
user avatar
1 vote
0 answers
84 views

Truffle dry-run on Ethereum Main reports different gas cost (less) than actual deployment gas

Just wanted to ask about something weird that I keep running into: I've been deploying smart contracts on Ethereum through truffle, and the estimated deployment cost during the --dry-run (simulation) ...
user avatar
0 votes
1 answer
144 views

Ethereum fork on Ganache: ran out of gas

what I'm trying to do is to fork the Ethereum Mainnet on my local ganache blockchain in order to interact with smart contract like Uniswap on my local machine. I forked the Ethereum network using ...
user avatar
  • 145
0 votes
1 answer
33 views

No coding exp - Error please help :D

I am trying to follow along with a tutorial on youtube. however i keep getting errors when i try to migrate. This is the error - Error: *** Deployment Failed *** "MemoryToken" is an ...
user avatar
  • 1
0 votes
1 answer
92 views

"Migrations" ran out of gas after x blocks mainnet

I trying to deploy my contract but I cant. After deployed in ropsten and development, for some reason I can't deploy to mainnet. Truffle v5.3.3 (core: 5.3.3) deploying... after compilers compilers: {...
user avatar
0 votes
1 answer
210 views

truffle migrate timeout error

I'm only trying to write a simple HelloWorld contract and deploy it to ropsten testnet. When I'm compiling/deploying on Remix i get no issues. However, when i try to run truffle migrate on my project, ...
user avatar
  • 131
0 votes
1 answer
26 views

Truffle v5.4.15 deploy error with newly create project

truffle deploy returns with the following error, in a newly create project (using flutter init) 1_initial_migration.js Deploying 'Migrations' Error: *** Deployment Failed *** "Migrations" -...
user avatar
  • 836
0 votes
1 answer
178 views

How to save truffle artifact for already deployed contract?

I have several contrats to deploy on different chains. Normally, when I just deploy the contract with truffle-v5 it creates/updates json object of artifacts by the path ./build/contracts/MyContract....
user avatar
  • 246
0 votes
0 answers
98 views

Truffle gas price on mainnet

I am trying to deploy my contract on mainnet. My truffle config says: live: { provider: function () { return new HDWalletProvider(MNEMONIC, API_URL) }, network_id: 1, ...
user avatar

1
2 3 4 5
10