From 3681f240db68077046f2a5131561048a6a84eb93 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Thu, 14 Mar 2024 13:19:50 +0300 Subject: [PATCH] fix: accept `LimitOrderV4Struct` in `LimitOrderContract` (#11) --- src/limit-order-contract/limit-order-contract.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/limit-order-contract/limit-order-contract.ts b/src/limit-order-contract/limit-order-contract.ts index 090d649..6fa5783 100644 --- a/src/limit-order-contract/limit-order-contract.ts +++ b/src/limit-order-contract/limit-order-contract.ts @@ -1,12 +1,12 @@ import {Interface, Signature} from 'ethers' -import {LimitOrder, TakerTraits} from '../limit-order' +import {LimitOrderV4Struct, TakerTraits} from '../limit-order' import LOP_V4_ABI from '../abi/AggregationRouterV6.abi.json' const lopContract = new Interface(LOP_V4_ABI) export class LimitOrderContract { static getFillOrderArgsCalldata( - order: LimitOrder, + order: LimitOrderV4Struct, signature: string, takerTraits: TakerTraits, amount: bigint @@ -15,7 +15,7 @@ export class LimitOrderContract { const {args, trait} = takerTraits.encode() return lopContract.encodeFunctionData('fillOrderArgs', [ - order.build(), + order, r, vs, amount, @@ -25,7 +25,7 @@ export class LimitOrderContract { } static getFillContractOrderArgsCalldata( - order: LimitOrder, + order: LimitOrderV4Struct, signature: string, takerTraits: TakerTraits, amount: bigint @@ -33,7 +33,7 @@ export class LimitOrderContract { const {args, trait} = takerTraits.encode() return lopContract.encodeFunctionData('fillContractOrderArgs', [ - order.build(), + order, signature, amount, trait,