Search code examples
ethereumtruffleganache

accounts[0] returns network name in string


I am running a set of smart contracts in test mode in order to perform some initial tests. However and very strangely, when running truffle migrate --network testrpc and using accounts[0] in my migration files, I get the following error: Error: Provided address "t" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be converted.

In this string, "t" is in fact the first letter of testrpc. If I use accounts[1] I get a "e", etc...

I was previously using testrpc command line encironment and later switched to ganache-cli to try and solve the issue. Unfortunately nothing worked quite as I expected and I am still stuck with the issue.

I am running on Ubuntu so that may cause the issue?

EDIT 1: Migration file:

// Starting deployment of asset
module.exports = async function(deployer, network, accounts) {

    // owner wallet
    var wallet = accounts[0];

};

Solution

  • I didn't find why it didn't work with testrpc, so I switched to ganache-cli which also provided the same issue... I finally resigned myself to use Ganache Client app, and it worked...