Skip to content

Commit

Permalink
Merge pull request #1607 from sushiswap/feature/solvbtc
Browse files Browse the repository at this point in the history
feat: SolvBTC(.ENA,.BBN) suppor
  • Loading branch information
matthewlilley authored Aug 13, 2024
2 parents b461c5f + ba388d0 commit 52d6d9f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apis/router/src/handlers/swap2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
isStable,
isWrapOrUnwrap,
} from 'sushi/router'
import { MultiRoute, getBigInt } from 'sushi/tines'
import { MultiRoute, RouteStatus, getBigInt } from 'sushi/tines'
import { Address } from 'viem'
import { z } from 'zod'
import { ExtractorClient } from '../../ExtractorClient.js'
Expand Down Expand Up @@ -192,7 +192,7 @@ function handler(

const body = createSwapBody(
route,
to
to && route.status !== RouteStatus.NoWay
? routeProcessorParams(
poolCodesMap,
route,
Expand Down
3 changes: 3 additions & 0 deletions packages/sushi/src/config/additional-bases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import {
SNX,
STG,
SUSHI,
SolvBTC,
TEL,
TRIBE,
UNI,
Expand Down Expand Up @@ -123,6 +124,8 @@ export const ADDITIONAL_BASES: {
[ChainId.ARBITRUM]: {
[FRAX_ADDRESS[ChainId.ARBITRUM]]: [FXS[ChainId.ARBITRUM]],
[FXS_ADDRESS[ChainId.ARBITRUM]]: [FRAX[ChainId.ARBITRUM]],
['0xaFAfd68AFe3fe65d376eEC9Eab1802616cFacCb8']: [SolvBTC[ChainId.ARBITRUM]], // SolvBTC.ENA
['0x346c574C56e1A4aAa8dc88Cda8F7EB12b39947aB']: [SolvBTC[ChainId.ARBITRUM]], // SolvBTC.BBN
},
[ChainId.FANTOM]: {
[FRAX_ADDRESS[ChainId.FANTOM]]: [FXS[ChainId.FANTOM]],
Expand Down
4 changes: 4 additions & 0 deletions packages/sushi/src/currency/token-addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -650,3 +650,7 @@ export const JUGNI_ADDRESS = {
export const UDSP_ADDRESS = {
[ChainId.SKALE_EUROPA]: '0x73d22d8a2D1f59Bf5Bcf62cA382481a2073FAF58',
} as const

export const SolvBTC_ADDRESS = {
[ChainId.ARBITRUM]: '0x3647c54c4c2c65bc7a2d63c0da2809b399dbbdc0',
} as const
10 changes: 10 additions & 0 deletions packages/sushi/src/currency/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {
STG_ADDRESS,
SUSHI_ADDRESS,
SWISE_ADDRESS,
SolvBTC_ADDRESS,
TEL_ADDRESS,
TRIBE_ADDRESS,
TUSD_ADDRESS,
Expand Down Expand Up @@ -1214,3 +1215,12 @@ export const SKL = new Token({
symbol: 'SKL',
decimals: 18,
})

export const SolvBTC = addressMapToTokenMap(
{
decimals: 18,
symbol: 'Solv BTC',
name: 'SolvBTC',
},
SolvBTC_ADDRESS,
) as Record<keyof typeof SolvBTC_ADDRESS, Token>
4 changes: 4 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 52d6d9f

Please sign in to comment.