1

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

1
  • 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, 2017 at 4:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.