Skip to content

Commit

Permalink
Merge pull request #13 from clober-dex/feat/deploy
Browse files Browse the repository at this point in the history
feat: Arbitrage deploy
  • Loading branch information
JhChoy authored Jul 23, 2024
2 parents bef2369 + 23f2db9 commit da2663b
Show file tree
Hide file tree
Showing 5 changed files with 1,315 additions and 5 deletions.
10 changes: 5 additions & 5 deletions deploy/Arbitrage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { DeployFunction } from 'hardhat-deploy/types'
import { BOOK_MANAGER, deployWithVerify, SAFE_WALLET } from '../utils'
import { getChain, isDevelopmentNetwork } from '@nomicfoundation/hardhat-viem/internal/chains'
import { Address } from 'viem'
import { arbitrum } from 'viem/chains'

const deployFunction: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts, network } = hre
Expand All @@ -14,13 +13,14 @@ const deployFunction: DeployFunction = async function (hre: HardhatRuntimeEnviro
return
}

let owner: Address = '0x'
let owner: Address
if (chain.testnet || isDevelopmentNetwork(chain.id)) {
owner = deployer
} else if (chain.id === arbitrum.id) {
owner = SAFE_WALLET[chain.id] // Safe
} else {
throw new Error('Unknown chain')
owner = SAFE_WALLET[chain.id] // Safe
if (owner == undefined) {
throw new Error('Unknown chain')
}
}

await deployWithVerify(hre, 'Arbitrage', [BOOK_MANAGER[chain.id], owner])
Expand Down
481 changes: 481 additions & 0 deletions deployments/421614/Arbitrage.json

Large diffs are not rendered by default.

Loading

0 comments on commit da2663b

Please sign in to comment.