-
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.
* Add missing chains to withERC7412 * Fix displaying Arbthetix * Fallback for UNKNOWN Token Icon * @snx-v3/useTokenInfo * Support arbitrum deployment * Fix rewards for different pool collaterals * Show all rewards when looking at the pool * Fix supported chains * Add all the subgraphs for all deployments * Typecheck harder
- Loading branch information
Showing
31 changed files
with
454 additions
and
169 deletions.
There are no files selected for viewing
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,59 @@ | ||
export async function importAllErrors(chainId, preset) { | ||
if (!preset) { | ||
throw new Error(`Missing preset`); | ||
} | ||
const deployment = `${Number(chainId).toFixed(0)}-${preset}`; | ||
switch (deployment) { | ||
case '1-main': { | ||
const [{ default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/1-main/AllErrors.readable.json'), | ||
]); | ||
return { address: undefined, abi }; | ||
} | ||
case '11155111-main': { | ||
const [{ default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/11155111-main/AllErrors.readable.json'), | ||
]); | ||
return { address: undefined, abi }; | ||
} | ||
case '10-main': { | ||
const [{ default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/10-main/AllErrors.readable.json'), | ||
]); | ||
return { address: undefined, abi }; | ||
} | ||
case '8453-andromeda': { | ||
const [{ default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/8453-andromeda/AllErrors.readable.json'), | ||
]); | ||
return { address: undefined, abi }; | ||
} | ||
case '84532-andromeda': { | ||
const [{ default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/84532-andromeda/AllErrors.readable.json'), | ||
]); | ||
return { address: undefined, abi }; | ||
} | ||
case '42161-main': { | ||
const [{ default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/42161-main/AllErrors.readable.json'), | ||
]); | ||
return { address: undefined, abi }; | ||
} | ||
case '421614-main': { | ||
const [{ default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/421614-main/AllErrors.readable.json'), | ||
]); | ||
return { address: undefined, abi }; | ||
} | ||
case '42161-arbthetix': { | ||
const [{ default: abi }] = await Promise.all([ | ||
import('@synthetixio/v3-contracts/42161-arbthetix/AllErrors.readable.json'), | ||
]); | ||
return { address: undefined, abi }; | ||
} | ||
default: { | ||
throw new Error(`Unsupported deployment ${deployment} for AllErrors`); | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.