import { task } from 'hardhat/config'
import { hdkey } from 'ethereumjs-wallet'
import * as bip39 from 'bip39'
task('rekey', 'Generates a new set of keys for a test network').setAction(
async () => {
const mnemonic = bip39.generateMnemonic()
const pathPrefix = "m/44'/60'/0'/0"
const labels = [
'l2OutputOracleProposer',
'proxyAdminOwner',
'optimismBaseFeeRecipient',
'optimismL1FeeRecipient',
'p2pSequencerAddress',
'l2OutputOracleOwner',
'batchSenderAddress',
]
const hdwallet = hdkey.fromMasterSeed(await bip39.mnemonicToSeed(mnemonic))
let i = 0
const out = {}
console.log(`Mnemonic: ${mnemonic}`)
for (const label of labels) {
const wallet = hdwallet.derivePath(`${pathPrefix}/${i}`).getWallet()
out[label] = `0x${wallet.getAddress().toString('hex')}`
i++
}
console.log(JSON.stringify(out, null, ' '))
}
)
-
Mark Tyneway authored
* bedrock: make fee recipient be SequencerFeeVault The fee recipient or `block.coinbase` is now set to a hardcoded value of the predeploy `SequencerFeeVault`. This reduces configuration that is consensus criticial. * op-chain-ops: correct config Fixes a bug in the fee tests * core-utils: remove dead config field from op-node config * contracts-bedrock: deployment files Existing tooling expects the name of the contract to equal the name of the deployment. The latest work that updated the deploy files added the `Impl` suffix to contract names. * sdk: improve erc20 deposit logs
927b4321