Skip to content

executeQuote

The executeQuote method executes a quote by signing it and then executing the signed quote. This is a convenience method that combines signQuote and executeSignedQuote into a single operation.

Parameters

ParameterTypeDescription
clientBaseMeeClientMEE client instance used to make the request
paramsSignQuoteParamsParameters for signing the quote
params.quoteGetQuotePayloadThe quote payload to be executed

Returns

Promise resolving to an ExecuteSignedQuotePayload containing:

PropertyTypeDescription
hashHexThe transaction hash of the executed quote

Example

const quote = await meeClient.getQuote({
  instructions: [
    mcNexus.build({ type: "default", data: { chainId: targetChain.id, calls: [{ to: "0x...", value: 0n }] } }),
  ],
  feeToken: {
    address: mcUSDC.addressOn(optimism.id),
    chainId: optimism.id
  }
});
 
const { hash } = await meeClient.executeQuote({ quote });
 
const receipt = await meeClient.waitForSupertransactionReceipt({ hash });

Error Handling

Throws an error if:

  • The account is not deployed on any required chain
  • The quote signing fails
  • The quote execution fails

Type Definitions

SignQuoteParams

type SignQuoteParams = {
  quote: GetQuotePayload
  deadline?: number
  nonce?: number
}

ExecuteSignedQuotePayload

type ExecuteSignedQuotePayload = {
  hash: Hex
}