0

Is there a way to load the truffle console with the following variables without having to do manual type-ins on every test?

let app = await MyContract.deployed();
let accounts = web3.eth.getAccounts();

Excuse the naivety, starting out with Solidity/Truffle and asking the basic questions that don't seem to be answered (probably because they're not possible).

2
  • Just wondering why don't you do your tests the usual way with truffle test? You write your tests for each contract method there and whenever smart contract change is done you run the tests to check if everything is ok. – Miroslav Nedelchev Feb 14 '20 at 19:06
  • Thanks, will look into tests to see how it might help here. It would be great if truffle console stored commands in memory after exiting though! – Nick Feb 14 '20 at 20:55

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.