Commit 47629fed authored by tre's avatar tre

Create deployment script for Faucet and FaucetAuthModules

parent a5a55290
...@@ -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
/* 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
/* 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
/* 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
...@@ -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',
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment