diff --git a/sdks/uniswapx-sdk/src/order/V3DutchOrder.ts b/sdks/uniswapx-sdk/src/order/V3DutchOrder.ts index 606e41b47..eac2da40e 100644 --- a/sdks/uniswapx-sdk/src/order/V3DutchOrder.ts +++ b/sdks/uniswapx-sdk/src/order/V3DutchOrder.ts @@ -317,7 +317,9 @@ export class UnsignedV3DutchOrder implements OffChainOrder { startAmount: this.info.input.startAmount, curve: { relativeBlocks: encodeRelativeBlocks(this.info.input.curve.relativeBlocks), - relativeAmounts: this.info.input.curve.relativeAmounts, + relativeAmounts: this.info.input.curve.relativeAmounts.map((amount) => + amount.toString() + ), }, maxAmount: this.info.input.maxAmount, adjustmentPerGweiBaseFee: this.info.input.adjustmentPerGweiBaseFee, @@ -327,7 +329,9 @@ export class UnsignedV3DutchOrder implements OffChainOrder { startAmount: output.startAmount, curve: { relativeBlocks: encodeRelativeBlocks(output.curve.relativeBlocks), - relativeAmounts: output.curve.relativeAmounts, + relativeAmounts: output.curve.relativeAmounts.map((amount) => + amount.toString() + ), }, recipient: output.recipient, minAmount: output.minAmount, diff --git a/sdks/uniswapx-sdk/src/order/types.ts b/sdks/uniswapx-sdk/src/order/types.ts index 160f7861a..d85347010 100644 --- a/sdks/uniswapx-sdk/src/order/types.ts +++ b/sdks/uniswapx-sdk/src/order/types.ts @@ -37,7 +37,7 @@ export interface OffChainOrder { * Returns any block overrides to be applied when quoting the order on chain * @return The block overrides */ - get blockOverrides(): BlockOverrides + get blockOverrides(): BlockOverrides; } export type TokenAmount = { @@ -73,7 +73,7 @@ export type PriorityOrderResolutionOptions = { export type V3OrderResolutionOptions = { currentBlock: number; filler?: string; -} +}; export type DutchOutput = { readonly token: string; @@ -146,7 +146,10 @@ export type V3DutchInput = { readonly adjustmentPerGweiBaseFee: BigNumber; }; -export type V3DutchInputJSON = Omit & { +export type V3DutchInputJSON = Omit< + V3DutchInput, + "startAmount" | "curve" | "maxAmount" | "adjustmentPerGweiBaseFee" +> & { startAmount: string; curve: NonlinearDutchDecayJSON; maxAmount: string; @@ -160,7 +163,7 @@ export type NonlinearDutchDecay = { export type EncodedNonlinearDutchDecay = { relativeBlocks: BigNumber; - relativeAmounts: bigint[]; + relativeAmounts: string[]; }; export type EncodedV3DutchInput = Omit & { @@ -185,9 +188,12 @@ export type V3DutchOutput = { readonly adjustmentPerGweiBaseFee: BigNumber; }; -export type V3DutchOutputJSON = Omit & { +export type V3DutchOutputJSON = Omit< + V3DutchOutput, + "startAmount" | "curve" | "minAmount" | "adjustmentPerGweiBaseFee" +> & { startAmount: string; curve: NonlinearDutchDecayJSON; minAmount: string; adjustmentPerGweiBaseFee: string; -}; \ No newline at end of file +};