Skip to content

getQuote

The getQuote method requests a quote from the MEE service for executing a set of instructions. It returns a committed supertransaction quote.

Parameters

ParameterTypeDescription
clientBaseMeeClientMEE client instance used to make the request
paramsGetQuoteParamsParameters for the quote request
params.instructionsInstruction[]Array of instructions to be executed
params.feeTokenFeeTokenInformation about the token used for fees
params.accountMultichainSmartAccount(Optional) Smart account to execute the transaction. If not provided, uses the client's default account

Returns

Promise resolving to a GetQuotePayload containing:

PropertyTypeDescription
hashHexTransaction hash
nodeAddressAddress of the MEE node
commitmentHexCommitment hash
paymentInfoFilledPaymentInfoComplete payment information with token amounts
userOpsMeeFilledUserOpDetails[]Array of user operations with their details

Example

const quote = await meeClient.getQuote({
  instructions: [
    mcNexus.build({ ... }),
  ],
  feeToken: { 
    address: '0x...', 
    chainId: 1 
  }
});

Error Handling

Throws an error if the account is not deployed on any required chain.

Type Definitions

GetQuoteParams

type Instruction = {
  chainId: number
  calls: {
    to: Address
    value?: bigint
    data?: Hex
    gasLimit?: bigint // This is optional and defaults to 500_000n. Any overspending will be refunded.
  }[]
}
 
type GetQuoteParams = {
  instructions: Instruction[]
  feeToken: FeeToken
}

GetQuotePayload

type GetQuotePayload = {
  hash: Hex
  node: Address
  commitment: Hex
  paymentInfo: FilledPaymentInfo
  userOps: MeeFilledUserOpDetails[]
}