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
8d560e15
Commit
8d560e15
authored
Jan 08, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contracts-bedrock: fix genesis magic check
parent
926f04bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
9 deletions
+34
-9
config.yml
.circleci/config.yml
+6
-1
check-l2.ts
packages/contracts-bedrock/tasks/check-l2.ts
+28
-8
No files found.
.circleci/config.yml
View file @
8d560e15
...
...
@@ -641,7 +641,12 @@ jobs:
make devnet-up
-
run
:
name
:
Check L2 config
command
:
npx hardhat check-l2 --network devnetL1 --l2-rpc-url http://localhost:9545 --l1-rpc-url http://localhost:8545
command
:
|
npx hardhat check-l2 \
--network devnetL1 \
--l2-rpc-url http://localhost:9545 \
--l1-rpc-url http://localhost:8545 \
--l2-output-oracle-address 0x6900000000000000000000000000000000000000
working_directory
:
packages/contracts-bedrock
-
run
:
name
:
Deposit ERC20 through the bridge
...
...
packages/contracts-bedrock/tasks/check-l2.ts
View file @
8d560e15
...
...
@@ -146,14 +146,28 @@ const checkGenesisMagic = async (
const
l1Provider
=
new
hre
.
ethers
.
providers
.
StaticJsonRpcProvider
(
args
.
l1RpcUrl
)
const
Deployment__L2OutputOracle
=
await
hre
.
deployments
.
get
(
'
L2OutputOracle
'
)
const
L2OutputOracle
=
new
hre
.
ethers
.
Contract
(
Deployment__L2OutputOracle
.
address
,
Deployment__L2OutputOracle
.
abi
,
l1Provider
)
// Get the address if it was passed in via CLI
// Otherwise get the address from a hardhat deployment file
let
address
:
string
if
(
args
.
l2OutputOracleAddress
!==
''
)
{
address
=
args
.
l2OutputOracleAddress
}
else
{
const
Deployment__L2OutputOracle
=
await
hre
.
deployments
.
get
(
'
L2OutputOracle
'
)
address
=
Deployment__L2OutputOracle
.
address
}
const
abi
=
{
inputs
:
[],
name
:
'
startingBlockNumber
'
,
outputs
:
[{
internalType
:
'
uint256
'
,
name
:
''
,
type
:
'
uint256
'
}],
stateMutability
:
'
view
'
,
type
:
'
function
'
,
}
const
L2OutputOracle
=
new
hre
.
ethers
.
Contract
(
address
,
[
abi
],
l1Provider
)
startingBlockNumber
=
await
L2OutputOracle
.
startingBlockNumber
()
}
else
{
...
...
@@ -639,6 +653,12 @@ task('check-l2', 'Checks a freshly migrated L2 system for correct migration')
.
addOptionalParam
(
'
l1RpcUrl
'
,
'
L1 RPC URL of node
'
,
''
,
types
.
string
)
.
addOptionalParam
(
'
l2RpcUrl
'
,
'
L2 RPC URL of node
'
,
''
,
types
.
string
)
.
addOptionalParam
(
'
chainId
'
,
'
Expected chain id
'
,
0
,
types
.
int
)
.
addOptionalParam
(
'
l2OutputOracleAddress
'
,
'
Address of the L2OutputOracle oracle
'
,
''
,
types
.
string
)
.
addOptionalParam
(
'
skipPredeployCheck
'
,
'
Skip long check
'
,
...
...
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