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
2answers
14 views

Truffle not deploy updates

Truffle not deploy contract updates. truffle migrate compiles it but falsely say network up to date. OS: Windows Truffle v5.1.39 npm 6.14.5
0
votes
1answer
10 views

Truffle re-deploy unchanged contracts on every migrate

On every truffle migrate truffle deploy contracts even if they are not changed. although it doesn't re-compile Truffle v5.0.5
0
votes
1answer
30 views

How to re-compile contracts using truffle which are updated?

I deployed something in the test-net(ropsten). Later, realized that one of my contracts needs some amendments. In such cases how to compile specific contracts and deploy only that contract using ...
0
votes
1answer
31 views

Saving migration to chain.insufficient funds for gas * price + value

It looks like the contract was deployed well on mainnet However, eventually this error occurs Saving migration to chain.insufficient funds for gas * price + value Does it mean that the migration was ...
0
votes
1answer
37 views

Transaction underpriced at 5000000 gas but overpriced at 10000000

I've been developing a smart contract for a while on the Ropsten network using the Truffle framework, quite successfully. My truffle-config.js looks like this: const path = require("path"); ...
0
votes
1answer
75 views

Unknown network ganache

Although it compiles successfully truffle migrate --network ganache gives the following error: Unknown network "ganache". See your Truffle configuration file for available networks. I ...
0
votes
1answer
28 views

Truffle Migrate

What happens when there is a minor change in the smart contract and I run truffle migrate command. Example: //before contract test{ function display() public returns (string){ return "...
0
votes
0answers
27 views

Truffle + Infura Mainnet deploy. Transactions never get mined, timing out after 750 seconds

The contract deploys on Rinkeby without a hitch, but when it comes to mainnet it is erroring out strangely. Infura's HTTP endpoint was giving me Invalid JSON RPC RESPONSE "", so I decided to ...
1
vote
2answers
40 views

Truffle migration deployment: Transaction was not mined within 50 blocks

I am running my own Ethereum client node (Open Ethereum 3.0.1). I am using Truffle migrate to deploy my smart contract to MainNet. However, the contract deployment is taking too long. The result from ...
0
votes
0answers
13 views

Garbage Value on Truffle console while executing the commands from a tutorial

I am following the tutorial at: JustDev tutorial on medium When I execute the command: truffle(ganache)> Victim.deployed().then(contract => victim = contract) I am getting a huge output which ...
0
votes
1answer
22 views

truffle migrate: Accessing 2_deploy_contracts.js of another Truffle project

I am executing “truffle migrate” command but I am getting one reference error related to ‘adoption’ variable:there is no error related to compilation 2_deploy_contracts.js ReferenceError: adoption ...
0
votes
0answers
33 views

Truffle stuck when deploy smart contract when using Ledger wallet

I have a little problem deploying smart contract with ledger nano s as provider on ropsten. The script just remain stuck at first migration Starting migrations... ====================== > Network ...
1
vote
1answer
28 views

Web3.py: ValueError: Could not format value when trying to deploy smart contract bytecode from Truffle

