From ab5ba8777d855ce194ba40bc47b82ce4e3c64491 Mon Sep 17 00:00:00 2001 From: Ed Zynda Date: Mon, 13 May 2024 10:52:38 +0300 Subject: [PATCH] Deploy contracts to Mantle (#644) * deploy diamond, facets and periphery to mantle * verify --- config/amarok.json | 6 + config/dexs.json | 8 + config/stargate.json | 1 + config/symbiosis.json | 4 + config/tokenwrapper.json | 3 +- deployments/_deployments_log_file.json | 282 ++++++++++++++++++++++++- deployments/mantle.diamond.json | 65 ++++++ deployments/mantle.json | 22 ++ foundry.toml | 2 + networks | 1 + script/helperFunctions.sh | 5 +- 11 files changed, 396 insertions(+), 3 deletions(-) create mode 100644 deployments/mantle.diamond.json create mode 100644 deployments/mantle.json diff --git a/config/amarok.json b/config/amarok.json index 3f7dac92e..494245c7c 100644 --- a/config/amarok.json +++ b/config/amarok.json @@ -99,6 +99,12 @@ "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f" ] }, + "mantle": { + "chainId": 5000, + "connextHandler": "0x0000000000000000000000000000000000000000", + "domain": "", + "tokensToApprove": [] + }, "cronos": { "chainId": 25, "connextHandler": "0x0000000000000000000000000000000000000000", diff --git a/config/dexs.json b/config/dexs.json index 6738df959..53e99e6fe 100644 --- a/config/dexs.json +++ b/config/dexs.json @@ -575,5 +575,13 @@ "0xfD0af5274aA16C72B7c463B22a435C06DEBbe894", "0xf471d32cb40837bf24529fcf17418fc1a4807626", "0x427bFc2E0aa683ec43fbF7861d5F4A74147938d8" + ], + "mantle": [ + "0xD9F4e85489aDCD0bAF0Cd63b4231c6af58c26745", + "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64", + "0xF048e5816B0C7951AC179f656C5B86e5a79Bd7b5", + "0xc02FFcdD914DbA646704439c6090BAbaD521d04C", + "0xf3552b98BB4234B47674700A99a0308D74B40F51", + "0xF2ee649caB7a0edEdED7a27821B0aCDF77778aeD" ] } diff --git a/config/stargate.json b/config/stargate.json index a17022722..cf52851fe 100644 --- a/config/stargate.json +++ b/config/stargate.json @@ -99,6 +99,7 @@ "linea": "0xeCc19E177d24551aA7ed6Bc6FE566eCa726CC8a9", "metis": "0xeCc19E177d24551aA7ed6Bc6FE566eCa726CC8a9", "mode": "0x0000000000000000000000000000000000000000", + "mantle": "0x0000000000000000000000000000000000000000", "scroll": "0x0000000000000000000000000000000000000000", "localanvil": "0x0000000000000000000000000000000000000000", "mumbai": "0x0000000000000000000000000000000000000000", diff --git a/config/symbiosis.json b/config/symbiosis.json index 93bb3431f..82490e4eb 100644 --- a/config/symbiosis.json +++ b/config/symbiosis.json @@ -54,5 +54,9 @@ "mode": { "metaRouter": "0xcE8f24A58D85eD5c5A6824f7be1F8d4711A0eb4C", "gateway": "0xAdB2d3b711Bb8d8Ea92ff70292c466140432c278" + }, + "mantle": { + "metaRouter": "0xca506793A420E901BbCa8066be5661E3C52c84c2", + "gateway": "0xd92Ca299F1C2518E78E48C207b64591BA6E9b9a8" } } diff --git a/config/tokenwrapper.json b/config/tokenwrapper.json index f1e521898..a31e1983c 100644 --- a/config/tokenwrapper.json +++ b/config/tokenwrapper.json @@ -32,5 +32,6 @@ "aurora": "0xc9bdeed33cd01541e1eed10f90519d2c06fe3feb", "harmony": "0xcf664087a5bb0237a0bad6742852ec6c8d69a27a", "harmonyTestnet": "0x7466d7d0c21fa05f32f5a0fa27e12bdc06348ce2", - "scroll": "0x5300000000000000000000000000000000000004" + "scroll": "0x5300000000000000000000000000000000000004", + "mantle": "0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111" } diff --git a/deployments/_deployments_log_file.json b/deployments/_deployments_log_file.json index 3181983d9..232c77d17 100644 --- a/deployments/_deployments_log_file.json +++ b/deployments/_deployments_log_file.json @@ -543,6 +543,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0x1215791Ad4E823F36A71329c56e5999f8F320082", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 12:30:19", + "CONSTRUCTOR_ARGS": "0x", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "DiamondLoupeFacet": { @@ -1101,6 +1115,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0x519483eEC772BA34098af187Aee7b56C77927B1a", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 12:30:55", + "CONSTRUCTOR_ARGS": "0x", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "OwnershipFacet": { @@ -1660,6 +1688,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0x9f8AC9248395b93220C6ABbA41d0989Aa08257Ab", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 12:31:34", + "CONSTRUCTOR_ARGS": "0x", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "DexManagerFacet": { @@ -2174,6 +2216,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0xbd0B19349A4D0DF5Abb67D31659d4C5C17b78901", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 12:32:42", + "CONSTRUCTOR_ARGS": "0x", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "AccessManagerFacet": { @@ -2700,6 +2756,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0xdbffD7A135b332748Df2784D214c5f48eC706C3a", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 12:33:16", + "CONSTRUCTOR_ARGS": "0x", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "WithdrawFacet": { @@ -3214,6 +3284,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0xf600Caa1468FFaa0B8Eef877A84152e2bDdDe2Fb", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 12:32:07", + "CONSTRUCTOR_ARGS": "0x", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "PeripheryRegistryFacet": { @@ -3755,6 +3839,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0x36eacDF8e9CF209d84B427316839800a81a2c45A", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 12:33:54", + "CONSTRUCTOR_ARGS": "0x", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "LiFiDiamond": { @@ -4278,6 +4376,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 11:36:11", + "CONSTRUCTOR_ARGS": "0x00000000000000000000000011f11121df7256c40339393b0fb045321022ce440000000000000000000000001215791ad4e823f36a71329c56e5999f8f320082", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "LiFiDiamondImmutable": { @@ -5700,6 +5812,20 @@ } ] } + }, + "mantle": { + "production": { + "2.0.0": [ + { + "ADDRESS": "0x2b7D2C78bd801Cc06DDCF91DeE2e8fAE22814f7e", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 12:36:25", + "CONSTRUCTOR_ARGS": "0x", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "HopFacetOptimized": { @@ -6893,6 +7019,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.1": [ + { + "ADDRESS": "0x66861f292099cAF644F4A8b6091De49BEC5E8a15", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 12:35:47", + "CONSTRUCTOR_ARGS": "0x", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "MultichainFacet": { @@ -8570,6 +8710,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0xA950Ac46b0b844c0564d18A54A9685e614B9086C", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 13:02:25", + "CONSTRUCTOR_ARGS": "0x00000000000000000000000011f1022ca6adef6400e5677528a80d49a069c00c", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "Executor": { @@ -9270,6 +9424,20 @@ } ] } + }, + "mantle": { + "production": { + "2.0.0": [ + { + "ADDRESS": "0x7078d1DE45C7D3e87f71D5DA663db2a8Ee1dfEbe", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 13:02:36", + "CONSTRUCTOR_ARGS": "0x000000000000000000000000a950ac46b0b844c0564d18a54a9685e614b9086c", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "FeeCollector": { @@ -9784,6 +9952,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0xF048e5816B0C7951AC179f656C5B86e5a79Bd7b5", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 13:03:30", + "CONSTRUCTOR_ARGS": "0x00000000000000000000000008647cc950813966142a416d40c382e2c5db73bb", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "Receiver": { @@ -10824,6 +11006,20 @@ } ] } + }, + "mantle": { + "production": { + "2.0.2": [ + { + "ADDRESS": "0x0561fFe9855541C02D17951c93405A4407Df74BC", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 13:03:19", + "CONSTRUCTOR_ARGS": "0x000000000000000000000000156cebba59deb2cb23742f70dcb0a11cc775591f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007078d1de45c7d3e87f71d5da663db2a8ee1dfebe00000000000000000000000000000000000000000000000000000000000186a0", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "ServiceFeeCollector": { @@ -11522,6 +11718,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.1": [ + { + "ADDRESS": "0xf3552b98BB4234B47674700A99a0308D74B40F51", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 13:04:08", + "CONSTRUCTOR_ARGS": "0x00000000000000000000000008647cc950813966142a416d40c382e2c5db73bb", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "HopFacetPacked": { @@ -15378,6 +15588,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0x9D4B9784fC46496926ee4784e490F14d106D83a8", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 12:34:33", + "CONSTRUCTOR_ARGS": "0x", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "CalldataVerificationFacet": { @@ -15868,6 +16092,20 @@ } ] } + }, + "mantle": { + "production": { + "1.1.1": [ + { + "ADDRESS": "0x9157b6550D1C3209C20aCAd12A2dC57Df34Ca48b", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 12:35:15", + "CONSTRUCTOR_ARGS": "0x", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "LiFuelFeeCollector": { @@ -16523,7 +16761,7 @@ "TIMESTAMP": "2024-04-17 13:55:58", "CONSTRUCTOR_ARGS": "0x000000000000000000000000c71284231a726a18ac85c94d75f9fe17a185beaf", "SALT": "", - "VERIFIED": "false" + "VERIFIED": "true" } ] } @@ -16541,6 +16779,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.1": [ + { + "ADDRESS": "0xc02FFcdD914DbA646704439c6090BAbaD521d04C", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 13:03:42", + "CONSTRUCTOR_ARGS": "0x000000000000000000000000c71284231a726a18ac85c94d75f9fe17a185beaf", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "AcrossFacetPacked": { @@ -17068,6 +17320,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0xb8C5408ED5f40ca8df929A50DD36b252B6b39f76", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 13:02:13", + "CONSTRUCTOR_ARGS": "0x000000000000000000000000ca506793a420e901bbca8066be5661e3c52c84c2000000000000000000000000d92ca299f1c2518e78e48c207b64591ba6e9b9a8", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "TokenWrapper": { @@ -17403,6 +17669,20 @@ } ] } + }, + "mantle": { + "production": { + "1.0.0": [ + { + "ADDRESS": "0xF2ee649caB7a0edEdED7a27821B0aCDF77778aeD", + "OPTIMIZER_RUNS": "1000000", + "TIMESTAMP": "2024-05-10 13:04:34", + "CONSTRUCTOR_ARGS": "0x000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead1111", + "SALT": "", + "VERIFIED": "true" + } + ] + } } }, "GasRebateDistributor": { diff --git a/deployments/mantle.diamond.json b/deployments/mantle.diamond.json new file mode 100644 index 000000000..c06fbe059 --- /dev/null +++ b/deployments/mantle.diamond.json @@ -0,0 +1,65 @@ +{ + "LiFiDiamond": { + "Facets": { + "0x1215791Ad4E823F36A71329c56e5999f8F320082": { + "Name": "DiamondCutFacet", + "Version": "1.0.0" + }, + "0x519483eEC772BA34098af187Aee7b56C77927B1a": { + "Name": "DiamondLoupeFacet", + "Version": "1.0.0" + }, + "0x9f8AC9248395b93220C6ABbA41d0989Aa08257Ab": { + "Name": "OwnershipFacet", + "Version": "1.0.0" + }, + "0xf600Caa1468FFaa0B8Eef877A84152e2bDdDe2Fb": { + "Name": "WithdrawFacet", + "Version": "1.0.0" + }, + "0xbd0B19349A4D0DF5Abb67D31659d4C5C17b78901": { + "Name": "DexManagerFacet", + "Version": "1.0.0" + }, + "0xdbffD7A135b332748Df2784D214c5f48eC706C3a": { + "Name": "AccessManagerFacet", + "Version": "1.0.0" + }, + "0x36eacDF8e9CF209d84B427316839800a81a2c45A": { + "Name": "PeripheryRegistryFacet", + "Version": "1.0.0" + }, + "0x66861f292099cAF644F4A8b6091De49BEC5E8a15": { + "Name": "LIFuelFacet", + "Version": "1.0.1" + }, + "0x2b7D2C78bd801Cc06DDCF91DeE2e8fAE22814f7e": { + "Name": "GenericSwapFacet", + "Version": "2.0.0" + }, + "0x9D4B9784fC46496926ee4784e490F14d106D83a8": { + "Name": "StandardizedCallFacet", + "Version": "1.0.0" + }, + "0x9157b6550D1C3209C20aCAd12A2dC57Df34Ca48b": { + "Name": "CalldataVerificationFacet", + "Version": "1.1.1" + }, + "0xb8C5408ED5f40ca8df929A50DD36b252B6b39f76": { + "Name": "SymbiosisFacet", + "Version": "1.0.0" + } + }, + "Periphery": { + "ERC20Proxy": "0xA950Ac46b0b844c0564d18A54A9685e614B9086C", + "Executor": "0x7078d1DE45C7D3e87f71D5DA663db2a8Ee1dfEbe", + "FeeCollector": "0xF048e5816B0C7951AC179f656C5B86e5a79Bd7b5", + "GasRebateDistributor": "", + "LiFuelFeeCollector": "0xc02FFcdD914DbA646704439c6090BAbaD521d04C", + "Receiver": "0x0561fFe9855541C02D17951c93405A4407Df74BC", + "RelayerCelerIM": "", + "ServiceFeeCollector": "0xf3552b98BB4234B47674700A99a0308D74B40F51", + "TokenWrapper": "0xF2ee649caB7a0edEdED7a27821B0aCDF77778aeD" + } + } +} \ No newline at end of file diff --git a/deployments/mantle.json b/deployments/mantle.json new file mode 100644 index 000000000..ba3ab525a --- /dev/null +++ b/deployments/mantle.json @@ -0,0 +1,22 @@ +{ + "DiamondCutFacet": "0x1215791Ad4E823F36A71329c56e5999f8F320082", + "DiamondLoupeFacet": "0x519483eEC772BA34098af187Aee7b56C77927B1a", + "OwnershipFacet": "0x9f8AC9248395b93220C6ABbA41d0989Aa08257Ab", + "WithdrawFacet": "0xf600Caa1468FFaa0B8Eef877A84152e2bDdDe2Fb", + "DexManagerFacet": "0xbd0B19349A4D0DF5Abb67D31659d4C5C17b78901", + "AccessManagerFacet": "0xdbffD7A135b332748Df2784D214c5f48eC706C3a", + "PeripheryRegistryFacet": "0x36eacDF8e9CF209d84B427316839800a81a2c45A", + "StandardizedCallFacet": "0x9D4B9784fC46496926ee4784e490F14d106D83a8", + "CalldataVerificationFacet": "0x9157b6550D1C3209C20aCAd12A2dC57Df34Ca48b", + "LiFiDiamond": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "LIFuelFacet": "0x66861f292099cAF644F4A8b6091De49BEC5E8a15", + "GenericSwapFacet": "0x2b7D2C78bd801Cc06DDCF91DeE2e8fAE22814f7e", + "SymbiosisFacet": "0xb8C5408ED5f40ca8df929A50DD36b252B6b39f76", + "ERC20Proxy": "0xA950Ac46b0b844c0564d18A54A9685e614B9086C", + "Executor": "0x7078d1DE45C7D3e87f71D5DA663db2a8Ee1dfEbe", + "Receiver": "0x0561fFe9855541C02D17951c93405A4407Df74BC", + "FeeCollector": "0xF048e5816B0C7951AC179f656C5B86e5a79Bd7b5", + "LiFuelFeeCollector": "0xc02FFcdD914DbA646704439c6090BAbaD521d04C", + "ServiceFeeCollector": "0xf3552b98BB4234B47674700A99a0308D74B40F51", + "TokenWrapper": "0xF2ee649caB7a0edEdED7a27821B0aCDF77778aeD" +} \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 2cd2fb475..5baa6001e 100644 --- a/foundry.toml +++ b/foundry.toml @@ -43,6 +43,7 @@ metis = "${ETH_NODE_URI_METIS}" mode = "${ETH_NODE_URI_MODE}" zksync = "${ETH_NODE_URI_ZKSYNC}" scroll = "${ETH_NODE_URI_SCROLL}" +mantle = "${ETH_NODE_URI_MANTLE}" # testnets goerli = "${ETH_NODE_URI_GOERLI}" @@ -75,6 +76,7 @@ linea = { key = "${LINEA_ETHERSCAN_API_KEY}", url = "https://api.lineascan.build metis = { key = "${METIS_ETHERSCAN_API_KEY}", url = "https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan" } mode = { key = "${MODE_ETHERSCAN_API_KEY}", url = "https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan" } scroll = { key = "${SCROLL_ETHERSCAN_API_KEY}", url = "https://api.scrollscan.com/api" } +mantle = { key = "${MANTLE_ETHERSCAN_API_KEY}", url = "https://api.routescan.io/v2/network/mainnet/evm/5000/etherscan" } #testnets goerli = { key = "${MAINNET_ETHERSCAN_API_KEY}" } diff --git a/networks b/networks index af747e722..1556c31d3 100644 --- a/networks +++ b/networks @@ -10,6 +10,7 @@ fantom fuse gnosis linea +mantle metis mode moonbeam diff --git a/script/helperFunctions.sh b/script/helperFunctions.sh index 48b3ddd34..79123917e 100755 --- a/script/helperFunctions.sh +++ b/script/helperFunctions.sh @@ -2833,6 +2833,10 @@ function getChainId() { echo "324" return 0 ;; + "mantle") + echo "5000" + return 0 + ;; *) return 1 ;; @@ -3607,4 +3611,3 @@ function test_tmp() { #getPeripheryAddressFromDiamond "$NETWORK" "0x9b11bc9FAc17c058CAB6286b0c785bE6a65492EF" "RelayerCelerIM" verifyContract "$NETWORK" "$CONTRACT" "$ADDRESS" "$ARGS" } -