Skip to content

feat: add support for base deployments #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const w3fImplementationsPath = './web3-functions'
const w3fConfigsPath = './scripts/configs'
const abisPath = './abis'

const domains = ['mainnet', 'gnosis']
const domains = ['mainnet', 'gnosis', 'base']
type Domain = (typeof domains)[number]

const triggerTypeNames = ['block', 'cron', 'event', 'time']
Expand Down Expand Up @@ -135,6 +135,7 @@ const passwordPath = process.env.GELATO_PASSWORD_PATH as string
const envPrivateKey = process.env.GELATO_PRIVATE_KEY as string
const mainnetRpcUrl = process.env.MAINNET_RPC_URL as string
const gnosisRpcUrl = process.env.GNOSIS_CHAIN_RPC_URL as string
const baseRpcUrl = process.env.BASE_RPC_URL as string

const deployerPrivateKey =
envPrivateKey || (keystorePath && passwordPath && retrievePrivateKeyFromKeystore(keystorePath, passwordPath))
Expand All @@ -144,16 +145,19 @@ if (!deployerPrivateKey) throw new Error('Private key is not configured')
const deployerWallets: Record<Domain, Wallet> = {
mainnet: new Wallet(deployerPrivateKey, new providers.JsonRpcProvider(mainnetRpcUrl)),
gnosis: new Wallet(deployerPrivateKey, new providers.JsonRpcProvider(gnosisRpcUrl)),
base: new Wallet(deployerPrivateKey, new providers.JsonRpcProvider(baseRpcUrl)),
}

const automationSDKs: Record<Domain, AutomateSDK> = {
mainnet: new AutomateSDK(1, deployerWallets.mainnet),
gnosis: new AutomateSDK(100, deployerWallets.gnosis),
base: new AutomateSDK(8453, deployerWallets.base),
}

const managementSDKs: Record<Domain, Web3Function> = {
mainnet: new Web3Function(1, deployerWallets.mainnet),
gnosis: new Web3Function(100, deployerWallets.gnosis),
base: new Web3Function(8453, deployerWallets.base),
}

const prompter = readline.createInterface({
Expand Down
Loading