Skip to content

Commit 2b21cdf

Browse files
authored
Merge pull request #5 from NFTX-project/deploy-arbitrum
Deploy to Arbitrum
2 parents 524a68f + e386077 commit 2b21cdf

File tree

51 files changed

+26037
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+26037
-34
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Large diffs are not rendered by default.

addresses.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,26 @@
1919
"UniswapV3FactoryUpgradeable": "0xa70e10beB02fF9a44007D9D3695d4b96003db101",
2020
"WETH": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
2121
},
22+
"arbitrum": {
23+
"CreateVaultZap": "0xF9E891AB1ECa89B7A4B3cBD45aEBFDF3Ec38946F",
24+
"DefaultProxyAdmin": "0xdA7C2F023Dd30329d41483B95AFd24962f468A54",
25+
"FailSafe": "0xBDA73b600435BF4309270438842dcE06f9a06fb7",
26+
"MarketplaceUniversalRouterZap": "0xf56296B3010a59Ef7F0915569DD44E1302b9Ca40",
27+
"MigratorZap": "0x6E1537eD56f52414f0182FaebF79A5fB2Ad2CABd",
28+
"NFTXEligibilityManager": "0x6DCdfD7e94957cBAE9023c232dE18c0F72c2aD16",
29+
"NFTXFeeDistributorV3": "0x0d50970C7848ebbE52661e70057D7D063B7de886",
30+
"NFTXInventoryStakingV3Upgradeable": "0xe39a7E67d3E3b6eAF58BC02C4E80C3688847d155",
31+
"NFTXRouter": "0x52731751Dede22827ad47109f5e9697d75a3ef4d",
32+
"nftxUniversalRouter": "0x4529ad73b2cc8d4db0b0deba90de165e35c4b628",
33+
"NFTXVaultFactoryUpgradeableV3": "0x4dEeb9D2Bff2e9C35ce1f013DcC4582F891cb711",
34+
"NonfungiblePositionManager": "0x8AD238377531547838370B9C4aC346b9Ed5466Ea",
35+
"permit2": "0x000000000022d473030f116ddee9f6b43ac78ba3",
36+
"QuoterV2": "0xff3957CB28aB34186543281e0bbe0De05C9e7D6D",
37+
"SwapRouter": "0xeA60242d7183E3d13Dc17fb2A4D0230d34eef502",
38+
"TickLens": "0x3f2797b0E19CBf2377B8DE2d1CEC2698AcA7b081",
39+
"UniswapV3FactoryUpgradeable": "0xF4D0512FB47319B0CE9144EF582862e2921CaBF8",
40+
"WETH": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"
41+
},
2242
"sepolia": {
2343
"CreateVaultZap": "0xD80b916470F8e79FD8d09874cb159CbB8D13d8da",
2444
"DefaultProxyAdmin": "0x36cBBb16F2FA71d4B773E9F4A11cF7FC53B13EfD",

deploy/deployConfig.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const config: {
8181
...commonConfig,
8282
treasury: "0x40D73Df4F99bae688CE3C23a01022224FE16C7b2",
8383
WETH: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
84-
REWARD_TIER_CARDINALITY: "102",
84+
REWARD_TIER_CARDINALITY: "102", // average block time = 12 seconds (https://etherscan.io/chart/blocktime). Cardinality = (20mins * 60) / 12 = 100. then adding 2 extra blocks for good measures.
8585
permit2: "0x000000000022d473030f116ddee9f6b43ac78ba3",
8686
nftxUniversalRouter: "0x250d62a67254A46c0De472d2c9215E1d890cC90f", // NOTE: update this if new UniswapV3Factory deployed.
8787
v2VaultFactory: "0xBE86f647b167567525cCAAfcd6f881F1Ee558216",
@@ -91,14 +91,15 @@ const config: {
9191
},
9292
arbitrum: {
9393
...commonConfig,
94-
treasury: "0x000000000000000000000000000000000000dEaD", // FIXME: set valid address
94+
treasury: "0x3863A65CE278a240f9Aa2A4b4A48493bE59E6139",
9595
WETH: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
96-
REWARD_TIER_CARDINALITY: "75",
96+
REWARD_TIER_CARDINALITY: "4617", // average block time = 0.26 seconds (https://arbiscan.io/chart/blocktime). Cardinality = (20mins * 60) / 0.26 = 4615. then adding 2 extra blocks for good measures.
9797
permit2: "0x000000000022d473030f116ddee9f6b43ac78ba3",
98-
nftxUniversalRouter: "0x000000000000000000000000000000000000dEaD", // FIXME: set valid address
98+
nftxUniversalRouter: "0x4529ad73b2cc8d4db0b0deba90de165e35c4b628", // NOTE: update this if new UniswapV3Factory deployed.
9999
v2VaultFactory: "0xE77b89FEc41A7b7dC74eb33602e82F0672FbB33C",
100100
v2Inventory: "0x1A2C03ABD4Af7C87d8b4d5aD39b56fa98E8C4Cc6",
101101
sushiRouter: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",
102+
multisig: "0x3863A65CE278a240f9Aa2A4b4A48493bE59E6139",
102103
},
103104
};
104105

deploy/utils/index.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import path from "path";
55
import { format } from "prettier";
66
import { keccak256, toUtf8Bytes, defaultAbiCoder } from "ethers/lib/utils";
77
import deployConfig from "../deployConfig";
8+
import { Contract } from "ethers";
89

910
export const getConfig = async (hre: HardhatRuntimeEnvironment) => {
1011
const { deployments, getNamedAccounts, network } = hre;
@@ -118,13 +119,16 @@ export const handleUpgradeDeploy = async ({
118119
}): Promise<Deployment> => {
119120
const { deploy, network, deployments } = await getConfig(hre);
120121

121-
const defaultProxyAdminContract = await getContract(hre, "DefaultProxyAdmin");
122-
123-
// set the current owner of the proxy, in the deployOptions
124-
deployOptions.proxy = {
125-
...(typeof deployOptions.proxy === "object" ? deployOptions.proxy : {}),
126-
owner: await defaultProxyAdminContract.owner(),
127-
};
122+
let defaultProxyAdminContract: Contract | undefined;
123+
try {
124+
// if the DefaultProxyAdmin is already deployed
125+
defaultProxyAdminContract = await getContract(hre, "DefaultProxyAdmin");
126+
// set the current owner of the proxy, in the deployOptions
127+
deployOptions.proxy = {
128+
...(typeof deployOptions.proxy === "object" ? deployOptions.proxy : {}),
129+
owner: await defaultProxyAdminContract.owner(),
130+
};
131+
} catch {}
128132

129133
let deployment: Deployment | undefined = undefined;
130134
try {

deployments/arbitrum/.chainId

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
42161

0 commit comments

Comments
 (0)