Skip to content

Commit

Permalink
fmt: yarn format
Browse files Browse the repository at this point in the history
  • Loading branch information
gzeoneth committed Feb 15, 2024
1 parent 8e1693b commit e89e01b
Showing 1 changed file with 83 additions and 45 deletions.
128 changes: 83 additions & 45 deletions scripts/upgrade/deploy4844.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,96 @@ import { deployContract, verifyContract } from '../deploymentUtils'
import { maxDataSize, isUsingFeeToken } from '../config'

async function main() {
const [signer] = await ethers.getSigners()
const overrides : Overrides = {
maxFeePerGas: ethers.utils.parseUnits('30', 'gwei'),
maxPriorityFeePerGas: ethers.utils.parseUnits('0.001', 'gwei')
}
const [signer] = await ethers.getSigners()
const overrides: Overrides = {
maxFeePerGas: ethers.utils.parseUnits('30', 'gwei'),
maxPriorityFeePerGas: ethers.utils.parseUnits('0.001', 'gwei'),
}

const contractFactory = new ContractFactory(
IReader4844__factory.abi,
Reader4844Bytecode,
signer
)
const reader4844 = await contractFactory.deploy(overrides)
await reader4844.deployed()
console.log(`Reader4844 deployed at ${reader4844.address}`)
const contractFactory = new ContractFactory(
IReader4844__factory.abi,
Reader4844Bytecode,
signer
)
const reader4844 = await contractFactory.deploy(overrides)
await reader4844.deployed()
console.log(`Reader4844 deployed at ${reader4844.address}`)

// skip verification on deployment
const sequencerInbox = await deployContract('SequencerInbox', signer, [
maxDataSize,
reader4844.address,
isUsingFeeToken
], false, overrides)
// SequencerInbox logic do not need to be initialized
const prover0 = await deployContract('OneStepProver0', signer, [], false, overrides)
const proverMem = await deployContract('OneStepProverMemory', signer, [], false, overrides)
const proverMath = await deployContract('OneStepProverMath', signer, [], false, overrides)
const proverHostIo = await deployContract('OneStepProverHostIo', signer, [], false, overrides)
const osp: Contract = await deployContract('OneStepProofEntry', signer, [
// skip verification on deployment
const sequencerInbox = await deployContract(
'SequencerInbox',
signer,
[maxDataSize, reader4844.address, isUsingFeeToken],
false,
overrides
)
// SequencerInbox logic do not need to be initialized
const prover0 = await deployContract(
'OneStepProver0',
signer,
[],
false,
overrides
)
const proverMem = await deployContract(
'OneStepProverMemory',
signer,
[],
false,
overrides
)
const proverMath = await deployContract(
'OneStepProverMath',
signer,
[],
false,
overrides
)
const proverHostIo = await deployContract(
'OneStepProverHostIo',
signer,
[],
false,
overrides
)
const osp: Contract = await deployContract(
'OneStepProofEntry',
signer,
[
prover0.address,
proverMem.address,
proverMath.address,
proverHostIo.address,
], false, overrides)
const challengeManager = await deployContract('ChallengeManager', signer, [], false, overrides)
// ChallengeManager logic do not need to be initialized
],
false,
overrides
)
const challengeManager = await deployContract(
'ChallengeManager',
signer,
[],
false,
overrides
)
// ChallengeManager logic do not need to be initialized

// verify
await verifyContract('SequencerInbox', sequencerInbox.address, [
maxDataSize,
reader4844.address,
isUsingFeeToken
])
await verifyContract('OneStepProver0', prover0.address, [])
await verifyContract('OneStepProverMemory', proverMem.address, [])
await verifyContract('OneStepProverMath', proverMath.address, [])
await verifyContract('OneStepProverHostIo', proverHostIo.address, [])
await verifyContract('OneStepProofEntry', osp.address, [
prover0.address,
proverMem.address,
proverMath.address,
proverHostIo.address,
])
await verifyContract('ChallengeManager', challengeManager.address, [])
// verify
await verifyContract('SequencerInbox', sequencerInbox.address, [
maxDataSize,
reader4844.address,
isUsingFeeToken,
])
await verifyContract('OneStepProver0', prover0.address, [])
await verifyContract('OneStepProverMemory', proverMem.address, [])
await verifyContract('OneStepProverMath', proverMath.address, [])
await verifyContract('OneStepProverHostIo', proverHostIo.address, [])
await verifyContract('OneStepProofEntry', osp.address, [
prover0.address,
proverMem.address,
proverMath.address,
proverHostIo.address,
])
await verifyContract('ChallengeManager', challengeManager.address, [])
}

main()
Expand Down

0 comments on commit e89e01b

Please sign in to comment.