> ## Documentation Index
> Fetch the complete documentation index at: https://tokenterminal.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# metamask_v1_polygon

> Tables in tt-contracts.metamask_v1_polygon

## Tables

### Router\_swap\_function

Failed swap attempts through MetaMask's swap router contract on Polygon. Contains transaction-level data for unsuccessful swap operations, useful for analyzing swap failure patterns and gas consumption in failed MetaMask transactions.

<Accordion title="Columns">
  | Column             | Type        | Description                                                                                                                                                                                                                                                          |
  | ------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `block_timestamp`  | `TIMESTAMP` | Timestamp when the block was produced. UTC timezone, millisecond precision.                                                                                                                                                                                          |
  | `block_number`     | `INT64`     | Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block's position in the blockchain.                                                                                                                 |
  | `transaction_hash` | `STRING`    | Unique identifier for the transaction. 66-character hex string including 0x prefix.                                                                                                                                                                                  |
  | `trace_address`    | `STRING`    | Hierarchical position of the internal call within a transaction's execution trace. Comma-separated sequence of integers representing the call path, where each number indicates the index of the call at that nesting level, with null representing top-level calls. |
  | `status`           | `BOOL`      | Transaction execution outcome indicator. Boolean value where true represents successful execution and false represents failed execution.                                                                                                                             |
  | `from_address`     | `STRING`    | Address that initiated the transaction or contract call. Hex-encoded, 0x-prefixed, 42-character string.                                                                                                                                                              |
  | `to_address`       | `STRING`    | Address receiving the transaction or contract call. Hex-encoded, 0x-prefixed, 42-character string.                                                                                                                                                                   |
  | `value`            | `FLOAT64`   | Amount of native cryptocurrency sent with the transaction. Floating-point representation in whole units (e.g., ETH, BNB, MATIC).                                                                                                                                     |
  | `gas_used`         | `INT64`     | Amount of gas consumed by the transaction execution. Integer representing the actual computational steps used.                                                                                                                                                       |
  | `gas`              | `NUMERIC`   | Gas limit allocated for the transaction execution. Integer representing the maximum computational steps allowed.                                                                                                                                                     |
  | `signature`        | `STRING`    | Function selector identifying which contract function was called. 10-character hex string including 0x prefix.                                                                                                                                                       |
  | `in_aggregatorId`  | `STRING`    | Identifier for the decentralized exchange (DEX) aggregator executing the swap route. Null values in samples suggest this field may not be populated for all swap transactions or aggregator types.                                                                   |
  | `in_tokenFrom`     | `STRING`    | Contract address of the source token being swapped in the MetaMask Router transaction. Hex-encoded, 0x-prefixed 40-character string for EVM tokens; null when transaction failed or parameters unavailable.                                                          |
  | `in_amount`        | `STRING`    | Input amount for the swap, transaction, or operation. Numeric string representation of token quantity in smallest denomination.                                                                                                                                      |
  | `in_data`          | `STRING`    | Encoded input data for the contract function call. Hex-encoded byte string representing function parameters and additional call data.                                                                                                                                |
</Accordion>

<Accordion title="Sample Data">
  | gas     | value | status | in\_data | gas\_used | in\_amount | signature  | to\_address                                | block\_number | from\_address                              | in\_tokenFrom | trace\_address | block\_timestamp         | in\_aggregatorId | transaction\_hash                                                  |
  | ------- | ----- | ------ | -------- | --------- | ---------- | ---------- | ------------------------------------------ | ------------- | ------------------------------------------ | ------------- | -------------- | ------------------------ | ---------------- | ------------------------------------------------------------------ |
  | 1602300 | 0     | false  |          | 30895     |            | 0x5f575529 | 0x1a1ec25dc08e98e5e93f1104b5e5cdd298707d31 | 66166059      | 0x608db44fa0a698af6ca4447111fd4534ed718763 |               |                | 2025-01-01T04:27:53.000Z |                  | 0x3105fb52fb49e401bb826c2480fc51c9c784407aa9b2e9a513f60dd92f4f9b04 |
  | 1604428 | 0     | false  |          | 15148     |            | 0x5f575529 | 0x1a1ec25dc08e98e5e93f1104b5e5cdd298707d31 | 66184048      | 0x88630c35578dc8f986b7c3c2b9d6ead8ff0c925b |               |                | 2025-01-01T15:25:22.000Z |                  | 0x7dc472f943325c62aa91b85637572464b521bd4c87275c766aea694dcefa62b9 |
  | 1620872 | 0     | false  |          | 15148     |            | 0x5f575529 | 0x1a1ec25dc08e98e5e93f1104b5e5cdd298707d31 | 66183392      | 0x5dbbf886b858e77d43b5f380057f35bb4fc580ad |               |                | 2025-01-01T15:01:36.000Z |                  | 0xa22d86cbdff4f2ed8fcf1ab0f8c820d14bb49d254751f03029efe963dcc95c63 |
</Accordion>

<Accordion title="Example Query">
  **Query with partition filter**

  ```sql theme={null}
  SELECT *
  FROM `tt-contracts.metamask_v1_polygon.Router_swap_function`
  WHERE block_timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
  LIMIT 100
  ```
</Accordion>

***
