From e7a062a95cf38253f3b2ee020c98110555329caa Mon Sep 17 00:00:00 2001 From: tim Date: Fri, 4 Oct 2024 01:33:13 -0400 Subject: [PATCH] ARBITRUM ONE DEPLOYED --- backend | 2 +- bin/arb1/init-deploy | 37 +++++++++++++++++++++++++++++++++++++ contract | 2 +- doc/arb1-deploy.md | 43 +++++++++++++++++++++++++------------------ web | 2 +- 5 files changed, 65 insertions(+), 21 deletions(-) create mode 100755 bin/arb1/init-deploy diff --git a/backend b/backend index a4f576d..c60bc21 160000 --- a/backend +++ b/backend @@ -1 +1 @@ -Subproject commit a4f576d6ecebbd23eb940ae8b1afbc0e6107a33a +Subproject commit c60bc219f6a6b0a8b7f536eb85380b14c4026dd8 diff --git a/bin/arb1/init-deploy b/bin/arb1/init-deploy new file mode 100755 index 0000000..5e103bb --- /dev/null +++ b/bin/arb1/init-deploy @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +TAG=arb1 +RPC=${RPC_URL:-arbitrum_alchemy} +CHAINID=42161 + +cd contract || exit 1 + +# force clean build +rm -rf out/ broadcast/ cache/ +bin/build --skip Test || exit 1 + +rm -rf deployment/"$TAG"/out +mkdir -p deployment/"$TAG" +cp -r out deployment/"$TAG"/ + +cpbroadcast() { + CONTRACT=$1 + mkdir -p deployment/"$TAG"/broadcast/"$CONTRACT"/"$CHAINID" + cp broadcast/"$CONTRACT"/"$CHAINID"/run-latest.json deployment/"$TAG"/broadcast/"$CONTRACT"/"$CHAINID"/run-latest.json +} + +if [ "$1" == "broadcast" ]; then + BROADCAST=--broadcast +else + BROADCAST= +fi + +# trezor account 0 is the admin account +forge script script/DeployArbitrum.sol -vvvv --fork-url "$RPC" --trezor --mnemonic-indexes 0 "$BROADCAST" + +if [ "$1" == 'broadcast' ]; then + cpbroadcast DeployArbitrum.sol + echo Saved deployment files. +else + echo Deployment NOT broadcast \(use \'broadcast\' argument\) +fi diff --git a/contract b/contract index a91056d..5ff3e32 160000 --- a/contract +++ b/contract @@ -1 +1 @@ -Subproject commit a91056d2329a646e1f949572cedb6ee7df7c8aaa +Subproject commit 5ff3e3285c53b0e33316647d26d0d9e00652b9b6 diff --git a/doc/arb1-deploy.md b/doc/arb1-deploy.md index edcc8c2..2d6d652 100644 --- a/doc/arb1-deploy.md +++ b/doc/arb1-deploy.md @@ -2,16 +2,23 @@ ## Contracts -| Contract | Address | Cost | -|----------------|---------------------------------------------|-----------------------------------------------| -| ArbitrumRouter | | | -| Dexorder | | | -| FeeManager | | | -| QueryHelper | | | -| VaultFactory | | | -| VaultImpl | | | -| -------------- | ------------------------------------------- | --------------------------------------------- | -| Total | | | +| Contract | Address | Cost | +|----------------|--------------------------------------------|---------------------------------------------| +| ArbitrumRouter | 0x0d1C3Ef315E95f0687dD750d301F90640CFbB538 | 0.00002125181 ETH (2125181 gas * 0.01 gwei) | +| Dexorder | 0xcc5465A5f87dd3EE7908610E742159FfaA22a7c3 | 0.00000764635 ETH (764635 gas * 0.01 gwei) | +| FeeManager | 0x5610ef201A396DCA9cbEd3cACb21bF786671dF9B | 0.00001492179 ETH (1492179 gas * 0.01 gwei) | +| QueryHelper | 0x97b3C3Af43c8d3e7bCCB398C1237a511a8DC42Db | 0.0000097769 ETH (977690 gas * 0.01 gwei) | +| VaultFactory | 0xC2D51971aEe76E7498C7FD6D3EBF261f373B622f | 0.000019627 ETH (1962700 gas * 0.01 gwei) | +| VaultImpl | 0x679735cEb6b61b6548C901322Dd2B44e1D963B26 | 0.00005813201 ETH (5813201 gas * 0.01 gwei) | +| -------------- | ------------------------------------------ | ------------------------------------------- | +| Total | | | + + +VaultFactory +VaultImpl 0x679735cEb6b61b6548C901322Dd2B44e1D963B26 +FeeManager 0x5610ef201A396DCA9cbEd3cACb21bF786671dF9B +Dexorder 0xcc5465A5f87dd3EE7908610E742159FfaA22a7c3 +QueryHelper 0x97b3C3Af43c8d3e7bCCB398C1237a511a8DC42Db ### Vault Init Code Hash 0x... @@ -19,17 +26,17 @@ ## Accounts -| Name | Address | Description | -|---------|--------------------------------------------|----------------------------------------------------------------------------| -| admin | | deploys contracts, is upgrader, runs mirrorprice, funded from from faucets | -| vaulter | | deploys vaults | -| place | | receives order placement fees | -| gas | | receives gas fees | -| fill | | receives fill fees | +| Index | Name | Address | Description | +|------:|---------|--------------------------------------------|--------------------------------| +| 0 | admin | 0x12DB90820DAFed100E40E21128E40Dcd4fF6B331 | deploys contracts, is upgrader | +| 1 | vaulter | 0x0E280F5eDA58872d7cDaA8AC0A57A55fD6133AEd | deploys vaults | +| 2 | place | 0x078E0C1112262433375b9aaa987BfF09a08e863C | receives order placement fees | +| 3 | gas | 0x411c418C005EBDefB551e5E6B734520Ef2591f51 | receives gas fees | +| 4 | fill | 0x152a3a04cE063dC77497aA06b6A09FeFD271E716 | receives fill fees | ## Deployment Steps 1. `kubectl apply -f deploy/k8s/postgres.yaml -f deploy/k8s/redis.yaml` 2. `bin/arb1/finaldata-deploy` -3. \ No newline at end of file +3. `bin/arb1/init-deploy broadcast` diff --git a/web b/web index dff1a6b..af17b15 160000 --- a/web +++ b/web @@ -1 +1 @@ -Subproject commit dff1a6b6358348e6bf7d96b440a18cf3e4065210 +Subproject commit af17b153145b487bd0b728a23a20ae84eb61af28