I'm using Truffle together with Parity to test contracts.

How do I tell truffle what account to use with Parity when testing contracts? I have a total of 3 accounts in Parity currently.

The command I'm currently using is as follows:

truffle test --network kovan

1 Answer 1


in the configuration file of truffle (truffle.js), in the networks group, you can specify a from field with an address, which is going to be used by default when sending transactions on that network. For example I have this entry for Rinkeby:

rinkeby: {
  host: "localhost",
  port: 8545,
  network_id: 4,
  from: "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", // your address here
  gas: 4612388

Also when running the test whenever you send a transaction you can specify the address of the source explicitly as with any other transaction.

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.