Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
15 views

From Truffle Ganache and localhost to Web Server

i created a contract that run easy on my localhost with npm run dev after truffle migrate --reset and i can use my GUI on localhost:3000. Now i tried to deploy it on infura Ropsten using my Metamask ...
4
votes
0answers
63 views
+50

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
0answers
26 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....
0
votes
2answers
21 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
50 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
44 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 ...
0
votes
1answer
20 views

receiver.payable

Truffle v5.0.5 (core: 5.0.5) Solidity v0.5.0 (solc-js) Node v10.15.1 pragma solidity v0.5.0; contract ApprovalContracts { address public sender; address public receiver; address public ...
0
votes
2answers
107 views

Truffle compile and migrate not working

I have a geth node running on my laptop. This is the command I used to start geth. geth --port 4321 --networkid 1234 --datadir=./dataDir --rpc --rpcport 8543 --rpcaddr 127.0.0.1 --rpcapi "eth,net,...
0
votes
0answers
14 views

web3 is not getting detected while migration in truffle [duplicate]

I am trying to deploy the contract in ropsten. In that process I use web3 for a conversion. Due to this the migration fails as mentioned below. Please assist me in resolving this. I have also tried ...
0
votes
0answers
58 views

Truffle: Error: Could not find a compiler version matching 0.5.0

I wonder why I get the error when I have v0.5.0 everywhere and do the following: In my Action.sol: pragma solidity ^0.5.0; In Migrations.sol: pragma solidity >=0.5.0 <0.6.0; When running truffle ...
0
votes
1answer
29 views

Solidity. Truffle. Call contract function in migration file

Tell me, how through truffle, after the deployment of the contract, call one of its functions? I mean, during migration, how can I call the function of the contract? var Ownable = artifacts.require("....
0
votes
1answer
10 views

Link library to contract without migrations

To link library in migrations I use: await deployer.deploy(MyTokenL) await deployer.link(MyTokenL, MyToken) We want to use migrations as infrastructure deployment and then have a deployment factory ...
0
votes
0answers
33 views

Revert on ERC20.transferFrom

I am getting Error: Returned error: VM Exception while processing transaction: revert when testing MyContract.deposit() Here are simplified versions of my code to highlight where the issue is ...
1
vote
0answers
18 views

Error: Cannot create instance of X; no code at address

Having a little issue. I have deployed a Mock ERC20 contract on development network like so: const ERC20Mock = artifacts.require("ERC20Mock"); module.exports = async function(deployer, network, ...
0
votes
0answers
49 views

Truffle migrate not working with 2_deploy_contracts.js

I have made a sample contract using Truffle's pet-shop. I have also added the 2_deploy_contracts.js file. I have changed the solidity version and also the constructor() public {} to comply with the ...
0
votes
0answers
20 views

Issue with truffle migrate

I'm trying to migrate a simple contract on the ganache blockchain.But when I type 'truffle migrate' command in the terminal.It freezes for some time and then command execution stops without showing ...
1
vote
1answer
108 views

truffle migrate not working

every time I enter truffle migrate command in the terminal it doesn't does anything but takes some time and nothing happens after that. I am using Truffle version 5.0.4
0
votes
0answers
16 views

Truffle Deployment

I have created a DAPP using Truffle & Ganache. It is working fine in development server after running the following command. $ganache-cli Deploy the contract. $truffle migrate --reset Run the ...
0
votes
1answer
26 views

Truffle test failing

i am learning solidity contracts and ethereum dapps. I have created a smart contract for creating a ERC20 token on using truffle dev environment. pragma solidity ^0.5.0; contract LearnTokens { ...
0
votes
1answer
55 views

ERC20 is an abstract contract or an interface and cannot be deployed

i am trying to deploy a test erc20 token with truffle on ganache-cli My migration file name 2_deploy_contracts.js here is the code for it: var erc20 = artifacts.require('./ERC20.sol'); module....
1
vote
1answer
65 views

Error when deploying with infura ropsten, rinkeby and kovan

when deploying to infura ropsten i get error Running migration: 1_initial_migration.js Deploying Migrations... ... 0x0ed88dd40f380a805ed0ba1b5b0a9d8178321ab6da9e5c0cb247f5700337b173 Migrations: ...
2
votes
0answers
31 views

Tracking Non-Deployer Transaction Gas Use In Truffle Migrate

In Truffle, gas used by a Migration in deployer.deploy() is tracked by a Reporter using events emitted by the Migration. If I have code of the form: deployer.deploy(MyContract) .then(instance =>...
0
votes
1answer
126 views

Upgrading to solidity version 0.5.0 getting deployment failed error with same smartcontract perfectly deployed on 0.4.24

The same smart contract is running smoothly in solidity version 0.4.24 but now when I update the solidity version and solving a lot of bugs inside my smart contract I intended to deploy that in ...
1
vote
1answer
25 views

Truffle - a proper way to execute a chunk of code

Let's say I have a complex operation to execute, for example deploying 6 contracts and calling functions to each one, passing addreses to few of them and executing some extra more functions. I can, of ...
1
vote
1answer
13 views

Show truffle migration history

What is the best way to show truffles migration history or at least the last successful step. Something similar what I see when I do truffle migrate: Running migration: 1_initial_migration.js ...
1
vote
1answer
29 views

Truffle - call migration file multiple times

I would like to execute migration file "6_deploy_and_register_group.js" every time when I need to create a new group. Is this a proper way to use migrations? If yes, how can I make it working? ...
1
vote
1answer
82 views

Can't connect to local blockchain

Using Truffle, I'm trying to implement my first smart contract by running the MetaCoin webpack. After running Truffle Develop, I can see my list of accounts: Truffle Develop started at http://127.0....
1
vote
0answers
27 views

Deploy Imported Smart Contract in Test case

I have a project that contains a Token Smart Contract, it has been added to my project by means of: npm install ../token_project In my testcase I have: var MyToken = artifacts.require("...
1
vote
0answers
49 views

I want to use Ledger Nano S to deploy the contract, but not working

I wanted to deploy the contract with the Ledger Nano S wallet, but not working on truffle. I installed npm package 'truffle-ledger-provider' and followed the practice. But I got an error ...
0
votes
2answers
75 views

truffle migration fails, but initial migration was mined

I am trying to deploy this contract on a private permissioned Quorum network. The migration fails on the 1_initial_migration process. If I try to repeat the process with: sudo truffle migrate --...
0
votes
0answers
63 views

How to `truffle migrate` to private permissioned network?

I am running a private permissioned network and would like to use Truffle v5.0.1 for deployment. I use it according to the documentation: Compile my project with truffle compile so that the ./build ...
1
vote
1answer
371 views

Truffle migrate no error but does not create build directory

I'm trying to develop a simple dapp using ReactJS.I used Charterhouse/truffle-create-react-app box suggested by truffle website. The problem is truffle compile and truffle migrate do not seem to work. ...
0
votes
1answer
65 views

Migrates contract with specific account without hard-code address using truffle and Genache

Block Builders! I am trying to migrate my two smart contracts using truffle and Genache. I would like to specify the deploying accounts existing locally. However, when I try to migrate the contracts I ...
4
votes
2answers
324 views

Truffle v5 runs out of gas but Truffle v4 deploys the contract

Truffle v4 used to deploy the contract successfully, but Truffle v5 truffle migrate command fails. My process to deploy: 1) delete buidl/ folder 2) truffle compile 3) truffle migrate Truffle v5 ...
0
votes
1answer
66 views

Set up backup from private Ethereum (Ganache) [duplicate]

I have created an ethereum application with Ganache and truffle js. i have installed ganache in a server, and th application work. but when i stop the server i lose the the smart contract that i have ...
0
votes
1answer
120 views

Truffle Migrate Error: Could not find built Migrations contract: Unexpected token in JSON at position 0

Running truffle migrate with valid contract code started causing this error for me: Writing artifacts to ./build/contracts Using network 'development'. Error: Could not find built Migrations ...
2
votes
0answers
104 views

Transaction not mined error when deploying to quorum maker server

I get the following error when attempting to deploy my zeppelin erc20 token to a quorum server(used quorum maker). (master) $ node migrations/2_proj.js ``````` transactionHash ...
1
vote
0answers
31 views

error in WebSocket connection

error : browser-sync-client.js?v=2.26.3:15 WebSocket connection to 'ws://localhost:3000/browser-sync/socket.io/?EIO=3&transport=websocket&sid=mW3 please i need help on this. i was getting ...
1
vote
0answers
43 views

Error: cannot find module hdwallet-provider - trying to deploy contract to ropsten using infura key [duplicate]

I have reviewed the other posts in the last few days following what seem like forever for get to sync to my local machine - so this is my last try to get it to deploy the petshop contract to ropsten ...
1
vote
1answer
37 views

Truffle migrate ERC820Registry

I use Truffle and Ganache and I want to test some contracts that use the ERC820 Registry. I'm new to Truffle (and JavaScript in general) and I'm struggling to follow the instructions described in EIP-...
2
votes
1answer
194 views

Running out of gas during a deploy due to a large number of require() statements?

I have a smart contract that has a fair number of functions, but a large number of require() statements because I carefully check every incoming parameter and some intermediate calculation results too....
0
votes
3answers
88 views

How does Truffle Migrate sign the transaction that it's dealing with?

As a newbie in this space, I'm just wondering how Truffle handles migrating contracts with the Truffle Migrate command—what does it use to sign those transactions? Does it use some wallet ...
0
votes
1answer
91 views

Error migrating contracts with Truffle

I´m having problem migrating my contracts to the private blockchain. That blockchain is located in a CentOS VirtualMachine instance. With the Geth console I connect to the blockchain and I unlock one ...
1
vote
0answers
43 views

How to get back the ownership from crowdsale?

When I started crowdsale, I transferred token ownership to the crowdsale contract. When the sale finished, I'd like to send back the ownership to token so that the next crowdsale will start. How can I ...
1
vote
1answer
343 views

Could not find artifacts for ./Election from any sources

I tried solutions provided in ethereum stack, but nothing worked for me. My smart contract file: pragma solidity ^0.4.15; contract Election { string public candidate; function Eletion () ...
0
votes
1answer
52 views

Why does “truffle migrate” to Rinkeby results two transactions per contract

I ran truffle migrate -f 2 --network rinkeby. Then, I navigated to https://rinkeby.etherscan.io/address/[ADDRESS_OF_DEPLOYER] And I got two TXs: The second TX is clear since To equals to "Contract ...
0
votes
1answer
135 views

Calling fallback function in truffle to delegate a call

I'm playing with the upgradeable contracts via DelegateProxy in Solidity. This pattern posits that a MutableForwarder contract is deployed once, and all the subsequent calls to the upgradeable ...
1
vote
1answer
89 views

Can not deploy to Rinkeby via truffle - cannot read property 'bind'

I am using truffle: "^4.1.14" and ganache-cli version "^6.1.8". When I try to migrate to ganache cli network, it works without a problem. But when I try to migrate to Rinkeby, it always fails. The ...
-2
votes
1answer
31 views

The code was working fine few days ago(solidity) [closed]

Error parsing C:\Users\"directory"\example.sol: ParsedContract.sol:45:1: ParserError: Expected pragma, import directive or contract/interface/library definition. } ^ Compilation failed. See above. ...
1
vote
0answers
15 views

Contract mined but Truffle gives error

Something weird happened, and I can't understand what to do now. While migrating the contract to the MainNet, I received this: $ truffle migrate --network live Using network 'live'. Running ...