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

Truffle migrations - get deployed contracts list

I have the following problem: migrations no. 7: (deploy proxies) await deployer.deploy(TestProxy); await ExportUtils.addDeployed(await TestProxy.deployed(), true, { privileges: [ { ...
0
votes
1answer
34 views

Contract not deploying on private network

I have a smart contract a little bit like this: pragma solidity ^0.5.10; contract sc { struct element { uint96 firstKey; uint96 secondKey; bytes32 firstData; ...
0
votes
1answer
25 views

How to set allowUnlimitedContractSize in Ganache V2.1.0 with windows 10

while following this or this solution I found nowhere any file to make change for allowUnlimitedContractSize = true so my problem is same as in link but how I can change this in Ganache v 2.1.0
0
votes
0answers
12 views

truffle - toUtf8 on Migrations not working

I'm deploying my contracts via migrations and would like to show some info on the console about them just by getting data from these contracts and displaying it. I'm sending a deployed contract to the ...
0
votes
1answer
31 views

Migration 2_deploy_contracts invalid or does not take any parameters at Object.run()

I am trying to compile my smart contracts using truffle pet-shop. I have the following contract in directory election/contracts/election.sol ; pragma solidity >=0.4.0 <0.6.0; contract Election{ ...
0
votes
1answer
11 views

How to get an instance for a previously migrated contract with truffle?

Scenario: Token contract migration file Dapp contract migration file I want to interact with the already deployed token contract in the dapp contract migration file.
0
votes
0answers
7 views

truffle exec scripts/seed-exchange.js --network kovan

I've been running into an error when I attempt to seed my exchange/contracts on the kovan test network. Any help would be appreciated. Using network 'kovan'. Token fetched ...
0
votes
1answer
24 views

truffle deploy --network ropsten issues

I am having an issue deploying to ropsten. I am receiving an insufficient funds error but I believe my address to have ether on ropsten. This command: truffle migrations --network ropsten Also ...
0
votes
1answer
40 views

Deploy smart contract on Ropsten with Truffle without truffle-hdwallet-provider

Here is my truffle-config.js networks: { ropsten: { network_id: 3, host: '127.0.0.1', port: 8545, gas: 4000000, from: "address_in_metamask" }, I ran a geth node using the command: geth --...
0
votes
1answer
39 views

Error: Invalid JSON RPC response | ropsten.infura

I'm trying to deploy my contracts to the ropsten test network, but I get this error. the message error : C:\Users\acer\test>truffle migrate --reset --network ropsten Using network 'ropsten'. ...
1
vote
1answer
36 views

truffle migrate --network kovan issue

When I run truffle migrate --network kovan in the terminal the contract deployment doesn't run. Just: Compiling your contracts...==================== >Eveything is up to date, there is nothing to ...
0
votes
0answers
33 views

How to fix? Tx nonce go out of sync when using multiple unit tests on the same contract under Ganache+Truffle

Here is my example contract (ignore the fact this could be pure, this is a simplified example and my real example is not a pure function, it changes state, but I can reproduce the bug with this simple ...
0
votes
0answers
45 views

Running Migrate in Truffle does not work

I have been using Remix for developing my dapp but decided I should use Truffle to make things a little more robust and professional. I have truffle and ganache installed. I run truffle migrate and ...
0
votes
2answers
37 views

Truffle migrate --network ropsten always runs development network

I am trying to deploy a simple contract to the Ropsten network using Truffle and Infura. I have set up the Ropsten network in the truffle-confug.js file but it seems truffle always uses the ...
0
votes
1answer
83 views

Truffle error when deploy a contract

Does anybody know how to solve this? I've try to compile and deploy my contract to get the address, why obtained this error Error: 1_initial_migration.js ====================== Deploying '...
-1
votes
1answer
22 views

Truffle ganache error

I have this error~! Contract has not been deployed to detected network (network/artifact mismatch) Can you help me thank you!
0
votes
1answer
77 views

Migrations ran out of gas

I have unboxed pet-shop. Then inside the contracts folder, I made a file Election.sol which has the code - pragma solidity ^0.5.8; contract Election{ string public candidate; constructor() ...
2
votes
2answers
214 views

What's the difference between Truffle Migrations and ZeppelinOS upgradeable contracts?

It was my understanding that Truffle migrations will move updated contracts to new addresses. As a developer, you can use this feature to update already deployed contracts with new code. ZeppelinOS ...
0
votes
0answers
110 views

“Migrations” hit an invalid opcode while deploying on deploy Migrations.sol with Truffle

An error occurs when truffle migrate try to deploy Migrations.sol contract, i don't understand why pragma solidity >=0.4.21 <0.6.0; contract Migrations { address public owner; uint public ...
0
votes
1answer
304 views

TRUFFE MIGRATE: Saving migration to chain.Error: Error: Error: Returned error: VM Exception while processing transaction: invalid opcode

$ truffle migrate Compiling your contracts... =========================== > Everything is up to date, there is nothing to compile. Starting migrations... ====================== > Network name: ...
0
votes
0answers
33 views

Truffle migration contract [duplicate]

Why do we have to deploy the migration solidity contract in truffle? Do we also have to deploy it during production? Why do we have to deploy it so many times and why can't we use a single large ...
1
vote
1answer
198 views

Transaction exited with an error (status 0) after consuming all gas

I developed some smart contracts to be deployed to a private PoA (Proof of Authority) blockchain. I spun up a private blockchain via truffle develop and got the following receipt: Compiling your ...
-1
votes
1answer
77 views

Error while deploying smart contract (quorum-examples tutorial by truffle)

:~workspace/myproject$truffle migrate --reset Compiling your contracts... Everything is up to date, there is nothing to compile. Running migration: 1_initial_migration.js Replacing Migrations... ...
0
votes
0answers
44 views

Unknown network “ganache”. See your Truffle configuration file for available networks

I am working windows 10 and have both truffle.js & truffle-config.js I am using command truffle migrate --reset --networks rinkeby Error produced: Unknown network "ganache". See ...
1
vote
1answer
22 views

How does a Truffle migration know the address of a contract before it is created?

How does the truffle migration of this contract know what the address is of the registry contract, in the constructor: https://github.com/marbleprotocol/humanity/blob/master/contracts/Humanity.sol ...
0
votes
1answer
127 views

How do I overcome the problem of gas limit?

Here is my genesis.json file { "config": { "chainId": 1994, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0 }, "...
0
votes
1answer
75 views

Why Could not find artifacts for contract from any sources

I am using windows 10 with truffle and ganache-cli. I have 2 contracts file to be deployed contain interfaces of other contracts defined within the contract: Contracts: ERC721Mintable.sol Ownable ...
0
votes
1answer
45 views

Quorum 7nodes example unable to finish simplestorage migration using privateFor

I'm following this example: truffle quorum example I created a cluster using docker-compose and all the nodes are up and running but when I run the truffle migrate command the migration doesn't end ...
3
votes
1answer
87 views

Ganache + Truffle: how to deploy a contract without considering the gas

I am working with Ganache and Truffle. I am trying to deploy kind of a huge smart contract, but most of the functions in this smart contract are pre-prod functions, so I do not really worry about real-...
0
votes
1answer
54 views

Truffle migrations - UNABLE TO MIGRATE (Error: Deployment Failed)

The compilations goes well on the Rinkeby testnet using the command geth --rinkeby --rpc --rpcapi="personal,eth,network,web3,net" --ipcpath "~/Library/Ethereum/geth.ipc" --syncmode light --cache 64 --...
0
votes
0answers
17 views

Deploying multiple instances of contract, no error but no deployment

I am trying to deploy the same contract code to create multiple instance: const contract = require('truffle-contract') var Greeter3 = artifacts.require("Greeter3"); module.exports = function(...
1
vote
1answer
36 views

How to pass account address to truffle deployer?

How do I pass my account address to the contract constructor while deploying with truffle migration? I want to pass address into MyAdress like below. deployer.deploy(MyContract, MyAddress) My ...
1
vote
1answer
91 views

Deploy new contract through another contract function in Truffle

I have a function in my contract minter.sol that creates another contract etnX.sol: function createNewContract(string memory name, string memory symbol, uint256 _maxSupply) public onlyOwner { ...
0
votes
1answer
22 views

How truffle share (is it?) the addresses of the previously deployed contracts between migrations files?

We have 2 migrations files (2,3) and in 2 we are deploying singletons contracts which later be used in the contracts we deploy on migrations file number 3. How Truffle pass the address of the ...
0
votes
0answers
40 views

Oraclize: Truffle migrate failed

I'm trying to migrate a contract into a ganache chain. It needs to use Oraclize - in the end, the plan is to have a private chain using Oraclize via ethereum-bridge. However, truffle migrate fails ...
1
vote
0answers
20 views

When does 'truffle deploy' yield a different output every time?

truffle deploy (aka truffle migrate) is documented here. I'm doing the following sequence: Starting a local Ganache node Running truffle deploy I'd expect this sequence to yield the exact same ...
0
votes
0answers
134 views

Truffle.js file is not created with truffle init command

I have run the truffle init command successfully with creating the following directories and files such as contracts, migrations, test, and truffle-config.js but the one file is missing as truffle.js? ...
2
votes
2answers
426 views

Error while migrating contracts to Ropsten using truffle - Error: legacy access request rate exceeded

I'm deploying some contract to Ropsten ethereum test network using Truffle but it gave me this error: Error: legacy access request rate exceeded I have no idea what does it means and what should I ...
2
votes
1answer
120 views

unable to deploying Truffle Contracts to Rinkeby!

I am stuck with an issue as unable to deploying Truffle Contracts to Rinkeby network! As shown here it's using network 'development'? why? I want Rinkeby! ASMAHANs-MacBook-Pro:project-6 asmahan$ ...
1
vote
2answers
73 views

How use Truffle Framework [closed]

Anyone please help me to understand what is exactly Truffle & Ganache ? How to install & use Truffle ? Please reply who are know this.
0
votes
1answer
136 views

truffle migrate --network ropsten issues

When i run truffle migrate --network ropsten i don't see the contract deployment but just Compiling your contracts... =========================== > Everything is up to date, there is nothing to ...
1
vote
3answers
41 views

Issue deploying this contract

This is a contract im trying to deploy and i think its an abstract contract as most of the functions dont seem to be implemented... anyway the issue im facing is that truffle is telling me i cant ...
1
vote
1answer
15 views

In case we have an interface written in a seperate .sol file how do we migrate it successfully?

HI consider i have 3 smart contracts A,B,C. I have a separate file D.sol which is an interface used in all A,B and C. What would the migration script look like for this project?
0
votes
2answers
39 views

I can't migrate the contract using truffle init

I am working to build a Dapp using Ganache, Web3, and Truffle frameworks. I am unable to compile the contracts using truffle compile. I am facing an error. I want to explain you in detail what I did. ...
1
vote
1answer
141 views

HDWalletProvider & truffleconfig: 'truffle migrate' will compile but not do anything else

I am trying to build a React app with Truffle. Firstly, my file structure is like so, with root_dir being the project root directory: root_dir/node_modules/src/libs/truffle All of truffle's files, ...
6
votes
2answers
185 views

Deploying contract with no cost (gasPrice 0) on private network

In order to achieve a no-coin bootstrapping of my private network I'm trying to deploy a first special contract having zero funds in owner wallet (every wallet of this private network should have zero ...
0
votes
2answers
437 views

TypeError: Data location must be “memory” for parameter in function, but none was given

Contract fail to compile in IDE Remix.due to the following error: TypeError: Data location must be "storage" or "memory" for parameter in function, but none was given. version:0.5.6+commit....
1
vote
2answers
89 views

Getting error in truffle migrate

I am trying to compile a sample solidity contract,sampleapp.sol. The code is given below: pragma solidity >=0.4.21 <0.6.0; contract SimpleStorage { uint storedData; function set(uint ...
2
votes
2answers
117 views

Cannot able to call the contract inside the truffle console

I am new to the truffle framework. I have initialised my contract Dapp with the constructor function as given below pragma solidity ^0.5.0; contract Dapp { uint public totalSupply; ...
0
votes
0answers
121 views

Geth contract migration with truffle error: Served eth_getBlockByNumber err=“context canceled”

I have 2 contracts that i want to deploy them on the rinkeby network on geth. Configurations: Operting System: Windows 10 Truffle: v5.0.6 Node v10.13.0 Geth: 1.9.0-unstable Network id: 1 ...