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
1answer
8 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; ...
0
votes
0answers
31 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: ...
0
votes
0answers
17 views

truffle migrate --reset headache

Compiling your contracts... =========================== > Compiling .\contracts\Migrations.sol > Compiling .\contracts\UniswapV2Migrator.sol > Compiling .\contracts\UniswapV2Router01.sol > ...
0
votes
0answers
27 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 ...
1
vote
0answers
29 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 ...
0
votes
0answers
16 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 ...
0
votes
1answer
53 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 ...
0
votes
0answers
22 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 ...
0
votes
2answers
34 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 ...
0
votes
1answer
53 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 ...
0
votes
1answer
35 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 ===================== ...
0
votes
0answers
15 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 ...
0
votes
1answer
32 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 --...
0
votes
0answers
34 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 ...
0
votes
0answers
167 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 ...
1
vote
0answers
35 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) ...
0
votes
1answer
64 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 ...
0
votes
1answer
26 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 ...
0
votes
1answer
45 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: {...
0
votes
0answers
68 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, ...
0
votes
1answer
14 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" -...
0
votes
1answer
55 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....
0
votes
0answers
24 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, ...
0
votes
1answer
24 views

How to deploy from a particular address in truffle

I have the following code in my token_migrations.js: const WETH = artifacts.require("WETH") const USDC = artifacts.require("USDC") module.exports = function (deployer, accounts) { ...
0
votes
1answer
100 views

How to get list of all emitted events in truffle console?

I wrote a very simple smart contract which emits an event everytime I call one of its functions: pragma solidity ^0.8.0; contract MyContract { event Score( uint date, string ...
0
votes
1answer
20 views

Construction function [closed]

My construction function accepts three arguments, one of which has to be a specific amount written in Wei. Whenever I try to compile and migrate my contract an error shows up notifying me that number ...
0
votes
0answers
27 views

Truffle compile error. ParseError: Expected ';' but got '}'

I am trying to compile my contract but I get ParseError while compiling Migrations.sol. I got this error after running E:\blockchain-learning\hooks-truffle-ganache>truffle develop truffle(develop)&...
0
votes
0answers
53 views

Hit a require or revert statement somewhere in its constructor

I have created a contract which creates a new UniswapV3Factory contract in the TopLevelContract constructor. The code is below pragma solidity = 0.7.6; import './../v3-core/contracts/UniswapV3Factory....
0
votes
0answers
39 views

Interrogation about Truffle deployer.deploy function arguments

I have the following Truffle migration: module.exports = function (deployer, networks, accounts) { var receiver = accounts[1]; var balance = 50000000000000000000; deployer.deploy(MPC, receiver, {...
0
votes
0answers
42 views

Cannot migrate contract to blockchain on Truffle's Pet Shop tutorial

I have completed Truffle's Pet Shop tutorial up to the point of migrating the Adoption.sol contract with 2_deploy_migration.js . This is the error that shows up in the terminal. Starting migrations... ...
0
votes
1answer
65 views

ERC721Burnable TypeError: Definition of base has to precede definition of derived contract

I'm getting an error due to Burnable but it's not even in my contract. @openzeppelin/contracts/token/ERC721/ERC721Burnable.sol:12:46: abstract contract ERC721Burnable is Context, ERC721 ...
1
vote
1answer
24 views

inheritance behavior of 2 contract when deployed

I would like to implement two contracts that extend another contract with an information store. Example: contract MonsterData { struct Monster { string name; int8 category; } ...
0
votes
2answers
194 views

Issue while migrating to Ropsten network

I am trying to migrate the contract to ROPSTEN network. It fails for the following reason. Please advice. migrate command $env:MNEMONIC=' XX XX XX';truffle migrate --reset --network ropsten Error ...
0
votes
0answers
26 views

Where to find the routerAddress, pairAddress, routerForkAddress, pairForkAddress? I am trying to make a clone of the UniswapV2

const BonusToken = artifacts.require('BonusToken.sol'); const LiquidityMigrator = artifacts.require('LiquidityMigrator.sol'); const Migrations = artifacts.require('Migrations'); module.exports = ...
1
vote
1answer
200 views

Cancelling truffle migrate to mainnet. With previous pending transactions that have low gas prices

I am exporting my smart contract to the Ethereum mainnet and I am using Truffle to export my smart contract. However when deploying I was trying out multiple parameters and as a result have 11 ...
1
vote
0answers
53 views

Compiling contract failes

I want to create crowdsale, but when compiling contracts i got: Compiling your contracts... =========================== > Compiling ./contracts/Migrations.sol > Compiling ./contracts/TubblySale....
0
votes
0answers
32 views

Truffle : Source code in build/contracts/HelloWorld.json doesn't change after first migrate

build/contracts/HelloWorld.json line 890: "source": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.7;\r\n\r\ncontract HelloWorld{\r\n function hello() public pure returns(...
0
votes
0answers
16 views

"Error: Returned values aren't valid, did it run Out of Gas?" while calling ownerOf method in truffle develop

I am using the following code of NFT // contracts/MyNFT.sol // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; // pragma solidity ^0.7.1; import "@openzeppelin/contracts/token/...
0
votes
2answers
141 views

Migration to test net works, but not to main net

I am trying to deploy my contract to the ETH mainnet / livenet. Everything works fine for the testnet, and also the dry-run for the mainnet works, but not the actual migration. Here is the output: ...
-1
votes
1answer
109 views

BSC testnet seems to be not up to date at truffle

it looks like my truffle setup is far behind the actual testnet, resulting that I cant deploy anything (getting timeout) 🔢 Code to reproduce truffle-config.js bsctestnet: { provider: () => ...
0
votes
1answer
156 views

"Uncaught ReferenceError: global is not defined” as I tried to call Todolist.deployed() in truffle console

I was trying this Beginner tutorial on smart contracts and solidity. I typed truffle compile, truffle migrate and they ran without any error and I got my gas cost used up in Ganache. When I opened ...
1
vote
0answers
199 views

Is it possible to recreate the contract artifacts with Truffle

When trying to interact with a deployed contract I'm getting uncaught errors. For example if I try something simple as getting the name of the contract: let instance = await [contract].deployed() ...
0
votes
1answer
76 views

Contract has not been not deployed to detected network

I'm trying to access a smart contract in my local dev environment, but it doesn't appear to be deploying fully. In summary, I get what seems to be a successful migration, however, I am not able to ...
0
votes
0answers
26 views

Unable to deploy contract using Truffle on local network Geth : "ProxyAdmin" hit an invalid opcode while deploying

I am trying to deploy a simple contract using truffle on my local Geth network. But it is throwing the following error: Santanu@ITS-7 MINGW64 /d/xampp/htdocs/truffle_nft_example_nuxt (main) > ...
0
votes
0answers
45 views

Error with Truffle React (the contract doesn't have address)

Someone knows something about this error with Truffle React box? Must be my Metamask wallet address but it is already in my truffle-config file. I leave the App.js file here (I didn't make it. It's ...
0
votes
2answers
310 views

Contract is NOT deployed Despite calling truffle migrate

I'm trying to call a contract I've created. I've set up my truffle deployment script like so: var SafeYieldAggregator = artifacts.require("SafeYieldAggregator") module.exports = function(...
0
votes
1answer
18 views

The second contract is not getting deployed in migration

const Input = artifacts.require("Input"); const Register = artifacts.require("Register"); module.exports = function (deployer) { deployer.deploy(Input, "test_name") ....
1
vote
3answers
141 views

Cannot find module '@chainlink/contracts/truffle/v0.4/LinkToken'

I was following these steps in order to use Chainlink on Kovan testnet. when I've finished the configuration (truffle-config.js, npm install to get all the dependencies, etc.) and I've compiled the ...
2
votes
1answer
213 views

Truffle incompatible with ESMs (ES5 / ES6 modules with "type": "module" in package.json)?

is it possible to execute truffle commands inside a folder in "ESM mode", i.e. package.json contains "type": "module", uses import instead of require etc.? Here is what I ...
0
votes
1answer
218 views

How to deploy a new version of a smart contract to a testnet?

So I have deployed a contract to the Rinkeby testnet but I have added some new features to it and I've tried deploying the contract again but it just says the following: √ Fetching solc version list ...

1
2 3 4 5
10