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
1 answer
639 views

Calculate required funds for truffle migrate to live network

Trying to deploy a dapp to the live network. Got this insufficient funds for gas * price + value: My wallet currently has 0.05 ether... How do I calculate the required funds?
shaharsol's user avatar
  • 561
1 vote
1 answer
160 views

Unable to deploy contract on ropsten

Firstly I installed geth and it's running I created an account and verified keystore file in the location: ~/Library/ethereum/testnet/keystore Then I used: Web3.personal.newAccount('password') ...
Rakesh 's user avatar
  • 103
2 votes
1 answer
980 views

Deploying smart contracts with truffle and geth in windows

I'm trying to deploy a contract. When running: truffle.cmd migrate network --ropsten I get the following error: No network specified. Cannot determine current network. Please help! Details are ...
CryptoQueen's user avatar
0 votes
4 answers
6k views

How to get blockNumber of contracts deployed with truffle?

We deploy our contracts with truffle migrate. We need the blockNumber of the contract deployment transaction in the webapp. We could use web3.eth.getTransaction(txhash).blockNumber() but can't get ...
szerte's user avatar
  • 1,231
2 votes
1 answer
1k views

UnhandledPromiseRejectionWarning: Error: Web3ProviderEngine does not support synchronous requests

I've been struggling on this for days, and been googling a bunch of things but still no luck. Here's my code for 2_deploy_contracts.js: const CoinCrowdsale = artifacts.require("./CoinCrowdsale.sol") ...
0xgoku's user avatar
  • 471
2 votes
2 answers
3k views

How does Truffle know the address of contracts published via truffle migrate?

In Truffle's documentation, it says DeployedAddresses.sol is how Truffle identifies and stores the addresses of contracts published to the blockchain via truffle migrate. How does this file work, and ...
AlwaysQuestioning's user avatar
0 votes
2 answers
325 views

unable to deploy contract on ropston testnet

I am trying to deploy contract on ropston testnet. I have created an account through truffle console and got three test ethers from https://faucet.bitfwd.xyz/. I have confirmed that my account has ...
Shoaib Iqbal's user avatar
0 votes
1 answer
625 views

Truffle "Replacing" durring migration

