From d080bbede88a3c6c329411b46f93bbd021dc9179 Mon Sep 17 00:00:00 2001 From: Shane Fontaine <9441295+shanefontaine@users.noreply.github.com> Date: Mon, 29 Jan 2024 08:02:41 -0800 Subject: [PATCH 1/2] feat: Update Hop addresses --- src/adapters/hop/index.ts | 70 ++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 19 deletions(-) diff --git a/src/adapters/hop/index.ts b/src/adapters/hop/index.ts index 13343b83..4fd962bc 100644 --- a/src/adapters/hop/index.ts +++ b/src/adapters/hop/index.ts @@ -25,10 +25,9 @@ const contractAddresses = { USDC: "0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a", USDT: "0x3E4a3a4796d16c0Cd582C382691998f7c06420B6", MATIC: "0x22B1Cbb8D98a01a3B71D034BB899775A76Eb1cc2", - WBTC: "0xb98454270065A31D71Bf635F6F7Ee6A518dFb849", HOP: "0x914f986a44AcB623A277d6Bd17368171FCbe4273", - SNX: "0x893246FACF345c99e4235E5A7bbEE7404c988b96", - SUSD: "0x36443fC70E073fe9D50425f82a3eE19feF697d62", // seems like it's not used + MAGIC: "0xf074540eb83c86211F305E145eB31743E228E57d", + rETH: "0x87269B23e73305117D0404557bAdc459CEd0dbEc" }, polygon: { ETH: "0xb98454270065A31D71Bf635F6F7Ee6A518dFb849", @@ -36,7 +35,6 @@ const contractAddresses = { USDC: "0x25D8039bB044dC227f741a9e381CA4cEAE2E6aE8", USDT: "0x6c9a1ACF73bd85463A46B0AFc076FBdf602b690B", MATIC: "0x553bC791D746767166fA3888432038193cEED5E2", - WBTC: "0x91Bd9Ccec64fC22475323a0E55d58F7786587905", HOP: "0x58c61AeE5eD3D748a1467085ED2650B697A66234", }, arbitrum: { @@ -44,18 +42,17 @@ const contractAddresses = { DAI: "0x7aC115536FE3A185100B2c4DE4cb328bf3A58Ba6", USDC: "0x0e0E3d2C5c292161999474247956EF542caBF8dd", USDT: "0x72209Fe68386b37A40d6bCA04f78356fd342491f", - WBTC: "0x3E4a3a4796d16c0Cd582C382691998f7c06420B6", HOP: "0x25FB92E505F752F730cAD0Bd4fa17ecE4A384266", + MAGIC: "0xEa5abf2C909169823d939de377Ef2Bf897A6CE98", + rETH: "0xc315239cFb05F1E130E7E28E603CEa4C014c57f0" }, optimism: { ETH: "0x83f6244Bd87662118d96D9a6D44f09dffF14b30E", DAI: "0x7191061D5d4C60f598214cC6913502184BAddf18", USDC: "0xa81D244A1814468C734E5b4101F7b9c0c577a8fC", USDT: "0x46ae9BaB8CEA96610807a275EBD36f8e916b5C61", - WBTC: "0xB1ea9FeD58a317F81eEEFC18715Dd323FDEf45c4", HOP: "0x03D7f750777eC48d39D080b020D83Eb2CB4e3547", - SNX: "0x16284c7323c35F4960540583998C98B1CfC581a7", - SUSD: "0x33Fe5bB8DA466dA55a8A32D6ADE2BB104E2C5201", // seems like it's not used + rETH: "0xA0075E8cE43dcB9970cB7709b9526c1232cc39c2" }, xdai: { ETH: "0xD8926c12C0B2E5Cd40cFdA49eCaFf40252Af491B", @@ -63,9 +60,26 @@ const contractAddresses = { USDC: "0x25D8039bB044dC227f741a9e381CA4cEAE2E6aE8", USDT: "0xFD5a186A7e8453Eb867A360526c5d987A00ACaC2", MATIC: "0x7ac71c29fEdF94BAc5A5C9aB76E1Dd12Ea885CCC", - WBTC: "0x07C592684Ee9f71D58853F9387579332d471b6Ca", HOP: "0x6F03052743CD99ce1b29265E377e320CD24Eb632", }, + nova: { + ETH: "0x8796860ca1677Bf5d54cE5A348Fe4b779a8212f3", + HOP: "0x02D47f76523d2f059b617E4346de67482792eB83", + MAGIC: "0xE638433e2C1dF5f7a3a21b0a6b5c4b37278e55DC" + }, + base: { + ETH: "0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a", + USDC: "0x46ae9BaB8CEA96610807a275EBD36f8e916b5C61", + HOP: "0xe22D2beDb3Eca35E6397e0C6D62857094aA26F52", + }, + linea: { + ETH: "0xCbb852A6274e03fA00fb4895dE0463f66dF27a11", + HOP: "0x0a6b1904369fE59E002ad0713ae89d4E3dF5A7Cf", + }, + polygonZkevm: { + ETH: "0x0ce6c85cF43553DE10FC56cecA0aef6Ff0DD444d", + HOP: "0x9ec9551d4A1a1593b0ee8124D98590CC71b3B09D", + }, } as any; // 'l2CanonicalToken contracts' @@ -76,10 +90,9 @@ const tokenAddresses = { USDC: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", USDT: "0xdAC17F958D2ee523a2206206994597C13D831ec7", MATIC: "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0", - WBTC: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", - SNX: "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F", - SUSD: "0x57Ab1ec28D129707052df4dF418D58a2D46d5f51", + MAGIC: "0xB0c7a3Ba49C7a6EaBa6cD4a96C55a1391070Ac9A", + rETH: "0xae78736Cd615f374D3085123A210448E74Fc6393" }, polygon: { ETH: "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619", @@ -87,7 +100,6 @@ const tokenAddresses = { USDC: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", USDT: "0xc2132D05D31c914a87C6611C10748AEb04B58e8F", MATIC: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", - WBTC: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6", HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", }, arbitrum: { @@ -95,18 +107,17 @@ const tokenAddresses = { DAI: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", USDC: "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8", USDT: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", - WBTC: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", + MAGIC: "0x539bdE0d7Dbd336b79148AA742883198BBF60342", + rETH: "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8" }, optimism: { ETH: "0x4200000000000000000000000000000000000006", DAI: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", USDC: "0x7F5c764cBc14f9669B88837ca1490cCa17c31607", USDT: "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58", - WBTC: "0x68f180fcCe6836688e9084f035309E29Bf0A2095", HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", - SNX: "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4", - SUSD: "0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9", + rETH: "0x9Bcef72be871e61ED4fBbc7630889beE758eb81D" }, xdai: { ETH: "0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1", @@ -114,7 +125,24 @@ const tokenAddresses = { USDC: "0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83", USDT: "0x4ECaBa5870353805a9F068101A40E0f32ed605C6", MATIC: "0x7122d7661c4564b7C6Cd4878B06766489a6028A2", - WBTC: "0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252", + HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", + }, + nova: { + ETH: "0x722E8BdD2ce80A4422E880164f2079488e115365", + HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", + MAGIC: "0xe8936ac97A85d708d5312D52C30c18d4533b8A9c" + }, + base: { + ETH: "0x4200000000000000000000000000000000000006", + USDC: "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA", + HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", + }, + linea: { + ETH: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f", + HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", + }, + polygonZkevm: { + ETH: "0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9", HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", }, } as any; @@ -280,7 +308,11 @@ const adapter: BridgeAdapter = { polygon: constructParams("polygon"), arbitrum: constructParams("arbitrum"), optimism: constructParams("optimism"), - gnosis: constructParams("xdai") + gnosis: constructParams("xdai"), + nova: constructParams("nova"), + base: constructParams("base"), + linea: constructParams("linea"), + polygonZkevm: constructParams("polygonZkevm") }; export default adapter; From ddc8245bae1fd6089c18d5009c924928ca44e5ec Mon Sep 17 00:00:00 2001 From: vrtnd Date: Thu, 1 Feb 2024 16:11:34 +0700 Subject: [PATCH 2/2] Hop bridge new chains --- src/adapters/hop/index.ts | 28 ++++++++++++++-------------- src/data/bridgeNetworkData.ts | 10 +++------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/adapters/hop/index.ts b/src/adapters/hop/index.ts index 4fd962bc..a8fc80f5 100644 --- a/src/adapters/hop/index.ts +++ b/src/adapters/hop/index.ts @@ -27,7 +27,7 @@ const contractAddresses = { MATIC: "0x22B1Cbb8D98a01a3B71D034BB899775A76Eb1cc2", HOP: "0x914f986a44AcB623A277d6Bd17368171FCbe4273", MAGIC: "0xf074540eb83c86211F305E145eB31743E228E57d", - rETH: "0x87269B23e73305117D0404557bAdc459CEd0dbEc" + rETH: "0x87269B23e73305117D0404557bAdc459CEd0dbEc", }, polygon: { ETH: "0xb98454270065A31D71Bf635F6F7Ee6A518dFb849", @@ -44,7 +44,7 @@ const contractAddresses = { USDT: "0x72209Fe68386b37A40d6bCA04f78356fd342491f", HOP: "0x25FB92E505F752F730cAD0Bd4fa17ecE4A384266", MAGIC: "0xEa5abf2C909169823d939de377Ef2Bf897A6CE98", - rETH: "0xc315239cFb05F1E130E7E28E603CEa4C014c57f0" + rETH: "0xc315239cFb05F1E130E7E28E603CEa4C014c57f0", }, optimism: { ETH: "0x83f6244Bd87662118d96D9a6D44f09dffF14b30E", @@ -52,7 +52,7 @@ const contractAddresses = { USDC: "0xa81D244A1814468C734E5b4101F7b9c0c577a8fC", USDT: "0x46ae9BaB8CEA96610807a275EBD36f8e916b5C61", HOP: "0x03D7f750777eC48d39D080b020D83Eb2CB4e3547", - rETH: "0xA0075E8cE43dcB9970cB7709b9526c1232cc39c2" + rETH: "0xA0075E8cE43dcB9970cB7709b9526c1232cc39c2", }, xdai: { ETH: "0xD8926c12C0B2E5Cd40cFdA49eCaFf40252Af491B", @@ -62,10 +62,10 @@ const contractAddresses = { MATIC: "0x7ac71c29fEdF94BAc5A5C9aB76E1Dd12Ea885CCC", HOP: "0x6F03052743CD99ce1b29265E377e320CD24Eb632", }, - nova: { + arbitrum_nova: { ETH: "0x8796860ca1677Bf5d54cE5A348Fe4b779a8212f3", HOP: "0x02D47f76523d2f059b617E4346de67482792eB83", - MAGIC: "0xE638433e2C1dF5f7a3a21b0a6b5c4b37278e55DC" + MAGIC: "0xE638433e2C1dF5f7a3a21b0a6b5c4b37278e55DC", }, base: { ETH: "0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a", @@ -76,7 +76,7 @@ const contractAddresses = { ETH: "0xCbb852A6274e03fA00fb4895dE0463f66dF27a11", HOP: "0x0a6b1904369fE59E002ad0713ae89d4E3dF5A7Cf", }, - polygonZkevm: { + polygon_zkevm: { ETH: "0x0ce6c85cF43553DE10FC56cecA0aef6Ff0DD444d", HOP: "0x9ec9551d4A1a1593b0ee8124D98590CC71b3B09D", }, @@ -92,7 +92,7 @@ const tokenAddresses = { MATIC: "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0", HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", MAGIC: "0xB0c7a3Ba49C7a6EaBa6cD4a96C55a1391070Ac9A", - rETH: "0xae78736Cd615f374D3085123A210448E74Fc6393" + rETH: "0xae78736Cd615f374D3085123A210448E74Fc6393", }, polygon: { ETH: "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619", @@ -109,7 +109,7 @@ const tokenAddresses = { USDT: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", MAGIC: "0x539bdE0d7Dbd336b79148AA742883198BBF60342", - rETH: "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8" + rETH: "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8", }, optimism: { ETH: "0x4200000000000000000000000000000000000006", @@ -117,7 +117,7 @@ const tokenAddresses = { USDC: "0x7F5c764cBc14f9669B88837ca1490cCa17c31607", USDT: "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58", HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", - rETH: "0x9Bcef72be871e61ED4fBbc7630889beE758eb81D" + rETH: "0x9Bcef72be871e61ED4fBbc7630889beE758eb81D", }, xdai: { ETH: "0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1", @@ -127,10 +127,10 @@ const tokenAddresses = { MATIC: "0x7122d7661c4564b7C6Cd4878B06766489a6028A2", HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", }, - nova: { + arbitrum_nova: { ETH: "0x722E8BdD2ce80A4422E880164f2079488e115365", HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", - MAGIC: "0xe8936ac97A85d708d5312D52C30c18d4533b8A9c" + MAGIC: "0xe8936ac97A85d708d5312D52C30c18d4533b8A9c", }, base: { ETH: "0x4200000000000000000000000000000000000006", @@ -141,7 +141,7 @@ const tokenAddresses = { ETH: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f", HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", }, - polygonZkevm: { + polygon_zkevm: { ETH: "0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9", HOP: "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC", }, @@ -309,10 +309,10 @@ const adapter: BridgeAdapter = { arbitrum: constructParams("arbitrum"), optimism: constructParams("optimism"), gnosis: constructParams("xdai"), - nova: constructParams("nova"), base: constructParams("base"), linea: constructParams("linea"), - polygonZkevm: constructParams("polygonZkevm") + "arbitrum nova": constructParams("arbitrum_nova"), + "polygon zkevm": constructParams("polygon_zkevm"), }; export default adapter; diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index 0ab30aed..6d4188e2 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -222,15 +222,11 @@ export default [ iconLink: "icons:hop-protocol", largeTxThreshold: 10000, url: "", - chains: [ - "Ethereum", - "Polygon", - "Arbitrum", - "Optimism", - // "Gnosis" - ], + chains: ["Ethereum", "Polygon", "Arbitrum", "Optimism", "Gnosis", "Base", "Arbitrum Nova", "Polygon zkEVM"], chainMapping: { gnosis: "xdai", // this is needed temporarily, need to fix and remove + "arbitrum nova": "arbitrum_nova", + "polygon zkevm": "polygon_zkevm", }, }, /* breaking running adapters, disable temporarily