I am trying to deploy a contract factory that creates multiple other contracts.

The problem is they are both in the same solidity file.

When migrating and deploying I can only access the Factory contract through truffle.

I tried accessing one of the created contracts through .at(theContractsAddress), but it doesn't have an instance of the created contract to reference, even though it has correct address.

Any suggestions? Also, does anyone think it would be easier to split the contract into two files? Or will that mess up now they are linked to each other

  • It is a better practice to split contract so they are easier to mantain individually. You can always import them if you need them. – Ismael Sep 2 '17 at 4:05

Your Answer

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

Browse other questions tagged or ask your own question.