2

I am using truffle framework for Dapp development and I am new in Blockchain.I used the command web3.personal.newAccount() to create a new account. Creating new account using web3.personal.newAccount() and getting it listed using  web3.eth.accounts

But i cannot view this account when i take ganache ui. It still keeps showing the initially created 10 accounts. Ganache ui still shows 10 accounts

1)How to get the list updated? 2)isn't the command web3.personal.newAccount() creating the new account on my local blockchain?if isn't which list is web3.eth.accounts showing? 3)This code is part of an election Dapp.I cannot make a transaction after adding this account it is showing "failed".

Thanks in advance:-p

  • 1
    There is a lot to go into here, especially related to the different web3 contexts. My first question is why are you looking to create a new account versus using one of the 10 accounts generated? – Shawn Tabrizi Aug 29 '18 at 20:45
  • Did you search for the address in the search box of Ganache? Or did you scroll down? The attached photo only shows 10 addresses, and the one you created is the 13th. – shane Aug 30 '18 at 0:02
  • @shanefontaine I tried scrolling down,but i couldn't see any of the 3 accounts i created. – jeswin cyriac Aug 30 '18 at 3:46
  • @ShawnTabrizi I tried this as part of resolving a transaction failure,but resetting my account helped me with that.But i would like to know why the problem stated above occurs? – jeswin cyriac Aug 30 '18 at 3:50
  • @jeswincyriac the ganache only creates the blockchain with the entered accounts. But it doesn't completely synchronize with all the operations we do on the block chain. – Zeeshan Ahmad Khalil Aug 8 at 15:25

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.