Logs (or event logs), is a way for smart contracts to communicate with the outside world by “documenting” small pieces of information.

Event logs allow other people to know that something has happened without them having to query the contract directly. The most common form of event logs today are ERC20 (and ERC721) token transfer events.

Query raw logs data by contract address/topic0.

select * from monad_testnet.logs
where address = '0x0000000000000039cd5e8ae05257ce51c473ddd1' 
limit 10;

Table Columns

                      Partitioned table "monad_testnet.logs"
      Column       |            Type             | Collation | Nullable | Default
-------------------+-----------------------------+-----------+----------+---------
 address           | character varying(42)       |           |          |
 from_address      | character varying(42)       |           |          |
 to_address        | character varying(42)       |           |          |
 data              | character varying           |           |          |
 topic0            | character varying(66)       |           |          |
 topic1            | character varying(66)       |           |          |
 topic2            | character varying(66)       |           |          |
 topic3            | character varying(66)       |           |          |
 log_index         | numeric(38,0)               |           | not null |
 transaction_hash  | character varying(66)       |           | not null |
 transaction_index | numeric(38,0)               |           |          |
 block_timestamp   | timestamp without time zone |           | not null |
 block_number      | numeric(38,0)               |           |          |
 block_hash        | character varying(66)       |           |          |
 _metadata         | jsonb                       |           |          |
 _extra_fields     | jsonb                       |           |          |
 _created_at       | timestamp without time zone |           |          |
 _updated_at       | timestamp without time zone |           |          |
Partition key: RANGE (block_timestamp)
Indexes:
    "logs_pk" PRIMARY KEY, btree (block_timestamp, transaction_hash, log_index)
    "monad_testnet_logs_address_block_timestamp_index" btree (address, block_timestamp DESC)
    "monad_testnet_logs_block_number_block_timestamp_index" btree (block_number, block_timestamp DESC)