Function getQuote

  • Requests a quote from the MEE service for executing a set of instructions

    Parameters

    • client: {
          account: MultichainSmartAccount;
          extend: (<const client, const extendedHttpClient>(fn) => never);
          pollingInterval: number;
          request: (<T>(params) => Promise<T>);
      }

      MEE client instance used to make the request

      • account: MultichainSmartAccount
      • extend: (<const client, const extendedHttpClient>(fn) => never)

        Extends the client with additional functionality

        Returns

        Extended client with both base and new functionality

          • <const client, const extendedHttpClient>(fn): never
          • Type Parameters

            • const client extends {
                  extend?: undefined;
                  request?: undefined;
              }
            • const extendedHttpClient extends HttpClient

            Parameters

            Returns never

      • pollingInterval: number
      • request: (<T>(params) => Promise<T>)

        Makes HTTP requests to the Http node

          • <T>(params): Promise<T>
          • Type Parameters

            • T

            Parameters

            • params: RequestParams

            Returns Promise<T>

    • params: GetQuoteParams

      Parameters for the quote request

    Returns Promise<GetQuotePayload>

    Promise resolving to a committed supertransaction quote

    Async

    Throws

    Error if the account is not deployed on any required chain

    Example

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