-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: v3 migration * fix: pretty * feat: teleporter modal * fix: polish position migration * fix: update mainnet configuration * fix: v2 snx price * feat: migration success * feat: migrate USD modal * fix: convert usd button * feat: pools page design updates * feat: migration alert * fix: update sepolia migration * fix: ci * mainnet wip * fix: liquidity positions loading fix * fix: migration for sepolia * fix: v2 staked collateral amount * fix: deps * fix: typo * fix: migration summary division error * fix: circular dependency * fix: deps * feat: migration improvments * fix: tests * fix: alerts style * feat: account migration QA * fix: ui improvments * fix: migration UI improvements * fix: finilise migration ui * fix: ui issues * fix: migration ui issues * feat: base undelegate alert * fix: total assets value * feat: migration open query param * fix: tests --------- Co-authored-by: jmzwar <james.zwar@protonmail.com>
- Loading branch information
Showing
96 changed files
with
3,535 additions
and
1,447 deletions.
There are no files selected for viewing
Binary file added
BIN
+12.8 MB
.yarn/cache/@synthetixio-contracts-npm-1.2.3-6fb48cb664-db21ac9403.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
export async function importLegacyMarket(chainId, preset) { | ||
if (!preset) { | ||
throw new Error(`Missing preset`); | ||
} | ||
const deployment = `${Number(chainId).toFixed(0)}-${preset}`; | ||
switch (deployment) { | ||
case '1-main': { | ||
const [{ default: meta }, { default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/1-main/meta.json'), | ||
import('@synthetixio/v3-contracts/1-main/LegacyMarketProxy.readable.json'), | ||
]); | ||
return { address: meta.contracts.LegacyMarketProxy, abi }; | ||
} | ||
case '11155111-main': { | ||
const [{ default: meta }, { default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/11155111-main/meta.json'), | ||
import('@synthetixio/v3-contracts/11155111-main/LegacyMarketProxy.readable.json'), | ||
]); | ||
return { address: meta.contracts.LegacyMarketProxy, abi }; | ||
} | ||
/*case '10-main': { | ||
const [{ default: meta }, { default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/10-main/meta.json'), | ||
import('@synthetixio/v3-contracts/10-main/LegacyMarketProxy.readable.json'), | ||
]); | ||
return { address: meta.contracts.LegacyMarketProxy, abi }; | ||
}*/ | ||
default: { | ||
throw new Error(`Unsupported deployment ${deployment} for Extras`); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
export async function importV2x(chainId, preset) { | ||
if (!preset) { | ||
throw new Error(`Missing preset`); | ||
} | ||
const deployment = `${Number(chainId).toFixed(0)}-${preset}`; | ||
switch (deployment) { | ||
case '1-main': { | ||
const [{ default: meta }, { default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/1-main/meta.json'), | ||
import('@synthetixio/v3-contracts/1-main/V2x.readable.json'), | ||
]); | ||
return { address: meta.contracts.V2x, abi }; | ||
} | ||
case '11155111-main': { | ||
const [{ default: meta }, { default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/11155111-main/meta.json'), | ||
import('@synthetixio/v3-contracts/11155111-main/V2x.readable.json'), | ||
]); | ||
return { address: meta.contracts.V2x, abi }; | ||
} | ||
/*case '10-main': { | ||
const [{ default: meta }, { default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/10-main/meta.json'), | ||
import('@synthetixio/v3-contracts/10-main/V2x.readable.json'), | ||
]); | ||
return { address: meta.contracts.V2x, abi }; | ||
}*/ | ||
default: { | ||
throw new Error(`Unsupported deployment ${deployment} for V2x`); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './useLegacyMarket'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "@snx-v3/useLegacyMarket", | ||
"private": true, | ||
"main": "index.ts", | ||
"version": "0.0.1", | ||
"dependencies": { | ||
"@ethersproject/contracts": "^5.7.0", | ||
"@snx-v3/contracts": "workspace:*", | ||
"@snx-v3/useBlockchain": "workspace:*", | ||
"@tanstack/react-query": "^5.8.3", | ||
"react": "^18.2.0" | ||
} | ||
} |
Oops, something went wrong.