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
8fa75e4b
Commit
8fa75e4b
authored
Mar 31, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip: l2 deployements
Predeploy implementations
parent
6ad72677
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
289 additions
and
0 deletions
+289
-0
100-L1BlockImpl.ts
packages/contracts-bedrock/deploy/100-L1BlockImpl.ts
+25
-0
101-L2CrossDomainMessengerImpl.ts
...ontracts-bedrock/deploy/101-L2CrossDomainMessengerImpl.ts
+29
-0
102-L2StandardBridgeImpl.ts
...ages/contracts-bedrock/deploy/102-L2StandardBridgeImpl.ts
+29
-0
103-L2ToL1MessagePasserImpl.ts
...s/contracts-bedrock/deploy/103-L2ToL1MessagePasserImpl.ts
+20
-0
104-L2ERC721BridgeImpl.ts
packages/contracts-bedrock/deploy/104-L2ERC721BridgeImpl.ts
+35
-0
105-GasPriceOracleImpl.ts
packages/contracts-bedrock/deploy/105-GasPriceOracleImpl.ts
+20
-0
106-SequencerFeeVaultImpl.ts
...ges/contracts-bedrock/deploy/106-SequencerFeeVaultImpl.ts
+24
-0
107-BaseFeeVaultImpl.ts
packages/contracts-bedrock/deploy/107-BaseFeeVaultImpl.ts
+24
-0
108-L1FeeVaultImpl.ts
packages/contracts-bedrock/deploy/108-L1FeeVaultImpl.ts
+24
-0
109-OptimismMintableERC20FactoryImpl.ts
...ts-bedrock/deploy/109-OptimismMintableERC20FactoryImpl.ts
+26
-0
110-OptimismMintableERC721FactoryImpl.ts
...s-bedrock/deploy/110-OptimismMintableERC721FactoryImpl.ts
+33
-0
No files found.
packages/contracts-bedrock/deploy/100-L1BlockImpl.ts
0 → 100644
View file @
8fa75e4b
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
ethers
}
from
'
ethers
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
{
assertContractVariable
,
deploy
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
await
deploy
({
hre
,
name
:
'
L1Block
'
,
args
:
[],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
DEPOSITOR_ACCOUNT
'
,
ethers
.
utils
.
getAddress
(
'
0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001
'
)
)
},
})
}
deployFn
.
tags
=
[
'
L1BlockImpl
'
,
'
l2
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/101-L2CrossDomainMessengerImpl.ts
0 → 100644
View file @
8fa75e4b
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
ethers
}
from
'
ethers
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
{
assertContractVariable
,
deploy
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
Artifact__L1CrossDomainMessenger
=
await
hre
.
deployments
.
get
(
'
L1CrossDomainMessenger
'
)
await
deploy
({
hre
,
name
:
'
L2CrossDomainMessenger
'
,
args
:
[
Artifact__L1CrossDomainMessenger
.
address
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
OTHER_MESSENGER
'
,
ethers
.
utils
.
getAddress
(
Artifact__L1CrossDomainMessenger
.
address
)
)
},
})
}
deployFn
.
tags
=
[
'
L2CrossDomainMessengerImpl
'
,
'
l2
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/102-L2StandardBridgeImpl.ts
0 → 100644
View file @
8fa75e4b
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
ethers
}
from
'
ethers
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
{
assertContractVariable
,
deploy
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
Artifact__L1StandardBridge
=
await
hre
.
deployments
.
get
(
'
L1StandardBridge
'
)
await
deploy
({
hre
,
name
:
'
L2StandardBridge
'
,
args
:
[
Artifact__L1StandardBridge
.
address
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
OTHER_BRIDGE
'
,
ethers
.
utils
.
getAddress
(
Artifact__L1StandardBridge
.
address
)
)
},
})
}
deployFn
.
tags
=
[
'
L2StandardBridgeImpl
'
,
'
l2
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/103-L2ToL1MessagePasserImpl.ts
0 → 100644
View file @
8fa75e4b
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
{
assertContractVariable
,
deploy
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
await
deploy
({
hre
,
name
:
'
L2ToL1MessagePasser
'
,
args
:
[],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
MESSAGE_VERSION
'
,
1
)
},
})
}
deployFn
.
tags
=
[
'
L2ToL1MessagePasserImpl
'
,
'
l2
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/104-L2ERC721BridgeImpl.ts
0 → 100644
View file @
8fa75e4b
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
{
ethers
}
from
'
ethers
'
import
{
predeploys
}
from
'
../src/constants
'
import
{
assertContractVariable
,
deploy
}
from
'
../src/deploy-utils
'
// TODO: should be proxy and should be companion network
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
Artifact__L1ERC721Bridge
=
await
hre
.
deployments
.
get
(
'
L1ERC721Bridge
'
)
await
deploy
({
hre
,
name
:
'
L2ERC721Bridge
'
,
args
:
[
predeploys
.
L2CrossDomainMessenger
,
Artifact__L1ERC721Bridge
.
address
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
MESSENGER
'
,
ethers
.
utils
.
getAddress
(
predeploys
.
L2CrossDomainMessenger
)
)
await
assertContractVariable
(
contract
,
'
OTHER_BRIDGE
'
,
ethers
.
utils
.
getAddress
(
Artifact__L1ERC721Bridge
.
address
)
)
},
})
}
deployFn
.
tags
=
[
'
L2ERC721BridgeImpl
'
,
'
l2
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/105-GasPriceOracleImpl.ts
0 → 100644
View file @
8fa75e4b
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
{
assertContractVariable
,
deploy
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
await
deploy
({
hre
,
name
:
'
GasPriceOracle
'
,
args
:
[],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
DECIMALS
'
,
6
)
},
})
}
deployFn
.
tags
=
[
'
GasPriceOracle
'
,
'
l2
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/106-SequencerFeeVaultImpl.ts
0 → 100644
View file @
8fa75e4b
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
{
assertContractVariable
,
deploy
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
await
deploy
({
hre
,
name
:
'
SequencerFeeVault
'
,
args
:
[
hre
.
deployConfig
.
sequencerFeeVaultRecipient
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
RECIPIENT
'
,
hre
.
deployConfig
.
sequencerFeeVaultRecipient
)
},
})
}
deployFn
.
tags
=
[
'
SequencerFeeVaultImpl
'
,
'
l2
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/107-BaseFeeVaultImpl.ts
0 → 100644
View file @
8fa75e4b
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
{
assertContractVariable
,
deploy
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
await
deploy
({
hre
,
name
:
'
BaseFeeVault
'
,
args
:
[
hre
.
deployConfig
.
baseFeeVaultRecipient
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
RECIPIENT
'
,
hre
.
deployConfig
.
baseFeeVaultRecipient
)
},
})
}
deployFn
.
tags
=
[
'
BaseFeeVaultImpl
'
,
'
l2
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/108-L1FeeVaultImpl.ts
0 → 100644
View file @
8fa75e4b
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
{
assertContractVariable
,
deploy
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
await
deploy
({
hre
,
name
:
'
L1FeeVault
'
,
args
:
[
hre
.
deployConfig
.
l1FeeVaultRecipient
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
RECIPIENT
'
,
hre
.
deployConfig
.
l1FeeVaultRecipient
)
},
})
}
deployFn
.
tags
=
[
'
L1FeeVaultImpl
'
,
'
l2
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/109-OptimismMintableERC20FactoryImpl.ts
0 → 100644
View file @
8fa75e4b
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
ethers
}
from
'
ethers
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
{
assertContractVariable
,
deploy
}
from
'
../src/deploy-utils
'
import
{
predeploys
}
from
'
../src/constants
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
await
deploy
({
hre
,
name
:
'
OptimismMintableERC20Factory
'
,
args
:
[
predeploys
.
L2StandardBridge
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
BRIDGE
'
,
ethers
.
utils
.
getAddress
(
predeploys
.
L2StandardBridge
)
)
},
})
}
deployFn
.
tags
=
[
'
OptimismMintableERC20FactoryImpl
'
,
'
l2
'
]
export
default
deployFn
packages/contracts-bedrock/deploy/110-OptimismMintableERC721FactoryImpl.ts
0 → 100644
View file @
8fa75e4b
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
ethers
}
from
'
ethers
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
{
assertContractVariable
,
deploy
}
from
'
../src/deploy-utils
'
import
{
predeploys
}
from
'
../src/constants
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
OptimismMintableERC721Factory
=
await
hre
.
ethers
.
getContractAt
(
'
OptimismMintableERC721Factory
'
,
predeploys
.
OptimismMintableERC721Factory
)
const
remoteChainId
=
await
OptimismMintableERC721Factory
.
REMOTE_CHAIN_ID
()
await
deploy
({
hre
,
name
:
'
OptimismMintableERC721Factory
'
,
args
:
[
predeploys
.
L2StandardBridge
,
remoteChainId
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
BRIDGE
'
,
ethers
.
utils
.
getAddress
(
predeploys
.
L2StandardBridge
)
)
await
assertContractVariable
(
contract
,
'
REMOTE_CHAIN_ID
'
,
remoteChainId
)
},
})
}
deployFn
.
tags
=
[
'
OptimismMintableERC721FactoryImpl
'
,
'
l2
'
]
export
default
deployFn
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