0xFableOrg / roll-op

The simplest way to spin your own dev / prod rollup, fully configurable.
BSD 3-Clause Clear License
92 stars 25 forks source link

Separate private keys from the rest of the config #52

Open norswap opened 1 year ago

norswap commented 1 year ago

Currently, we have a bunch of configuration options for accounts and private key.

This is super redundant: the accounts can be derived from the private keys, and by default we should do this derivation.

We can still allow accounts to be specified as a safety option, in which case, we will verify that the account & key match.

To do this we should install & use the eth_account python package.

norswap commented 11 months ago

We could use this: https://www.rareskills.io/post/generate-ethereum-address-from-private-key-python

norswap commented 11 months ago

It honestly might be a good idea to write the accounts explicitly, but to check the private keys against the supplied accounts, to avoid errors. Also the private keys should probably be providable separately from the config file (probably via environment variables? a secrets.toml file?) so that they do not get mingled to the config file, which should be commitable.

I'm changing the title of this issue to reflect this.