Skip to content

Commit

Permalink
feat(symbiosis): Add SymbiosisFacet 1.0.0 (#506)
Browse files Browse the repository at this point in the history
* Add Symbiosis Finance to LiFi (#475)

* init commit

* moving initiate test functions after setup

* formatting UpdateSymbiosisFacet.s.sol

* naming fix

* fix function signature  and docs

* back calldata to memory

* enable implicit casting memory to calldata

* rollback to memory

* Update docs/SymbiosisFacet.md

Co-authored-by: satoshi-lifi <[email protected]>

* update comments

* ascending order in config

* fix deploy/update scripts

* add symbiosis to deployRequirements.json

* rename symbiosisData

* updating comments in ISymbiosisMetaRouter.sol

* add comments to _otherSideCalldata

* delete native swaps test comment

* fix comments and delete unused interface

* fixed other side calldata in SymbiosisFacet test

* delete extra tests

* delete extra tests with native assets

---------

Co-authored-by: vvvvv <vvvvvv>
Co-authored-by: satoshi-lifi <[email protected]>
Co-authored-by: Илья Прокофьев <[email protected]>

* Fix tests

* Deploy to arbitrum staging

* Handle approved tokens

* Deploy new version to staging

* Update staging deployments

* Update staging deployments

* fix merge conflicts

* deploy to production

* Remove junk file

* Update tests to use live contracts

* update comment

---------

Co-authored-by: vlcr777888 <[email protected]>
Co-authored-by: satoshi-lifi <[email protected]>
Co-authored-by: Илья Прокофьев <[email protected]>
Co-authored-by: Daniel Bläcker <[email protected]>
  • Loading branch information
5 people authored Feb 27, 2024
1 parent f063575 commit 2707eb2
Show file tree
Hide file tree
Showing 31 changed files with 925 additions and 12 deletions.
46 changes: 46 additions & 0 deletions config/symbiosis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"mainnet": {
"metaRouter": "0xf621Fb08BBE51aF70e7E0F4EA63496894166Ff7F",
"gateway": "0xfCEF2Fe72413b65d3F393d278A714caD87512bcd"
},
"arbitrum": {
"metaRouter": "0xf7e96217347667064DEE8f20DB747B1C7df45DDe",
"gateway": "0x80ddDDa846e779cceE463bDC0BCc2Ae296feDaF9"
},
"avalanche": {
"metaRouter": "0x6F0f6393e45fE0E7215906B6f9cfeFf53EA139cf",
"gateway": "0x4cfA66497Fa84D739a0f785FBcEe9196f1C64e4a"
},
"base": {
"metaRouter": "0x691df9C4561d95a4a726313089c8536dd682b946",
"gateway": "0x41Ae964d0F61Bb5F5e253141A462aD6F3b625B92"
},
"boba": {
"metaRouter": "0xca506793A420E901BbCa8066be5661E3C52c84c2",
"gateway": "0xd92Ca299F1C2518E78E48C207b64591BA6E9b9a8"
},
"bsc": {
"metaRouter": "0x44487a445a7595446309464A82244B4bD4e325D5",
"gateway": "0x5c97D726bf5130AE15408cE32bc764e458320D2f"
},
"linea": {
"metaRouter": "0x9A31bAC4b3B958C835C243800B474818D04393dd",
"gateway": "0x83f71AabdDBb9F0E3B6462Cc7635b6fFAD0f2f2e"
},
"optimism": {
"metaRouter": "0x0f91052dc5B4baE53d0FeA5DAe561A117268f5d2",
"gateway": "0x200a0fe876421DC49A26508e3Efd0a1008fD12B5"
},
"polygon": {
"metaRouter": "0xa260E3732593E4EcF9DdC144fD6C4c5fe7077978",
"gateway": "0xAb83653fd41511D638b69229afBf998Eb9B0F30c"
},
"zkSync": {
"metaRouter": "0x38307CB291Af47Af9847c134a34E9477c939Ca28",
"gateway": "0x8cA239448AdD34b057D1CB5934F12AC899DB66e1"
},
"polygonzkevm": {
"metaRouter": "0xb91d3060C90aac7c4c706aef2B37997b3b2a1DcF",
"gateway": "0x668961F4923A4FB96b22ad1F18aE215bB2694593"
}
}
152 changes: 152 additions & 0 deletions deployments/_deployments_log_file.json
Original file line number Diff line number Diff line change
Expand Up @@ -15167,5 +15167,157 @@
]
}
}
},
"SymbiosisFacet": {
"arbitrum": {
"staging": {
"1.0.0": [
{
"ADDRESS": "0xb590b3B312f3C73621aa1E363841c8baecc2E712",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-02-23 12:19:14",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000f7e96217347667064dee8f20db747b1c7df45dde00000000000000000000000080dddda846e779ccee463bdc0bcc2ae296fedaf9",
"SALT": "",
"VERIFIED": "true"
}
]
},
"production": {
"1.0.0": [
{
"ADDRESS": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-02-23 12:35:20",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000f7e96217347667064dee8f20db747b1c7df45dde00000000000000000000000080dddda846e779ccee463bdc0bcc2ae296fedaf9",
"SALT": "",
"VERIFIED": "true"
}
]
}
},
"optimism": {
"staging": {
"1.0.0": [
{
"ADDRESS": "0xb590b3B312f3C73621aa1E363841c8baecc2E712",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-02-23 12:23:14",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000000f91052dc5b4bae53d0fea5dae561a117268f5d2000000000000000000000000200a0fe876421dc49a26508e3efd0a1008fd12b5",
"SALT": "",
"VERIFIED": "false"
}
]
},
"production": {
"1.0.0": [
{
"ADDRESS": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-02-23 12:38:32",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000000f91052dc5b4bae53d0fea5dae561a117268f5d2000000000000000000000000200a0fe876421dc49a26508e3efd0a1008fd12b5",
"SALT": "",
"VERIFIED": "true"
}
]
}
},
"avalanche": {
"production": {
"1.0.0": [
{
"ADDRESS": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-02-23 12:34:27",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000006f0f6393e45fe0e7215906b6f9cfeff53ea139cf0000000000000000000000004cfa66497fa84d739a0f785fbcee9196f1c64e4a",
"SALT": "",
"VERIFIED": "true"
}
]
}
},
"base": {
"production": {
"1.0.0": [
{
"ADDRESS": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-02-23 12:36:13",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000691df9c4561d95a4a726313089c8536dd682b94600000000000000000000000041ae964d0f61bb5f5e253141a462ad6f3b625b92",
"SALT": "",
"VERIFIED": "true"
}
]
}
},
"bsc": {
"production": {
"1.0.0": [
{
"ADDRESS": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-02-23 12:37:46",
"CONSTRUCTOR_ARGS": "0x00000000000000000000000044487a445a7595446309464a82244b4bd4e325d50000000000000000000000005c97d726bf5130ae15408ce32bc764e458320d2f",
"SALT": "",
"VERIFIED": "true"
}
]
}
},
"mainnet": {
"production": {
"1.0.0": [
{
"ADDRESS": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-02-23 12:39:34",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000f621fb08bbe51af70e7e0f4ea63496894166ff7f000000000000000000000000fcef2fe72413b65d3f393d278a714cad87512bcd",
"SALT": "",
"VERIFIED": "true"
}
]
}
},
"polygonzkevm": {
"production": {
"1.0.0": [
{
"ADDRESS": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-02-23 12:40:24",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000b91d3060c90aac7c4c706aef2b37997b3b2a1dcf000000000000000000000000668961f4923a4fb96b22ad1f18ae215bb2694593",
"SALT": "",
"VERIFIED": "false"
}
]
}
},
"polygon": {
"production": {
"1.0.0": [
{
"ADDRESS": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-02-23 12:39:20",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000a260e3732593e4ecf9ddc144fd6c4c5fe7077978000000000000000000000000ab83653fd41511d638b69229afbf998eb9b0f30c",
"SALT": "",
"VERIFIED": "true"
}
]
}
},
"linea": {
"production": {
"1.0.0": [
{
"ADDRESS": "0x57F4d19AeC341F50BaBB55beDF73C4B87EE400ba",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-02-23 12:49:52",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000009a31bac4b3b958c835c243800b474818d04393dd00000000000000000000000083f71aabddbb9f0e3b6462cc7635b6ffad0f2f2e",
"SALT": "",
"VERIFIED": "true"
}
]
}
}
}
}
4 changes: 4 additions & 0 deletions deployments/arbitrum.diamond.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
"0xF18A285f4e6f720Eb9b4e05df71f88b9552E6ADB": {
"Name": "AmarokFacetPacked",
"Version": "1.0.0"
},
"0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a": {
"Name": "SymbiosisFacet",
"Version": "1.0.0"
}
},
"Periphery": {
Expand Down
4 changes: 4 additions & 0 deletions deployments/arbitrum.diamond.staging.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@
"Name": "SynapseBridgeFacet",
"Version": "1.0.0"
},
"0xb590b3B312f3C73621aa1E363841c8baecc2E712": {
"Name": "SymbiosisFacet",
"Version: "1.0.0"
},
"0xE500dED7b9C9f1020870B7a6Db076Dbd892C0fea": {
"Name": "DeBridgeDlnFacet",
"Version": "1.0.0"
Expand Down
3 changes: 2 additions & 1 deletion deployments/arbitrum.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
"CalldataVerificationFacet": "0x7A5c119ec5dDbF9631cf40f6e5DB28f31d4332a0",
"LiFuelFeeCollector": "0xc4f7A34b8d283f66925eF0f5CCdFC2AF3030DeaE",
"AcrossFacetPacked": "0xE397c4883ec89ed4Fc9D258F00C689708b2799c9",
"AmarokFacetPacked": "0xF18A285f4e6f720Eb9b4e05df71f88b9552E6ADB"
"AmarokFacetPacked": "0xF18A285f4e6f720Eb9b4e05df71f88b9552E6ADB",
"SymbiosisFacet": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a"
}
1 change: 1 addition & 0 deletions deployments/arbitrum.staging.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
"RelayerCelerIM": "0x9d3573b1d85112446593f617f1f3eb5ec1778D27",
"ServiceFeeCollector": "0x9cc3164f01ED3796Fdf7Da538484D634608D2203",
"WormholeFacet": "0x7260Fd3F8D0bEb06fF5935C6eadE9f406107c270",
"SymbiosisFacet": "0xb590b3B312f3C73621aa1E363841c8baecc2E712",
"DeBridgeDlnFacet": "0xE500dED7b9C9f1020870B7a6Db076Dbd892C0fea"
}
4 changes: 4 additions & 0 deletions deployments/avalanche.diamond.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
"0xC3cD90545f30F4F9E71e582510Cc64ab5a743E85": {
"Name": "ThorSwapFacet",
"Version": "1.0.0"
},
"0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a": {
"Name": "SymbiosisFacet",
"Version": "1.0.0"
}
},
"Periphery": {
Expand Down
3 changes: 2 additions & 1 deletion deployments/avalanche.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"CalldataVerificationFacet": "0x7A5c119ec5dDbF9631cf40f6e5DB28f31d4332a0",
"LiFuelFeeCollector": "0xc4f7A34b8d283f66925eF0f5CCdFC2AF3030DeaE",
"AllBridgeFacet": "0x85f9c55B22bd2c389b560130F878CeB8b289C4c4",
"ThorSwapFacet": "0xC3cD90545f30F4F9E71e582510Cc64ab5a743E85"
"ThorSwapFacet": "0xC3cD90545f30F4F9E71e582510Cc64ab5a743E85",
"SymbiosisFacet": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a"
}
4 changes: 4 additions & 0 deletions deployments/base.diamond.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
"0x9b3C5C83b0E1415BA91bBc9486102e80362F0629": {
"Name": "AllBridgeFacet",
"Version": "2.0.0"
},
"0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a": {
"Name": "SymbiosisFacet",
"Version": "1.0.0"
}
},
"Periphery": {
Expand Down
3 changes: 2 additions & 1 deletion deployments/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
"CBridgeFacetPacked": "0x4f62E7a939C62316F76E2afC644A9A907Dc30D2d",
"AllBridgeFacet": "0x9b3C5C83b0E1415BA91bBc9486102e80362F0629",
"AcrossFacetPacked": "0xE397c4883ec89ed4Fc9D258F00C689708b2799c9",
"AmarokFacet": "0x8782a38Afb46B291E4b7409C90De10B95b96a78D"
"AmarokFacet": "0x8782a38Afb46B291E4b7409C90De10B95b96a78D",
"SymbiosisFacet": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a"
}
4 changes: 4 additions & 0 deletions deployments/bsc.diamond.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
"0xF18A285f4e6f720Eb9b4e05df71f88b9552E6ADB": {
"Name": "AmarokFacetPacked",
"Version": "1.0.0"
},
"0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a": {
"Name": "SymbiosisFacet",
"Version": "1.0.0"
}
},
"Periphery": {
Expand Down
3 changes: 2 additions & 1 deletion deployments/bsc.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@
"CalldataVerificationFacet": "0x7A5c119ec5dDbF9631cf40f6e5DB28f31d4332a0",
"LiFuelFeeCollector": "0xc4f7A34b8d283f66925eF0f5CCdFC2AF3030DeaE",
"ThorSwapFacet": "0xC3cD90545f30F4F9E71e582510Cc64ab5a743E85",
"AmarokFacetPacked": "0xF18A285f4e6f720Eb9b4e05df71f88b9552E6ADB"
"AmarokFacetPacked": "0xF18A285f4e6f720Eb9b4e05df71f88b9552E6ADB",
"SymbiosisFacet": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a"
}
10 changes: 9 additions & 1 deletion deployments/linea.diamond.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
"Name": "CalldataVerificationFacet",
"Version": "1.1.1"
},
"0xFa3f966fDf2eC20ef92d399A0012131915ccb9Fc": {
"Name": "",
"Version": ""
},
"0xf4E632a8be2164F93427603F6c9A73e182923b02": {
"Name": "HopFacet",
"Version": "2.0.0"
Expand All @@ -76,6 +80,10 @@
"0x6569c96727C85d8497CDfDC32bEE6686eD474e89": {
"Name": "AmarokFacetPacked",
"Version": "1.0.0"
},
"0x57F4d19AeC341F50BaBB55beDF73C4B87EE400ba": {
"Name": "SymbiosisFacet",
"Version": "1.0.0"
}
},
"Periphery": {
Expand All @@ -88,4 +96,4 @@
"ServiceFeeCollector": "0xA8Fe73F7b3a825fF51f2200af12c16B3BA95394d"
}
}
}
}
3 changes: 2 additions & 1 deletion deployments/linea.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"HopFacetPacked": "0x71327AF4f53E8831BD7E1adDbeD9D2b6dacE64a2",
"HopFacetOptimized": "0xf812bA858d9Fa57788dF0F792eF35752d54863F1",
"AmarokFacet": "0x967D0f9181521a407613495e68e5F8D22b49e513",
"AmarokFacetPacked": "0x6569c96727C85d8497CDfDC32bEE6686eD474e89"
"AmarokFacetPacked": "0x6569c96727C85d8497CDfDC32bEE6686eD474e89",
"SymbiosisFacet": "0x57F4d19AeC341F50BaBB55beDF73C4B87EE400ba"
}
4 changes: 4 additions & 0 deletions deployments/mainnet.diamond.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
"0xF18A285f4e6f720Eb9b4e05df71f88b9552E6ADB": {
"Name": "AmarokFacetPacked",
"Version": "1.0.0"
},
"0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a": {
"Name": "SymbiosisFacet",
"Version": "1.0.0"
}
},
"Periphery": {
Expand Down
3 changes: 2 additions & 1 deletion deployments/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@
"LiFuelFeeCollector": "0xc4f7A34b8d283f66925eF0f5CCdFC2AF3030DeaE",
"ThorSwapFacet": "0xC3cD90545f30F4F9E71e582510Cc64ab5a743E85",
"AcrossFacetPacked": "0xE397c4883ec89ed4Fc9D258F00C689708b2799c9",
"AmarokFacetPacked": "0xF18A285f4e6f720Eb9b4e05df71f88b9552E6ADB"
"AmarokFacetPacked": "0xF18A285f4e6f720Eb9b4e05df71f88b9552E6ADB",
"SymbiosisFacet": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a"
}
4 changes: 4 additions & 0 deletions deployments/optimism.diamond.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
"0xF18A285f4e6f720Eb9b4e05df71f88b9552E6ADB": {
"Name": "AmarokFacetPacked",
"Version": "1.0.0"
},
"0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a": {
"Name": "SymbiosisFacet",
"Version": "1.0.0"
}
},
"Periphery": {
Expand Down
6 changes: 5 additions & 1 deletion deployments/optimism.diamond.staging.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
"0xd4c115C8e54014Aae8109f72c3395D15b3400A9E": {
"Name": "AcrossFacetPacked",
"Version": "1.0.0"
},
"0xb590b3B312f3C73621aa1E363841c8baecc2E712": {
"Name": "SymbiosisFacet",
"Version": "1.0.0"
}
},
"Periphery": {
Expand All @@ -56,4 +60,4 @@
"ServiceFeeCollector": "0x0874Be3949ABF784C11E5f822F1a54c8655904C1"
}
}
}
}
3 changes: 2 additions & 1 deletion deployments/optimism.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"LiFuelFeeCollector": "0xc4f7A34b8d283f66925eF0f5CCdFC2AF3030DeaE",
"AllBridgeFacet": "0x71205D77043848B57243A3F7eA133E11A3dd346b",
"AcrossFacetPacked": "0xE397c4883ec89ed4Fc9D258F00C689708b2799c9",
"AmarokFacetPacked": "0xF18A285f4e6f720Eb9b4e05df71f88b9552E6ADB"
"AmarokFacetPacked": "0xF18A285f4e6f720Eb9b4e05df71f88b9552E6ADB",
"SymbiosisFacet": "0xe12b2488c71432F9a116E9ac244D3Ef4c2386d3a"
}
Loading

0 comments on commit 2707eb2

Please sign in to comment.