Closed JackPickering closed 6 years ago
@JackPickering People have been running into this when using the overwrite
option in migrations. See this thread. It seems like they found a reasonable workaround - I can't see their entire code in that issue so it's a little difficult to grok exactly why this happens.
If you discover a way to distill it into a clear bug report or a way we could improve error messaging that would be wonderful.
This was fixed a while ago, closing for housekeeping.
I would like to migrate a set of truffle contracts, this is a rather large set and therefore, will not allow me to migrate all at once. Therefore, I have split my migration files down into separate stages.
If all of my contracts are stored in the contract folder, and I go to migrate the first file (migration file A), it compiles all of my contracts and successfully migrates the one contract specified in migration file A. If I then go add my second migration file into migrations and go to migrate the next contract, the truffle console reads:
Network up to date.
This is obviously not true however, I found a work-around for this as I discovered truffle was checking the compiled contracts in the build folder, assuming they'd already been migrated and then stated network up to date without migrating migration file B.
So I now have a migration and contract folder with only the contracts necessary for migrations file A, I migrate and it works fine, I then add my contracts necessary for migration B into the contracts folder, and the migration B file into migrations, and I now get the error:
Error: Could not set 'null' as the transaction hash for contractA
When I try to link the two together, for some reason it cant find the transaction hash?
If I then go to the contract abi:
... ...
The full trace of the error is as follows:
So the transaction hash is definitely there...
Can anyone help?