Pangea

Documentation and Resources

The Indexer Pangea allows for retrieving data from the Fuel blockchain. The data can be general (e.g., blocks, transactions) or targeted, related to Spark smart contracts (e.g., SparkOrder, SparkMarket).

At present, the indexer cannot be deployed locally, and access to it is only possible via the Superchain API.

Access can be achieved either through HTTPS requests or via WebSocket.

It is important to note that all requests must be authenticated, as there is currently no open API for Fuel without authorization.

API Limitations

One limitation of the Pangea API is that data is only accessible for the last 10,000 blocks. Therefore, if the blockchain height has moved beyond this limit, certain orders may become unavailable. To mitigate this, it's advisable to store the relevant orders in a local state or retrieve them through another indexer.

HTTP Requests

Raw blocks

Curl example for blocks getting

curl -s --location --request GET \\
    "<https://fuel.beta.superchain.network/v1/api/blocks?chains=FUEL&from_block=-10&to_block=latest>" \\
    --header "Accept: application/jsonstream" \\
    --header "Accept-Encoding: gzip" --compressed \\
    --header "Authorization: Basic $SUPER_AUTH" | jq

Response

[
  ...
    {
    "chain": 122,
    "block_number": "0x1",
    "hash": "0xd9778bef768a7a1cba49af87bc90479264bd12702c3f96e33348718da1559ad7",
    "parent_hash": "0xdd87728ce9c2539af61d6c5326c234c5cb0722b14a8c059f5126ca2a8ca3b4e2",
    "da_block_number": "0x5a4227",
    "transactions_root": "0xaa54f87aae6932e9345622f5b876b8ee9155b6acc31ee279dbddfadcdf263ee0",
    "transactions_count": 1,
    "message_receipt_count": 0,
    "message_outbox_root": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "event_inbox_root": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "timestamp": 1715871136
  }
]

fuel.beta.superchain.network/v1/api/blocks?chains=FUEL

  • chains: This parameter is used to filter the data by specific blockchain networks.

  • from_block: This parameter is used to filter the data by a starting block number.

  • to_block: This parameter is used to filter the data by an ending block number.

  • from_da_block_number: This parameter is used to filter the data by a starting data availability block number.

  • to_da_block_number: This parameter is used to filter the data by an ending data availability block number.

Transactions

curl -s --location --request GET \\
    "<https://fuel.beta.superchain.network/v1/api/transactions?chains=FUEL&from_block=-10&to_block=latest>" \\
    --header "Accept: application/jsonstream" \\
    --header "Accept-Encoding: gzip" --compressed \\
    --header "Authorization: Basic $SUPER_AUTH" | jq

v1/api/transactions

  • chains: This parameter is used to filter the data by specific blockchain networks.

  • from_block: This parameter is used to filter the data by a starting block number.

  • to_block: This parameter is used to filter the data by an ending block number.

  • to__in: This parameter is used to filter the data by the to address.

  • from__in: This parameter is used to filter the data by the from address.

  • value__gte: This parameter is used to filter the value using the greater than or equal to operator.

  • value__lte: This parameter is used to filter the value using the less than or equal to operator.

Raw contact logs

curl -s --location --request GET \\
    "<https://fuel.beta.superchain.network/v1/api/logs?chains=FUEL&from_block=-100&to_block=latest&id__in=0x4a2ce054e3e94155f7092f7365b212f7f45105b74819c623744ebcc5d065c6ac>" \\
    --header "Accept: application/jsonstream" \\
    --header "Accept-Encoding: gzip" --compressed \\
    --header "Authorization: Basic $SUPER_AUTH" | jq

fuel.beta.superchain.network/v1/api/logs?chains=FUEL

  • chains: This parameter is used to filter the data by specific blockchain networks.

  • from_block: This parameter is used to filter the data by a starting block number.

  • to_block: This parameter is used to filter the data by an ending block number.

  • id__in: This parameter is used to filter the data by a list of contract ids.

  • ra__in: This parameter is used to filter the logs by a list of ra values.

  • rb__in: This parameter is used to filter the logs by a list of rb values.

  • input_contract_contract_id__in: This parameter is used to filter the data by a list of input contract contract ids.

Spark orders

curl -s --location --request GET \\
    "<https://fuel.beta.superchain.network/v1/api/spark/orders?chains=FUEL&from_block=-10&to_block=latest>" \\
    --header "Accept: application/jsonstream" \\
    --header "Accept-Encoding: gzip" --compressed \\
    --header "Authorization: Basic $SUPER_AUTH" | jq

uel.beta.superchain.network/v1/api/spark/orders?chains=FUEL

  • chains: This parameter is used to filter the data by specific blockchain networks.

  • from_block: This parameter is used to filter the data by a starting block number.

  • to_block: This parameter is used to filter the data by an ending block number.

  • order_id__in: This parameter is used to filter the data by a list of order ids.

  • order_type__in: This parameter is used to filter the data by a list of order types (i.e. Buy, Sell).

  • state_type__in: This parameter is used to filter the data by a list of order state types (i.e. Open, Cancel, Match).

  • user__in: This parameter is used to filter the data by a list of user accounts.

  • owner__in: This parameter is used to filter the data by a list of owner accounts.

  • asset__in: This parameter is used to filter the data by a list of asset contract ids.

  • address__in: This parameter is used to filter the data by a list of addresses.

Last updated