import { type Address } from "@morpho-org/blue-sdk"; import type { ERC20ApprovalAction, Requirement, Transaction } from "../../types"; /** * Get token "requirement" for permit2. * * Two steps: * 1. Verify if the allowance is enough on permit2 contract. * => If not, approve the token to permit2 contract with classic approval on infinite amount. * 2. Verify if the allowance is enough on general adapter from permit2 contract. * => If not, approve the token to general adapter from permit2 contract with permit2 signature on the required amount. * * @param params - Destructured object with: * @param params.address - ERC20 token address. * @param params.chainId - Chain/network id. * @param params.permit2 - Permit2 contract address. * @param params.args - Object with: * @param params.args.amount - Required token amount. * @param params.allowancesGeneralAdapter - Allowance for general adapter from permit2 contract. * @param params.allowancesPermit2 - Allowance for permit2. * @param params.allowanceGeneralAdapterPermit2 - Allowance for general adapter from permit2 contract. * @param params.allowanceGeneralAdapterExpiration - Expiration for general adapter from permit2 contract. * @param params.nonce - Nonce for permit2. * @returns An array of approval transaction or requirement signatures objects. */ export declare const getRequirementsPermit2: (params: { address: Address; chainId: number; permit2: Address; args: { amount: bigint; }; allowancesPermit2: bigint; allowancesGeneralAdapter: bigint; allowanceGeneralAdapterPermit2: bigint; allowanceGeneralAdapterExpiration: bigint; nonce: bigint; }) => Readonly | Requirement>[];