I have a working solidity contract which compiles and gets deployed successfully by both truffle and web3.js + metamask. Importing the very same contract into python and deploying it using web3.py (...
0
votes
0answers
18 views

How to keep track of deployed versions and implement a CD strategy with truffle?

My original question on SO here didn't had much success... so I copy/paste it here, hoping for more interest. Thanks in advance! I'm working on a dapp project which includes a main smart contract, ...
0
votes
1answer
22 views

Truffle testing a contract against an already-deployed external contract

Let's say I'm writing an escrow contract. The conditions of this escrow are based on the properties of a second already-deployed contract on Kovan and mainnet. Should I skip testing my escrow contract ...
0
votes
2answers
25 views

Do I have to create a custom ERC20 to test transfers in Truffle?

I have a smart contract that escrows and transfers a specific ERC20 token to and from users (with their approval). I'm a bit confused as to how to test transfers of existing tokens. Do I have to copy+...
0
votes
2answers
30 views

web3 in truffle.js file

I am trying to deploy my contracts with the specific account the user is using instead of hard coding it. But in this code, I get an error as such: Error: Cannot find module 'web3' the truffle-...
0
votes
0answers
41 views

Truffle Error: invalid argument 0: hex string without 0x prefix

I'm trying to deploy and test the smart contracts on the Goerli network using Truffle. While migrating getting below error. Contract: Simple Storage Test suite Simple Storage Set ...
0
votes
1answer
208 views

Truffle Deployment Error: Invalid number of parameters for “undefined”. Got 1 expected 0!

I am trying to deploy my smart contract. When I run truffle compile everything works however when I run truffle migrate, I get this occurring error message: Error: * Deployment Failed * "KJToken&...
0
votes
1answer
15 views

not able to deploy contract

I'm working on API'S for smart contract. I'm using tronbox to compile and migrate. Error is this contract constructor expected 1 arguments, received 0 I tried to add arguments in migrations like this ...
0
votes
1answer
19 views

looking for a start in solidity [duplicate]

I am totally new to the Solidity Programing. I was working on NodeJS, express and mongoDB. Few days ago I started working on blockchain. I have to write the API'S for contracts. We are using truffle ...
0
votes
2answers
133 views

Truffle deployment error while deploying with Infura (Error: Callback was already called)

I am trying to deploy a token smart contract to Ropsten test network with Infura, but I am always getting an error as I am using truffle migrate --reset --network ropsten_infura Compiling your ...
0
votes
1answer
87 views

Timeout error on deploying to Rinkeby from truffle migrate

I have just finished the CryptoZombies tutorials, and was trying to deploy the file following their instructions to the Rinkeby network. But I keep getting this timeout error and am lost on how to ...
0
votes
1answer
49 views

How to act as another wallet when using Truffle exec scripts?

I am writing a seed to add data on the smart contract after I deploy it. I'm using ropsten network, setted up like this in truffle-config: ropsten: { provider: function () { return new ...
0
votes
2answers
17 views

What causes .deployed() to return same contract instances in each test

It took me awhile to diagnose the problem. At first I just noticed that the states of my contracts were being affected by previous tests when running truffle test I then looked in the terminal tab in ...
1
vote
1answer
17 views

How to add gas to a Truffle generated account imported to MetaMask

I am a beginner and was building a dapp using truffle unbox react. In my app, I was just taking input of a string and printting it using a simple contract. Everything is working fine. But, when i ...
0
votes
0answers
45 views

ERC721 Token abstract contract or an interface and cannot be deployed

after reading many post i can't found the issues about this Smart contract who compile but it think i miss something about the inheritance and the Abstract contract. This is the SC : // solium-...
0
votes
0answers
19 views

If I set unlimited gas in a dev environment, am I just postponing dealing with a problem in my contract or is it a Truffle issue?

Booted up ganache with this command: ganache-cli --gasLimit=0x1fffffffffffff --allowUnlimitedContractSize -e 1000000000 because I was running into this error on truffle migrate in my development ...
0
votes
1answer
37 views

Smart Contract Deployment Failed PowerShell

A beginner smart contract developer here. This is my smart contract: pragma solidity ^0.5.16; contract Ballot { struct Voter { uint weight; bool voted; uint8 vote; ...
0
votes
1answer
57 views

Unable to deploy contract on Besu network(docker) using dynamic IP

I am stuck with a weird situation. I create a local Ethereum network with Hyperledger Besu in docker environment. I try to deploy contracts to a rpc node using Truffle(different container in same ...
0
votes
1answer
120 views

Cannot find module '@truffle/hdwallet-provider' [duplicate]

I am trying to deploy a smart contract that works nicely in Ganache to a test net (Kovan). However, all the tutorials out there use a package called hdwallet provider. When I follow the ...
0
votes
0answers
59 views

truffle test fails with `Error: Callback was already called.`

I have a single .sol contract that includes 2 libraries, 1 interface and 3 contracts A, B and C such that B is A and C is A, B. The contract C is the one I am interested in as it includes all the ...
0
votes
2answers
30 views

How to prevent someone to replace our smart contract

I'm still learning to develop dApp and currently, I conduct some testing on my dApp. I found out that someone who is part of the blockchain network (miner and node) can replace our deployed smart ...
0
votes
1answer
16 views

When i am doing migration, the netwrok name is ganache instead of development and multiple errors are there

D:\>truffle migrate --reset Compiling your contracts... =========================== > Compiling .\contracts\Migrations.sol > Artifacts written to D:\build\contracts > Compiled ...
1
vote
1answer
30 views

How to use solidity library with truffle

I'm using truffle V5.1.13 and when I run truffle test the res variable contains a transaction receipt rather than the expected 2. I notice if I remove everything that has to do with the library things ...
0
votes
0answers
10 views

Aragon: How to update files after a contract compiles

I need to update certain files (in app/public/) every time when a contract compiles. Namely I need to extract the ABI from a contract and store in app/public/. Is it possible with the current version ...
0
votes
1answer
19 views

How of should I migrate my Smart Contract?

I am developing a scraper which scrapes data and puts it on ethereum blockchain(ganache for dev) every week. So as to put this data onto the blockchain should I migrate my smart contract each time I ...
0
votes
1answer
39 views

How do you pass an array as an argument to a contract *constructor* using Truffle deployment script

I need to pass array as argument to contract constructor using truffle deployment script. My contract code looks like this: pragma solidity ^0.5.0; contract ArrayArgument { uint[] public arrsv;...
0
votes
1answer
28 views

How to use older version of Solidity in Truffle suite

I've tried to migrate contract on an older version of solidity, I have modified the config.js to be as in the following and the smart contract solidity code I'm trying to deploy as follows The ...
1
vote
0answers
39 views

Not able to populate my smart contract with data after deployment [closed]

I want to populate my smart contract with data. I am using truffle framework. In migrations file for the smart contract I'm populating the data but it is giving error: TypeError: instance.create is ...
0
votes
1answer
27 views

Truffle test: “Cannot read property 'gasUsed' of null” error. Truffle migrate works fine

Whenever I try and do truffle test I get the error Cannot read property 'gasUsed' of null But truffle migrate --reset works fine More confusingly, to rule out something in one of my tests that is ...
0
votes
1answer
52 views

Truffle- how to deploy ERC20 on local, but not public network, without the error “X is an abstract contract or an interface and cannot be deployed”?

So, I have a contract, let's call it contract A, that needs to make call to the Dai contract (referred to as Cash). This contract already exists on Kovan, so in 2deploy_contracts.js I simply set its ...
0
votes
1answer
182 views

“truffle migrate --network ropsten” stuck after compiling

I am trying to redeploy a contract on Ropsten Testnet using the command: truffle migrate --reset -f 1567182283 --network ropsten Here, "1567182283" is the prefix of my migration file. Upon executing,...
0
votes
1answer
40 views

Redeploy contract on Ropsten Network

I have already deployed my smart contract on Ropsten network for testing using truffle suite. The command line I used was: truffle deploy --network ropsten Now, I have made some changes to my ...
0
votes
2answers
67 views

Truffle best practices - unit vs integration tests

Think about having two contracts: MockToken Faucet (which takes token address as constructor parameter) To unit test Faucet I would create two new instances: const token = await MockToken.new() ...
0
votes
1answer
142 views

Deployment Failed | hit a require or revert statement somewhere in its constructor

I create a custom ERC20Token and a contract to store data sent from web3.Js. after storing data in mapping I would like to call ERC20Token contracts functionality inside this contract. code of ...
0
votes
1answer
40 views

“Migrations” exceeded the block limit

I didn't have any problem using solc 0.5.0 (geth 1.9.3), but facing this problem after upgraded to 0.5.12 (geth 1.9.9). After doing some research, I believe it is because of the changes to the ...
0
votes
0answers
44 views

Truffle - set or disable optimizer only for selected contracts

I have over 40 contracts in my project, for example: admin groups votings registry token In my truffle config I have optimizer enabled with 600 runs. compilers: { solc: { version: "0.5....
0
votes
1answer
189 views

TypeError: balance.toNumber is not a function

I need check that token has no balance when selfDestruct was called, but shows an error that balance.toNumber is not a function in the test file. DappTokenSale.sol function endSale() public { //...
4
votes
3answers
82 views

I got this error during migration in truffle. : ParserError: Expected '(' but got identifier

This is my smartcontract code pragma solidity ^0.5.0; contract DappToken{ uint256 public totalSupply; constructor DappToken() public{ totalSupply = 10000; } } This is code for ...

1
2 3 4 5
7