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
47629fed
Commit
47629fed
authored
May 11, 2023
by
tre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create deployment script for Faucet and FaucetAuthModules
parent
a5a55290
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
175 additions
and
1 deletion
+175
-1
hardhat.ts
packages/contracts-periphery/config/deploy/hardhat.ts
+8
-0
Faucet.ts
packages/contracts-periphery/deploy/faucet/Faucet.ts
+29
-0
GithubFaucetAuthModule.ts
...phery/deploy/faucet/authmodules/GithubFaucetAuthModule.ts
+37
-0
OptimistFaucetAuthModule.ts
...ery/deploy/faucet/authmodules/OptimistFaucetAuthModule.ts
+37
-0
deploy.ts
packages/contracts-periphery/src/config/deploy.ts
+64
-1
No files found.
packages/contracts-periphery/config/deploy/hardhat.ts
View file @
47629fed
...
@@ -12,6 +12,14 @@ const config: DeployConfig = {
...
@@ -12,6 +12,14 @@ const config: DeployConfig = {
'
0x70997970c51812dc3a010c7d01b50e0d17dc79c8
'
,
'
0x70997970c51812dc3a010c7d01b50e0d17dc79c8
'
,
optimistAllowlistCoinbaseQuestAttestor
:
optimistAllowlistCoinbaseQuestAttestor
:
'
0x70997970c51812dc3a010c7d01b50e0d17dc79c8
'
,
'
0x70997970c51812dc3a010c7d01b50e0d17dc79c8
'
,
faucetAdmin
:
''
,
faucetName
:
''
,
githubFamAdmin
:
''
,
githubFamName
:
''
,
githubFamVersion
:
''
,
optimistFamAdmin
:
''
,
optimistFamName
:
''
,
optimistFamVersion
:
''
,
}
}
export
default
config
export
default
config
packages/contracts-periphery/deploy/faucet/Faucet.ts
0 → 100644
View file @
47629fed
/* Imports: External */
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
HardhatRuntimeEnvironment
}
from
'
hardhat/types
'
import
'
@nomiclabs/hardhat-ethers
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
hardhat-deploy
'
import
type
{
DeployConfig
}
from
'
../../src
'
const
deployFn
:
DeployFunction
=
async
(
hre
:
HardhatRuntimeEnvironment
)
=>
{
const
deployConfig
=
hre
.
deployConfig
as
DeployConfig
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
console
.
log
(
'
Deploying Faucet
'
)
const
{
deploy
}
=
await
hre
.
deployments
.
deterministic
(
'
Faucet
'
,
{
salt
:
hre
.
ethers
.
utils
.
solidityKeccak256
([
'
string
'
],
[
'
Faucet
'
]),
from
:
deployer
,
args
:
[
deployConfig
.
faucetAdmin
],
log
:
true
,
})
const
result
=
await
deploy
()
console
.
log
(
`Faucet deployed to
${
result
.
address
}
`
)
}
deployFn
.
tags
=
[
'
Faucet
'
,
'
FaucetEnvironment
'
]
export
default
deployFn
packages/contracts-periphery/deploy/faucet/authmodules/GithubFaucetAuthModule.ts
0 → 100644
View file @
47629fed
/* Imports: External */
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
HardhatRuntimeEnvironment
}
from
'
hardhat/types
'
import
'
@nomiclabs/hardhat-ethers
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
hardhat-deploy
'
import
type
{
DeployConfig
}
from
'
../../../src
'
const
deployFn
:
DeployFunction
=
async
(
hre
:
HardhatRuntimeEnvironment
)
=>
{
const
deployConfig
=
hre
.
deployConfig
as
DeployConfig
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
const
{
deploy
}
=
await
hre
.
deployments
.
deterministic
(
'
AdminFaucetAuthModule
'
,
{
salt
:
hre
.
ethers
.
utils
.
solidityKeccak256
(
[
'
string
'
],
[
'
AdminFaucetAuthModule
'
]
),
from
:
deployer
,
args
:
[
deployConfig
.
githubFamAdmin
,
deployConfig
.
githubFamName
,
deployConfig
.
githubFamVersion
,
],
log
:
true
,
}
)
await
deploy
()
}
deployFn
.
tags
=
[
'
Faucet
'
,
'
FaucetEnvironment
'
]
export
default
deployFn
packages/contracts-periphery/deploy/faucet/authmodules/OptimistFaucetAuthModule.ts
0 → 100644
View file @
47629fed
/* Imports: External */
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
{
HardhatRuntimeEnvironment
}
from
'
hardhat/types
'
import
'
@nomiclabs/hardhat-ethers
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
'
hardhat-deploy
'
import
type
{
DeployConfig
}
from
'
../../../src
'
const
deployFn
:
DeployFunction
=
async
(
hre
:
HardhatRuntimeEnvironment
)
=>
{
const
deployConfig
=
hre
.
deployConfig
as
DeployConfig
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
const
{
deploy
}
=
await
hre
.
deployments
.
deterministic
(
'
AdminFaucetAuthModule
'
,
{
salt
:
hre
.
ethers
.
utils
.
solidityKeccak256
(
[
'
string
'
],
[
'
AdminFaucetAuthModule
'
]
),
from
:
deployer
,
args
:
[
deployConfig
.
optimistFamAdmin
,
deployConfig
.
optimistFamName
,
deployConfig
.
optimistFamVersion
,
],
log
:
true
,
}
)
await
deploy
()
}
deployFn
.
tags
=
[
'
Faucet
'
,
'
FaucetEnvironment
'
]
export
default
deployFn
packages/contracts-periphery/src/config/deploy.ts
View file @
47629fed
...
@@ -54,6 +54,46 @@ export interface DeployConfig {
...
@@ -54,6 +54,46 @@ export interface DeployConfig {
*/
*/
optimistAllowlistCoinbaseQuestAttestor
:
string
optimistAllowlistCoinbaseQuestAttestor
:
string
/**
* Address of privileged account for the Faucet contract.
*/
faucetAdmin
:
string
/**
* Name of Faucet contract.
*/
faucetName
:
string
/**
* Address of admin account for the Github FaucetAuthModule.
*/
githubFamAdmin
:
string
/**
* Name of Github FaucetAuthModule contract, used for the EIP712 domain separator.
*/
githubFamName
:
string
/**
* Version of Github FaucetAuthModule contract, used for the EIP712 domain separator.
*/
githubFamVersion
:
string
/**
* Address of admin account for Optimist FaucetAuthModule.
*/
optimistFamAdmin
:
string
/**
* Name of Optimist FaucetAuthModule contract, used for the EIP712 domain separator.
*/
optimistFamName
:
string
/**
* Version of Optimist FaucetAuthModule contract, used for the EIP712 domain separator.
*/
optimistFamVersion
:
string
/**
/**
* Address of the owner of the proxies on L2. There will be a ProxyAdmin deployed as a predeploy
* Address of the owner of the proxies on L2. There will be a ProxyAdmin deployed as a predeploy
* after bedrock, so the owner of proxies should be updated to that after the upgrade.
* after bedrock, so the owner of proxies should be updated to that after the upgrade.
...
@@ -98,7 +138,30 @@ export const configSpec: DeployConfigSpec<DeployConfig> = {
...
@@ -98,7 +138,30 @@ export const configSpec: DeployConfigSpec<DeployConfig> = {
optimistAllowlistCoinbaseQuestAttestor
:
{
optimistAllowlistCoinbaseQuestAttestor
:
{
type
:
'
address
'
,
type
:
'
address
'
,
},
},
faucetAdmin
:
{
type
:
'
address
'
,
},
faucetName
:
{
type
:
'
string
'
,
},
githubFamAdmin
:
{
type
:
'
address
'
,
},
githubFamName
:
{
type
:
'
string
'
,
},
githubFamVersion
:
{
type
:
'
string
'
,
},
optimistFamAdmin
:
{
type
:
'
address
'
,
},
optimistFamName
:
{
type
:
'
string
'
,
},
optimistFamVersion
:
{
type
:
'
string
'
,
},
l2ProxyOwnerAddress
:
{
l2ProxyOwnerAddress
:
{
type
:
'
address
'
,
type
:
'
address
'
,
},
},
...
...
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