Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
d0104ffa
Commit
d0104ffa
authored
Aug 02, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fault-mon: fix tests
parent
ad7018c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
helpers.spec.ts
packages/chain-mon/test/fault-mon/helpers.spec.ts
+27
-5
No files found.
packages/chain-mon/test/fault-mon/helpers.spec.ts
View file @
d0104ffa
...
@@ -3,6 +3,7 @@ import '@nomiclabs/hardhat-ethers'
...
@@ -3,6 +3,7 @@ import '@nomiclabs/hardhat-ethers'
import
{
Contract
,
utils
}
from
'
ethers
'
import
{
Contract
,
utils
}
from
'
ethers
'
import
{
toRpcHexString
}
from
'
@eth-optimism/core-utils
'
import
{
toRpcHexString
}
from
'
@eth-optimism/core-utils
'
import
Artifact__L2OutputOracle
from
'
@eth-optimism/contracts-bedrock/forge-artifacts/L2OutputOracle.sol/L2OutputOracle.json
'
import
Artifact__L2OutputOracle
from
'
@eth-optimism/contracts-bedrock/forge-artifacts/L2OutputOracle.sol/L2OutputOracle.json
'
import
Artifact__Proxy
from
'
@eth-optimism/contracts-bedrock/forge-artifacts/Proxy.sol/Proxy.json
'
import
{
SignerWithAddress
}
from
'
@nomiclabs/hardhat-ethers/signers
'
import
{
SignerWithAddress
}
from
'
@nomiclabs/hardhat-ethers/signers
'
import
{
expect
}
from
'
./setup
'
import
{
expect
}
from
'
./setup
'
...
@@ -29,22 +30,43 @@ describe('helpers', () => {
...
@@ -29,22 +30,43 @@ describe('helpers', () => {
})
})
let
L2OutputOracle
:
Contract
let
L2OutputOracle
:
Contract
let
Proxy
:
Contract
beforeEach
(
async
()
=>
{
beforeEach
(
async
()
=>
{
const
Factory__Proxy
=
new
hre
.
ethers
.
ContractFactory
(
Artifact__Proxy
.
abi
,
Artifact__Proxy
.
bytecode
.
object
,
signer
)
Proxy
=
await
Factory__Proxy
.
deploy
(
signer
.
address
)
const
Factory__L2OutputOracle
=
new
hre
.
ethers
.
ContractFactory
(
const
Factory__L2OutputOracle
=
new
hre
.
ethers
.
ContractFactory
(
Artifact__L2OutputOracle
.
abi
,
Artifact__L2OutputOracle
.
abi
,
Artifact__L2OutputOracle
.
bytecode
.
object
,
Artifact__L2OutputOracle
.
bytecode
.
object
,
signer
signer
)
)
L2OutputOracle
=
await
Factory__L2OutputOracle
.
deploy
(
const
L2OutputOracleImplementation
=
await
Factory__L2OutputOracle
.
deploy
(
deployConfig
.
l2OutputOracleSubmissionInterval
,
deployConfig
.
l2OutputOracleSubmissionInterval
,
deployConfig
.
l2BlockTime
,
deployConfig
.
l2BlockTime
,
deployConfig
.
l2OutputOracleStartingBlockNumber
,
deployConfig
.
l2OutputOracleStartingTimestamp
,
deployConfig
.
l2OutputOracleProposer
,
deployConfig
.
l2OutputOracleChallenger
,
deployConfig
.
finalizationPeriodSeconds
deployConfig
.
finalizationPeriodSeconds
)
)
await
Proxy
.
upgradeToAndCall
(
L2OutputOracleImplementation
.
address
,
L2OutputOracleImplementation
.
interface
.
encodeFunctionData
(
'
initialize
'
,
[
deployConfig
.
l2OutputOracleStartingBlockNumber
,
deployConfig
.
l2OutputOracleStartingTimestamp
,
deployConfig
.
l2OutputOracleProposer
,
deployConfig
.
l2OutputOracleChallenger
,
])
)
L2OutputOracle
=
new
hre
.
ethers
.
Contract
(
Proxy
.
address
,
Artifact__L2OutputOracle
.
abi
,
signer
)
})
})
describe
(
'
findOutputForIndex
'
,
()
=>
{
describe
(
'
findOutputForIndex
'
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment