mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-13 21:52:36 +03:00
21 lines
583 B
TypeScript
21 lines
583 B
TypeScript
import { SwapExecutor__factory } from "@orionprotocol/contracts/lib/ethers-v6-cjs/index.js"
|
|
import type { BigNumberish, AddressLike } from "ethers"
|
|
import { type CallParams, addCallParams } from "./utils.js"
|
|
|
|
|
|
export function generateFeePaymentCall(
|
|
matcher: AddressLike,
|
|
token: AddressLike,
|
|
amount: BigNumberish,
|
|
callParams?: CallParams
|
|
) {
|
|
|
|
const executorInterface = SwapExecutor__factory.createInterface()
|
|
const calldata = executorInterface.encodeFunctionData('payFeeToMatcher', [
|
|
matcher,
|
|
token,
|
|
amount
|
|
])
|
|
|
|
return addCallParams(calldata, callParams)
|
|
} |