Commit 6ec60435 authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: remove calls to hre ethers

parent 4a117690
...@@ -5,7 +5,7 @@ const { env } = process ...@@ -5,7 +5,7 @@ const { env } = process
const startingTimestamp = const startingTimestamp =
typeof env.L2OO_STARTING_BLOCK_TIMESTAMP === 'string' typeof env.L2OO_STARTING_BLOCK_TIMESTAMP === 'string'
? ethers.BigNumber.from(env.L2OO_STARTING_BLOCK_TIMESTAMP).toNumber() ? ethers.BigNumber.from(env.L2OO_STARTING_BLOCK_TIMESTAMP).toNumber()
: (Date.now() / 1000) | 0 : Math.floor(Date.now() / 1000)
const config = { const config = {
submissionInterval: 6, submissionInterval: 6,
...@@ -15,11 +15,10 @@ const config = { ...@@ -15,11 +15,10 @@ const config = {
l2BlockTime: 2, l2BlockTime: 2,
startingTimestamp, startingTimestamp,
sequencerAddress: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8', sequencerAddress: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8',
maxSequencerDrift: 10, maxSequencerDrift: 10,
sequencerWindowSize: 2, sequencerWindowSize: 2,
ownerAddress: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8', ownerAddress: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8',
fundDevAccounts: true,
} }
export default config export default config
...@@ -11,6 +11,7 @@ task('genesis-l1', 'create a genesis config') ...@@ -11,6 +11,7 @@ task('genesis-l1', 'create a genesis config')
'genesis.json' 'genesis.json'
) )
.setAction(async (args, hre) => { .setAction(async (args, hre) => {
const { deployConfig } = hre
const alloc: State = {} const alloc: State = {}
// Give each predeploy a single wei // Give each predeploy a single wei
...@@ -26,40 +27,36 @@ task('genesis-l1', 'create a genesis config') ...@@ -26,40 +27,36 @@ task('genesis-l1', 'create a genesis config')
} }
} }
// Prefund dev accounts if (deployConfig.fundDevAccounts) {
const accounts = [ const accounts = [
'0x14dC79964da2C08b23698B3D3cc7Ca32193d9955', '0x14dC79964da2C08b23698B3D3cc7Ca32193d9955',
'0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65', '0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65',
'0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec', '0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec',
'0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f', '0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f',
'0x2546BcD3c84621e976D8185a91A922aE77ECEc30', '0x2546BcD3c84621e976D8185a91A922aE77ECEc30',
'0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC', '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
'0x70997970C51812dc3A010C7d01b50e0d17dc79C8', '0x70997970C51812dc3A010C7d01b50e0d17dc79C8',
'0x71bE63f3384f5fb98995898A86B02Fb2426c5788', '0x71bE63f3384f5fb98995898A86B02Fb2426c5788',
'0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199', '0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199',
'0x90F79bf6EB2c4f870365E785982E1f101E93b906', '0x90F79bf6EB2c4f870365E785982E1f101E93b906',
'0x976EA74026E726554dB657fA54763abd0C3a0aa9', '0x976EA74026E726554dB657fA54763abd0C3a0aa9',
'0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc', '0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc',
'0xBcd4042DE499D14e55001CcbB24a551F3b954096', '0xBcd4042DE499D14e55001CcbB24a551F3b954096',
'0xFABB0ac9d68B0B445fB7357272Ff202C5651694a', '0xFABB0ac9d68B0B445fB7357272Ff202C5651694a',
'0xa0Ee7A142d267C1f36714E4a8F75612F20a79720', '0xa0Ee7A142d267C1f36714E4a8F75612F20a79720',
'0xbDA5747bFD65F08deb54cb465eB87D40e51B197E', '0xbDA5747bFD65F08deb54cb465eB87D40e51B197E',
'0xcd3B766CCDd6AE721141F452C550Ca635964ce71', '0xcd3B766CCDd6AE721141F452C550Ca635964ce71',
'0xdD2FD4581271e230360230F9337D5c0430Bf44C0', '0xdD2FD4581271e230360230F9337D5c0430Bf44C0',
'0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097', '0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097',
'0xde3829a23df1479438622a08a116e8eb3f620bb5', '0xde3829a23df1479438622a08a116e8eb3f620bb5',
'0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
] ]
const signers = await hre.ethers.getSigners() for (const account of accounts) {
for (const signer of signers) { alloc[ethers.utils.getAddress(account)] = {
accounts.push(signer.address) balance:
} '0x200000000000000000000000000000000000000000000000000000000000000',
}
for (const account of accounts) {
alloc[ethers.utils.getAddress(account)] = {
balance:
'0x200000000000000000000000000000000000000000000000000000000000000',
} }
} }
......
...@@ -190,17 +190,29 @@ task('genesis-l2', 'create a genesis config') ...@@ -190,17 +190,29 @@ task('genesis-l2', 'create a genesis config')
if (deployConfig.fundDevAccounts) { if (deployConfig.fundDevAccounts) {
const accounts = [ const accounts = [
'0xde3829a23df1479438622a08a116e8eb3f620bb5', '0x14dC79964da2C08b23698B3D3cc7Ca32193d9955',
'0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', '0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65',
'0x70997970C51812dc3A010C7d01b50e0d17dc79C8', '0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec',
'0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f',
'0x2546BcD3c84621e976D8185a91A922aE77ECEc30',
'0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC', '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
'0x70997970C51812dc3A010C7d01b50e0d17dc79C8',
'0x71bE63f3384f5fb98995898A86B02Fb2426c5788',
'0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199',
'0x90F79bf6EB2c4f870365E785982E1f101E93b906',
'0x976EA74026E726554dB657fA54763abd0C3a0aa9',
'0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc',
'0xBcd4042DE499D14e55001CcbB24a551F3b954096',
'0xFABB0ac9d68B0B445fB7357272Ff202C5651694a',
'0xa0Ee7A142d267C1f36714E4a8F75612F20a79720',
'0xbDA5747bFD65F08deb54cb465eB87D40e51B197E',
'0xcd3B766CCDd6AE721141F452C550Ca635964ce71',
'0xdD2FD4581271e230360230F9337D5c0430Bf44C0',
'0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097',
'0xde3829a23df1479438622a08a116e8eb3f620bb5',
'0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
] ]
const signers = await hre.ethers.getSigners()
for (const signer of signers) {
accounts.push(signer.address)
}
for (const account of accounts) { for (const account of accounts) {
alloc[account] = { alloc[account] = {
balance: balance:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment