From 846b989cb1e6d1b2eeb05ba48d86492256b926fb Mon Sep 17 00:00:00 2001 From: pedromcunha Date: Thu, 17 Oct 2024 19:51:06 -0400 Subject: [PATCH 1/2] Fix issue with exact output returning lowest slippage price point --- demo/pages/hooks/usePrice.tsx | 4 +- demo/pages/hooks/useQuote.tsx | 6 +- demo/pages/sdk/actions/bridge.tsx | 2 +- demo/pages/sdk/actions/getBridgeQuote.tsx | 2 +- demo/pages/sdk/actions/getPrice.tsx | 2 +- demo/pages/sdk/actions/getSwapQuote.tsx | 2 +- packages/sdk/src/routes/index.ts | 9 +- packages/sdk/src/types/RelayChain.ts | 2 +- packages/sdk/src/types/api.ts | 600 +++++++++++++++--- .../TransactionModalRenderer.tsx | 2 +- .../components/widgets/SwapWidget/index.tsx | 12 +- .../components/widgets/SwapWidgetRenderer.tsx | 10 +- packages/ui/src/constants/address.ts | 4 +- 13 files changed, 550 insertions(+), 107 deletions(-) diff --git a/demo/pages/hooks/usePrice.tsx b/demo/pages/hooks/usePrice.tsx index 640aaf7a..f8da986f 100644 --- a/demo/pages/hooks/usePrice.tsx +++ b/demo/pages/hooks/usePrice.tsx @@ -15,7 +15,7 @@ const UsePrice: NextPage = () => { const [destinationCurrency, setDestinationCurrency] = useState(zeroAddress) const [recipient, setRecipient] = useState() - const [tradeType, setTradeType] = useState<'EXACT_INPUT' | 'EXACT_OUTPUT'>( + const [tradeType, setTradeType] = useState<'EXACT_INPUT' | 'EXPECTED_OUTPUT'>( 'EXACT_INPUT' ) const [source, setSource] = useState() @@ -120,7 +120,7 @@ const UsePrice: NextPage = () => { }} > - +
diff --git a/demo/pages/hooks/useQuote.tsx b/demo/pages/hooks/useQuote.tsx index 1bf9ed91..34eacc95 100644 --- a/demo/pages/hooks/useQuote.tsx +++ b/demo/pages/hooks/useQuote.tsx @@ -15,8 +15,8 @@ const UseQuote: NextPage = () => { const [originCurrency, setOriginCurrency] = useState('') const [destinationCurrency, setDestinationCurrency] = useState('') const [recipient, setRecipient] = useState() - const [tradeType, setTradeType] = useState<'EXACT_INPUT' | 'EXACT_OUTPUT'>( - 'EXACT_INPUT' + const [tradeType, setTradeType] = useState<'EXACT_INPUT' | 'EXPECTED_OUTPUT'>( + 'EXPECTED_OUTPUT' ) const [source, setSource] = useState() const [useExternalLiquidity, setUseExternalLiquidity] = @@ -125,7 +125,7 @@ const UseQuote: NextPage = () => { }} > - +
diff --git a/demo/pages/sdk/actions/bridge.tsx b/demo/pages/sdk/actions/bridge.tsx index 4417d806..7ddb0b83 100644 --- a/demo/pages/sdk/actions/bridge.tsx +++ b/demo/pages/sdk/actions/bridge.tsx @@ -150,7 +150,7 @@ const BridgeActionPage: NextPage = () => { currency, toCurrency: currency, recipient: recipient ? (recipient as Address) : undefined, - tradeType: useExactInput ? 'EXACT_INPUT' : 'EXACT_OUTPUT', + tradeType: useExactInput ? 'EXACT_INPUT' : 'EXPECTED_OUTPUT', options: { usePermit: usePermit, useExternalLiquidity: canonical diff --git a/demo/pages/sdk/actions/getBridgeQuote.tsx b/demo/pages/sdk/actions/getBridgeQuote.tsx index 7720b3ed..96401983 100644 --- a/demo/pages/sdk/actions/getBridgeQuote.tsx +++ b/demo/pages/sdk/actions/getBridgeQuote.tsx @@ -134,7 +134,7 @@ const GetBridgeQuotePage: NextPage = () => { currency, toCurrency: zeroAddress, recipient: recipient ? (recipient as Address) : undefined, - tradeType: useExactInput ? 'EXACT_INPUT' : 'EXACT_OUTPUT' + tradeType: useExactInput ? 'EXACT_INPUT' : 'EXPECTED_OUTPUT' }) setResponse(quote) }} diff --git a/demo/pages/sdk/actions/getPrice.tsx b/demo/pages/sdk/actions/getPrice.tsx index 8d216043..77d29608 100644 --- a/demo/pages/sdk/actions/getPrice.tsx +++ b/demo/pages/sdk/actions/getPrice.tsx @@ -129,7 +129,7 @@ const GetPricePage: NextPage = () => { originCurrency, destinationCurrency, recipient: recipient ? (recipient as Address) : undefined, - tradeType: useExactInput ? 'EXACT_INPUT' : 'EXACT_OUTPUT' + tradeType: useExactInput ? 'EXACT_INPUT' : 'EXPECTED_OUTPUT' }) setResponse(price) }} diff --git a/demo/pages/sdk/actions/getSwapQuote.tsx b/demo/pages/sdk/actions/getSwapQuote.tsx index c9162c29..81ccd961 100644 --- a/demo/pages/sdk/actions/getSwapQuote.tsx +++ b/demo/pages/sdk/actions/getSwapQuote.tsx @@ -130,7 +130,7 @@ const GetSwapQuote: NextPage = () => { amount, currency: fromCurrency, recipient: recipient ? (recipient as Address) : undefined, - tradeType: useExactOuput ? 'EXACT_OUTPUT' : 'EXACT_INPUT' + tradeType: useExactOuput ? 'EXPECTED_OUTPUT' : 'EXACT_INPUT' }) setResponse(quote) }} diff --git a/packages/sdk/src/routes/index.ts b/packages/sdk/src/routes/index.ts index da9d9709..dbc2eb91 100644 --- a/packages/sdk/src/routes/index.ts +++ b/packages/sdk/src/routes/index.ts @@ -11,10 +11,13 @@ export const routes = [ "/execute/permits", "/quote", "/price", + "/execute/user-op/{chainId}", "/lives", "/intents/status", - "/intents/quote", "/intents/status/v2", + "/intents/quote", + "/intents/quote/v2", + "/requests/{requestId}/signature", "/requests", "/requests/v2", "/transactions/index", @@ -22,5 +25,7 @@ export const routes = [ "/conduit/install", "/prices/rates", "/currencies/v1", - "/currencies/token/price" + "/tokenlist", + "/currencies/token/price", + "/provision/chain" ]; \ No newline at end of file diff --git a/packages/sdk/src/types/RelayChain.ts b/packages/sdk/src/types/RelayChain.ts index fd8c6942..840deefc 100644 --- a/packages/sdk/src/types/RelayChain.ts +++ b/packages/sdk/src/types/RelayChain.ts @@ -5,7 +5,7 @@ type Erc20Currencies = NonNullable< paths['/chains']['get']['responses']['200']['content']['application/json']['chains'] >['0']['erc20Currencies'] -export type ChainVM = 'evm' | 'svm' +export type ChainVM = 'evm' | 'svm' | 'bvm' export type RelayChain = { id: number diff --git a/packages/sdk/src/types/api.ts b/packages/sdk/src/types/api.ts index eac36278..6ea99aea 100644 --- a/packages/sdk/src/types/api.ts +++ b/packages/sdk/src/types/api.ts @@ -85,7 +85,7 @@ export interface paths { * @description The type of VM the chain runs on * @enum {string} */ - vmType?: "evm" | "svm"; + vmType?: "bvm" | "evm" | "svm"; explorerQueryParams?: { [key: string]: unknown; } | null; @@ -144,7 +144,7 @@ export interface paths { /** @description User address, when supplied returns user balance and max bridge amount */ user?: string; /** @description Restricts the user balance and capacity to a particular currency when supplied with a currency id. Defaults to the native currency of the destination chain. */ - currency?: "degen" | "eth" | "usdc" | "xai" | "sipher" | "pop" | "tia" | "tg7" | "cgt" | "omi"; + currency?: "anime" | "btc" | "cgt" | "degen" | "eth" | "omi" | "pop" | "sipher" | "tg7" | "tia" | "topia" | "usdc" | "xai" | "weth" | "apeeth"; }; }; responses: { @@ -197,7 +197,7 @@ export interface paths { originChainId: number; destinationChainId: number; /** @enum {string} */ - currency: "degen" | "eth" | "usdc" | "xai" | "sipher" | "pop" | "tia" | "tg7" | "cgt" | "omi"; + currency: "anime" | "btc" | "cgt" | "degen" | "eth" | "omi" | "pop" | "sipher" | "tg7" | "tia" | "topia" | "usdc" | "xai" | "weth" | "apeeth"; /** @description Amount to bridge as the base amount (can be switched to exact input using the dedicated flag), denoted in wei */ amount: string; /** @description App fees to be charged for execution */ @@ -296,7 +296,7 @@ export interface paths { * @description Origin chain gas currency * @enum {string} */ - gasCurrency?: "avax" | "degen" | "bnb" | "matic" | "eth" | "usdc" | "xai" | "dai" | "sipher" | "sol" | "pop" | "tia" | "tg7" | "cgt" | "omi"; + gasCurrency?: "anime" | "btc" | "cgt" | "degen" | "eth" | "omi" | "pop" | "sipher" | "tg7" | "tia" | "topia" | "usdc" | "xai" | "weth" | "apeeth" | "ape" | "avax" | "bnb" | "dai" | "matic" | "sol"; /** @description Combination of the relayerGas and relayerService to give you the full relayer fee in wei */ relayer?: string; /** @description Destination chain gas fee in wei */ @@ -307,10 +307,10 @@ export interface paths { * @description The currency for all relayer fees (gas and service) * @enum {string} */ - relayerCurrency?: "degen" | "eth" | "usdc" | "xai" | "sipher" | "pop" | "tia" | "tg7" | "cgt" | "omi"; + relayerCurrency?: "anime" | "btc" | "cgt" | "degen" | "eth" | "omi" | "pop" | "sipher" | "tg7" | "tia" | "topia" | "usdc" | "xai" | "weth" | "apeeth"; app?: string; /** @enum {string} */ - appCurrency?: "degen" | "eth" | "usdc" | "xai" | "sipher" | "pop" | "tia" | "tg7" | "cgt" | "omi"; + appCurrency?: "anime" | "btc" | "cgt" | "degen" | "eth" | "omi" | "pop" | "sipher" | "tg7" | "tia" | "topia" | "usdc" | "xai" | "weth" | "apeeth"; }; breakdown?: { /** @description Amount that will be bridged in the estimated time */ @@ -372,7 +372,7 @@ export interface paths { originChainId: number; destinationChainId: number; /** @enum {string} */ - currency: "degen" | "eth" | "usdc" | "xai" | "sipher" | "pop" | "tia" | "tg7" | "cgt" | "omi"; + currency: "anime" | "btc" | "cgt" | "degen" | "eth" | "omi" | "pop" | "sipher" | "tg7" | "tia" | "topia" | "usdc" | "xai" | "weth" | "apeeth"; /** @description Amount to bridge as the base amount (can be switched to exact input using the dedicated flag), denoted in wei */ amount: string; /** @description App fees to be charged for execution */ @@ -472,7 +472,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ gas?: { @@ -491,6 +492,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Combination of the relayerGas and relayerService to give you the full relayer fee @@ -509,7 +511,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayer?: { @@ -528,6 +531,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Destination chain gas fee @@ -546,7 +550,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayerGas?: { @@ -565,6 +570,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Fees paid to the relay solver, note that this value can be negative (which represents network rewards for moving in a direction that optimizes liquidity distribution) @@ -583,7 +589,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayerService?: { @@ -602,6 +609,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Fees paid to the app. Currency will be the same as the relayer fee currency. This needs to be claimed later by the app owner and is not immediately distributed to the app @@ -620,7 +628,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ app?: { @@ -639,6 +648,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; }; breakdown?: { @@ -796,7 +806,7 @@ export interface paths { * @description Origin chain gas currency * @enum {string} */ - gasCurrency?: "avax" | "degen" | "bnb" | "matic" | "eth" | "usdc" | "xai" | "dai" | "sipher" | "sol" | "pop" | "tia" | "tg7" | "cgt" | "omi"; + gasCurrency?: "anime" | "btc" | "cgt" | "degen" | "eth" | "omi" | "pop" | "sipher" | "tg7" | "tia" | "topia" | "usdc" | "xai" | "weth" | "apeeth" | "ape" | "avax" | "bnb" | "dai" | "matic" | "sol"; /** @description Combination of the relayerGas and relayerService to give you the full relayer fee in wei */ relayer?: string; /** @description Destination chain gas fee in wei */ @@ -807,10 +817,10 @@ export interface paths { * @description The currency for all relayer fees (gas and service) * @enum {string} */ - relayerCurrency?: "degen" | "eth" | "usdc" | "xai" | "sipher" | "pop" | "tia" | "tg7" | "cgt" | "omi"; + relayerCurrency?: "anime" | "btc" | "cgt" | "degen" | "eth" | "omi" | "pop" | "sipher" | "tg7" | "tia" | "topia" | "usdc" | "xai" | "weth" | "apeeth"; app?: string; /** @enum {string} */ - appCurrency?: "degen" | "eth" | "usdc" | "xai" | "sipher" | "pop" | "tia" | "tg7" | "cgt" | "omi"; + appCurrency?: "anime" | "btc" | "cgt" | "degen" | "eth" | "omi" | "pop" | "sipher" | "tg7" | "tia" | "topia" | "usdc" | "xai" | "weth" | "apeeth"; }; /** * @example { @@ -981,7 +991,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ gas?: { @@ -1000,6 +1011,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Combination of the relayerGas and relayerService to give you the full relayer fee @@ -1018,7 +1030,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayer?: { @@ -1037,6 +1050,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Destination chain gas fee @@ -1055,7 +1069,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayerGas?: { @@ -1074,6 +1089,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Fees paid to the relay solver, note that this value can be negative (which represents network rewards for moving in a direction that optimizes liquidity distribution) @@ -1092,7 +1108,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayerService?: { @@ -1111,6 +1128,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Fees paid to the app. Currency will be the same as the relayer fee currency. This needs to be claimed later by the app owner and is not immediately distributed to the app @@ -1129,7 +1147,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ app?: { @@ -1148,6 +1167,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; }; /** @@ -1345,7 +1365,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ gas?: { @@ -1364,6 +1385,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Combination of the relayerGas and relayerService to give you the full relayer fee @@ -1382,7 +1404,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayer?: { @@ -1401,6 +1424,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Destination chain gas fee @@ -1419,7 +1443,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayerGas?: { @@ -1438,6 +1463,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Fees paid to the relay solver, note that this value can be negative (which represents network rewards for moving in a direction that optimizes liquidity distribution) @@ -1456,7 +1482,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayerService?: { @@ -1475,6 +1502,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Fees paid to the app. Currency will be the same as the relayer fee currency. This needs to be claimed later by the app owner and is not immediately distributed to the app @@ -1493,7 +1521,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ app?: { @@ -1512,6 +1541,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; }; breakdown?: { @@ -1554,7 +1584,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ currencyIn?: { @@ -1573,6 +1604,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @example { @@ -1590,7 +1622,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ currencyOut?: { @@ -1609,6 +1642,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** @description The difference between the input and output values, including fees */ totalImpact?: { @@ -1673,6 +1707,7 @@ export interface paths { content: { "application/json": { user: string; + recipient?: string; origins: { chainId: number; currency: string; @@ -1683,6 +1718,7 @@ export interface paths { partial?: boolean; /** @enum {string} */ tradeType: "EXACT_INPUT"; + useUserOperation?: boolean; }; }; }; @@ -1764,7 +1800,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ gas?: { @@ -1783,6 +1820,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Combination of the relayerGas and relayerService to give you the full relayer fee @@ -1801,7 +1839,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayer?: { @@ -1820,6 +1859,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Destination chain gas fee @@ -1838,7 +1878,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayerGas?: { @@ -1857,6 +1898,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Fees paid to the relay solver, note that this value can be negative (which represents network rewards for moving in a direction that optimizes liquidity distribution) @@ -1875,7 +1917,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayerService?: { @@ -1894,6 +1937,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Fees paid to the app. Currency will be the same as the relayer fee currency. This needs to be claimed later by the app owner and is not immediately distributed to the app @@ -1912,7 +1956,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ app?: { @@ -1931,6 +1976,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; }; breakdown?: { @@ -1973,7 +2019,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ currencyIn?: { @@ -1992,6 +2039,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @example { @@ -2009,7 +2057,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ currencyOut?: { @@ -2028,6 +2077,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** @description The difference between the input and output values, including fees */ totalImpact?: { @@ -2161,7 +2211,7 @@ export interface paths { * @description Whether to use the amount as the output or the input for the basis of the swap * @enum {string} */ - tradeType: "EXACT_INPUT" | "EXACT_OUTPUT"; + tradeType: "EXACT_INPUT" | "EXACT_OUTPUT" | "EXPECTED_OUTPUT"; txs?: { to?: string; value?: string; @@ -2272,7 +2322,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ gas?: { @@ -2291,6 +2342,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Combination of the relayerGas and relayerService to give you the full relayer fee @@ -2309,7 +2361,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayer?: { @@ -2328,6 +2381,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Destination chain gas fee @@ -2346,7 +2400,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayerGas?: { @@ -2365,6 +2420,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Fees paid to the relay solver, note that this value can be negative (which represents network rewards for moving in a direction that optimizes liquidity distribution) @@ -2383,7 +2439,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayerService?: { @@ -2402,6 +2459,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Fees paid to the app. Currency will be the same as the relayer fee currency. This needs to be claimed later by the app owner and is not immediately distributed to the app @@ -2420,7 +2478,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ app?: { @@ -2439,6 +2498,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; }; /** @description A summary of the swap and what the user should expect to happen given an input */ @@ -2465,7 +2525,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ currencyIn?: { @@ -2484,6 +2545,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @example { @@ -2501,7 +2563,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ currencyOut?: { @@ -2520,6 +2583,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** @description The difference between the input and output values, including fees */ totalImpact?: { @@ -2601,7 +2665,7 @@ export interface paths { * @description Whether to use the amount as the output or the input for the basis of the swap * @enum {string} */ - tradeType: "EXACT_INPUT" | "EXACT_OUTPUT"; + tradeType: "EXACT_INPUT" | "EXACT_OUTPUT" | "EXPECTED_OUTPUT"; txs?: { to?: string; value?: string; @@ -2657,7 +2721,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ gas?: { @@ -2676,6 +2741,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Combination of the relayerGas and relayerService to give you the full relayer fee @@ -2694,7 +2760,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayer?: { @@ -2713,6 +2780,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Destination chain gas fee @@ -2731,7 +2799,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayerGas?: { @@ -2750,6 +2819,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Fees paid to the relay solver, note that this value can be negative (which represents network rewards for moving in a direction that optimizes liquidity distribution) @@ -2768,7 +2838,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ relayerService?: { @@ -2787,6 +2858,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @description Fees paid to the app. Currency will be the same as the relayer fee currency. This needs to be claimed later by the app owner and is not immediately distributed to the app @@ -2805,7 +2877,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ app?: { @@ -2824,6 +2897,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; }; /** @description A summary of the swap and what the user should expect to happen given an input */ @@ -2850,7 +2924,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ currencyIn?: { @@ -2869,6 +2944,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @example { @@ -2886,7 +2962,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ currencyOut?: { @@ -2905,6 +2982,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** @description The difference between the input and output values, including fees */ totalImpact?: { @@ -2967,6 +3045,83 @@ export interface paths { }; }; }; + "/execute/user-op/{chainId}": { + post: { + parameters: { + path: { + chainId: string; + }; + }; + requestBody: { + content: { + "application/json": { + id: number; + jsonrpc: string; + method: string; + params: [{ + sender: string; + nonce: string; + factory?: string | null; + factoryData?: string | null; + callData: string; + callGasLimit: string; + verificationGasLimit: string; + preVerificationGas: string; + maxFeePerGas: string; + maxPriorityFeePerGas: string; + paymaster?: string | null; + paymasterVerificationGasLimit?: string | null; + paymasterPostOpGasLimit?: string | null; + paymasterData?: string | null; + signature: string; + }, string]; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + content: { + "application/json": { + jsonrpc?: string; + id?: number; + result?: string; + }; + }; + }; + /** @description Default Response */ + 400: { + content: { + "application/json": { + jsonrpc?: string; + id?: number; + error?: unknown; + }; + }; + }; + /** @description Default Response */ + 401: { + content: { + "application/json": { + jsonrpc?: string; + id?: number; + error?: unknown; + }; + }; + }; + /** @description Default Response */ + 500: { + content: { + "application/json": { + jsonrpc?: string; + id?: number; + error?: unknown; + }; + }; + }; + }; + }; + }; "/lives": { get: { responses: { @@ -3014,6 +3169,39 @@ export interface paths { }; }; }; + "/intents/status/v2": { + get: { + parameters: { + query?: { + /** @description A unique id representing the execution in the Relay system. You can obtain this id from the requests api or the check object within the step items. */ + requestId?: string; + }; + }; + responses: { + /** @description Default Response */ + 200: { + content: { + "application/json": { + /** + * @description Note that fallback is returned in the case of a refund + * @enum {string} + */ + status?: "refund" | "delayed" | "waiting" | "failure" | "pending" | "success"; + details?: string; + /** @description Incoming transaction hashes */ + inTxHashes?: string[]; + /** @description Outgoing transaction hashes */ + txHashes?: string[]; + /** @description The last timestamp the data was updated */ + time?: number; + originChainId?: number; + destinationChainId?: number; + }; + }; + }; + }; + }; + }; "/intents/quote": { post: { requestBody: { @@ -3054,12 +3242,14 @@ export interface paths { }; }; }; - "/intents/status/v2": { - get: { - parameters: { - query?: { - /** @description A unique id representing the execution in the Relay system. You can obtain this id from the requests api or the check object within the step items. */ - requestId?: string; + "/intents/quote/v2": { + post: { + requestBody: { + content: { + "application/json": { + request: Record; + source?: string; + }; }; }; responses: { @@ -3067,20 +3257,140 @@ export interface paths { 200: { content: { "application/json": { + requestId?: string; + approvalTxData?: { + to?: string; + data?: string; + value?: string; + }; + depositTxData?: { + to?: string; + data?: string; + value?: string; + }; /** - * @description Note that fallback is returned in the case of a refund - * @enum {string} + * @example { + * "currency": { + * "chainId": 8453, + * "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", + * "symbol": "USDC", + * "name": "USD Coin", + * "decimals": 6, + * "metadata": { + * "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png", + * "verified": false, + * "isNative": false + * } + * }, + * "amount": "30754920", + * "amountFormatted": "30.75492", + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" + * } */ - status?: "refund" | "delayed" | "waiting" | "failure" | "pending" | "success"; - details?: string; - /** @description Incoming transaction hashes */ - inTxHashes?: string[]; - /** @description Outgoing transaction hashes */ - txHashes?: string[]; - /** @description The last timestamp the data was updated */ - time?: number; - originChainId?: number; - destinationChainId?: number; + currencyIn?: { + currency?: { + chainId?: number; + address?: string; + symbol?: string; + name?: string; + decimals?: number; + metadata?: { + logoURI?: string; + verified?: boolean; + isNative?: boolean; + }; + }; + amount?: string; + amountFormatted?: string; + amountUsd?: string; + minimumAmount?: string; + }; + /** + * @example { + * "currency": { + * "chainId": 8453, + * "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", + * "symbol": "USDC", + * "name": "USD Coin", + * "decimals": 6, + * "metadata": { + * "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png", + * "verified": false, + * "isNative": false + * } + * }, + * "amount": "30754920", + * "amountFormatted": "30.75492", + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" + * } + */ + currencyOut?: { + currency?: { + chainId?: number; + address?: string; + symbol?: string; + name?: string; + decimals?: number; + metadata?: { + logoURI?: string; + verified?: boolean; + isNative?: boolean; + }; + }; + amount?: string; + amountFormatted?: string; + amountUsd?: string; + minimumAmount?: string; + }; + relayerFee?: string; + depositGasFee?: string; + }; + }; + }; + /** @description Default Response */ + 400: { + content: { + "application/json": { + message?: string; + }; + }; + }; + }; + }; + }; + "/requests/{requestId}/signature": { + get: { + parameters: { + path: { + requestId: string; + }; + }; + responses: { + /** @description Default Response */ + 200: { + content: { + "application/json": { + requestData?: { + originChainId?: number; + originUser?: string; + originCurrency?: string; + originAmount?: string; + originTransferDestination?: string; + destinationChainId?: number; + destinationUser?: string; + }; + signature?: string; + }; + }; + }; + /** @description Default Response */ + 400: { + content: { + "application/json": { + message?: string; + code?: string; }; }; }; @@ -3222,7 +3532,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ currencyIn?: { @@ -3241,6 +3552,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @example { @@ -3258,7 +3570,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ currencyOut?: { @@ -3277,6 +3590,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; rate?: string; }; @@ -3319,6 +3633,9 @@ export interface paths { id?: string; startTimestamp?: number; endTimestamp?: number; + /** @description Get all requests for a single chain in either direction. Setting originChainId and/or destinationChainId will override this parameter. */ + chainId?: string; + sortBy?: "createdAt" | "updatedAt"; }; }; responses: { @@ -3459,7 +3776,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ refundCurrencyData?: { @@ -3478,6 +3796,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; appFees?: { recipient?: string; @@ -3502,7 +3821,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ currencyIn?: { @@ -3521,6 +3841,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; /** * @example { @@ -3538,7 +3859,8 @@ export interface paths { * }, * "amount": "30754920", * "amountFormatted": "30.75492", - * "amountUsd": "30.901612" + * "amountUsd": "30.901612", + * "minimumAmount": "30454920" * } */ currencyOut?: { @@ -3557,6 +3879,7 @@ export interface paths { amount?: string; amountFormatted?: string; amountUsd?: string; + minimumAmount?: string; }; rate?: string; }; @@ -3646,20 +3969,20 @@ export interface paths { content: { "application/json": { /** @enum {string} */ - event?: "INSTALLED" | "UNINSTALLED" | "NETWORK_UPDATED" | "NETWORK_DELETED"; + event: "INSTALLED" | "UNINSTALLED" | "NETWORK_UPDATED" | "NETWORK_DELETED"; id: string; - chain_id: number; - parent_chain_id: number; + chain_id?: number; + parent_chain_id?: number; /** @enum {string} */ - type: "OPTIMISM" | "ARBITRUM"; - name: string; - rpc: string; - ws: string; + type?: "OPTIMISM" | "ARBITRUM"; + name?: string; + rpc?: string; + ws?: string; explorer?: string; logo_url?: string; icon_url?: string; brand_color?: string; - native_currency: { + native_currency?: { name?: string; symbol?: string; decimals?: number; @@ -3730,6 +4053,8 @@ export interface paths { TIA?: number; POP?: number; OMI?: number; + TOPIA?: number; + ANIME?: number; }; }; }; @@ -3757,6 +4082,8 @@ export interface paths { verified?: boolean; /** @description Limit the number of results */ limit?: number; + /** @description Include all chains for a currency when filtering by chainId and address */ + includeAllChains?: boolean; }; }; }; @@ -3772,7 +4099,7 @@ export interface paths { name?: string; decimals?: number; /** @enum {string} */ - vmType?: "evm" | "svm"; + vmType?: "bvm" | "evm" | "svm"; metadata?: { logoURI?: string; verified?: boolean; @@ -3784,6 +4111,40 @@ export interface paths { }; }; }; + "/tokenlist": { + get: { + parameters: { + query?: { + chainId?: number; + }; + }; + responses: { + /** @description Default Response */ + 200: { + content: { + "application/json": { + name?: string; + logoURI?: string; + tokens?: { + name?: string; + decimals?: number; + symbol?: string; + address?: string; + chainId?: number; + logoURI?: string; + }[]; + timestamp?: string; + version?: { + major?: number; + minor?: number; + patch?: number; + }; + }; + }; + }; + }; + }; + }; "/currencies/token/price": { get: { parameters: { @@ -3816,6 +4177,81 @@ export interface paths { }; }; }; + "/provision/chain": { + post: { + parameters: { + header: { + "X-RELAY-INTEGRATION-SECRET": string; + }; + }; + requestBody: { + content: { + "application/json": { + chainId: number; + parentChainId: number; + /** @enum {string} */ + type: "OPTIMISM" | "ARBITRUM"; + name: string; + rpc: string; + ws: string; + explorer?: string; + logoUrl?: string; + iconurl?: string; + brandColor?: string; + nativeCurrency: { + name?: string; + symbol?: string; + decimals?: number; + contract?: string; + }; + contracts: Record; + }; + }; + }; + responses: { + /** @description Default Response */ + 200: { + content: { + "application/json": { + id?: string; + status?: string; + etaSeconds?: number; + }; + }; + }; + /** @description Default Response */ + 400: { + content: { + "application/json": { + message?: string; + code?: string; + status?: string; + }; + }; + }; + /** @description Default Response */ + 401: { + content: { + "application/json": { + message?: string; + code?: string; + status?: string; + }; + }; + }; + /** @description Default Response */ + 500: { + content: { + "application/json": { + message?: string; + code?: string; + status?: string; + }; + }; + }; + }; + }; + }; } export type webhooks = Record; diff --git a/packages/ui/src/components/common/TransactionModal/TransactionModalRenderer.tsx b/packages/ui/src/components/common/TransactionModal/TransactionModalRenderer.tsx index 66df95b1..7de45351 100644 --- a/packages/ui/src/components/common/TransactionModal/TransactionModalRenderer.tsx +++ b/packages/ui/src/components/common/TransactionModal/TransactionModalRenderer.tsx @@ -212,7 +212,7 @@ export const TransactionModalRenderer: FC = ({ debouncedInputAmountValue && debouncedInputAmountValue.length > 0 && Number(debouncedInputAmountValue) !== 0) || - (tradeType === 'EXACT_OUTPUT' && + (tradeType === 'EXPECTED_OUTPUT' && debouncedOutputAmountValue && debouncedOutputAmountValue.length > 0 && Number(debouncedOutputAmountValue) !== 0)) && diff --git a/packages/ui/src/components/widgets/SwapWidget/index.tsx b/packages/ui/src/components/widgets/SwapWidget/index.tsx index 77a783bc..883bbcf5 100644 --- a/packages/ui/src/components/widgets/SwapWidget/index.tsx +++ b/packages/ui/src/components/widgets/SwapWidget/index.tsx @@ -36,7 +36,7 @@ type BaseSwapWidgetProps = { defaultToToken?: Token defaultToAddress?: Address defaultAmount?: string - defaultTradeType?: 'EXACT_INPUT' | 'EXACT_OUTPUT' + defaultTradeType?: 'EXACT_INPUT' | 'EXPECTED_OUTPUT' lockToToken?: boolean lockFromToken?: boolean lockChainId?: number @@ -355,12 +355,12 @@ const SwapWidget: FC = ({ lineHeight: '36px', py: 0, color: - isFetchingPrice && tradeType === 'EXACT_OUTPUT' + isFetchingPrice && tradeType === 'EXPECTED_OUTPUT' ? 'text-subtle' : 'input-color', _placeholder: { color: - isFetchingPrice && tradeType === 'EXACT_OUTPUT' + isFetchingPrice && tradeType === 'EXPECTED_OUTPUT' ? 'text-subtle' : 'input-color' } @@ -531,7 +531,7 @@ const SwapWidget: FC = ({ onClick={() => { if (fromToken || toToken) { if (tradeType === 'EXACT_INPUT') { - setTradeType('EXACT_OUTPUT') + setTradeType('EXPECTED_OUTPUT') setAmountInputValue('') setAmountOutputValue(amountInputValue) } else { @@ -641,7 +641,7 @@ const SwapWidget: FC = ({ = ({ } setValue={(e) => { setAmountOutputValue(e) - setTradeType('EXACT_OUTPUT') + setTradeType('EXPECTED_OUTPUT') if (Number(e) === 0) { setAmountInputValue('') debouncedAmountOutputControls.flush() diff --git a/packages/ui/src/components/widgets/SwapWidgetRenderer.tsx b/packages/ui/src/components/widgets/SwapWidgetRenderer.tsx index 4002f7b7..f1bfdc9b 100644 --- a/packages/ui/src/components/widgets/SwapWidgetRenderer.tsx +++ b/packages/ui/src/components/widgets/SwapWidgetRenderer.tsx @@ -33,7 +33,7 @@ import type { AdaptedWallet } from '@reservoir0x/relay-sdk' import type { LinkedWallet } from '../../types/index.js' import { formatBN } from '../../utils/numbers.js' -export type TradeType = 'EXACT_INPUT' | 'EXACT_OUTPUT' +export type TradeType = 'EXACT_INPUT' | 'EXPECTED_OUTPUT' type SwapWidgetRendererProps = { transactionModalOpen: boolean @@ -145,7 +145,7 @@ const SwapWidgetRenderer: FC = ({ useState(false) const address = useWalletAddress(wallet, linkedWallets) - const [tradeType, setTradeType] = useState<'EXACT_INPUT' | 'EXACT_OUTPUT'>( + const [tradeType, setTradeType] = useState<'EXACT_INPUT' | 'EXPECTED_OUTPUT'>( defaultTradeType ?? 'EXACT_INPUT' ) const queryClient = useQueryClient() @@ -168,7 +168,7 @@ const SwapWidgetRenderer: FC = ({ setValue: setAmountOutputValue, debouncedControls: debouncedAmountOutputControls } = useDebounceState( - defaultTradeType === 'EXACT_OUTPUT' ? defaultAmount ?? '' : '', + defaultTradeType === 'EXPECTED_OUTPUT' ? defaultAmount ?? '' : '', 500 ) @@ -409,7 +409,7 @@ const SwapWidgetRenderer: FC = ({ debouncedInputAmountValue && debouncedInputAmountValue.length > 0 && Number(debouncedInputAmountValue) !== 0) || - (tradeType === 'EXACT_OUTPUT' && + (tradeType === 'EXPECTED_OUTPUT' && debouncedOutputAmountValue && debouncedOutputAmountValue.length > 0 && Number(debouncedOutputAmountValue) !== 0)) && @@ -440,7 +440,7 @@ const SwapWidgetRenderer: FC = ({ ) : '' ) - } else if (tradeType === 'EXACT_OUTPUT') { + } else if (tradeType === 'EXPECTED_OUTPUT') { const amountIn = price?.details?.currencyIn?.amount ?? '' setAmountInputValue( amountIn !== '' diff --git a/packages/ui/src/constants/address.ts b/packages/ui/src/constants/address.ts index a32b7c79..d276116f 100644 --- a/packages/ui/src/constants/address.ts +++ b/packages/ui/src/constants/address.ts @@ -1,8 +1,10 @@ +import type { ChainVM } from '@reservoir0x/relay-sdk' + export const evmDeadAddress = '0x000000000000000000000000000000000000dead' as const export const solDeadAddress = '11111111111111111111111111111111' as const //need to check this -export const getDeadAddress = (vmType?: 'evm' | 'svm') => { +export const getDeadAddress = (vmType?: ChainVM) => { if (vmType === 'svm') { return solDeadAddress } else { From 2134530afb3f916cdc0c8b43d27a18ee385af255 Mon Sep 17 00:00:00 2001 From: pedromcunha Date: Thu, 17 Oct 2024 19:51:54 -0400 Subject: [PATCH 2/2] feat: changeset --- .changeset/rude-buckets-search.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/rude-buckets-search.md diff --git a/.changeset/rude-buckets-search.md b/.changeset/rude-buckets-search.md new file mode 100644 index 00000000..02883b38 --- /dev/null +++ b/.changeset/rude-buckets-search.md @@ -0,0 +1,6 @@ +--- +'@reservoir0x/relay-sdk': patch +'@reservoir0x/relay-kit-ui': patch +--- + +Replace exact_output with expected_output tradeType