Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions contracts/deploy/020-ContractInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,32 @@ export const ContractInit = async (
// submitter and challenger
const submitter: string = config.rollupProposer
const challenger: string = config.rollupChallenger
const rollupDelayPeriod: number = config.rollupDelayPeriod

if (!ethers.utils.isAddress(submitter)
|| !ethers.utils.isAddress(challenger)
) {
console.error('please check your address')
return ''
}
if (rollupDelayPeriod==0){
console.error('rollupDelayPeriod cannot set zero')
return ''
}
let res = await Rollup.importGenesisBatch(batchHeader)
let rec = await res.wait()
console.log(`importGenesisBatch(%s) ${rec.status == 1 ? "success" : "failed"}`, batchHeader)
res = await Rollup.addChallenger(challenger)
rec = await res.wait()
console.log(`addChallenger(%s) ${rec.status == 1 ? "success" : "failed"}`, challenger)

res =await Rollup.initialize2("0x0000000000000000000000000000000000000000000000000000000000000001")
rec = await res.wait()
console.log(`initialize2(%s) ${rec.status == 1 ? "success" : "failed"}`)

res = await Rollup.initialize3(rollupDelayPeriod)
rec = await res.wait()
console.log(`initialize3(%s) ${rec.status == 1 ? "success" : "failed"}`)
}

// ------------------ staking init -----------------
Expand Down
4 changes: 3 additions & 1 deletion contracts/src/deploy-config/l1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ const config = {
finalizationPeriodSeconds: 10,
rollupProofWindow: 86400,
proofRewardPercent: 70,
rollupDelayPeriod: 86400,

// challenge config
rollupProposer: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8',
rollupChallenger: '0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65',
// genesis config
batchHeader: '0x0000000000000000000000000000000000000000000000000043a758882ae97327ffcc63373e26fcd144a5a738eac834c167175d69713780c0010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014000000000000000000000000000000000000000000000000000000000000000020cd420e20d610897b8f2c5ac5259ab8b57cce1074212cec2815b2b73ff93d9f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
batchHeader: '0x00000000000000000000000000000000000000000000000000886e14341b355178d11a2c9f985f60a1a195973078b688a11aeaebb0c95db595010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c44401400000000000000000000000000000000000000000000000000000000000000002d20dde82426d971e398b3cba11ebb60d0d740b799f85e2f95fd12a1faad8e2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',

// staking config
// staking Cross-Chain config
Expand Down
1 change: 1 addition & 0 deletions tx-submitter/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ tx-submitter
**/tx-submitter
build/
*debug_bin*
submitter-leveldb

# Config and Environment files
.env*
Expand Down
Loading
Loading