The Stack Overflow podcast is back! Listen to an interview with our new CEO.
14

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 always the first such step anyway. The numbering convention is x_script_name.js, with x starting at 1. Your real-meat contracts would typically come in scripts ...


12

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


4

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/yourContract.json there is a field "networks": { "1": { //live network "events": {}, "links": {}, "address": "0xd77d2a7a728dc7c7c58ac1bcfdfb35934b3ed066" },...


4

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 permissions to the interface. So in the second migration (the first one is reserved for Truffle housekeeping) I'm deploying the storage: var MEStorage = artifacts....


4

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 to parity its only less than 2GB the entire blockchain.


4

all i had to do is copy the Ethereum folder contents from the old OS into the the hidden .ethereum folder on Linux. Everything will sync up automatically after you use the geth updatedb command


3

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 can study how Storj tokens were converted from Counterparty to Ethereum. The party issuing the tokens creates matching pool of tokens in new network User ...


3

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 files: // Don't deploy this contract if it has already been deployed deployer.deploy(A, {overwrite: false}); In your case you could mark migrations and your ...


3

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 addresses, to find it successfully compiling in under 30 seconds!


3

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 import to parity using parity import /tmp/yourfifo This is for the blockchain itself, not the wallet (from my understanding).


3

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.


3

I'm unsure if you are attempting to copy the blockchain (so you don't have to resync?) or import your accounts. I'm not sure how the chaindata is set up on Windows vs Linux, but if you just want to see accounts, you can check out the answers on this thread.


3

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 informations by running truffle networks --clean before truffle migrate.


3

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 expects you to take some other step to approve the transaction. Parity tries to do this by running a web UI on some other port, showing each transaction request on ...


3

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.


2

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 by migrating to Embark or something else. You could post the contract code and the errors you are getting so we can help you figure out what's failing.


2

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 the during the compilation time as explained here. Are comments included with deployed contracts and do they increase deployment gas? No, everything ...


2

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 purposes if it compiles correctly at Browser Solidity, it should also compile correctly here. 3. Contracts that use "imports" will need to have the code ...


2

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 transaction and has to be added into a block ie Verified (not in the real sense) by Miners. Yes in a way it is a kind off fork of the project, but usually ...


1

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. According to discussions here, go-lang unit tests have Stdin connected to /dev/null. This does make sense as unit tests are supposed to be automated. I might be wrong as I am new to go-lang....


1

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 ethereum network.


1

Populous is a Python based framework for developing Solidity smart contracts: http://populus.readthedocs.io/en/latest/


1

It looks like this a current issue with the module that's soon going to be patched. This bug is fixed, but we never pushed out a new version. Added tests here. Will push out a new version of Truffle with the fix once the changes are approved. trufflesuite/truffle-require#6 https://github.com/trufflesuite/truffle/issues/383


1

Trick is mining, please initiate the mining by executing miner.start().


1

What I got with Parity was a screen showing up on a page served by a service on another port with a button to confirm the transaction. If you're sending a few different transactions in the course of your deployment, you get a number of these authorization requests showing up, and you have to click all of them. The workaround is to run Parity with the deploy ...


1

As indicated in my answer to this question, I'm a big believer in total data discovery. If you have that property, then you're at least half way to being able to migrate that data to a new structure. But it's not always possible. You're not going to get away without some logic. Even in modular storage contracts, you're still needing permission and setter ...


1

As suggested by @Rob, running testrpc from the same folder in which truffle console is run solved the issue in my case


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