Skip to content

Commit

Permalink
Deploy LIFI to Worldchain
Browse files Browse the repository at this point in the history
  • Loading branch information
ezynda3 committed Nov 19, 2024
1 parent c2c412f commit 75c2266
Show file tree
Hide file tree
Showing 19 changed files with 534 additions and 269 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ETH_NODE_URI_ROOTSTOCK=https://rootstock.drpc.org #[pre-commit-checker: not a se
ETH_NODE_URI_SEI=https://evm-rpc.sei-apis.com #[pre-commit-checker: not a secret].io
ETH_NODE_URI_SCROLL=https://1rpc.io/scroll #[pre-commit-checker: not a secret].io
ETH_NODE_URI_TAIKO=https://rpc.taiko.tools #[pre-commit-checker: not a secret].io
ETH_NODE_URI_WORLDCHAIN=https://worldchain-mainnet.g.alchemy.com/public #[pre-commit-checker: not a secret].io
ETH_NODE_URI_XLAYER=https://rpc.xlayer.tech #[pre-commit-checker: not a secret].io
ETH_NODE_URI_ZKSYNC=https://zksync2-mainnet.zksync #[pre-commit-checker: not a secret].io

Expand Down
8 changes: 8 additions & 0 deletions config/across.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,13 @@
"0x5300000000000000000000000000000000000004",
"0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df"
]
},
"worldchain": {
"chainId": 480,
"acrossSpokePool": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64",
"weth": "0x4200000000000000000000000000000000000006",
"tokensToApprove": [
"0x4200000000000000000000000000000000000006"
]
}
}
12 changes: 10 additions & 2 deletions config/amarok.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@
"chainId": 34443,
"connextHandler": "0x7380511493DD4c2f1dD75E9CCe5bD52C787D4B51",
"domain": "1836016741",
"tokensToApprove": ["0x4200000000000000000000000000000000000006"]
"tokensToApprove": [
"0x4200000000000000000000000000000000000006"
]
},
"arbitrum": {
"chainId": 42161,
Expand Down Expand Up @@ -299,10 +301,16 @@
"domain": "",
"tokensToApprove": []
},
"worldchain": {
"chainId": 480,
"connextHandler": "0x0000000000000000000000000000000000000000",
"domain": "",
"tokensToApprove": []
},
"xlayer": {
"chainId": 196,
"connextHandler": "0x0000000000000000000000000000000000000000",
"domain": "",
"tokensToApprove": []
}
}
}
5 changes: 5 additions & 0 deletions config/dexs.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,11 @@
"0x833Be894C596b15FAe740C2D522d660084c48B05",
"0x2321F1a63A683a1F3634Dbe1CbA0d657D5F56d54"
],
"worldchain": [
"0x50D5a8aCFAe13Dceb217E9a071F6c6Bd5bDB4155",
"0x8f023b4193a6b18C227B4a755f8e28B3D30Ef9a1",
"0x603a538477d44064eA5A5d8C345b4Ff6fca1142a"
],
"zksync": [
"0xf15485ada1a1826fA46225032b13F6A972eC73C1",
"0xbE07Edbb7d0fc7eb941078486F6b59061bF0336C",
Expand Down
1 change: 1 addition & 0 deletions config/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
"sei": "0x0000000000000000000000000000000000000000",
"xlayer": "0x0000000000000000000000000000000000000000",
"taiko": "0x0000000000000000000000000000000000000000",
"worldchain": "0x0000000000000000000000000000000000000000",
"zksync": "0x0000000000000000000000000000000000000000"
},
"autoWhitelistPeripheryContracts": [
Expand Down
17 changes: 17 additions & 0 deletions config/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,23 @@
"safeAddress": "0xa89a87986e8ee1Ac8fDaCc5Ac91627010Ec9f772",
"gasZipChainId": 249
},
"worldchain": {
"name": "World Chain",
"chainId": 480,
"nativeAddress": "0x0000000000000000000000000000000000000000",
"nativeCurrency": "ETH",
"wrappedNativeAddress": "0x4200000000000000000000000000000000000006",
"status": "inactive",
"type": "mainnet",
"rpcUrl": "https://worldchain-mainnet.g.alchemy.com/public",
"verificationType": "etherscan",
"explorerUrl": "https://worldscan.org",
"explorerApiUrl": "https://api.worldscan.org/api",
"multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",
"safeApiUrl": "https://safe-transaction-worldchain.safe.global/api",
"safeAddress": "0xa6E64bC059ddAa72ec374C50B1A5c6b3a27d64Ce",
"gasZipChainId": 0
},
"xlayer": {
"name": "X Layer",
"chainId": 196,
Expand Down
3 changes: 2 additions & 1 deletion config/stargate.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
"scroll": "0x0000000000000000000000000000000000000000",
"xlayer": "0x0000000000000000000000000000000000000000",
"taiko": "0x0000000000000000000000000000000000000000",
"worldchain": "0x0000000000000000000000000000000000000000",
"localanvil": "0x0000000000000000000000000000000000000000",
"mumbai": "0x0000000000000000000000000000000000000000",
"sepolia": "0x0000000000000000000000000000000000000000"
Expand Down Expand Up @@ -271,4 +272,4 @@
"mumbai": "0x817436a076060D158204d955E5403b6Ed0A5fac0",
"sepolia": "0x0000000000000000000000000000000000000000"
}
}
}
3 changes: 2 additions & 1 deletion config/tokenwrapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"blast": "0x4300000000000000000000000000000000000004",
"rootstock": "0x542fda317318ebf1d3deaf76e0b632741a7e677d",
"sei": "0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7",
"worldchain": "0x4200000000000000000000000000000000000006",
"xlayer": "0xe538905cf8410324e03a5a23c1c177a474d59b2b",
"taiko": "0xA51894664A773981C6C112C43ce576f315d5b1B6",
"immutablezkevm": "0x3a0c2ba54d6cbd3121f01b96dfd20e99d1696c9d"
}
}
14 changes: 14 additions & 0 deletions deployments/_deployments_log_file.json
Original file line number Diff line number Diff line change
Expand Up @@ -22376,6 +22376,20 @@
}
]
}
},
"worldchain": {
"production": {
"1.0.1": [
{
"ADDRESS": "0xBa713B18c806EcdEEE49FAec623dE2D872192872",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-11-19 10:35:41",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000000000000000000000000000000000000000000000",
"SALT": "",
"VERIFIED": "false"
}
]
}
}
},
"StargateFacetV2": {
Expand Down
76 changes: 76 additions & 0 deletions deployments/worldchain.diamond.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"LiFiDiamond": {
"Facets": {
"0x57FdfF2e36De6c8a8Cde297B150Ae291132Eae8d": {
"Name": "DiamondCutFacet",
"Version": "1.0.0"
},
"0xA1a4d577709dC4A70CA38F1D41562fab3aD09D3f": {
"Name": "DiamondLoupeFacet",
"Version": "1.0.0"
},
"0x81Ae738700D8f1e5BB2A200584174cDf17Fb5455": {
"Name": "OwnershipFacet",
"Version": "1.0.0"
},
"0xfA009cd56d35AE3BbdF975135b0BAE9b403c7da1": {
"Name": "WithdrawFacet",
"Version": "1.0.0"
},
"0xE154389c1bAE241F220661131b7AfDc1514C55c7": {
"Name": "DexManagerFacet",
"Version": "1.0.0"
},
"0x314E1E760316050B0D6338bCf3d689b8D301F593": {
"Name": "AccessManagerFacet",
"Version": "1.0.0"
},
"0x54ECfbAaeb49c864a9c45C70B785ca6C70c66453": {
"Name": "PeripheryRegistryFacet",
"Version": "1.0.0"
},
"0x14Dd70456Bfe4Cd8b605f7A0d24b3A74aCe99713": {
"Name": "LIFuelFacet",
"Version": "1.0.0"
},
"0xd2B3b3605e630232c13111458Ae3a97d13c8F477": {
"Name": "GenericSwapFacet",
"Version": "1.0.0"
},
"0xBa713B18c806EcdEEE49FAec623dE2D872192872": {
"Name": "GenericSwapFacetV3",
"Version": "1.0.0"
},
"0xe6C6A35684308f2DaadbeeA50B62CFEaAFaa407E": {
"Name": "StandardizedCallFacet",
"Version": "1.0.0"
},
"0x1feB868BF64AdC552E051fB7387681F78b988a81": {
"Name": "CalldataVerificationFacet",
"Version": "1.0.0"
},
"0xF6Eff8df65Fc4a4c1528761Aa727b5471956A844": {
"Name": "EmergencyPauseFacet",
"Version": "1.0.0"
},
"0xB5dD83183fD7CCF859b227CA83663a034d5B2f92": {
"Name": "AcrossFacetV3",
"Version": "1.0.0"
},
"0x90ADbFc03002aaA3d9FEdf2517D593CfD93e6c57": {
"Name": "AcrossFacetPackedV3",
"Version": "1.0.0"
}
},
"Periphery": {
"ERC20Proxy": "0x98750e70Cf1313D9702f0f57D399DD0bA05d16E0",
"Executor": "0xd9318fFE1EbbfA71049A443e623Be566067C9D6B",
"FeeCollector": "0x50D5a8aCFAe13Dceb217E9a071F6c6Bd5bDB4155",
"Receiver": "0xD9e3837E42198aaFc13cb51536d7c31f590aD6Fd",
"LiFuelFeeCollector": "0x8f023b4193a6b18C227B4a755f8e28B3D30Ef9a1",
"TokenWrapper": "0x603a538477d44064eA5A5d8C345b4Ff6fca1142a",
"LiFiDEXAggregator": "0x2321F1a63A683a1F3634Dbe1CbA0d657D5F56d54",
"ReceiverAcrossV3": "0xD263a23453CB9A77860ed6393A2B9a55AF70EFAb"
}
}
}
26 changes: 26 additions & 0 deletions deployments/worldchain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"DiamondCutFacet": "0x57FdfF2e36De6c8a8Cde297B150Ae291132Eae8d",
"DiamondLoupeFacet": "0xA1a4d577709dC4A70CA38F1D41562fab3aD09D3f",
"OwnershipFacet": "0x81Ae738700D8f1e5BB2A200584174cDf17Fb5455",
"DexManagerFacet": "0xE154389c1bAE241F220661131b7AfDc1514C55c7",
"AccessManagerFacet": "0x314E1E760316050B0D6338bCf3d689b8D301F593",
"WithdrawFacet": "0xfA009cd56d35AE3BbdF975135b0BAE9b403c7da1",
"PeripheryRegistryFacet": "0x54ECfbAaeb49c864a9c45C70B785ca6C70c66453",
"GenericSwapFacet": "0xd2B3b3605e630232c13111458Ae3a97d13c8F477",
"GenericSwapFacetV3": "0xBa713B18c806EcdEEE49FAec623dE2D872192872",
"LIFuelFacet": "0x14Dd70456Bfe4Cd8b605f7A0d24b3A74aCe99713",
"CalldataVerificationFacet": "0x1feB868BF64AdC552E051fB7387681F78b988a81",
"StandardizedCallFacet": "0xe6C6A35684308f2DaadbeeA50B62CFEaAFaa407E",
"LiFiDiamond": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE",
"EmergencyPauseFacet": "0xF6Eff8df65Fc4a4c1528761Aa727b5471956A844",
"AcrossFacetV3": "0xB5dD83183fD7CCF859b227CA83663a034d5B2f92",
"AcrossFacetPackedV3": "0x90ADbFc03002aaA3d9FEdf2517D593CfD93e6c57",
"ERC20Proxy": "0x98750e70Cf1313D9702f0f57D399DD0bA05d16E0",
"Executor": "0xd9318fFE1EbbfA71049A443e623Be566067C9D6B",
"FeeCollector": "0x50D5a8aCFAe13Dceb217E9a071F6c6Bd5bDB4155",
"Receiver": "0xD9e3837E42198aaFc13cb51536d7c31f590aD6Fd",
"LiFuelFeeCollector": "0x8f023b4193a6b18C227B4a755f8e28B3D30Ef9a1",
"TokenWrapper": "0x603a538477d44064eA5A5d8C345b4Ff6fca1142a",
"LiFiDEXAggregator": "0x2321F1a63A683a1F3634Dbe1CbA0d657D5F56d54",
"ReceiverAcrossV3": "0xD263a23453CB9A77860ed6393A2B9a55AF70EFAb"
}
2 changes: 2 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ rootstock = "${ETH_NODE_URI_ROOTSTOCK}"
sei = "${ETH_NODE_URI_SEI}"
taiko = "${ETH_NODE_URI_TAIKO}"
velas = "${ETH_NODE_URI_VELAS}"
worldchain = "${ETH_NODE_URI_WORLDCHAIN}"
xlayer = "${ETH_NODE_URI_XLAYER}"
zksync = "${ETH_NODE_URI_ZKSYNC}"
scroll = "${ETH_NODE_URI_SCROLL}"
Expand Down Expand Up @@ -100,6 +101,7 @@ polygonzkevm = { key = "${POLYGONZKEVM_ETHERSCAN_API_KEY}", url = "https://api-z
scroll = { key = "${SCROLL_ETHERSCAN_API_KEY}", url = "https://api.scrollscan.com/api", chain = "534352" }
sei = { key = "${SEI_ETHERSCAN_API_KEY}", url = "https://seitrace.com/pacific-1/api", chain = "1329" }
taiko = { key = "${TAIKO_ETHERSCAN_API_KEY}", url = "https://api.taikoscan.io/api", chain = "167000" }
worldchain = { key = "${WORLDCHAIN_ETHERSCAN_API_KEY}", url = "https://api.worldscan.org/api", chain = "480" }
xlayer = { key = "${XLAYER_ETHERSCAN_API_KEY}", url = "https://www.oklink.com/api/v5/explorer/xlayer/api", chain = "196" }

#testnets
Expand Down
1 change: 1 addition & 0 deletions networks
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ rootstock
scroll
sei
taiko
worldchain
xlayer
zksync
bsc-testnet
Expand Down
20 changes: 13 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"abi:generate": "forge clean && rm -fr typechain/* && forge build --skip script --skip test --skip Base --skip Test && hardhat diamondABI",
"typechain": "forge clean && rm -rf typechain/* && forge build src && typechain --target ethers-v5 'out/*.sol/*.json' --out-dir typechain",
"codegen": "plop",
"healthcheck": "tsx ./script/deploy/healthCheck.mts",
"healthcheck": "tsx ./script/deploy/healthCheck.ts",
"propose-safe-tx": "ts-node ./script/deploy/safe/propose-to-safe.ts",
"confirm-safe-tx": "ts-node ./script/deploy/safe/confirm-safe-tx.ts",
"add-safe-owners": "ts-node ./script/deploy/safe/add-owners-to-safe.ts",
Expand Down Expand Up @@ -106,12 +106,18 @@
"merkletreejs": "^0.3.11",
"notify-send": "^0.1.2",
"pino": "^7.9.2",
"tsx": "^4.7.2",
"viem": "^2.18.7",
"zx": "^8.0.2"
"tsx": "^4.19.2",
"viem": "^2.21.48",
"zx": "^8.2.2"
},
"lint-staged": {
"*.{ts,js}": ["prettier --write", "eslint --fix"],
"*.sol": ["prettier --write", "solhint --fix"]
"*.{ts,js}": [
"prettier --write",
"eslint --fix"
],
"*.sol": [
"prettier --write",
"solhint --fix"
]
}
}
}
Loading

0 comments on commit 75c2266

Please sign in to comment.