9

Could someone point out what is happening with truffle.

"truffle compile" works fine. Please find the below truffle migrate reset output

Ubuntu#truffle version
Truffle v3.1.2
Ubuntu#truffle migrate --reset
Using network 'development'.

Running migration: 1_initial_migration.js
  Deploying Migrations...
  Migrations: 0x8ef3810f2dc59ecb37a518d18fab657343d8b281
Saving artifacts...
Running migration: 2_deploy_contracts.js
  Deploying A...
  A: 0x78724b3d9468e1e81e168c4fd3fa7e8c74f41532
Error encountered, bailing. Network state unknown. Review successful transactions manually.
TypeError: Cannot read property 'links' of undefined
    at /usr/lib/node_modules/truffle/node_modules/truffle-migrate/node_modules/truffle-deployer/src/linker.js:30:22
    at Array.forEach (native)
    at Object.link (/usr/lib/node_modules/truffle/node_modules/truffle-migrate/node_modules/truffle-deployer/src/linker.js:28:18)
    at /usr/lib/node_modules/truffle/node_modules/truffle-migrate/node_modules/truffle-deployer/src/actions/link.js:5:12
    at /usr/lib/node_modules/truffle/node_modules/truffle-migrate/node_modules/truffle-deployer/src/deferredchain.js:20:15
    at process._tickDomainCallback (internal/process/next_tick.js:129:7)
Ubuntu#

testrpc output while invoking truffle migrate

HD Wallet
==================
Mnemonic:      ring book bridge orange sick announce original they cross such sudden jar
Base HD Path:  m/44'/60'/0'/0/{account_index}

Listening on localhost:8545
net_version
eth_accounts
net_version
net_version
eth_sendTransaction

  Transaction: 0x4ac810d07f93349a0a15607734138610143cc5a6ab2ebf473969f4a9ad8a98dd
  Contract created: 0x0ecffa76b13841a4d1562d68e651fcbdd2a9c27d
  Gas usage: 0x02c504
  Block Number: 0x01
  Block Time: Thu Feb 23 2017 12:59:28 GMT+0530 (IST)

eth_newBlockFilter
eth_getFilterChanges
eth_getTransactionReceipt
eth_getCode
eth_uninstallFilter
net_version
net_version
eth_sendTransaction

  Transaction: 0x1b1eafe1ed1788ced13a4e9706fba24ef2b156c6211d8aa0328bbb35f5a6d1f5
  Contract created: 0x121a3c3285ba61b88de863013c156fecc23f6d00
  Gas usage: 0x01aad6
  Block Number: 0x02
  Block Time: Thu Feb 23 2017 12:59:29 GMT+0530 (IST)

eth_newBlockFilter
eth_getFilterChanges
eth_getTransactionReceipt
eth_getCode
  • Probable duplicate? ethereum.stackexchange.com/questions/12331/… – Richard Horrocks Feb 23 '17 at 9:58
  • 1
    I think the problem is in your 2_deploy_contracts.js, please add it to the question. – max taldykin Feb 23 '17 at 12:24
  • Correcting 2_deploy_contracts.js solved my problem. It was pointing to a non existing link file. Thanks !! – sun Feb 26 '17 at 7:03
  • 2
    Please add an answer explaining what you did, then mark your answer as accepted :) It will help others in future. – Richard Horrocks Mar 12 '17 at 10:22
3

The contract size was crossing more than 24000 bytes . Hence the contract was not getting deployed. ( I had many imports/inheritance)

Solution was to split the contract code by functionality and redeploy.

Vitalik statement on contract size

1

I had the same error but due to gas limit. Check your gas limit if you get following line: Error: exceeds block gas limit

-1

Someone told about truffle is not compatible with nodejs8, so you may want to try the followings: http://truffleframework.com/blog/how-were-making-installation-issues-a-thing-of-the-past

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.