diff --git a/.github/workflows/apps-evm-e2e.yml b/.github/workflows/apps-evm-e2e.yml index f904322af4..9d31c18446 100644 --- a/.github/workflows/apps-evm-e2e.yml +++ b/.github/workflows/apps-evm-e2e.yml @@ -1,18 +1,18 @@ name: Sushi - apps / evm on: - pull_request: - types: [opened, synchronize] - paths: - - ".github/workflows/apps-evm-e2e.yml" - - "apps/evm/**" - - "config/nextjs/**" - - "config/router/**" - - "config/tailwindcss/**" - - "config/typescript/**" - - "config/viem/**" - - "config/wagmi/**" - - "packages/**" + # pull_request: + # types: [opened, synchronize] + # paths: + # - ".github/workflows/apps-evm-e2e.yml" + # - "apps/evm/**" + # - "config/nextjs/**" + # - "config/router/**" + # - "config/tailwindcss/**" + # - "config/typescript/**" + # - "config/viem/**" + # - "config/wagmi/**" + # - "packages/**" workflow_dispatch: env: diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 150bed71ea..52dd4c8bd5 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -1,12 +1,13 @@ name: 'Chromatic' on: - pull_request: - types: [opened, synchronize] - paths: - - ".github/workflows/chromatic.yml" - - "config/tailwindcss/**" - - "packages/ui/**" + # pull_request: + # types: [opened, synchronize] + # paths: + # - ".github/workflows/chromatic.yml" + # - "config/tailwindcss/**" + # - "packages/ui/**" + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/rain-ci.yml b/.github/workflows/rain-ci.yml new file mode 100644 index 0000000000..aaa7e6dc03 --- /dev/null +++ b/.github/workflows/rain-ci.yml @@ -0,0 +1,26 @@ +name: Rain CI +on: [push] + +jobs: + install-build-lint-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: DeterminateSystems/nix-installer-action@v4 + - uses: DeterminateSystems/magic-nix-cache-action@v2 + + - name: Install deps + run: nix develop -c pnpm install --frozen-lockfile + + - name: Build ./packages/sushi + run: nix develop -c pnpm exec turbo run build --filter=./packages/sushi + + - name: Lint + run: nix develop -c pnpm lint + + - name: Check ./packages/sushi Types + run: nix develop -c pnpm exec turbo run check --filter=./packages/sushi + + - name: Test ./packages/sushi + run: nix develop -c pnpm exec turbo run test --filter=./packages/sushi \ No newline at end of file diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index fc63f6dbc4..b696c5da82 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -3,8 +3,9 @@ name: Sushi - verify # workflow_call: # workflow_dispatch: on: - pull_request: - types: [opened, synchronize] + # pull_request: + # types: [opened, synchronize] + workflow_dispatch: env: TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: ${{ secrets.TURBO_TEAM }} diff --git a/.gitignore b/.gitignore index 128f57f1b7..a3f851728c 100644 --- a/.gitignore +++ b/.gitignore @@ -60,6 +60,7 @@ exports # cache cache +mem-cache # generated generated diff --git a/packages/hooks/src/usePinnedTokens.ts b/packages/hooks/src/usePinnedTokens.ts index 7950e52b33..3b3e69f478 100644 --- a/packages/hooks/src/usePinnedTokens.ts +++ b/packages/hooks/src/usePinnedTokens.ts @@ -12,6 +12,11 @@ import { import { ARB, DAI, + ENOSYS_APS, + ENOSYS_BNZ, + ENOSYS_EETH, + ENOSYS_EQNT, + ENOSYS_HLN, FRAX, GNO, MATIC, @@ -353,6 +358,17 @@ export const DEFAULT_BASES = { USDC[ChainId.CRONOS], ], [ChainId.BLAST]: [Native.onChain(ChainId.BLAST), USDB[ChainId.BLAST]], + [ChainId.FLARE]: [ + Native.onChain(ChainId.FLARE), + WNATIVE[ChainId.FLARE], + WETH9[ChainId.FLARE], + USDT[ChainId.FLARE], + ENOSYS_BNZ, + ENOSYS_EQNT, + ENOSYS_HLN, + ENOSYS_APS, + ENOSYS_EETH, + ], // [ChainId.SEPOLIA]: [Native.onChain(ChainId.SEPOLIA), WNATIVE[ChainId.SEPOLIA]], } as const satisfies Record> diff --git a/packages/sushi/package.json b/packages/sushi/package.json index 25cd6a9be0..83d71a609b 100644 --- a/packages/sushi/package.json +++ b/packages/sushi/package.json @@ -185,7 +185,7 @@ "check": "tsc --pretty --noEmit", "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", "dev": "tsc -w", - "generate": "npx tsx ./scripts/generate.ts", + "generate": "tsx ./scripts/generate.ts", "prepublishOnly": "pnpm build", "test": "vitest run -c ./test/vitest.config.ts", "test:debug": "vitest --inspect-brk --no-threads run -c ./test/vitest.config.ts", diff --git a/packages/sushi/src/chain/constants.ts b/packages/sushi/src/chain/constants.ts index 815b95e308..d742176352 100644 --- a/packages/sushi/src/chain/constants.ts +++ b/packages/sushi/src/chain/constants.ts @@ -52,6 +52,7 @@ export const ChainId = { CRONOS: 25, BLAST: 81457, // RONIN: 2020, + FLARE: 14, } as const export type ChainId = (typeof ChainId)[keyof typeof ChainId] @@ -130,5 +131,6 @@ export const ChainKey = { [ChainId.ZETACHAIN]: 'zetachain', [ChainId.CRONOS]: 'cronos', [ChainId.BLAST]: 'blast', + [ChainId.FLARE]: 'flare', } as const export type ChainKey = (typeof ChainKey)[keyof typeof ChainKey] diff --git a/packages/sushi/src/chain/generated.ts b/packages/sushi/src/chain/generated.ts index 0148eaf6b9..6a7bec1536 100644 --- a/packages/sushi/src/chain/generated.ts +++ b/packages/sushi/src/chain/generated.ts @@ -57,6 +57,28 @@ export default [ name: 'OP Mainnet', shortName: 'oeth', }, + { + chainId: 14, + explorers: [ + { + name: 'blockscout', + url: 'https://flare-explorer.flare.network', + standard: 'EIP3091', + }, + { + name: 'flarescan', + url: 'https://mainnet.flarescan.com', + standard: 'EIP3091', + }, + ], + nativeCurrency: { + name: 'Flare', + symbol: 'FLR', + decimals: 18, + }, + name: 'Flare Mainnet', + shortName: 'flr', + }, { chainId: 25, explorers: [ @@ -301,11 +323,6 @@ export default [ url: 'https://bobascan.com', standard: 'none', }, - { - name: 'Blockscout', - url: 'https://blockexplorer.boba.network', - standard: 'none', - }, ], nativeCurrency: { name: 'Ether', @@ -745,7 +762,7 @@ export default [ explorers: [ { name: 'Boba BNB block explorer', - url: 'https://blockexplorer.bnb.boba.network', + url: 'https://bobascan.com', standard: 'none', }, ], @@ -884,11 +901,6 @@ export default [ url: 'https://scrollscan.com', standard: 'EIP3091', }, - { - name: 'Blockscout', - url: 'https://blockscout.scroll.io', - standard: 'EIP3091', - }, ], nativeCurrency: { name: 'Ether', diff --git a/packages/sushi/src/config/bases-to-check-trades-against.ts b/packages/sushi/src/config/bases-to-check-trades-against.ts index a7d9aa8bfc..f26945152e 100644 --- a/packages/sushi/src/config/bases-to-check-trades-against.ts +++ b/packages/sushi/src/config/bases-to-check-trades-against.ts @@ -1,5 +1,14 @@ import { ChainId } from '../chain/index.js' -import { MUSD, Token, USDB } from '../currency/index.js' +import { + ENOSYS_APS, + ENOSYS_BNZ, + ENOSYS_EETH, + ENOSYS_EQNT, + ENOSYS_HLN, + MUSD, + Token, + USDB, +} from '../currency/index.js' import { AAVE, BUSD, @@ -479,4 +488,14 @@ export const BASES_TO_CHECK_TRADES_AGAINST: { USDC[ChainId.CRONOS], ], [ChainId.BLAST]: [WNATIVE[ChainId.BLAST], USDB[ChainId.BLAST], MUSD], + [ChainId.FLARE]: [ + WNATIVE[ChainId.FLARE], + WETH9[ChainId.FLARE], + USDT[ChainId.FLARE], + ENOSYS_BNZ, + ENOSYS_EQNT, + ENOSYS_HLN, + ENOSYS_APS, + ENOSYS_EETH, + ], } diff --git a/packages/sushi/src/config/native-ids.ts b/packages/sushi/src/config/native-ids.ts index f034f6435c..d4b1aba7ad 100644 --- a/packages/sushi/src/config/native-ids.ts +++ b/packages/sushi/src/config/native-ids.ts @@ -54,4 +54,5 @@ export const nativeCurrencyIds = { [ChainId.ZETACHAIN]: 'ZETA', [ChainId.CRONOS]: 'CRO', [ChainId.BLAST]: 'ETH', + [ChainId.FLARE]: 'FLR', } as const diff --git a/packages/sushi/src/config/route-processor.ts b/packages/sushi/src/config/route-processor.ts index 6a36705ec7..394e589fcd 100644 --- a/packages/sushi/src/config/route-processor.ts +++ b/packages/sushi/src/config/route-processor.ts @@ -132,6 +132,7 @@ export const ROUTE_PROCESSOR_3_SUPPORTED_CHAIN_IDS = [ ChainId.TELOS, ChainId.THUNDERCORE, ChainId.LINEA, + ChainId.FLARE, ] as const export type RouteProcessor3ChainId = (typeof ROUTE_PROCESSOR_3_SUPPORTED_CHAIN_IDS)[number] @@ -169,6 +170,7 @@ export const ROUTE_PROCESSOR_3_ADDRESS: Record< [ChainId.TELOS]: '0x80C7DD17B01855a6D2347444a0FCC36136a314de', [ChainId.THUNDERCORE]: '0x1b9d177CcdeA3c79B6c8F40761fc8Dc9d0500EAa', [ChainId.LINEA]: '0x0b17dF2CDEf8f0fCb7847e287726C6a8c1415A1f', + [ChainId.FLARE]: '0x9B3F1D56D9004e6C69d8247d402F38DE5F87A27c', } as const export const isRouteProcessor3ChainId = ( chainId: ChainId, @@ -225,6 +227,7 @@ export const ROUTE_PROCESSOR_3_2_SUPPORTED_CHAIN_IDS = [ ChainId.SCROLL, ChainId.FILECOIN, ChainId.ZETACHAIN, + ChainId.FLARE, ] as const export type RouteProcessor3_2ChainId = (typeof ROUTE_PROCESSOR_3_2_SUPPORTED_CHAIN_IDS)[number] @@ -251,6 +254,7 @@ export const ROUTE_PROCESSOR_3_2_ADDRESS: Record< [ChainId.SCROLL]: '0xCA6Fe749878841b96F620Ec79638B13dAaD3D320', [ChainId.FILECOIN]: '0xCdBCd51a5E8728E0AF4895ce5771b7d17fF71959', [ChainId.ZETACHAIN]: '0xb46e319390De313B8cc95EA5aa30C7bBFD79Da94', + [ChainId.FLARE]: '0x5CeEe9F4F49C106D5Bc049C8D649C332E6d365ad', } as const export const isRouteProcessor3_2ChainId = ( chainId: ChainId, diff --git a/packages/sushi/src/config/stables.ts b/packages/sushi/src/config/stables.ts index e15ae8142a..ee03cf6fcc 100644 --- a/packages/sushi/src/config/stables.ts +++ b/packages/sushi/src/config/stables.ts @@ -208,6 +208,7 @@ export const STABLES = { ], [ChainId.CRONOS]: [USDC[ChainId.CRONOS]], [ChainId.BLAST]: [USDB[ChainId.BLAST], MUSD], + [ChainId.FLARE]: [USDT[ChainId.FLARE]], // TESTNETS // [ChainId.RINKEBY]: [USDC[ChainId.RINKEBY]], // [ChainId.ROPSTEN]: [ diff --git a/packages/sushi/src/config/viem.ts b/packages/sushi/src/config/viem.ts index e82f9e73e0..fbf29f3516 100644 --- a/packages/sushi/src/config/viem.ts +++ b/packages/sushi/src/config/viem.ts @@ -32,6 +32,7 @@ import { // evmosTestnet, fantom, fantomTestnet, + flare as _flare, // fantomTestnet, // filecoinTestnet, foundry, @@ -90,6 +91,7 @@ export { // evmos, // evmosTestnet, fantom, + flare, // fantomTestnet, // filecoinTestnet, foundry, @@ -140,6 +142,16 @@ const haqq = { }, } as const +const flare = { + ..._flare, + contracts: { + multicall3: { + address: '0xcA11bde05977b3631167028862bE2a173976CA11', + blockCreated: 3002461, + }, + }, +} as const + // Chains missing from viem entirely export const kava = { id: ChainId.KAVA, @@ -490,95 +502,51 @@ export const blast = { }, } as const -// const alchemyId = -// process.env['ALCHEMY_ID'] || process.env['NEXT_PUBLIC_ALCHEMY_ID'] -const drpcId = process.env['DRPC_ID'] || process.env['NEXT_PUBLIC_DRPC_ID'] - export const publicTransports = { - [ChainId.ARBITRUM_NOVA]: http( - `https://lb.drpc.org/ogrpc?network=arbitrum-nova&dkey=${drpcId}`, - ), - [ChainId.ARBITRUM]: http( - `https://lb.drpc.org/ogrpc?network=arbitrum&dkey=${drpcId}`, - ), - [ChainId.AVALANCHE]: http( - `https://lb.drpc.org/ogrpc?network=avalanche&dkey=${drpcId}`, - ), - [ChainId.BOBA]: http('https://mainnet.boba.network'), - [ChainId.BOBA_AVAX]: http('https://avax.boba.network'), - [ChainId.BOBA_BNB]: http('https://bnb.boba.network'), - [ChainId.BSC]: http(`https://lb.drpc.org/ogrpc?network=bsc&dkey=${drpcId}`), - [ChainId.BTTC]: http('https://rpc.bittorrentchain.io'), - [ChainId.CELO]: http(`https://lb.drpc.org/ogrpc?network=celo&dkey=${drpcId}`), - [ChainId.ETHEREUM]: http( - `https://lb.drpc.org/ogrpc?network=ethereum&dkey=${drpcId}`, - ), - [ChainId.FANTOM]: http( - `https://lb.drpc.org/ogrpc?network=fantom&dkey=${drpcId}`, - ), - [ChainId.FUSE]: http(`https://lb.drpc.org/ogrpc?network=fuse&dkey=${drpcId}`), - [ChainId.GNOSIS]: http( - `https://lb.drpc.org/ogrpc?network=gnosis&dkey=${drpcId}`, - ), - [ChainId.HARMONY]: http( - `https://lb.drpc.org/ogrpc?network=harmony-0&dkey=${drpcId}`, - ), - [ChainId.KAVA]: http(`https://lb.drpc.org/ogrpc?network=kava&dkey=${drpcId}`), - [ChainId.METIS]: http( - `https://lb.drpc.org/ogrpc?network=metis&dkey=${drpcId}`, - ), - [ChainId.MOONBEAM]: http( - `https://lb.drpc.org/ogrpc?network=moonbeam&dkey=${drpcId}`, - ), - [ChainId.MOONRIVER]: http( - `https://lb.drpc.org/ogrpc?network=moonriver&dkey=${drpcId}`, - ), - [ChainId.OPTIMISM]: http( - `https://lb.drpc.org/ogrpc?network=optimism&dkey=${drpcId}`, - ), - [ChainId.POLYGON]: http( - `https://lb.drpc.org/ogrpc?network=polygon&dkey=${drpcId}`, - ), - [ChainId.POLYGON_ZKEVM]: http( - `https://lb.drpc.org/ogrpc?network=polygon-zkevm&dkey=${drpcId}`, - ), - [ChainId.THUNDERCORE]: http('https://mainnet-rpc.thundercore.com'), - [ChainId.HAQQ]: http(`https://lb.drpc.org/ogrpc?network=haqq&dkey=${drpcId}`), - [ChainId.CORE]: http('https://rpc.coredao.org'), - [ChainId.TELOS]: http('https://rpc1.us.telos.net/evm'), + [ChainId.ARBITRUM_NOVA]: http(arbitrumNova.rpcUrls.default.http[0]), + [ChainId.ARBITRUM]: http(arbitrum.rpcUrls.default.http[0]), + [ChainId.AVALANCHE]: http(avalanche.rpcUrls.default.http[0]), + [ChainId.BOBA]: http(boba.rpcUrls.default.http[0]), + [ChainId.BOBA_AVAX]: http(bobaAvax.rpcUrls.default.http[0]), + [ChainId.BOBA_BNB]: http(bobaBnb.rpcUrls.default.http[0]), + [ChainId.BSC]: http(bsc.rpcUrls.default.http[0]), + [ChainId.BTTC]: http(bttc.rpcUrls.default.http[0]), + [ChainId.CELO]: http(celo.rpcUrls.default.http[0]), + [ChainId.ETHEREUM]: http(mainnet.rpcUrls.default.http[0]), + [ChainId.FANTOM]: http(fantom.rpcUrls.default.http[0]), + [ChainId.FUSE]: http(fuse.rpcUrls.default.http[0]), + [ChainId.GNOSIS]: http(gnosis.rpcUrls.default.http[0]), + [ChainId.HARMONY]: http(harmonyOne.rpcUrls.default.http[0]), + [ChainId.KAVA]: http(kava.rpcUrls.default.http[0]), + [ChainId.METIS]: http(metis.rpcUrls.default.http[0]), + [ChainId.MOONBEAM]: http(moonbeam.rpcUrls.default.http[0]), + [ChainId.MOONRIVER]: http(moonriver.rpcUrls.default.http[0]), + [ChainId.OPTIMISM]: http(optimism.rpcUrls.default.http[0]), + [ChainId.POLYGON]: http(polygon.rpcUrls.default.http[0]), + [ChainId.POLYGON_ZKEVM]: http(polygonZkEvm.rpcUrls.default.http[0]), + [ChainId.THUNDERCORE]: http(thundercore.rpcUrls.default.http[0]), + [ChainId.HAQQ]: http(haqq.rpcUrls.default.http[0]), + [ChainId.CORE]: http(core.rpcUrls.default.http[0]), + [ChainId.TELOS]: http(telos.rpcUrls.default.http[0]), [ChainId.PALM]: http(palm.rpcUrls.default.http[0]), [ChainId.OKEX]: http(okc.rpcUrls.default.http[0]), [ChainId.HECO]: http(heco.rpcUrls.default.http[0]), [ChainId.ZKSYNC_ERA]: http(zkSync.rpcUrls.default.http[0]), - [ChainId.LINEA]: http( - `https://lb.drpc.org/ogrpc?network=linea&dkey=${drpcId}`, - ), - [ChainId.BASE]: http(`https://lb.drpc.org/ogrpc?network=base&dkey=${drpcId}`), - [ChainId.SCROLL]: http( - `https://lb.drpc.org/ogrpc?network=scroll&dkey=${drpcId}`, - ), - [ChainId.FILECOIN]: http( - `https://lb.drpc.org/ogrpc?network=filecoin&dkey=${drpcId}`, - // 'https://fil-mainnet-1.rpc.laconic.com/rpc/v1' - ), - [ChainId.ZETACHAIN]: http( - `https://lb.drpc.org/ogrpc?network=zeta-chain&dkey=${drpcId}`, - ), - [ChainId.CRONOS]: http( - `https://lb.drpc.org/ogrpc?network=cronos&dkey=${drpcId}`, - ), - [ChainId.BLAST]: http( - `https://lb.drpc.org/ogrpc?network=blast&dkey=${drpcId}`, - ), + [ChainId.LINEA]: http(linea.rpcUrls.default.http[0]), + [ChainId.BASE]: http(base.rpcUrls.default.http[0]), + [ChainId.SCROLL]: http(scroll.rpcUrls.default.http[0]), + [ChainId.FILECOIN]: http(filecoin.rpcUrls.default.http[0]), + [ChainId.ZETACHAIN]: http(zetachain.rpcUrls.default.http[0]), + [ChainId.CRONOS]: http(cronos.rpcUrls.default.http[0]), + [ChainId.BLAST]: http(blast.rpcUrls.default.http[0]), + [ChainId.FLARE]: http(flare.rpcUrls.default.http[0]), /* Testnets */ // TODO: add testnet transports - [ChainId.ARBITRUM_TESTNET]: http('https://sepolia-rollup.arbitrum.io/rpc'), - [ChainId.AVALANCHE_TESTNET]: http( - 'https://api.avax-test.network/ext/bc/C/rpc', - ), - [ChainId.BSC_TESTNET]: http('https://bsc-testnet.public.blastapi.io'), - [ChainId.FANTOM_TESTNET]: http('https://rpc.testnet.fantom.network'), - [ChainId.POLYGON_TESTNET]: http('https://rpc.ankr.com/polygon_mumbai'), - [ChainId.SEPOLIA]: http('https://sepolia.drpc.org'), + [ChainId.ARBITRUM_TESTNET]: http(arbitrumSepolia.rpcUrls.default.http[0]), + [ChainId.AVALANCHE_TESTNET]: http(avalancheFuji.rpcUrls.default.http[0]), + [ChainId.BSC_TESTNET]: http(bscTestnet.rpcUrls.default.http[0]), + [ChainId.FANTOM_TESTNET]: http(fantomTestnet.rpcUrls.default.http[0]), + [ChainId.POLYGON_TESTNET]: http(polygonMumbai.rpcUrls.default.http[0]), + [ChainId.SEPOLIA]: http(sepolia.rpcUrls.default.http[0]), } as const satisfies Record export const publicChains = [ @@ -618,6 +586,7 @@ export const publicChains = [ scroll, filecoin, zetachain, + flare, /* Testnets */ arbitrumSepolia, @@ -773,6 +742,10 @@ export const publicClientConfig = { chain: blast, transport: publicTransports[ChainId.BLAST], }, + [ChainId.FLARE]: { + chain: flare, + transport: publicTransports[ChainId.FLARE], + }, /* Testnets */ [ChainId.ARBITRUM_TESTNET]: { chain: arbitrumSepolia, diff --git a/packages/sushi/src/currency/token-addresses.ts b/packages/sushi/src/currency/token-addresses.ts index 75eafd6731..5940308846 100644 --- a/packages/sushi/src/currency/token-addresses.ts +++ b/packages/sushi/src/currency/token-addresses.ts @@ -311,6 +311,7 @@ export const WETH9_ADDRESS = { [ChainId.ZETACHAIN]: '0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891', [ChainId.CRONOS]: '0xe44Fd7fCb2b1581822D0c862B68222998a0c299a', [ChainId.BLAST]: '0x4300000000000000000000000000000000000004', + [ChainId.FLARE]: '0x62bd084cbcd6c85347c50292a141ea4d3e7e3511', } as const export const WNATIVE_ADDRESS = { @@ -367,6 +368,7 @@ export const WNATIVE_ADDRESS = { [ChainId.ZETACHAIN]: '0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf', [ChainId.CRONOS]: '0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23', [ChainId.BLAST]: WETH9_ADDRESS[ChainId.BLAST], + [ChainId.FLARE]: '0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d', } as const export const SUSHI_ADDRESS = { @@ -481,6 +483,7 @@ export const USDT_ADDRESS = { [ChainId.HAQQ]: axlUSDT_ADDRESS[ChainId.HAQQ], [ChainId.SCROLL]: '0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df', [ChainId.ZETACHAIN]: '0x7c8dDa80bbBE1254a7aACf3219EBe1481c6E01d7', + [ChainId.FLARE]: '0x96B41289D90444B8adD57e6F265DB5aE8651DF29', } as const export const DAI_ADDRESS = { diff --git a/packages/sushi/src/currency/tokens.ts b/packages/sushi/src/currency/tokens.ts index cc60febbec..787b1cc8c8 100644 --- a/packages/sushi/src/currency/tokens.ts +++ b/packages/sushi/src/currency/tokens.ts @@ -684,6 +684,13 @@ export const WNATIVE = { name: 'Wrapped CRO', }), [ChainId.BLAST]: WETH9[ChainId.BLAST], + [ChainId.FLARE]: new Token({ + chainId: ChainId.FLARE, + address: WNATIVE_ADDRESS[ChainId.FLARE], + decimals: 18, + symbol: 'WFLR', + name: 'Wrapped FLR', + }), } as const export const SUSHI = addressMapToTokenMap( @@ -802,7 +809,7 @@ export const USDT: Record = { USDT_ADDRESS, ) as Omit< Record, - typeof ChainId.BSC & typeof ChainId.BSC_TESTNET + typeof ChainId.BSC & typeof ChainId.BSC_TESTNET & typeof ChainId.FLARE >), [ChainId.BSC]: new Token({ chainId: ChainId.BSC, @@ -825,6 +832,13 @@ export const USDT: Record = { symbol: 'USDT', name: 'Tether USD', }), + [ChainId.FLARE]: new Token({ + chainId: ChainId.FLARE, + address: USDT_ADDRESS[ChainId.FLARE], + decimals: 6, + symbol: 'eUSDT', + name: 'Tether USD', + }), } export const DAI = addressMapToTokenMap( @@ -1152,3 +1166,43 @@ export const MUSD = new Token({ symbol: 'MUSD', decimals: 18, }) + +export const ENOSYS_BNZ = new Token({ + chainId: ChainId.FLARE, + address: '0xfD3449E8Ee31117a848D41Ee20F497a9bCb53164', + decimals: 18, + symbol: 'BNZ', + name: 'BonezCoin', +}) + +export const ENOSYS_EQNT = new Token({ + chainId: ChainId.FLARE, + address: '0x60fDC7B744E886e96Aa0DEf5f69eE440dB9d8c77', + decimals: 18, + symbol: 'eQNT', + name: 'EnosysQuant', +}) + +export const ENOSYS_HLN = new Token({ + chainId: ChainId.FLARE, + address: '0x140D8d3649Ec605CF69018C627fB44cCC76eC89f', + decimals: 18, + symbol: 'HLN', + name: 'Helion', +}) + +export const ENOSYS_APS = new Token({ + chainId: ChainId.FLARE, + address: '0xff56eb5b1a7faa972291117e5e9565da29bc808d', + decimals: 18, + symbol: 'APS', + name: 'Apsis', +}) + +export const ENOSYS_EETH = new Token({ + chainId: 14, + address: '0xa76dcddce60a442d69bac7158f3660f50921b122', + decimals: 18, + symbol: 'eETH', + name: 'Enosys ETH', +}) diff --git a/packages/sushi/src/serializer/index.ts b/packages/sushi/src/serializer/index.ts index 7da4aa67a3..cd7bda5da9 100644 --- a/packages/sushi/src/serializer/index.ts +++ b/packages/sushi/src/serializer/index.ts @@ -2,7 +2,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs' import path from 'path' // import { fileURLToPath } from 'url' import serializer from 'serialijse' -import { ChainId } from 'sushi/chain' +import { ChainId } from '../chain/index.js' import { Native } from '../currency/index.js' import { BentoBridgePoolCode,