Skip to content

Commit

Permalink
Integrate immutable scripts (#409)
Browse files Browse the repository at this point in the history
* wip

* added code to approve access to refund functions for refundWallet

* integrated makeDiamondImmutable into masterScript & added refundWallet approval to coreFacet update script

* wip

* wip

* added script to transfer ownership of periphery contracts

* wip

* wip - need to fix helper function startLocaLAnvilNetwork

* wip

* fixed a bunch of stuff

* recommit

* added deployment of CREATE3Factory before deploying contracts but script fails without error

* added script to accept ownership transfer of periphery contracts

* integrated start of localanvil based on flag

* added some cleanup stuff

* removed unused file

* wip

* wip

* fixed compilation errors

* updated target state

* fixed first part of diamondMakeImmutable script

* fixed diamondMakeImmutable script

* added .env check and fixed global.json

* cleanup

* last minor changes

* tested ownershipTransfer confirmation and removed todos

* reverted changes in global.json
  • Loading branch information
0xDEnYO authored Jun 27, 2023
1 parent 410ea89 commit 33617e4
Show file tree
Hide file tree
Showing 160 changed files with 2,964 additions and 1,262 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ test/logs


# script config
scripts/config.sh
script/config.sh
196 changes: 98 additions & 98 deletions .yarn/releases/yarn-1.22.15.cjs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions config/amarok.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,9 @@
"polygonzkevm": {
"connextHandler": "0x0000000000000000000000000000000000000000",
"domain": "0"
},
"localanvil": {
"connextHandler": "0x0000000000000000000000000000000000000000",
"domain": "0"
}
}
5 changes: 5 additions & 0 deletions config/cbridge.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,10 @@
"cBridge": "0xf89354F314faF344Abd754924438bA798E306DF2",
"cfUSDC": "0x0000000000000000000000000000000000000000",
"messageBus": "0xAd204986D6cB67A5Bc76a3CB8974823F43Cb9AAA"
},
"localanvil": {
"cBridge": "0xf89354F314faF344Abd754924438bA798E306DF2",
"cfUSDC": "0x0000000000000000000000000000000000000000",
"messageBus": "0xAd204986D6cB67A5Bc76a3CB8974823F43Cb9AAA"
}
}
1 change: 1 addition & 0 deletions config/dexs.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,6 @@
"0xfD0af5274aA16C72B7c463B22a435C06DEBbe894",
"0x427bFc2E0aa683ec43fbF7861d5F4A74147938d8"
],
"localanvil": [],
"avalancheFujiTestnet": []
}
91 changes: 91 additions & 0 deletions config/hop.json
Original file line number Diff line number Diff line change
Expand Up @@ -938,5 +938,96 @@
"d_contractName": "l2SaddleSwap"
}
]
},
"localanvil": {
"chainId": 31337,
"tokens": [
{
"name": "ETH",
"bridge": "0x3E4a3a4796d16c0Cd582C382691998f7c06420B6",
"token": "0x2C1b868d6596a18e32E61B901E4060C872647b6C",
"ammWrapper": "0xC08055b634D43F2176d721E26A3428D3b7E7DdB5"
},
{
"name": "HOP",
"bridge": "0x2E9bB44C9CB774939462eF874Fc854D8df524F13",
"token": "0x6F03052743CD99ce1b29265E377e320CD24Eb632",
"ammWrapper": "0x0000000000000000000000000000000000000000"
},
{
"name": "USDC",
"bridge": "0x884d1Aa15F9957E1aEAA86a82a72e49Bc2bfCbe3",
"token": "0xf56dc6695cF1f5c364eDEbC7Dc7077ac9B586068",
"ammWrapper": "0x50d7d8B850e0e880295800790551928F4546BfE2"
},
{
"name": "USDT",
"bridge": "0xdb16fbF595C02EeF7D9233d38C232495734F3D85",
"token": "0x1990BC6dfe2ef605Bfc08f5A23564dB75642Ad73",
"ammWrapper": "0x0000000000000000000000000000000000000000"
},
{
"name": "DAI",
"bridge": "0xf11EBB94EC986EA891Aec29cfF151345C83b33Ec",
"token": "0x8741Ba6225A6BF91f9D73531A98A89807857a2B3",
"ammWrapper": "0x0000000000000000000000000000000000000000"
},
{
"name": "UNI",
"bridge": "0xb07c6505e1E41112494123e40330c5Ac09817CFB",
"token": "0x7823E8DCC8bfc23EA3AC899EB86921f90e80F499",
"ammWrapper": "0x0000000000000000000000000000000000000000"
}
],
"approvals": [
{
"a_tokenAddress": "0x2C1b868d6596a18e32E61B901E4060C872647b6C",
"b_contractAddress": "0xC08055b634D43F2176d721E26A3428D3b7E7DdB5",
"c_tokenName": "ETH",
"d_contractName": "l2AmmWrapper"
},
{
"a_tokenAddress": "0x2C1b868d6596a18e32E61B901E4060C872647b6C",
"b_contractAddress": "0x7191061D5d4C60f598214cC6913502184BAddf18",
"c_tokenName": "ETH",
"d_contractName": "l2SaddleSwap"
},
{
"a_tokenAddress": "0x6F03052743CD99ce1b29265E377e320CD24Eb632",
"b_contractAddress": "0x2E9bB44C9CB774939462eF874Fc854D8df524F13",
"c_tokenName": "HOP",
"d_contractName": "l2Bridge"
},
{
"a_tokenAddress": "0xf56dc6695cF1f5c364eDEbC7Dc7077ac9B586068",
"b_contractAddress": "0x50d7d8B850e0e880295800790551928F4546BfE2",
"c_tokenName": "USDC",
"d_contractName": "l2AmmWrapper"
},
{
"a_tokenAddress": "0xf56dc6695cF1f5c364eDEbC7Dc7077ac9B586068",
"b_contractAddress": "0x723194C6Cfed24883b598931Ee802ab80952C001",
"c_tokenName": "USDC",
"d_contractName": "l2SaddleSwap"
},
{
"a_tokenAddress": "0x1990BC6dfe2ef605Bfc08f5A23564dB75642Ad73",
"b_contractAddress": "0xdb16fbF595C02EeF7D9233d38C232495734F3D85",
"c_tokenName": "USDT",
"d_contractName": "l2Bridge"
},
{
"a_tokenAddress": "0x8741Ba6225A6BF91f9D73531A98A89807857a2B3",
"b_contractAddress": "0xf11EBB94EC986EA891Aec29cfF151345C83b33Ec",
"c_tokenName": "DAI",
"d_contractName": "l2Bridge"
},
{
"a_tokenAddress": "0x7823E8DCC8bfc23EA3AC899EB86921f90e80F499",
"b_contractAddress": "0xb07c6505e1E41112494123e40330c5Ac09817CFB",
"c_tokenName": "UNI",
"d_contractName": "l2Bridge"
}
]
}
}
18 changes: 16 additions & 2 deletions config/multichain.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"324": {
"routers": ["0xd51194aa5c2e162371682cb43ed637bca632fac8"],
"zksyncera": {
"routers": [
"0xd51194aa5c2e162371682cb43ed637bca632fac8"
],
"anyNative": "0x7bcd44c0b91be28827426f607424e1a8a02d4e69",
"tokens": [
{
Expand Down Expand Up @@ -4791,5 +4793,17 @@
"b_anyTokenAddress": "0x3d4e1981f822e87a1a4c05f2e4b3bcade5406ae3"
}
]
},
"mumbai": {
"routers": [
"0x0000000000000000000000000000000000000002"
],
"anyNative": "0x0000000000000000000000000000000000000001"
},
"localanvil": {
"routers": [
"0x0000000000000000000000000000000000000002"
],
"anyNative": "0x0000000000000000000000000000000000000001"
}
}
4 changes: 3 additions & 1 deletion config/oftwrapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"avalanche": "0x2eF002aa0AB6761B6aEa8d639DcdAa20d79b768c",
"moonbeam": "0x2eF002aa0AB6761B6aEa8d639DcdAa20d79b768c",
"goerli": "0xDCbbEC8fB151E631F499CED845829c4db470f390",
"bscTestnet": "0xFEC8D14791AD618CffbFc1c3F181534092f95612"
"bscTestnet": "0xFEC8D14791AD618CffbFc1c3F181534092f95612",
"mumbai": "0x0000000000000000000000000000000000000000",
"localanvil": "0x0000000000000000000000000000000000000000"
},
"chains": [
{
Expand Down
194 changes: 194 additions & 0 deletions config/optimism.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,199 @@
"bridge": "0xd8f365c2c85648f9b89d9f1bf72c0ae4b1c36cfd"
}
]
},
"mumbai": {
"standardBridge": "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1",
"tokens": [
{
"assetId": "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
"bridge": "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4"
},
{
"assetId": "0x6b175474e89094c44da98b954eedeac495271d0f",
"bridge": "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"
},
{
"assetId": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"bridge": "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"
},
{
"assetId": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
"bridge": "0x68f180fcCe6836688e9084f035309E29Bf0A2095"
},
{
"assetId": "0xb6ed7644c69416d67b522e20bc294a9a9b405b31",
"bridge": "0xe0BB0D3DE8c10976511e5030cA403dBf4c25165B"
},
{
"assetId": "0x514910771af9ca656af840dff83e8264ecf986ca",
"bridge": "0x350a791Bfc2C21F9Ed5d10980Dad2e2638ffa7f6"
},
{
"assetId": "0xc18360217d8f7ab5e7c516566761ea12ce7f9d72",
"bridge": "0x65559aA14915a70190438eF90104769e5E890A00"
},
{
"assetId": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"bridge": "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"
},
{
"assetId": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
"bridge": "0x6fd9d7AD17242c41f7131d257212c54A0e816691"
},
{
"assetId": "0x5f98805a4e8be255a32880fdec7f6728c6568ba0",
"bridge": "0xc40F949F8a4e094D1b49a23ea9241D289B7b2819"
},
{
"assetId": "0xd291e7a03283640fdc51b121ac401383a46cc623",
"bridge": "0xB548f63D4405466B36C0c0aC3318a22fDcec711a"
},
{
"assetId": "0x03ab458634910aad20ef5f1c8ee96f1d6ac54919",
"bridge": "0x7FB688CCf682d58f86D7e38e03f9D22e7705448B"
},
{
"assetId": "0xae78736cd615f374d3085123a210448e74fc6393",
"bridge": "0x9Bcef72be871e61ED4fBbc7630889beE758eb81D"
},
{
"assetId": "0x7ae1d57b58fa6411f32948314badd83583ee0e8c",
"bridge": "0x00F932F0FE257456b32dedA4758922E56A4F4b42"
},
{
"assetId": "0x7697b462a7c4ff5f8b55bdbc2f4076c2af9cf51a",
"bridge": "0x7c6b91D9Be155A6Db01f749217d76fF02A7227F2"
},
{
"assetId": "0x15ee120fd69bec86c1d38502299af7366a41d1a6",
"bridge": "0x5029C236320b8f15eF0a657054B84d90bfBEDED3"
},
{
"assetId": "0x3c513db8bdc3806e4489d62c3d549a5aaf6a4e97",
"bridge": "0xc98B98d17435AA00830c87eA02474C5007E1f272"
},
{
"assetId": "0x01ba67aac7f75f647d94220cc98fb30fcc5105bf",
"bridge": "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb"
},
{
"assetId": "0x04fa0d235c4abf4bcf4787af4cf447de572ef828",
"bridge": "0xE7798f023fC62146e8Aa1b36Da45fb70855a77Ea"
},
{
"assetId": "0xbc396689893d065f41bc2c6ecbee5e0085233447",
"bridge": "0x9e1028F5F1D5eDE59748FFceE5532509976840E0"
},
{
"assetId": "0x431ad2ff6a9c365805ebad47ee021148d6f7dbe0",
"bridge": "0x9e5AAC1Ba1a2e6aEd6b32689DFcF62A509Ca96f3"
},
{
"assetId": "0x0a5e677a6a24b2f1a2bf4f3bffc443231d2fdec8",
"bridge": "0xbfD291DA8A403DAAF7e5E9DC1ec0aCEaCd4848B9"
},
{
"assetId": "0x0391d2021f89dc339f60fff84546ea23e337750f",
"bridge": "0x3e7eF8f50246f725885102E8238CBba33F276747"
},
{
"assetId": "0x259ab9b9eab62b0fd98729b97be121073d5b3479",
"bridge": "0x7b0bcC23851bBF7601efC9E9FE532Bf5284F65d3"
},
{
"assetId": "0x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e6",
"bridge": "0x1da650c3b2daa8aa9ff6f661d4156ce24d08a062"
},
{
"assetId": "0x3af33bef05c2dcb3c7288b77fe1c8d2aeba4d789",
"bridge": "0xf98dcd95217e15e05d8638da4c91125e59590b07"
},
{
"assetId": "0xca1207647ff814039530d7d35df0e1dd2e91fa84",
"bridge": "0xAF9fE3B5cCDAe78188B1F8b9a49Da7ae9510F151"
},
{
"assetId": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
"bridge": "0xab7badef82e9fe11f6f33f87bc9bc2aa27f2fcb5"
},
{
"assetId": "0x102e941b77bcaa7e35d368cafe51ef8f79c8d1ef",
"bridge": "0x3bB4445D30AC020a84c1b5A8A2C6248ebC9779D0"
},
{
"assetId": "0x69af81e73a73b40adf4f3d4223cd9b1ece623074",
"bridge": "0x3390108E913824B8eaD638444cc52B9aBdF63798"
},
{
"assetId": "0xd533a949740bb3306d119cc777fa900ba034cd52",
"bridge": "0x0994206dfe8de6ec6920ff4d779b0d950605fb53"
},
{
"assetId": "0x42d6622dece394b54999fbd73d108123806f6a18",
"bridge": "0xcfD1D50ce23C46D3Cf6407487B2F8934e96DC8f9"
},
{
"assetId": "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd",
"bridge": "0xFEaA9194F9F8c1B65429E31341a103071464907E"
},
{
"assetId": "0x8947da500eb47f82df21143d0c01a29862a8c3c5",
"bridge": "0x217D47011b23BB961eB6D93cA9945B7501a5BB11"
},
{
"assetId": "0xa693b19d2931d498c5b318df961919bb4aee87a5",
"bridge": "0xBA28feb4b6A6b81e3F26F08b83a19E715C4294fd"
},
{
"assetId": "0xb4272071ecadd69d933adcd19ca99fe80664fc08",
"bridge": "0xE4F27b04cC7729901876B44f4EAA5102EC150265"
},
{
"assetId": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
"bridge": "0x76FB31fb4af56892A25e32cFC43De717950c9278"
},
{
"assetId": "0x1da87b114f35e1dc91f72bf57fc07a768ad40bb0",
"bridge": "0x81ab7e0d570b01411fcc4afd3d50ec8c241cb74b"
},
{
"assetId": "0xbea98c05eeae2f3bc8c3565db7551eb738c8ccab",
"bridge": "0x117cFd9060525452db4A34d51c0b3b7599087f05"
},
{
"assetId": "0xba100000625a3754423978a60c9317c58a424e3d",
"bridge": "0xFE8B128bA8C78aabC59d4c64cEE7fF28e9379921"
},
{
"assetId": "0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",
"bridge": "0x1eba7a6a72c894026cd654ac5cdcf83a46445b08"
},
{
"assetId": "0x865377367054516e17014ccded1e7d814edc9ce4",
"bridge": "0x8aE125E8653821E851F12A49F7765db9a9ce7384"
},
{
"assetId": "0xbb9bc244d798123fde783fcc1c72d3bb8c189413",
"bridge": "0xd8f365c2c85648f9b89d9f1bf72c0ae4b1c36cfd"
}
]
},
"localanvil": {
"standardBridge": "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1",
"tokens": [
{
"assetId": "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
"bridge": "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4"
},
{
"assetId": "0x6b175474e89094c44da98b954eedeac495271d0f",
"bridge": "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"
},
{
"assetId": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"bridge": "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"
}
]
}
}
3 changes: 2 additions & 1 deletion config/stargate.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"bsc-testnet": "0x0000000000000000000000000000000000000000",
"sepolia": "0x0000000000000000000000000000000000000000",
"lineatest": "0x0000000000000000000000000000000000000000",
"polygonzkevm": "0x0000000000000000000000000000000000000000"
"polygonzkevm": "0x0000000000000000000000000000000000000000",
"localanvil": "0x0000000000000000000000000000000000000000"
},
"chains": [
{
Expand Down
Loading

0 comments on commit 33617e4

Please sign in to comment.