Skip to main content
29 votes
Accepted

What are truffle migrations?

The Migrations contract stores (in last_completed_migration) a number that corresponds to the last applied "migration" script, found in the migrations folder. Deploying this Migrations contract is ...
Xavier Leprêtre B9lab's user avatar
12 votes
Accepted

truffle migrate Error: "Cannot find module 'truffle-expect'"

1) Run the following command: npm install -g truffle-expect truffle-config web3 2) Run testrpc in another shell instance 3) Run truffle migrate in your truffle project directory
kpratihast's user avatar
10 votes

What are truffle migrations?

Here is an example of a real use case of Truffle migrations. I have a storage contract and an interface contract. The interface needs to know where the storage is and the storage needs to grant ...
takeshi's user avatar
  • 1,760
8 votes
Accepted

Truffle Dapp only works when I first use `truffle migrate --reset`

This is because truffle remembers previous migrations you made but you are on a new test network. You can see registered contract addresses by running truffle networks. You can delete these ...
Harold's user avatar
  • 372
5 votes
Accepted

How do I make truffle migrate replace just one contract?

Truffle has an overwrite flag you can use to select whether an already-deployed contract should be replaced when running migrate --reset You can use it by including the following in your migration ...
TC8's user avatar
  • 1,260
4 votes
Accepted

truffle migrate restarts from first migration after restarting testrpc

When you deploy a contract to your private chain. Truffle stores the network id of your chain to know on what chain it was deployed. ( with the address on the current chain ) in build/contract/...
0xCrema.eth's user avatar
  • 1,192
4 votes

What are truffle migrations?

Migrations are a bunch of boilerplate that Truffle requires and which you will copy-paste and then forget you ever did it.
William Entriken's user avatar
4 votes

Migration from Geth to Parity: Is there anything to copy/export?

No, you cannot import/export blockchain between geth and parity. However you can import/export wallets between clients. To import to geth you can actually try the --fast command with geth. If it is ...
niksmac's user avatar
  • 9,673
3 votes
Accepted

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

You've got the accounts argument at the wrong position (2nd instead of 3rd). Change this: module.exports = function(deployer, accounts) To this: module.exports = function(deployer, network, ...
goodvibration's user avatar
3 votes

What would it take to migrate from one smart contract platform to another?

Migration code is always easy. However it is impossible to migrate token balances without user interaction, unless this was carefully crafted to the token contract when it was originally issued. You ...
Mikko Ohtamaa's user avatar
3 votes

I can't verify my contract on the Rinkeby etherscan site

The compiler was timing out, and documentation online suggested that truffle optimizes the compilation -- nevertheless, I selected "no" for the optimized option, and didn't enter in the library ...
nickjm's user avatar
  • 865
3 votes

Migration from Geth to Parity: Is there anything to copy/export?

This is documented at https://wiki.parity.io/Importing-a-Chain-from-Geth.html In essence, you can create a fifo using mkfifo, and then run geth export /tmp/yourfifo Put that in the background, and ...
Bittylicious's user avatar
3 votes
Accepted

Migration from Geth to Parity: Is there anything to copy/export?

Nothing special needs to be done. Private keys will be imported automatically. On a typical machine, it will take around 1 hour to sync with the network.
Wavin's user avatar
  • 411
3 votes

Truffle migration stuck

One thing that can cause this behaviour with Parity (not sure if that's what the Azure service is running or not) is that if the account it wants to deploy with is locked, as it is by default, it ...
Edmund Edgar's user avatar
  • 16.9k
3 votes
Accepted

Error: invalid address during truffle migration process in Rinkeby network

I've found the reason. contractAddress is null because I'm using geth node in embedded/light mode - it hasn't enough information about blockchain. Issue may be closed.
LordotU's user avatar
  • 91
3 votes

Deployment Failed : "Migrations" -- only replay-protected (EIP-155) transactions allowed over RPC

Here is what I did to solve my problem: Change dependency of hdwallet-provider from 1.0.17 to 1.4.0. Relace the following line in package.json: "truffle-hdwallet-provider": "1.0.17&...
us_david's user avatar
  • 171
2 votes
Accepted

Alternatives to truffle?

There's Embark for example, as an alternative for Truffle. Given that you admit very little knowledge about Solidity, most likely the problem does not have to do with Truffle and it won't be solved ...
pabloruiz55's user avatar
  • 7,676
2 votes
Accepted

I can't verify my contract on the Rinkeby etherscan site

It's hard to say anything without seeing the code you tried to compile. Since you have already tried the compiler 2. beta version, as a suggestion; compilers spend sometime removing comments etc. from ...
Achala Dissanayake's user avatar
2 votes

I can't verify my contract on the Rinkeby etherscan site

Looking at the etherscan verification page, NOTES 1. To verify Contracts that accept Constructor arguments, please enter the ABI-encoded Arguments in the last box below. 2. For debugging ...
TC8's user avatar
  • 1,260
2 votes
Accepted

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

A Truffle Migration Simply Means that you are deploying the compiled contracts on the the Ethereum blockchain (The mainchain or any Testnet or Testrpc) This deploying of contracts is treated as a ...
Sharan Rajani's user avatar
2 votes
Accepted

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

Problem solved with $ npm i -g [email protected]
Senju's user avatar
  • 701
2 votes

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

Just ran into the same error. I was running an older version of ganache-cli in this case and had to update ganache, so what helped was running npm install -g ganache-cli in my case.
AirUp's user avatar
  • 363
2 votes

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

After doing lots of research I found out that updating the truffle version would fix this issue. npm install -g truffle
Pedram's user avatar
  • 21
2 votes

Deployment Failed : "Migrations" -- only replay-protected (EIP-155) transactions allowed over RPC

I had this issue with truffle version 5.0.5, updating truffle to version 5.3.0 fixed the issue! npm install -g [email protected] --save
Jacob-Jan Mosselman's user avatar
1 vote

perigord test: "authentication needed: password or unlock"?

For the updated question why "perigord test" doesn't take in password input from the terminal? Apparently the "test command" is converted to "go test", see this line. ...
Linmao Song's user avatar
  • 2,357
1 vote

Truffle "Replacing" durring migration

Nice observation, deployer.deploy(Cnumber0, 0); will create smartcontract and deployed in the network. It doesn't matter how many times you called. And every contract will have a unique id and unique ...
Jitendra Kumar. Balla's user avatar
1 vote

How to communicate with a deployed token?

That is kind of general error when there is an error in the contract. I had the error when I had an abstract function from parent that wasn't implemented
shonjs's user avatar
  • 475
1 vote

I can't verify my contract on the Rinkeby etherscan site

It seems etherscan has different hardware for verifying contracts for kovan and ropsten. I manage to verify in ropsten but failed in kovan with same contract.
Eugene's user avatar
  • 219
1 vote
Accepted

What does "Migration" means?

From what I saw in solitidy code, migration part is a built-in piece of code that let the owner update the contract address. Migration to a private blockchain may also involve a private or custom ...
btc4cash's user avatar
  • 538
1 vote

Alternatives to truffle?

Hardhat is one of the best frameworks in 2021. They have fast tests, good tutorials and easy integration. Also a quick google of blockchain developer contracts returns many jobs which list hardhat as ...
Pixelomo's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible