Instead of separating each contract into it's own file, I'm wondering if/how I can interact with each individual contract one in a single .sol file through truffle console. Thanks.

1 Answer 1


truffle console will automatically load all contracts regardless of their organization into .sol files. However, if you want to reference them in tests, just do

contract = artifacts.require('MyContract')

Without the .sol.

  • Sorry for the delay in adding this as an answer for you.. Commented Jul 25, 2017 at 12:30

Your Answer

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

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