what does "Replacing" mean in migration? a simple test contract C.sol: pragma solidity ^0.4.17; contract C{ uint public ConstructorUint; function C(uint SetConstructorUint)public{ ...
AlexanderLife's user avatar
0 votes
3 answers
2k views

Truffle: Migrate to ropsten, unknown network "true" error

I am trying to deploy a work in progress dapp to the ropsten network using: truffle migrate --network ropsten I have a geth instance running in terminal and I receive the following error: Unknown ...
David Weir's user avatar
0 votes
2 answers
442 views

How to communicate with a deployed token?

Using Truffle, I am trying to deploy the following contract: pragma solidity ^0.4.13; contract ERC20Events { event Approval(address indexed src, address indexed guy, uint wad); event ...
Swader's user avatar
  • 126
0 votes
2 answers
3k views

Truffle migrate to rinkeby fails with insufficient gas price

I'm trying to migrate my contracts to rinkeby using truffle (truffle migrate --network rinkeby), but it keeps telling me that I don't have enough funds: Using network 'rinkeby'. Running ...
ulu's user avatar
  • 740
2 votes
2 answers
7k views

Truffle migrate Could not connect to your Ethereum client

Issue: I fail to migrate(connect) a ethereum private chain on cloud server. Actual Results Will:dragon zhuangweiming$ truffle migrate --network development Using network 'development'. Running ...
Will_Z's user avatar
  • 33
0 votes
0 answers
221 views

Debugging amount of funds needed to deploy +network state unknown error on Ropsten

Wrote a simple contract. Attempting to deploy to testnet and get error. eth --testnet --fast --rpc --rpcapi eth,net,web3,personal truffle.js config: module.exports = { // See <http://...
user avatar
3 votes
3 answers
1k views

Truffle deploying without linking

I'm deploying two contracts, one of which depends on another, plus they depend on a number of other contracts via the import statements. However, although in my deployment script I haven't included ...
ulu's user avatar
  • 740
6 votes
3 answers
414 views

Why does truffle always fail with "Error: Don't set config.from directly. Instead, set config.networks and then config.networks[<network name>].from"

I have a problem that suddenly appeared, and now I get it every time that I try to run truffle test or truffle migrate, regardless of which project it is. I've even tried fetching the Petshop from the ...
karianneberg's user avatar
1 vote
1 answer
808 views

Unable to deploy contract from inside another contract (works on Remix but returns revert on truffle)

I have been stuck on this for days trying to figure out why I am unable to create new contract instances from inside my parent. I am working on a larger project and couldn't understand so I created an ...
Karan Kurbur's user avatar
3 votes
0 answers
390 views

Upgrading the truffle Migrations contract

In the standard truffle migrations contract the purpose of the upgrade function is upgrade the Migrations contract itself by copying the last_completed_migration of the old Migrations contract to the ...
mjhm's user avatar
  • 155
1 vote
1 answer
161 views

Is a truffle migration effectively the same thing as a fork?

I'm confused as to the distinction between a migration (in truffle) and a fork (project, not ethereum). After the initial migration (deploy), any future migrations create new contracts with new ...
mjhm's user avatar
  • 155
0 votes
1 answer
622 views

Truffle Deploy Doesn't Work [duplicate]

2_deploy_contracts.js var Regulator = artifacts.require("./Regulator.sol"); var TollBoothOperator = artifacts.require("./TollBoothOperator.sol"); module.exports = function(deployer) { ...
Karan Kurbur's user avatar
0 votes
0 answers
39 views

When i run the contract i got below mentioned error

Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: The contract code couldn't be stored, please check your gas amount. at Object.callback (/usr/...
Elango Elango Elango's user avatar
1 vote
0 answers
937 views

Why can I deploy my contract to the testnet, but not to the mainnet?

I deployed my smart contract to the ropsten testnet and everything worked fine. Now I wand to deploy it to the mainnet and I always get an error. How is that possible? What can I do? Setup Truffle ...
Nina's user avatar
  • 11
0 votes
3 answers
2k views

Truffle migrate to ganache-cli (testrpc) hangs on deploying Migrations.sol

I am trying to truffle migrate Metacoin to debug why Tuffle migrate is not working to testRPC/ganache-cli. It gets hung up on deploying for testRPC/ganache but if I do it from truffle develop and not ...
aquamanSam's user avatar
3 votes
0 answers
514 views

Contract not stored and out of gas in migration at Truffle ganache

I am facing this issue regularly while trying to migrate bunch of contracts but it get failed because of this issue . I am running over testrpc , i tried lot of recommendations over stack exchange and ...
Satyam Agrawal's user avatar
5 votes
2 answers
2k views

Printing uint256 value to console while debugging with Truffle

I am trying to figure out how to print values to the console while doing truffle debug <txhash>. So far I have tried using an event called "TestValue", but I am not seeing the output in the ...
Shawn's user avatar
  • 243
9 votes
1 answer
4k views

Return Token Contract address on truffle deploy

I am trying to figure out how to return the address of a contract when I deploy it with truffle's deployer.deploy. So the goal is that when I deploy a contract that is a custom token, I want to ...
Shawn's user avatar
  • 243
0 votes
1 answer
184 views

Error linking library when deploying with via Infura (ropsten)

I'm trying to deploy via Infura to ropsten and get this error. The local deployment works without a hitch. Linking SafeMath to contracts Error encountered, bailing. Network state unknown. Review ...
sofend's user avatar
  • 241
5 votes
2 answers
2k views

Truffle. How to link deployed library by address during migration?

For now I use this code to link library during truffle migration: deployer.deploy(SafeMathLibExt); deployer.link(SafeMathLibExt, [CrowdsaleTokenExt]); deployer.deploy(CrowdsaleTokenExt); This code ...
Egor Bukraba's user avatar
0 votes
1 answer
935 views

Why is my truffle migration failed?

I executed the following: ➜ voting_truffle truffle migrate Compiling ./contracts/Migrations.sol... Compiling ./contracts/Voting.sol... Compilation warnings encountered: /Users/glaksmono/Documents/...
0xgoku's user avatar
  • 471
1 vote
1 answer
538 views

Why the balance that I see in the Ropsten isn't reflected in Truffle console?

This is my account #1: http://ropsten.etherscan.io/address/0x6bc701e7c3b642fc12a3a6f7d1144b8200a26401 and I sent some ETH to account #2: https://ropsten.etherscan.io/address/...
0xgoku's user avatar
  • 471
2 votes
1 answer
1k views

How to write truffle migration file for the contract that contains more than one contract

Suppose my contract named "B" look like : contract A { function abc(){ ... } } contract B is A { function bc(){ ... } } then how will be the migration file look like.
sruthi23's user avatar
  • 361
0 votes
1 answer
2k views

Truffle deploy via Infura : does it work? [duplicate]

I've read mixed things. In the docs for Truffle Framework there are instructions for deploying contracts via Infura's APIs. But, elsewhere, I've read that Infura doesn't allow one to send ...
sofend's user avatar
  • 241
2 votes
1 answer
1k views

Issue in truffle migration with Quorum

I am following this tutorial http://truffleframework.com/tutorials/building-dapps-for-quorum-private-enterprise-blockchains for Quorum installation.. I have successfully installed vargrant(Installed ...
Crissi Mariam Robert's user avatar
1 vote
2 answers
374 views

Different errors while deploying with geth console and truffle

I'm trying to deploy a contract by two different ways, I can't succeed in any. First way: 1. geth console —rinkeby —rpc —rpcapi db,eth,net,web3,personal —unlock="0x..." 2>>geth.log I have ether ...
Олеся Костеева's user avatar
2 votes
2 answers
340 views

TokenTimelock gives out of gas errors when deployed within Truffle 4.0.1

I'm trying to deploy a contract using Truffle v4.0.1, within Truffle's own console but I keep getting out of gas errors. The constructor looks like: function MyAwesomeCrowdsale( uint64 ...
Dave Sag's user avatar
  • 879
0 votes
1 answer
2k views

Deploying contracts in truffle while passing parameters of it constructor results in an error

I have managed to successfully compile a solidity token contract, the constructor is shown below : function token(uint256 initialsupply, string symbol, string name, uint256 buyPrice, uint256 ...
jold20's user avatar
  • 156
1 vote
2 answers
2k views

Truffle can not find artifacts

I'm trying to deploy a contract and I don't require Migrations.sol in any of my migrations. I don't even have this file in my contracts folder. And I run truffle migrate inside my project folder. But ...
Олеся Костеева's user avatar
2 votes
1 answer
525 views

Understanding Truffle Migration

I'm building my dApp by modifying the pet-shop example, however, I got stuck at the migration step. 1_initial_migration.js runs successfully but 2_deploy_contracts.js gives me the following error ...
Charles's user avatar
  • 435
1 vote
0 answers
599 views

Truffle (4.0) test multiple contracts

I'm trying to test a contract that wrote and compiled, and I need to use another deployed contract to test it. I am writing a test for a specific contract and trying to invoke another deployed ...
rhlsthrm's user avatar
  • 425
2 votes
3 answers
2k views

Truffle post-deployment actions

I have 2 contracts that deployed with truffle. Now I extended it and my contracts require some bootstrap actions like "set some address" or "set in contract1 address of contract2". I will not change ...
Alex G.P.'s user avatar
  • 1,277
1 vote
1 answer
522 views

testrpc How do I force development accounts to be unlocked?

Using Truffle and testrpc. I am launching testrpc via testrpc --port 8545 --unlock 0 But when I run truffle migrate I get Running migration: 1_initial_migration.js Deploying Migrations... ... ...
Dave Sag's user avatar
  • 879
17 votes
1 answer
18k views

truffle migrate: How to deploy a contract whose constructor takes a parameter

I'm using Truffle Version 4 to develop a simple smart contract and am stuck on something I think reflects a very basic misunderstanding that I just can't get my head around. Here's my simple contract,...
Dave Sag's user avatar
  • 879
3 votes
1 answer
910 views

Having to set reset flag with truffle migrate

I am having a weird issue where my migrations are not being deployed when I run truffle migrate --network development. But when I run truffle migrate --network development --reset, the contracts are ...
Shawn's user avatar
  • 31
2 votes
2 answers
1k views

Truffle migrate not updating dependency

I have created a ProductFactory contract which creates instances of another Product contract. Now I change code in the Product contract which is imported into the ProductFactory and run truffle ...
Shashikant Soni's user avatar
2 votes
1 answer
395 views

truffle migrate restarts from first migration after restarting testrpc

I’m trying to create sort of private chain on testrpc so i use testrpc -u 0 -d --db /path/to/db to start testrpc each time. The thing is that if I restart testrpc (kill it and start it again) truffle ...
KwahuNashoba's user avatar
6 votes
1 answer
720 views

Truffle exits with "Error: The contract code couldn't be stored, please check your gas amount." error when migrating the 1_initial_migration.js

I am trying to migrate the basic truffle example (the one created via truffle init) to rospten using Parity but I get the following error even thought the contract is correctly deployed on Rospten: ...
Robbo's user avatar
  • 201
1 vote
1 answer
301 views

How does Parity decide which account to use when migrating a contract?

Parity 1.7.6 Three accounts active, two have funds. Am migrating a contract using truffle. Parity UI prompts me for the password for one of the accounts with funds. Why did it choose this one?
stone.212's user avatar
  • 1,994
0 votes
2 answers
943 views

Token not found on Etherscan after Deploying Crowdsale

I am deploying contract that creates a token and a crowdsale, based on code slightly modified from zeppelin-solidity. Problem: After deploying the contract to Rinkeby using Truffle and Infura, ...
Nyxynyx's user avatar
  • 1,167
2 votes
1 answer
5k views

Truffle migrate does not run 2_deploy_contracts.js

I am having problems with truffle migrate on the default Truffle project and using Infura as the provider. Steps to reproduce problem truffle init npm install ethereumjs-wallet bip39 web3-provider-...
Nyxynyx's user avatar
  • 1,167
1 vote
0 answers
186 views

How to deploy contracts within the same Truffle project at different times

If I have a Truffle project with two different contracts in it, can I deploy them at two separate times? Can I run an additional command alongside truffle migrate that will allow me to deploy just one,...
ethsmartcontract's user avatar
0 votes
1 answer
197 views

Truffle test error: setter does not works

I have very basic contract like this: pragma solidity ^0.4.0; contract Playground { uint public tokenPrice = 1; function setTokenPrice(uint newTokenPrice) public returns (uint) { ...
Alex G.P.'s user avatar
  • 1,277

1
6 7 8
9
10