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
0f2a6df3
Unverified
Commit
0f2a6df3
authored
Dec 14, 2022
by
Mark Tyneway
Committed by
GitHub
Dec 14, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4437 from ethereum-optimism/feat/deterministic-deploy-optimist
ctp: deterministic deployment optimist proxy
parents
5e3de23c
88dbdffd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
10 deletions
+26
-10
OptimistProxy.ts
packages/contracts-periphery/deploy/op-nft/OptimistProxy.ts
+26
-10
No files found.
packages/contracts-periphery/deploy/op-nft/OptimistProxy.ts
View file @
0f2a6df3
...
...
@@ -4,31 +4,33 @@ import { HardhatRuntimeEnvironment } from 'hardhat/types'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
'
hardhat-deploy
'
import
{
assertContractVariable
,
deploy
,
}
from
'
@eth-optimism/contracts-bedrock/src/deploy-utils
'
import
{
assertContractVariable
}
from
'
@eth-optimism/contracts-bedrock/src/deploy-utils
'
import
{
utils
}
from
'
ethers
'
const
{
getAddress
}
=
utils
const
deployFn
:
DeployFunction
=
async
(
hre
:
HardhatRuntimeEnvironment
)
=>
{
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
const
ddd
=
hre
.
deployConfig
.
ddd
if
(
getAddress
(
deployer
)
!==
getAddress
(
ddd
))
{
throw
new
Error
(
'
Must deploy with the ddd
'
)
}
const
Deployment__Optimist
=
await
hre
.
deployments
.
get
(
'
Optimist
'
)
console
.
log
(
`Deploying OptimistProxy with
${
deployer
}
`
)
await
deploy
({
hre
,
name
:
'
OptimistProxy
'
,
const
{
deploy
}
=
await
hre
.
deployments
.
deterministic
(
'
OptimistProxy
'
,
{
salt
:
hre
.
ethers
.
utils
.
solidityKeccak256
([
'
string
'
],
[
'
OptimistProxy
'
]),
contract
:
'
Proxy
'
,
from
:
deployer
,
args
:
[
deployer
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
admin
'
,
deployer
)
},
log
:
true
,
})
await
deploy
()
const
Deployment__OptimistProxy
=
await
hre
.
deployments
.
get
(
'
OptimistProxy
'
)
console
.
log
(
`OptimistProxy deployed to
${
Deployment__OptimistProxy
.
address
}
`
)
...
...
@@ -79,6 +81,20 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
}
else
{
console
.
log
(
'
admin already set to proxy owner address
'
)
}
const
Deployment__AttestationStation
=
await
hre
.
deployments
.
get
(
'
AttestationStationProxy
'
)
assertContractVariable
(
Optimist
,
'
name
'
,
hre
.
deployConfig
.
optimistName
)
assertContractVariable
(
Optimist
,
'
symbol
'
,
hre
.
deployConfig
.
optimistSymbol
)
assertContractVariable
(
Optimist
,
'
ATTESTATION_STATION
'
,
Deployment__AttestationStation
.
address
)
assertContractVariable
(
Optimist
,
'
ATTESTOR
'
,
hre
.
deployConfig
.
attestorAddress
)
assertContractVariable
(
Optimist
,
'
version
'
,
'
0.0.1
'
)
}
deployFn
.
tags
=
[
'
OptimistProxy
'
]
...
...
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