Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove internal use Ethereum account from accounts data #327

Open
filippsen opened this issue Jan 4, 2019 · 0 comments
Open

Remove internal use Ethereum account from accounts data #327

filippsen opened this issue Jan 4, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@filippsen
Copy link
Contributor

Environment/Browser

Version 1.4.3

Description

Account index mismatch when retrieving accounts calling web3.eth.getAccounts.

Steps to reproduce

  1. Edit app.js to call: this.web3.eth.getAccounts(function(err,res){console.error(err);console.log(res);});
  2. Observe the value of res

Other tests:

accounts = await web3.eth.getAccounts()
account = accounts[1] // default dev/ deployer

Expected result

Expected the first account to be of index 0 instead of 1. The first account is 0xa48F2e0b... for the current seed (default).

default account is 0xa48F.. instead of 0x620...

Actual result

["0x620CB...", "0xa48F2e0b...", ... ]

The account address 0x620... is used internally and ends up (manually) added as part of the accounts list.

Hints and guidelines

Remove the inclusion of the 0x620... account address to the _accounts data in init procedure (evm.js file). The _accounts data is a table serving as reference to the accounts list implementation (getAccounts and consequentlyeth_accounts)

This change impacts estimateGas and call, which will need to adapt to read the key from elsewhere e.g. a global constant or simply inline it.

@filippsen filippsen added the bug Something isn't working label Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant