Skip to content

Commit 902abc2

Browse files
committed
add script to deploy all registries at once
1 parent 20d41da commit 902abc2

8 files changed

+539
-13
lines changed

deployments.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ polygon:
7272
TricryptoFactoryNGHandler: '0xf46D25696677898454dfDd644830C821243A1188'
7373
TwocryptoFactoryNGHandler: '0xb00e89eabd59cd3254c88e390103cf17e914f678'
7474
zksync:
75-
Metaregistry: '0x48e4b27553e7643E10229ea3cba91c188dc524B1'
76-
StableswapFactoryNGHandler: '0x4Cabf81fbf1F42531d55507F38Be77367481a8dF'
77-
TricryptoFactoryNGHandler: '0xf3f38b1677553789A048FFf4A2CeedCDf063309e'
78-
TwocryptoFactoryNGHandler: '0x0F3d82D719582BcaB662F434D77B089C86D05FAb'
75+
AddressProvider: '0xBF664Ac8e934230FC6A381702678cc29661d38D5'
76+
Metaregistry: ''
77+
RateProvider: '0x9eB20D123F877f06c93CE82De4507B0911dFA783'
78+
StableswapFactoryNGHandler: ''
79+
TricryptoFactoryNGHandler: ''
80+
TwocryptoFactoryNGHandler: ''

scripts/add_new_id_addressprovider.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
from eth_account import Account
1212
from rich.console import Console as RichConsole
1313

14+
import sys
15+
sys.path.append("./")
16+
1417
from scripts.address_provider_constants import (
1518
ADDRESS_PROVIDER_MAPPING,
1619
addresses,
@@ -100,7 +103,7 @@ def main(network, fork, url):
100103
import boa_zksync
101104

102105
url = "https://mainnet.era.zksync.io"
103-
ADDRESS_PROVIDER = "0x54A5a69e17Aa6eB89d77aa3828E38C9Eb4fF263D"
106+
ADDRESS_PROVIDER = "0x3934a3bB913E4a44316a89f5a83876B9C63e4F31"
104107
elif network == "fraxtal":
105108
network_url = "https://rpc.frax.com"
106109
elif network == "kava":

scripts/address_provider_constants.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@
309309
"zksync": {
310310
2: "0x7C915390e109CA66934f1eB285854375D1B127FA", # 2: "Exchange Router",
311311
4: "0xCb8799BFF48bb549F7B69Bb9BE60DbA7cd4F1BB7", # 4: "Fee Distributor",
312-
11: "0x5044112fDf6c8DCc788a669c17345cfDB06549fa", # 11: "TricryptoNG Factory",
313-
12: "0x375444aeDEb6C3db897f293E1DBa85D7422A6859", # 12: "StableswapNG Factory",
314-
13: "0x24992A09E2257AF325102Cefa1F09E80E9062d49", # 13: "TwocryptoNG Factory",
312+
11: "0x5d4174C40f1246dABe49693845442927d5929f0D", # 11: "TricryptoNG Factory",
313+
12: "0xFcAb5d04e8e031334D5e8D2C166B08daB0BE6CaE", # 12: "StableswapNG Factory",
314+
13: "0xf3a546AF64aFd6BB8292746BA66DB33aFAE72114", # 13: "TwocryptoNG Factory",
315315
19: "0x5945932099f124194452a4c62d34bB37f16183B2", # 19: "CRV Token",
316316
20: "", # 20: "Gauge Factory",
317317
21: "", # 21: "Ownership Admin",

scripts/deploy_addressprovider_and_setup_zksync.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AddressProvider deployed on zksync at: 0x54A5a69e17Aa6eB89d77aa3828E38C9Eb4fF263D
1+
# AddressProvider deployed on zksync at: 0x3934a3bB913E4a44316a89f5a83876B9C63e4F31
22

33
import os
44

scripts/deploy_metaregistryl2.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,11 @@ def main(network, fork, url):
262262
console.log("Deploying Metaregistry ...")
263263
gauge_factory = address_provider.get_address(20) # 20 is for Gauge Factory
264264
gauge_type = GAUGE_TYPE[network]
265+
266+
deploy_mregistry = metaregistry_address == ZERO_ADDRESS
267+
deploy_mregistry = False
265268

266-
if metaregistry_address == ZERO_ADDRESS:
269+
if deploy_mregistry:
267270
metaregistry = deploy_and_cache_contracts(
268271
network,
269272
"Metaregistry",
@@ -303,9 +306,8 @@ def main(network, fork, url):
303306

304307
if network == "zksync":
305308
import boa_zksync
306-
307309
url = "https://mainnet.era.zksync.io"
308-
ADDRESS_PROVIDER = "0x54A5a69e17Aa6eB89d77aa3828E38C9Eb4fF263D"
310+
ADDRESS_PROVIDER = "0x3934a3bB913E4a44316a89f5a83876B9C63e4F31"
309311
elif network == "fraxtal":
310312
network_url = "https://rpc.frax.com"
311313
elif network == "kava":

scripts/deploy_rate_provider.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def main(network, fork, url):
6969
import boa_zksync
7070

7171
network_url = "https://mainnet.era.zksync.io"
72-
ADDRESS_PROVIDER = "0x54A5a69e17Aa6eB89d77aa3828E38C9Eb4fF263D"
72+
ADDRESS_PROVIDER = "0x3934a3bB913E4a44316a89f5a83876B9C63e4F31"
7373
elif network == "fraxtal":
7474
network_url = "https://rpc.frax.com"
7575
elif network == "kava":

0 commit comments

Comments
 (0)