Gets a quote for a permit-enabled transaction from the MEE service. This method is used when the payment token supports ERC20Permit, allowing for gasless approvals and more efficient transactions.
const quote = await getPermitQuote(meeClient, { instructions: [{ to: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", data: "0x...", value: "0" }], trigger: { paymentToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC amount: "1000000", // 1 USDC (6 decimals) owner: "0x...", // Token owner address spender: "0x..." // Address approved to spend tokens }}); Copy
const quote = await getPermitQuote(meeClient, { instructions: [{ to: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", data: "0x...", value: "0" }], trigger: { paymentToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC amount: "1000000", // 1 USDC (6 decimals) owner: "0x...", // Token owner address spender: "0x..." // Address approved to spend tokens }});
Will throw an error if:
The base MEE client instance
Extends the client with additional functionality
Makes HTTP requests to the Http node
Parameters for the permit quote request
Promise resolving to quote payload with permit-specific trigger information
Gets a quote for a permit-enabled transaction from the MEE service. This method is used when the payment token supports ERC20Permit, allowing for gasless approvals and more efficient transactions.
Example
Throws
Will throw an error if: