Gets a quote for an on-chain transaction from the MEE service. This method is used when the payment token doesn't support ERC20Permit or when a standard on-chain transaction is preferred.
const quote = await getOnChainQuote(meeClient, { instructions: [ mcNexus.build({ type: "default", data: { calls: [ { to: "0x0000000000000000000000000000000000000000", gasLimit: 50000n, value: 0n } ], chainId: base.id } }) ], trigger: { paymentToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC amount: "1000000" // 1 USDC (6 decimals) }}); Copy
const quote = await getOnChainQuote(meeClient, { instructions: [ mcNexus.build({ type: "default", data: { calls: [ { to: "0x0000000000000000000000000000000000000000", gasLimit: 50000n, value: 0n } ], chainId: base.id } }) ], trigger: { paymentToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC amount: "1000000" // 1 USDC (6 decimals) }});
Will throw an error if the token does not support ERC20Permit
The base MEE client instance
Extends the client with additional functionality
Makes HTTP requests to the Http node
Parameters for the quote request
Promise resolving to quote payload with trigger information
Gets a quote for an on-chain transaction from the MEE service. This method is used when the payment token doesn't support ERC20Permit or when a standard on-chain transaction is preferred.
Example
Throws
Will throw an error if the token does not support ERC20Permit