Skip to content

Commit a5eaad0

Browse files
committed
update addresses for mantle addressprovider
1 parent 03b8279 commit a5eaad0

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

scripts/add_new_id_addressprovider.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@
1111
from eth_account import Account
1212
from rich.console import Console as RichConsole
1313

14-
# sys.path.append("./")
1514
from scripts.address_provider_constants import (
1615
ADDRESS_PROVIDER_MAPPING,
1716
addresses,
1817
)
1918

20-
# import sys
21-
22-
2319
FIDDY_DEPLOYER = "0x2d12D0907A388811e3AA855A550F959501d303EE"
2420
ADDRESS_PROVIDER = "0x5ffe7FB82894076ECB99A30D6A32e969e6e35E98"
2521

@@ -64,16 +60,28 @@ def main(network, fork):
6460
address = addresses[network][id]
6561
description = ADDRESS_PROVIDER_MAPPING[id]
6662
existing_id = address_provider.get_id_info(id)
67-
if existing_id[0].lower() != address.lower():
68-
console.log(f"Adding {address} for {description} to id: {id} ...")
63+
64+
if (
65+
existing_id[0].lower()
66+
== "0x0000000000000000000000000000000000000000"
67+
):
68+
console.log(f"New id {id} at {address} for {description}.")
6969
ids.append(id)
7070
addresses_for_id.append(address)
7171
descriptions.append(description)
7272

73+
elif existing_id[0].lower() != address.lower():
74+
console.log(f"Updating id {id} for {description} with {address}.")
75+
address_provider.update_id(id, address, description)
76+
7377
if len(ids) > 20:
7478
raise
7579

76-
address_provider.add_new_ids(ids, addresses_for_id, descriptions)
80+
if len(ids) > 0:
81+
console.log("Adding new IDs to the Address Provider.")
82+
address_provider.add_new_ids(ids, addresses_for_id, descriptions)
83+
84+
console.log("Done!")
7785

7886

7987
if __name__ == "__main__":

scripts/address_provider_constants.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,20 @@
279279
13: "0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F",
280280
},
281281
"mantle": {
282+
2: "0x69522fb5337663d3B4dFB0030b881c1A750Adb4f", # curve router sidechain v1.0
282283
4: "0xf3A431008396df8A8b2DF492C913706BDB0874ef",
283284
11: "0x0C9D8c7e486e822C29488Ff51BFf0167B4650953",
284285
12: "0x5eeE3091f747E60a045a2E715a4c71e600e31F6E",
285286
13: "0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F",
286-
19: "0xcfD1D50ce23C46D3Cf6407487B2F8934e96DC8f9", # CRV
287-
21: "0xfe87a6cdca1eeb90987c6a196a1c5f5c76f5f2b0",
288-
22: "0x024d362f7aa162d8591304016fd60a209efc527e",
289-
23: "0x4339b53cf7f6eec1a997ceea81165e45c1244429",
290-
24: "0x77A214bd4ee3650e5608339BBbE04b09f5546ECF",
291-
25: "0xc8058960a9d7e7d81143bdba38d19e6824165932", # crvUSD
287+
14: "0x0fE38dCC905eC14F6099a83Ac5C93BF2601300CF", # StableCalc
288+
15: "0xd6681e74eEA20d196c15038C580f721EF2aB6320", # CryptoCalc
289+
20: "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c", # Child Gauge Factory
290+
19: "0xE265FC71d45fd791c9ebf3EE0a53FBB220Eb8f75", # CRV
291+
21: "0xd9D5d94A3815ea8240a2dF91D0c3D0829927bB16", # ownership admin
292+
22: "0xD77ac12A13eD114105DaDfF30DFF90E74b885B7e", # parameter admin
293+
23: "0x4339b53cf7f6eec1a997ceea81165e45c1244429", # Emergency admin
294+
24: "0xA38dEBfadd6EE6211E4f14062b9Fb9AAe7Fef135", # Vault
295+
25: "0x0994206dfE8De6Ec6920FF4D779B0d950605Fb53", # crvUSD
292296
},
293297
"scroll": {
294298
4: "0xf3A431008396df8A8b2DF492C913706BDB0874ef",

0 commit comments

Comments
 (0)