0

When i use await web3.eth.accounts.create(); to create a account and write something to smart contract in ganache, i get sender account not recognized.

But I get executed properly when i create an account using await web3.eth.personal.newAccount('password')

I want to create separate account for users and store it in the browser memory of the user using web3.eth.accounts.wallet.save('test');

  1. how to use the account stored in the users browser to write something to the smart contract

  2. Should all the users account be associated with the node (ganache) as it is done while executing personal.newaccount to write something on the smart contract.

  3. If it scould be associated, how to store the account created by personal.newAccount to the users local web3 wallet

1
  • Using importRawKey we can import the locally created account into the node. But the private key will be in users wallet and the node, is there any way to write into a smart contract without storing the private key in the node. – Vikash Mar 16 at 10:43

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.