Skip to content

Commit

Permalink
feat: add mainnet deployments and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
blockgroot committed Jul 12, 2024
1 parent a512795 commit 8000195
Show file tree
Hide file tree
Showing 19 changed files with 2,526 additions and 23 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ $ forge test -v
| ETHx ProxyAdmin | 0xAAE054B9b822554dd1D9d1F48f892B4585D3bbf0 | Arbitrum |
| ETHx | 0xED65C5085a18Fa160Af0313E60dcc7905E944Dc7 | Arbitrum |
| ETHx_OFT | 0x6904603c27392310D19E389105CA792FB935C43C | Arbitrum |
| ETHxPoolV1 | 0x107E427848937C4217C0efc1C3f35091de08E45e | Arbitrum |
| ETHxPoolV1 ProxyAdmin | 0xe9609DcbC830784b3b68D5b4162c5193Df5dfA98 | Arbitrum |
| ETHx ProxyAdmin | 0x8bc3646d175ECb081469Be6a0b2A10eeE112101C | Optimism |
| ETHx | 0xc54B43eaF921A5194c7973A4d65E055E5a1453c2 | Optimism |
| ETHx_OFT | 0x01aF04690d17DC27b891A7F67E9EEe4d14DE8EA8 | Optimism |
Expand All @@ -91,6 +93,8 @@ $ forge test -v
| ETHx | 0x52312ea29135A468417F0C71d6A75CfEA75351b7 | Arbitrum Sepolia |
| ETHx_OFT | 0x8AEDA11bD0C5fBafbFb142830d23812Df02A8424 | Arbitrum Sepolia |
| ETHxRateReceiver | 0x2b700f8b3F03798e7Db0e67a5aB48c12D10046DE | Arbitrum Sepolia |
| ETHxPoolV1 | 0xA6457927857107c1B6EBe82fe0d17E78ba03cb6A | Arbitrum Sepolia |
| ETHxPoolV1 ProxyAdmin | 0xe7a85781f16403C9AF078C81e603F8465870df7B | Arbitrum Sepolia |
| ETHx ProxyAdmin | 0xb30256CA8A9Ebe058Eb78a4edbf3364e7F8e5d86 | XLayer Testnet |
| ETHx | 0x7D03Bfa72Cd70e96A391cF32e7B27e43AE68a574 | XLayer Testnet |
| ETHx_OFT | 0xD99E8bA5259Dd2b8B9aBFE0eD78913ec60B8F898 | XLayer Testnet |
Expand Down
54 changes: 31 additions & 23 deletions deploy/ethxPoolV1.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
import assert from 'assert'

import { type DeployFunction } from 'hardhat-deploy/types'

const feeBps = 10;

const networkAddresses = {
arbitrumSepolia:{
"owner": "0xfcB068B43AB08aA9210F52eabd261A7a3b0C8357",
"bridger": "0xfcB068B43AB08aA9210F52eabd261A7a3b0C8357",
"ethx": "0x52312ea29135A468417F0C71d6A75CfEA75351b7",
"ethxOracle": "0x2b700f8b3F03798e7Db0e67a5aB48c12D10046DE"
},

arbitrum:{
"owner": "0xe85F0d083D0CD18485E531c1A8B8a05ad2C0308f",
"bridger": "0xc6160F5bC3C673AC390f11c492E8ED0d0693579A",
"ethx": "0xED65C5085a18Fa160Af0313E60dcc7905E944Dc7",
"ethxOracle": "0xB4AC4078DDA43d0eB6Bb9e08b8C12A73f9FEAA7d"
arbitrumsepolia: {
owner: "0xfcB068B43AB08aA9210F52eabd261A7a3b0C8357",
manager: "0xfcB068B43AB08aA9210F52eabd261A7a3b0C8357",
ethx: "0x52312ea29135A468417F0C71d6A75CfEA75351b7",
ethxOracle: "0x2b700f8b3F03798e7Db0e67a5aB48c12D10046DE"
},
arbitrumone: {
owner: "0xe85F0d083D0CD18485E531c1A8B8a05ad2C0308f",
manager: "0xc6160F5bC3C673AC390f11c492E8ED0d0693579A",
ethx: "0xED65C5085a18Fa160Af0313E60dcc7905E944Dc7",
ethxOracle: "0xB4AC4078DDA43d0eB6Bb9e08b8C12A73f9FEAA7d"
}
}

const deployETHxPool: DeployFunction = async (hre) => {
const { getNamedAccounts, deployments } = hre

const { deploy } = deployments
const { deployer } = await getNamedAccounts()

Expand All @@ -31,24 +28,35 @@ const deployETHxPool: DeployFunction = async (hre) => {
console.log(`Network: ${hre.network.name}`)
console.log(`Deployer: ${deployer}`)

const { arbitrumSepolia } = networkAddresses
const networkName = hre.network.name.toLowerCase()
const networkConfig = networkAddresses[networkName]
console.log(networkConfig);


assert(networkConfig, `No network configuration found for ${networkName}`)

const ethxPool = await deploy("ETHxPoolV1", {
from: deployer,
contract: "ETHxPoolV1",
proxy: {
owner: arbitrumSepolia.owner,
proxyContract: "OpenZeppelinTransparentProxy",
execute: {
methodName: "initialize",
args: [arbitrumSepolia.owner, arbitrumSepolia.bridger, arbitrumSepolia.ethx, feeBps, arbitrumSepolia.ethxOracle],
},
owner: networkConfig.owner,
proxyContract: "OpenZeppelinTransparentProxy",
execute: {
methodName: "initialize",
args: [
networkConfig.owner,
networkConfig.manager,
networkConfig.ethx,
feeBps,
networkConfig.ethxOracle
],
},
},
autoMine: true,
log: true,
});
});

console.log(`Deployed contract: ${"ETHxPoolV1"}, network: ${hre.network.name}, address: ${ethxPool.address}`)
console.log(`Deployed contract: ETHxPoolV1, network: ${hre.network.name}, address: ${ethxPool.address}`)
}

deployETHxPool.tags = ["ETHxPoolV1"]
Expand Down
1 change: 1 addition & 0 deletions deployments/arbitrumone/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
42161
259 changes: 259 additions & 0 deletions deployments/arbitrumone/DefaultProxyAdmin.json

Large diffs are not rendered by default.

Loading

0 comments on commit 8000195

Please sign in to comment.