-
Notifications
You must be signed in to change notification settings - Fork 158
Expand file tree
/
Copy pathcreateEthRollup.ts
More file actions
41 lines (35 loc) · 984 Bytes
/
createEthRollup.ts
File metadata and controls
41 lines (35 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { ethers } from 'hardhat'
import '@nomiclabs/hardhat-ethers'
import { createRollup } from './rollupCreation'
async function main() {
const feeToken = ethers.constants.AddressZero
const feeTokenPricer = ethers.constants.AddressZero
const rollupCreatorAddress = process.env.ROLLUP_CREATOR_ADDRESS
if (!rollupCreatorAddress) {
throw new Error('ROLLUP_CREATOR_ADDRESS not set')
}
const stakeTokenAddress = process.env.STAKE_TOKEN_ADDRESS
if (!stakeTokenAddress) {
throw new Error('STAKE_TOKEN_ADDRESS not set')
}
let customOsp = process.env.CUSTOM_OSP_ADDRESS as string
if (!customOsp) {
customOsp = ethers.constants.AddressZero
}
const [signer] = await ethers.getSigners()
await createRollup(
signer,
false,
rollupCreatorAddress,
feeToken,
feeTokenPricer,
stakeTokenAddress,
customOsp
)
}
main()
.then(() => process.exit(0))
.catch((error: Error) => {
console.error(error)
process.exit(1)
})