By default truffle uses testrpc / truffle develop which has a list of predefined addresses:

Truffle Develop started at http://localhost:9545/

(0) 0x627306090abab3a6e1400e9345bc60c78a8bef57
(1) 0xf17f52151ebef6c7334fad080c5704d77216b732
(2) 0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef
(3) 0x821aea9a577a9b44299b9c15c88cf3087f3b5544
(4) 0x0d1d4e623d10f9fba5db95830f7d3839406c6af2
(5) 0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e
(6) 0x2191ef87e392377ec08e7c08eb105ef5448eced5
(7) 0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5
(8) 0x6330a553fc93768f612722bb8c2ec78ac90b3bbc
(9) 0x5aeda56215b167893e80b4fe645ba6d5bab767de

How can I overwrite or add addresses ?


You can use cli option --account='***'

Specify --account=... any number of times passing arbitrary private keys and their associated balances to generate initial addresses:


testrpc -l 6000000 --account=\"0xb70f3dfa1a8b7d3f1e4e64f1bfb6f765acb87e89f455eb19240a8005415c984e,1000000000000000000000\" --unlock \"0x32e0eee34b6a76ffed8d17ed7d365f779f3da3e3\" 
| improve this answer | |
  • Should I run this everytime? And how to include this in truffle test? – Stef Heyenrath Dec 26 '17 at 11:26
  • I use the package.json scripts, define once and run by npm. – Зелёный Dec 26 '17 at 11:28
  • Sorry, I'm not able to get this working. Can you post a complete package.json file? – Stef Heyenrath Dec 26 '17 at 12:16
  • Here is an example of my package.json gist.github.com/fishbullet/51474dff2c1b3114d2fef0b5e5b13f28 – Зелёный Dec 26 '17 at 12:26
  • I see. However I don't want to install testrpc globally, but just for my project. Is this possible? And what would be the command ? – Stef Heyenrath Dec 26 '17 at 12:33

Your Answer

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

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