Skip to content

Commit

Permalink
fix: accept LimitOrderV4Struct in LimitOrderContract (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbrvk authored Mar 14, 2024
1 parent 64621fa commit 3681f24
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/limit-order-contract/limit-order-contract.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -15,7 +15,7 @@ export class LimitOrderContract {
const {args, trait} = takerTraits.encode()

return lopContract.encodeFunctionData('fillOrderArgs', [
order.build(),
order,
r,
vs,
amount,
Expand All @@ -25,15 +25,15 @@ export class LimitOrderContract {
}

static getFillContractOrderArgsCalldata(
order: LimitOrder,
order: LimitOrderV4Struct,
signature: string,
takerTraits: TakerTraits,
amount: bigint
): string {
const {args, trait} = takerTraits.encode()

return lopContract.encodeFunctionData('fillContractOrderArgs', [
order.build(),
order,
signature,
amount,
trait,
Expand Down

0 comments on commit 3681f24

Please sign in to comment.