SocialScan Explorer API
  • Introduction
  • 🎯API ENDPOINTS
    • Accounts
    • Contracts
    • Transactions
    • Blocks
    • Logs
    • Tokens
    • Stats
  • 🗳️Verify Smart Contract
    • Verify Smart Contract
      • Verify with SocialScan UI
      • Verify with SocialScan API
      • Verify through Foundry
      • Verify through Hardhat
  • 🤝SUPPORT
    • FAQ
    • Rate Limits
    • Common Error Messages
    • Getting Help
Powered by GitBook
On this page
  • Compare With EtherScan
  • Get Event Logs by Address
  • Get Event Logs by Topics
  • Get Event Logs by Address filtered by Topics

Was this helpful?

  1. API ENDPOINTS

Logs

PreviousBlocksNextTokens

Last updated 1 month ago

Was this helpful?

Compare With EtherScan

EndPoint
EtherScan
SocialScan

Get Event Logs by Address

✅

✅

Get Event Logs by Topics

✅

✅

Get Event Logs by Address filtered by Topics

✅

✅

Get Event Logs by Address

[]

Returns the event logs from an address, with optional filtering by block range.

https://api.w3w.ai/mantle/v1/developer/api
   ?module=logs
   &action=getLogs
   &address=0x201eba5cc46d216ce6dc03f6a759e8e766e956ae
   &fromBlock=19999000
   &toBlock=20000000
   &page=1
   &offset=1000
   &apikey=YourApiKeyToken

Try this endpoint in your

https://api.socialscan.io/monad-testnet/v1/developer/api
   ?module=logs
   &action=getLogs
   &address=0x34d1ae6076aee4072f54e1156d2e507dd564a355
   &fromBlock=0
   &toBlock=20000000
   &page=1
   &offset=100
   &apikey=8f9d3e27-a516-4c08-b235-7d94f02ca91b

Try this endpoint in your

Query Parameters

Parameter
Description

address

the string representing the address to check for logs

fromBlock

the integer block number to start searching for logs eg. 12878196

toBlock

the integer block number to stop searching for logs eg. 12879196

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page limited to 1000 records per query, use the page parameter for subsequent records

Sample response

{
    "status": "1",
    "message": "OK",
    "result": [
        {
            "transactionHash": "0x7fbafdc48171a5fea4253e877af8a1f1c8fd571e4c400fe6c1bf58ae58adaaa0",
            "logIndex": "0",
            "address": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
            "data": "0x000000000000000000000000000000000000000000000000000000000007e1c9",
            "blockNumber": "19999000",
            "timeStamp": "1699389429",
            "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000d08c50f7e69e9aeb2867deff4a8053d9a855e26a",
                "0x000000000000000000000000a53efa35eaed44014a0530894beeea93dabe6f83"
            ]
        },
        {
            "transactionHash": "0x15d1b3e6252c7911a58eaa44de222b87bda0eaf8fede2d39e01c04946d8b028e",
            "logIndex": "1",
            "address": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
            "data": "0x0000000000000000000000000000000000000000000000000000000000076688",
            "blockNumber": "19999001",
            "timeStamp": "1699389429",
            "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000f8eb2198903cfafaafc5481dc594c6519897df86",
                "0x0000000000000000000000006488f911c6cd86c289aa319c5a826dcf8f1ca065"
            ]
        },
        {
            "transactionHash": "0x15d1b3e6252c7911a58eaa44de222b87bda0eaf8fede2d39e01c04946d8b028e",
            "logIndex": "2",
            "address": "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffff570247f",
            "blockNumber": "19999001",
            "timeStamp": "1699389429",
            "topics": [
                "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
                "0x000000000000000000000000f8eb2198903cfafaafc5481dc594c6519897df86",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421"
            ]
        }
    ]
}

Get Event Logs by Topics

Returns the events log in a block range, filtered by topics.

https://api.w3w.ai/mantle/v1/developer/api
   ?module=logs
   &action=getLogs
   &fromBlock=19999900
   &toBlock=20000000
   &topic0=0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83
   &topic0_1_opr=and
   &topic1=0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421
   &page=1
   &offset=1000
   &apikey=YourApiKeyToken

Usage:

  • For a single topic, specify the topic number such as topic0, topic1, topic2, topic3

  • For multiple topics, specify the topic numbers and topic operator either and or or such as below topic0_1_opr (and|or between topic0 & topic1), topic1_2_opr (and|or between topic1 & topic2) topic2_3_opr (and|or between topic2 & topic3), topic0_2_opr (and|or between topic0 & topic2) topic0_3_opr (and|or between topic0 & topic3), topic1_3_opr (and|or between topic1 & topic3)

https://api.socialscan.io/monad-testnet/v1/developer/api
   ?module=logs
   &action=getLogs
   &fromBlock=0
   &toBlock=20000000
   &topic0=0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83
   &topic0_1_opr=and
   &topic1=0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421
   &page=1
   &offset=100
   &apikey=8f9d3e27-a516-4c08-b235-7d94f02ca91b

Usage:

  • For a single topic, specify the topic number such as topic0, topic1, topic2, topic3

  • For multiple topics, specify the topic numbers and topic operator either and or or such as below topic0_1_opr (and|or between topic0 & topic1), topic1_2_opr (and|or between topic1 & topic2) topic2_3_opr (and|or between topic2 & topic3), topic0_2_opr (and|or between topic0 & topic2) topic0_3_opr (and|or between topic0 & topic3), topic1_3_opr (and|or between topic1 & topic3)

Query Parameters

Parameter
Description

fromBlock

the integer block number to start searching for logs eg. 12878196

toBlock

the integer block number to stop searching for logs eg. 12879196

topic

the topic numbers to search for limited totopic0, topic1, topic2, topic3

topicOperator

the topic operator when multiple topic combinations are used limited to and or or

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page limited to 1000 records per query, use the page parameter for subsequent records

Sample response

{
    "status": "1",
    "message": "OK",
    "result": [
        {
            "transactionHash": "0x308dedbaad3a9f38bb1afde34c5480840677ecb82ba69886b4d81bb188d2ef08",
            "logIndex": "3",
            "address": "0x628f7131cf43e88ebe3921ae78c4ba0c31872bd4",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9adca0000000000000000000000000000000000000000000000000000c816bdd9c00000000000000000000000000000000000000059ff130ccbb39daea570acc00e9200000000000000000000000000000000000000000000000000fc837f56df7c5f00000000000000000000000000000000000000000000000000000000000310cc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008b536b600",
            "blockNumber": "19999901",
            "timeStamp": "1699389792",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x000000000000000000000000728011d2bd2f25fa6998b773e9508156caaaf281"
            ]
        },
        {
            "transactionHash": "0xa44d26e33815278af7973c3dc68dd719ad0f4898e95f0c1cc521a306b70e7596",
            "logIndex": "3",
            "address": "0x6488f911c6cd86c289aa319c5a826dcf8f1ca065",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6898a00000000000000000000000000000000000000000000000000000000000975e00000000000000000000000000000000000000000fff4cb636f2ba2daaf0d4d590000000000000000000000000000000000000000000000000000c62e03e2f8cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014",
            "blockNumber": "19999903",
            "timeStamp": "1699389792",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x000000000000000000000000387d5210595e95f41649209f3c4cc5c459ac83cd"
            ]
        },
        {
            "transactionHash": "0x905825b9bc452114c2ec784ad1cd1ca4674e9f4ebed27de49610bef9ccac651e",
            "logIndex": "3",
            "address": "0x628f7131cf43e88ebe3921ae78c4ba0c31872bd4",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff425db0000000000000000000000000000000000000000000000000001772aa3f8480000000000000000000000000000000000000059ff1488f3ac76f03e606d8c8e1c00000000000000000000000000000000000000000000000000fc837f56df7c5f00000000000000000000000000000000000000000000000000000000000310cc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001053c69540",
            "blockNumber": "19999904",
            "timeStamp": "1699389792",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x00000000000000000000000095898dcb11b7ee61d20d440178f0b491e3aae006"
            ]
        }
    ]
}

Get Event Logs by Address filtered by Topics

Returns the event logs from an address, filtered by topics and block range.

https://api.w3w.ai/mantle/v1/developer/api?module=logs
   &action=getLogs
   &address=0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a
   &fromBlock=19999900
   &toBlock=20000000
   &topic0=0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83
   &topic0_1_opr=and
   &topic1=0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421
   &page=1
   &offset=1000
   &apikey=YourApiKeyToken
https://api.socialscan.io/monad-testnet/v1/developer/api?module=logs
   &action=getLogs
   &address=0x34d1ae6076aee4072f54e1156d2e507dd564a355
   &fromBlock=0
   &toBlock=20000000
   &topic0=0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925
   &topic0_1_opr=and
   &topic1=0x000000000000000000000000a92428608032f189a0b5576093d98416fd3e9418
   &page=1
   &offset=100
   &apikey=8f9d3e27-a516-4c08-b235-7d94f02ca91b

Query Parameters

Parameter
Description

fromBlock

the integer block number to start searching for logs eg. 12878196

toBlock

the integer block number to stop searching for logs eg. 12879196

address

the string representing the address to check for logs

topic

the topic numbers to search for limited totopic0, topic1, topic2, topic3

topicOperator

the topic operator when multiple topic combinations are used limited to and or or

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page limited to 1000 records per query, use the page parameter for subsequent records

Sample response

{
    "status": "1",
    "message": "OK",
    "result": [
        {
            "transactionHash": "0xa1ec08e21896b510ca7f1ade9221ea136000edea92beea757c5965263627ad95",
            "logIndex": "3",
            "address": "0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c3a40000000000000000000000000000000000000000000000000d7621dc58210000000000000000000000000000000000000017809b862193550103f74bf56bd1110000000000000000000000000000000000000000000000005f00d2fec24cd7c800000000000000000000000000000000000000000000000000000000000459230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000095f9c5ec6800",
            "blockNumber": "19999923",
            "timeStamp": "1699389797",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x0000000000000000000000006658a52627f055c8ee1813da497256a87e283cc7"
            ]
        },
        {
            "transactionHash": "0xbd52e6d7109a6518cc98913206d0ccfdf5dc1b720538f05826f16112becb1b5b",
            "logIndex": "3",
            "address": "0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7e661000000000000000000000000000000000000000000000000117c6b5300fe0000000000000000000000000000000000000017809bb539e849e13c3cd656d595280000000000000000000000000000000000000000000000005f00d2fec24cd7c8000000000000000000000000000000000000000000000000000000000004592300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c2d052e93000",
            "blockNumber": "19999928",
            "timeStamp": "1699389797",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x0000000000000000000000006ac3c5b517c0a9024d8a6ff48c0d3977ae7993af"
            ]
        },
        {
            "transactionHash": "0xab21ef4b1a6a18f17b5543f3245a46ec3d526c4ec64f56b4c81bb20639e235a8",
            "logIndex": "3",
            "address": "0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff817c00000000000000000000000000000000000000000000000001111d67bb1bb0000000000000000000000000000000000000017809be3332f0829d4b17be6b0a3d10000000000000000000000000000000000000000000000005f00d2fec24cd7c8000000000000000000000000000000000000000000000000000000000004592300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000be2ce338f800",
            "blockNumber": "19999930",
            "timeStamp": "1699389802",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x00000000000000000000000036bee9554fa814799054dfc6658c789416ee4ed7"
            ]
        },
        {
            "transactionHash": "0x1a640471e7699b5230283c69159de5c4f3576525d324d1f4f37511fb78ea7063",
            "logIndex": "3",
            "address": "0xd08c50f7e69e9aeb2867deff4a8053d9a855e26a",
            "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff992450000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000017809c0893b3793d4e8f472ff043810000000000000000000000000000000000000000000000005f00d2fec24cd7c80000000000000000000000000000000000000000000000000000000000045923000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009a9d359ca000",
            "blockNumber": "19999931",
            "timeStamp": "1699389802",
            "topics": [
                "0x19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc83",
                "0x000000000000000000000000319b69888b0d11cec22caa5034e25fffbdc88421",
                "0x000000000000000000000000fd97098bac2ea76e1d1c39ea32b0c5b023fe761e"
            ]
        }
    ]
}

[]

Try this endpoint in your

Try this endpoint in your

[]

Try this endpoint in your

Try this endpoint in your

🎯
🔗
🔗
https://docs.etherscan.io/api-endpoints/logs#get-event-logs-by-address
browser
browser
https://docs.etherscan.io/api-endpoints/logs#get-event-logs-by-topics
🔗
browser
🔗
browser
https://docs.etherscan.io/api-endpoints/logs#get-event-logs-by-address-filtered-by-topics
🔗
browser
🔗
browser