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
85c77a95
Commit
85c77a95
authored
Dec 13, 2022
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ctp: AttestationStation deterministic proxy
Deploys the proxy in a deterministic manner for the attestationstation
parent
9c3a4a66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
14 deletions
+30
-14
hardhat.ts
packages/contracts-periphery/config/deploy/hardhat.ts
+1
-1
AttestationStationProxy.ts
...tracts-periphery/deploy/op-nft/AttestationStationProxy.ts
+29
-13
No files found.
packages/contracts-periphery/config/deploy/hardhat.ts
View file @
85c77a95
import
{
DeployConfig
}
from
'
../../src
'
import
{
DeployConfig
}
from
'
../../src
'
const
config
:
DeployConfig
=
{
const
config
:
DeployConfig
=
{
ddd
:
'
0x
9C6373dE60c2D3297b18A8f964618ac46E011B58
'
,
ddd
:
'
0x
f39fd6e51aad88f6f4ce6ab8827279cfffb92266
'
,
l2ProxyOwnerAddress
:
'
0x70997970c51812dc3a010c7d01b50e0d17dc79c8
'
,
l2ProxyOwnerAddress
:
'
0x70997970c51812dc3a010c7d01b50e0d17dc79c8
'
,
optimistName
:
'
OP Citizenship
'
,
optimistName
:
'
OP Citizenship
'
,
optimistSymbol
:
'
OPNFT
'
,
optimistSymbol
:
'
OPNFT
'
,
...
...
packages/contracts-periphery/deploy/op-nft/AttestationStationProxy.ts
View file @
85c77a95
...
@@ -3,10 +3,7 @@ import { HardhatRuntimeEnvironment } from 'hardhat/types'
...
@@ -3,10 +3,7 @@ import { HardhatRuntimeEnvironment } from 'hardhat/types'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
@nomiclabs/hardhat-ethers
'
import
'
@nomiclabs/hardhat-ethers
'
import
'
hardhat-deploy
'
import
'
hardhat-deploy
'
import
{
import
{
assertContractVariable
}
from
'
@eth-optimism/contracts-bedrock/src/deploy-utils
'
assertContractVariable
,
deploy
,
}
from
'
@eth-optimism/contracts-bedrock/src/deploy-utils
'
import
{
utils
}
from
'
ethers
'
import
{
utils
}
from
'
ethers
'
const
{
getAddress
}
=
utils
const
{
getAddress
}
=
utils
...
@@ -16,6 +13,11 @@ const { getAddress } = utils
...
@@ -16,6 +13,11 @@ const { getAddress } = utils
*/
*/
const
deployFn
:
DeployFunction
=
async
(
hre
:
HardhatRuntimeEnvironment
)
=>
{
const
deployFn
:
DeployFunction
=
async
(
hre
:
HardhatRuntimeEnvironment
)
=>
{
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
const
ddd
=
hre
.
deployConfig
.
ddd
if
(
getAddress
(
deployer
)
!==
getAddress
(
ddd
))
{
throw
new
Error
(
'
Must deploy with the ddd
'
)
}
console
.
log
(
`Deploying AttestationStationProxy with
${
deployer
}
`
)
console
.
log
(
`Deploying AttestationStationProxy with
${
deployer
}
`
)
...
@@ -23,15 +25,21 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
...
@@ -23,15 +25,21 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
'
AttestationStation
'
'
AttestationStation
'
)
)
await
deploy
({
const
{
deploy
}
=
await
hre
.
deployments
.
deterministic
(
hre
,
'
AttestationStationProxy
'
,
name
:
'
AttestationStationProxy
'
,
{
contract
:
'
Proxy
'
,
salt
:
hre
.
ethers
.
utils
.
solidityKeccak256
(
args
:
[
deployer
],
[
'
string
'
],
postDeployAction
:
async
(
contract
)
=>
{
[
'
AttestationStationProxy
'
]
await
assertContractVariable
(
contract
,
'
admin
'
,
deployer
)
),
},
contract
:
'
Proxy
'
,
})
from
:
deployer
,
args
:
[
deployer
],
log
:
true
,
}
)
await
deploy
()
const
Deployment__AttestationStationProxy
=
await
hre
.
deployments
.
get
(
const
Deployment__AttestationStationProxy
=
await
hre
.
deployments
.
get
(
'
AttestationStationProxy
'
'
AttestationStationProxy
'
...
@@ -44,6 +52,11 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
...
@@ -44,6 +52,11 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const
Proxy
=
await
hre
.
ethers
.
getContractAt
(
'
Proxy
'
,
addr
)
const
Proxy
=
await
hre
.
ethers
.
getContractAt
(
'
Proxy
'
,
addr
)
const
AttestationStation
=
await
hre
.
ethers
.
getContractAt
(
'
AttestationStation
'
,
addr
)
const
implementation
=
await
Proxy
.
callStatic
.
implementation
()
const
implementation
=
await
Proxy
.
callStatic
.
implementation
()
console
.
log
(
`implementation is set to
${
implementation
}
`
)
console
.
log
(
`implementation is set to
${
implementation
}
`
)
if
(
if
(
...
@@ -76,6 +89,9 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
...
@@ -76,6 +89,9 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
console
.
log
(
'
admin already set to L2 Proxy Owner Address
'
)
console
.
log
(
'
admin already set to L2 Proxy Owner Address
'
)
}
}
console
.
log
(
'
Contract deployment complete
'
)
console
.
log
(
'
Contract deployment complete
'
)
// Assert that the variables are set correctly
assertContractVariable
(
AttestationStation
,
'
version
'
,
'
0.0.1
'
)
}
}
deployFn
.
tags
=
[
'
AttestationStationProxy
'
]
deployFn
.
tags
=
[
'
AttestationStationProxy
'
]
...
...
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