Fuel Decoded Logs

Fetch decoded logs with event_name interfaces::events::SwapEvent for blocks 7004000 to 7005000.

curl -s --location --request GET \
 "https://app.pangea.foundation/v1/api/logs/decoded?chains=FUEL&from_block=7004000&to_block=7005000&event_name__in=interfaces::events::SwapEvent" \
 --header "Accept: application/jsonstream" \
 --header "Accept-Encoding: gzip" --compressed \
 --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 9889,
    "block_number": "0x6ae347",
    "block_hash": "0x6f5d4c9c6a781dfcab6d668a307ed7af2f68101203790c60cff8a39565db11ea",
    "transaction_index": "0x0",
    "transaction_hash": "0x1475a7afb78e19c1febd979f9c8810e05d56aa5079a1a0b24de47269ed9d3004",
    "log_index": "0x2",
    "id": "0x2e40f2b244b98ed6b8204b3de0156c6961f98525c8162f80162fcf53eebd90e7",
    "ra": "0x0",
    "rb": "0x6e2b2beb181a5f3d",
    "pc": "0xa960",
    "is": "0x90a8",
    "ptr": "0x3fea9e2",
    "len": "0x89",
    "digest": "0x3271243c3096e27d317567988cc5e443eeff4e8e1304c3ac4cad17e6dc6e9729",
    "data": "0x239ed6e12b7ce4089ee245244e3bf906999a6429c2a9a445a1e1faf56914a4ab286c479da40dc953bddc3bb4c453b608bba2e0ac483b077bd475174115395e6b000000000000000000eb982bff685e9b03b5459e49e1a40a6e1e0c68e004485717c395fb51b9d98e1600000000000d59780000000000000000000000000000000000000000002b28de",
    "event_name": "interfaces::events::SwapEvent",
    "decoded": "{\"asset_0_in\":874872,\"asset_0_out\":0,\"asset_1_in\":0,\"asset_1_out\":2828510,\"pool_id\":[{\"bits\":\"0x239ed6e12b7ce4089ee245244e3bf906999a6429c2a9a445a1e1faf56914a4ab\"},{\"bits\":\"0x286c479da40dc953bddc3bb4c453b608bba2e0ac483b077bd475174115395e6b\"},false],\"recipient\":{\"Address\":{\"bits\":\"0xeb982bff685e9b03b5459e49e1a40a6e1e0c68e004485717c395fb51b9d98e16\"}}}"
  }
]

Filter on events

The rb__in filter can also be used to fetch specific log events.

Fetch decoded logs for blocks 7004600 to 7004650 for events with rb 0x6e2b2beb181a5f3d and 0x61825e22a76ff7a0 .

curl -s --location --request GET \
 "https://app.pangea.foundation/v1/api/logs/decoded?chains=FUEL&from_block=7004600&to_block=7004650&rb__in=0x6e2b2beb181a5f3d,0x61825e22a76ff7a0" \
 --header "Accept: application/jsonstream" \
 --header "Accept-Encoding: gzip" --compressed \
 --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 9889,
    "block_number": "0x6ae1db",
    "block_hash": "0x2e00a81880299e4bebae1d03a1f7122c807ad2dadda6435e50fdf559d1b8dde4",
    "transaction_index": "0x0",
    "transaction_hash": "0x121a2bc251db740dc7357c9a4a1c0ba1b9d796455c6bdf050d79794f45f59e60",
    "log_index": "0x0",
    "id": "0x657ab45a6eb98a4893a99fd104347179151e8b3828fd8f2a108cc09770d1ebae",
    "ra": "0x0",
    "rb": "0x61825e22a76ff7a0",
    "pc": "0xa444",
    "is": "0x3108",
    "ptr": "0x3ffe732",
    "len": "0x50",
    "digest": "0x49fbfb6bce08d30efdaf9eb73cfe93e50bb2b6859a2f793908df55007d59a50e",
    "data": "0x00000000000000001abac553d7e9455018bc50811842266ab51a265245db0b3531b801b22da493e4f8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad0700000000004c4b40",
    "event_name": "events::UserSupplyCollateralEvent",
    "decoded": "{\"account\":{\"Address\":{\"bits\":\"0x1abac553d7e9455018bc50811842266ab51a265245db0b3531b801b22da493e4\"}},\"amount\":5000000,\"asset_id\":{\"bits\":\"0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07\"}}"
  }
]

Filter on contracts

The id__in filter can be used to fetch log events from specific contracts.

Fetch decoded logs for blocks 8000000 to 8001000 from contract with id 0x243ef4c2301f44eecbeaf1c39fee9379664b59a2e5b75317e8c7e7f26a25ed4d .

curl -s --location --request GET \
 "https://app.pangea.foundation/v1/api/logs/decoded?chains=FUEL&from_block=8000000&to_block=8001000&id__in=0x243ef4c2301f44eecbeaf1c39fee9379664b59a2e5b75317e8c7e7f26a25ed4d" \
 --header "Accept: application/jsonstream" \
 --header "Accept-Encoding: gzip" --compressed \
 --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 9889,
    "block_number": "0x7a145d",
    "block_hash": "0x5c89a5b5cd91f380c8b3c76eed4d81ea04c1371943efeaf081f41b1072b05743",
    "transaction_index": "0x0",
    "transaction_hash": "0x9b922e79d3c8cd9a067eb7cfac3ed27158cf6968e2a910b726e3b067e0572692",
    "log_index": "0x0",
    "id": "0x243ef4c2301f44eecbeaf1c39fee9379664b59a2e5b75317e8c7e7f26a25ed4d",
    "ra": "0x0",
    "rb": "0xbcea1a1c8196adb6",
    "pc": "0x95d4",
    "is": "0x2ff8",
    "ptr": "0x3ffb520",
    "len": "0x50",
    "digest": "0x94bb3887ff83fa75c00567a65da012bcf5825685bb285d1dd6bd8c3b1c09a0ff",
    "data": "0xc0641627bbba6cdf9ff4b783c41df0149802be74fea752df847fce1930d60476fb2b92c17160f9856664bde85bec51f5839d565898d489a6ef8fcb9b73575b5700000000000000010000000000000002",
    "event_name": "events::OrderCanceled",
    "decoded": "{\"nonce\":2,\"side\":{\"Sell\":null},\"strategy\":{\"bits\":\"0xfb2b92c17160f9856664bde85bec51f5839d565898d489a6ef8fcb9b73575b57\"},\"user\":{\"bits\":\"0xc0641627bbba6cdf9ff4b783c41df0149802be74fea752df847fce1930d60476\"}}"
  }
]

Query Parameters

app.pangea.foundation/v1/api/logs/decoded?chains=FUEL

  • chains: Filters the data by specific blockchain networks.
  • from_block: Filters the data by a starting block number.
  • to_block: Filters the data by an ending block number.
  • id__in: Filters the data by a list of contract ids.
  • ra__in: Filters the data by a list of ra values.
  • rb__in: Filters the data by a list of rb values.
  • event_name__in: Filters the data by a list of event_name.
  • address__in / contractid__in / identity__in: Filters the data by a list of addresses.