Skip to content

pimlico_getTokenQuotes

This method returns the tenatative token exhange rates used by the ERC-20 Paymaster.

Request

{
    "jsonrpc": "2.0",
    "method": "pimlico_getTokenQuotes",
    "params": [
        {
            "tokens": [
                "0x6b175474e89094c44da98b954eedeac495271d0f",
                "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
                "0x514910771af9ca656af840dff83e8264ecf986ca"
            ] // list of token addresses to get quotes for
        },
        "0x0000000071727De22E5E9d8BAf0edAc6f37da032", // entrypoint address
        "0xa4b1" // chain id
    ],
    "id": 1
}

Response

{
  "jsonrpc": "2.0",
  "id": 24,
  "result": {
    "quotes": [
      {
        "paymaster": "0x00000000000000fB866DaAA79352cC568a005D96",
        "token": "0xF57e7e7C23978C3cAEC3C3548E3D615c346e79fF",
        "postOpGas": "0xc350",
        "exchangeRate": "0x600d7237a1c7100000",
        "exchangeRateNativeToUsd": "0x699c61c9"
      },
      {
        "paymaster": "0x00000000000000fB866DaAA79352cC568a005D96",
        "token": "0x6fB3e0A217407EFFf7Ca062D46c26E5d60a14d69",
        "postOpGas": "0xc350",
        "exchangeRate": "0xf27de07216ca3000000",
        "exchangeRateNativeToUsd": "0x10a9f58e8e"
      }
    ]
  }
}