# get_logs

Reads logs matching emitter, inclusive block bounds, and topic filters. Live clients use eth_getLogs; retained execution clients read stored execution logs.

Canonical HTML: <https://determica.com/docs/functions/get_logs>

- Kind: table function
- Category: [Chain reads](/docs/category/chain-reads.md)
- Tags: RPC

Reads logs matching emitter, inclusive block bounds, and topic filters. Live clients use eth_getLogs; retained execution clients read stored execution logs.

## Overload 1: get_logs(CLIENT, ADDRESS, VARCHAR)

```sql
get_logs(CLIENT, ADDRESS, VARCHAR)
```

Decodes a human-readable event signature for one emitter without explicit block bounds.

- Kind: table
- Execution context: Live RPC
- Behavior: Immediate Read
- Execution modes: Live Client, Execution Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: Zero Or More
- Determinism: External State
- Return shape: Table
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- client_state_context
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Attached live CLIENT for RPC logs, attached pinned CLIENT with both block bounds, or retained execution CLIENT without block bounds. Retained execution reads do not require an attached TRANSPORT; detached pinned clients are rejected.
- `address` (ADDRESS; required; positional) — ADDRESS, NULL::ADDRESS for no emitter filter, or ADDRESS[]. A NULL or empty ADDRESS[] reads no logs. RPC address lists are de-duplicated and split into requests of at most 50 addresses.
- `event_signature` (VARCHAR; required; positional) — Event declaration used for topic0 filtering and decoding. It must be foldable to add decoded output columns.
- `topic0` (BYTES32 or list; optional; named) — Exact value or OR-list at topic position 0. For RPC requests it replaces the event-derived selector; only logs of the declared event decode, and retained execution logs must also match the event selector.
- `topic3` (BYTES32 or list; optional; named) — Exact value or OR-list for the third indexed parameter; a constant or a column read per row.
- `topic1` (BYTES32 or list; optional; named) — Exact value or OR-list for the first indexed parameter; a constant or a column read per row.
- `topic2` (BYTES32 or list; optional; named) — Exact value or OR-list for the second indexed parameter; a constant or a column read per row.

### Result columns

Log columns plus decoded event columns

Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

- `address` (ADDRESS) — Log emitter.
- `block_hash` (BYTES32) — Containing block hash.
- `block_number` (BLOCK_NUMBER) — Containing block height.
- `block_timestamp` (TIMESTAMP) — Containing block time in UTC, from the provider's log, or the block header when the log lacks it.
- `transaction_hash` (BYTES32) — Emitting transaction hash.
- `transaction_index` (INTEGER) — Transaction position in the block.
- `log_index` (INTEGER) — Log position in the block.
- `data` (BYTES) — Encoded non-indexed parameters.
- `removed` (BOOLEAN) — Whether a reorganization removed the log.
- `topics` (BYTES32[]) — Ordered indexed event topics.
- `source_kind` (VARCHAR) — rpc for provider logs or execution for retained execution logs.
- `execution_id` (UUID) — Retained execution identifier.
- `step_index` (UINTEGER) — Retained execution step.
- `frame_index` (UINTEGER) — Retained call-frame index.
- `effect_status` (VARCHAR) — Retained effect status.
- `...` (ABI-derived columns; dynamic) — A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

### Dynamic columns

- Source: event_signature or event_abi
- Names: Event parameter names
- Types: Mapped from each event parameter type
- Description: A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

Log columns plus decoded event columns. Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

## Overload 2: get_logs(CLIENT, ADDRESS, JSON)

```sql
get_logs(CLIENT, ADDRESS, JSON)
```

Decodes a JSON event ABI for one emitter without explicit block bounds.

- Kind: table
- Execution context: Live RPC
- Behavior: Immediate Read
- Execution modes: Live Client, Execution Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: Zero Or More
- Determinism: External State
- Return shape: Table
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- client_state_context
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Attached live CLIENT for RPC logs, attached pinned CLIENT with both block bounds, or retained execution CLIENT without block bounds. Retained execution reads do not require an attached TRANSPORT; detached pinned clients are rejected.
- `address` (ADDRESS; required; positional) — ADDRESS, NULL::ADDRESS for no emitter filter, or ADDRESS[]. A NULL or empty ADDRESS[] reads no logs. RPC address lists are de-duplicated and split into requests of at most 50 addresses.
- `event_abi` (JSON; required; positional) — JSON event fragment used for topic0 filtering and decoding. It must be foldable to add decoded output columns.
- `topic0` (BYTES32 or list; optional; named) — Exact value or OR-list at topic position 0. For RPC requests it replaces the event-derived selector; only logs of the declared event decode, and retained execution logs must also match the event selector.
- `topic3` (BYTES32 or list; optional; named) — Exact value or OR-list for the third indexed parameter; a constant or a column read per row.
- `topic1` (BYTES32 or list; optional; named) — Exact value or OR-list for the first indexed parameter; a constant or a column read per row.
- `topic2` (BYTES32 or list; optional; named) — Exact value or OR-list for the second indexed parameter; a constant or a column read per row.

### Result columns

Log columns plus decoded event columns

Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

- `address` (ADDRESS) — Log emitter.
- `block_hash` (BYTES32) — Containing block hash.
- `block_number` (BLOCK_NUMBER) — Containing block height.
- `block_timestamp` (TIMESTAMP) — Containing block time in UTC, from the provider's log, or the block header when the log lacks it.
- `transaction_hash` (BYTES32) — Emitting transaction hash.
- `transaction_index` (INTEGER) — Transaction position in the block.
- `log_index` (INTEGER) — Log position in the block.
- `data` (BYTES) — Encoded non-indexed parameters.
- `removed` (BOOLEAN) — Whether a reorganization removed the log.
- `topics` (BYTES32[]) — Ordered indexed event topics.
- `source_kind` (VARCHAR) — rpc for provider logs or execution for retained execution logs.
- `execution_id` (UUID) — Retained execution identifier.
- `step_index` (UINTEGER) — Retained execution step.
- `frame_index` (UINTEGER) — Retained call-frame index.
- `effect_status` (VARCHAR) — Retained effect status.
- `...` (ABI-derived columns; dynamic) — A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

### Dynamic columns

- Source: event_signature or event_abi
- Names: Event parameter names
- Types: Mapped from each event parameter type
- Description: A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

Log columns plus decoded event columns. Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

## Overload 3: get_logs(CLIENT, ADDRESS, VARCHAR, BIGINT)

```sql
get_logs(CLIENT, ADDRESS, VARCHAR, BIGINT)
```

Decodes a human-readable event signature for one emitter from an inclusive starting block.

- Kind: table
- Execution context: Live RPC
- Behavior: Immediate Read
- Execution modes: Live Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: Zero Or More
- Determinism: External State
- Return shape: Table
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- attached_live_client
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Attached live CLIENT for RPC logs, attached pinned CLIENT with both block bounds, or retained execution CLIENT without block bounds. Retained execution reads do not require an attached TRANSPORT; detached pinned clients are rejected.
- `address` (ADDRESS; required; positional) — ADDRESS, NULL::ADDRESS for no emitter filter, or ADDRESS[]. A NULL or empty ADDRESS[] reads no logs. RPC address lists are de-duplicated and split into requests of at most 50 addresses.
- `event_signature` (VARCHAR; required; positional) — Event declaration used for topic0 filtering and decoding. It must be foldable to add decoded output columns.
- `from_block` (BIGINT; required; positional) — Inclusive first block.
- `topic0` (BYTES32 or list; optional; named) — Exact value or OR-list at topic position 0. For RPC requests it replaces the event-derived selector; only logs of the declared event decode, and retained execution logs must also match the event selector.
- `topic3` (BYTES32 or list; optional; named) — Exact value or OR-list for the third indexed parameter; a constant or a column read per row.
- `topic1` (BYTES32 or list; optional; named) — Exact value or OR-list for the first indexed parameter; a constant or a column read per row.
- `topic2` (BYTES32 or list; optional; named) — Exact value or OR-list for the second indexed parameter; a constant or a column read per row.

### Result columns

Log columns plus decoded event columns

Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

- `address` (ADDRESS) — Log emitter.
- `block_hash` (BYTES32) — Containing block hash.
- `block_number` (BLOCK_NUMBER) — Containing block height.
- `block_timestamp` (TIMESTAMP) — Containing block time in UTC, from the provider's log, or the block header when the log lacks it.
- `transaction_hash` (BYTES32) — Emitting transaction hash.
- `transaction_index` (INTEGER) — Transaction position in the block.
- `log_index` (INTEGER) — Log position in the block.
- `data` (BYTES) — Encoded non-indexed parameters.
- `removed` (BOOLEAN) — Whether a reorganization removed the log.
- `topics` (BYTES32[]) — Ordered indexed event topics.
- `source_kind` (VARCHAR) — rpc for provider logs or execution for retained execution logs.
- `execution_id` (UUID) — Retained execution identifier.
- `step_index` (UINTEGER) — Retained execution step.
- `frame_index` (UINTEGER) — Retained call-frame index.
- `effect_status` (VARCHAR) — Retained effect status.
- `...` (ABI-derived columns; dynamic) — A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

### Dynamic columns

- Source: event_signature or event_abi
- Names: Event parameter names
- Types: Mapped from each event parameter type
- Description: A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

Log columns plus decoded event columns. Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

## Overload 4: get_logs(CLIENT, ADDRESS, JSON, BIGINT)

```sql
get_logs(CLIENT, ADDRESS, JSON, BIGINT)
```

Decodes a JSON event ABI for one emitter from an inclusive starting block.

- Kind: table
- Execution context: Live RPC
- Behavior: Immediate Read
- Execution modes: Live Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: Zero Or More
- Determinism: External State
- Return shape: Table
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- attached_live_client
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Attached live CLIENT for RPC logs, attached pinned CLIENT with both block bounds, or retained execution CLIENT without block bounds. Retained execution reads do not require an attached TRANSPORT; detached pinned clients are rejected.
- `address` (ADDRESS; required; positional) — ADDRESS, NULL::ADDRESS for no emitter filter, or ADDRESS[]. A NULL or empty ADDRESS[] reads no logs. RPC address lists are de-duplicated and split into requests of at most 50 addresses.
- `event_abi` (JSON; required; positional) — JSON event fragment used for topic0 filtering and decoding. It must be foldable to add decoded output columns.
- `from_block` (BIGINT; required; positional) — Inclusive first block.
- `topic0` (BYTES32 or list; optional; named) — Exact value or OR-list at topic position 0. For RPC requests it replaces the event-derived selector; only logs of the declared event decode, and retained execution logs must also match the event selector.
- `topic3` (BYTES32 or list; optional; named) — Exact value or OR-list for the third indexed parameter; a constant or a column read per row.
- `topic1` (BYTES32 or list; optional; named) — Exact value or OR-list for the first indexed parameter; a constant or a column read per row.
- `topic2` (BYTES32 or list; optional; named) — Exact value or OR-list for the second indexed parameter; a constant or a column read per row.

### Result columns

Log columns plus decoded event columns

Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

- `address` (ADDRESS) — Log emitter.
- `block_hash` (BYTES32) — Containing block hash.
- `block_number` (BLOCK_NUMBER) — Containing block height.
- `block_timestamp` (TIMESTAMP) — Containing block time in UTC, from the provider's log, or the block header when the log lacks it.
- `transaction_hash` (BYTES32) — Emitting transaction hash.
- `transaction_index` (INTEGER) — Transaction position in the block.
- `log_index` (INTEGER) — Log position in the block.
- `data` (BYTES) — Encoded non-indexed parameters.
- `removed` (BOOLEAN) — Whether a reorganization removed the log.
- `topics` (BYTES32[]) — Ordered indexed event topics.
- `source_kind` (VARCHAR) — rpc for provider logs or execution for retained execution logs.
- `execution_id` (UUID) — Retained execution identifier.
- `step_index` (UINTEGER) — Retained execution step.
- `frame_index` (UINTEGER) — Retained call-frame index.
- `effect_status` (VARCHAR) — Retained effect status.
- `...` (ABI-derived columns; dynamic) — A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

### Dynamic columns

- Source: event_signature or event_abi
- Names: Event parameter names
- Types: Mapped from each event parameter type
- Description: A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

Log columns plus decoded event columns. Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

## Overload 5: get_logs(CLIENT, ADDRESS, VARCHAR, BIGINT, BIGINT)

```sql
get_logs(CLIENT, ADDRESS, VARCHAR, BIGINT, BIGINT)
```

Decodes a human-readable event signature for one emitter between inclusive block bounds.

- Kind: table
- Execution context: Live RPC
- Behavior: Immediate Read
- Execution modes: Live Client, Pinned Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: Zero Or More
- Determinism: External State
- Return shape: Table
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- client_state_context
- pinned_bounds_match_client_block
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Attached live CLIENT for RPC logs, attached pinned CLIENT with both block bounds, or retained execution CLIENT without block bounds. Retained execution reads do not require an attached TRANSPORT; detached pinned clients are rejected.
- `address` (ADDRESS; required; positional) — ADDRESS, NULL::ADDRESS for no emitter filter, or ADDRESS[]. A NULL or empty ADDRESS[] reads no logs. RPC address lists are de-duplicated and split into requests of at most 50 addresses.
- `event_signature` (VARCHAR; required; positional) — Event declaration used for topic0 filtering and decoding. It must be foldable to add decoded output columns.
- `from_block` (BIGINT; required; positional) — Inclusive first block.
- `to_block` (BIGINT; required; positional) — Inclusive last block.
- `topic0` (BYTES32 or list; optional; named) — Exact value or OR-list at topic position 0. For RPC requests it replaces the event-derived selector; only logs of the declared event decode, and retained execution logs must also match the event selector.
- `topic3` (BYTES32 or list; optional; named) — Exact value or OR-list for the third indexed parameter; a constant or a column read per row.
- `topic1` (BYTES32 or list; optional; named) — Exact value or OR-list for the first indexed parameter; a constant or a column read per row.
- `topic2` (BYTES32 or list; optional; named) — Exact value or OR-list for the second indexed parameter; a constant or a column read per row.

### Result columns

Log columns plus decoded event columns

Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

- `address` (ADDRESS) — Log emitter.
- `block_hash` (BYTES32) — Containing block hash.
- `block_number` (BLOCK_NUMBER) — Containing block height.
- `block_timestamp` (TIMESTAMP) — Containing block time in UTC, from the provider's log, or the block header when the log lacks it.
- `transaction_hash` (BYTES32) — Emitting transaction hash.
- `transaction_index` (INTEGER) — Transaction position in the block.
- `log_index` (INTEGER) — Log position in the block.
- `data` (BYTES) — Encoded non-indexed parameters.
- `removed` (BOOLEAN) — Whether a reorganization removed the log.
- `topics` (BYTES32[]) — Ordered indexed event topics.
- `source_kind` (VARCHAR) — rpc for provider logs or execution for retained execution logs.
- `execution_id` (UUID) — Retained execution identifier.
- `step_index` (UINTEGER) — Retained execution step.
- `frame_index` (UINTEGER) — Retained call-frame index.
- `effect_status` (VARCHAR) — Retained effect status.
- `...` (ABI-derived columns; dynamic) — A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

### Dynamic columns

- Source: event_signature or event_abi
- Names: Event parameter names
- Types: Mapped from each event parameter type
- Description: A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

Log columns plus decoded event columns. Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

### Examples

_Named parameters · Needs RPC · RPC required_

```sql
-- Recent finalized-window USDC Transfer aggregation
WITH head AS (
  SELECT number AS head_block
  FROM get_block($client, 'finalized')
),
transfers AS (
  SELECT
    "to",
    value
  FROM head,
  get_logs(
    $client,
    '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'::ADDRESS, -- Ethereum mainnet USDC
    'event Transfer(address indexed from, address indexed to, uint256 value)',
    head_block - 5,
    head_block
  )
)
SELECT
  "to",
  sum(value) AS raw_value,
  format_units(sum(value), 6) AS usdc_value
FROM transfers
GROUP BY "to"
ORDER BY raw_value DESC;
```

## Overload 6: get_logs(CLIENT, ADDRESS, JSON, BIGINT, BIGINT)

```sql
get_logs(CLIENT, ADDRESS, JSON, BIGINT, BIGINT)
```

Decodes a JSON event ABI for one emitter between inclusive block bounds.

- Kind: table
- Execution context: Live RPC
- Behavior: Immediate Read
- Execution modes: Live Client, Pinned Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: Zero Or More
- Determinism: External State
- Return shape: Table
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- client_state_context
- pinned_bounds_match_client_block
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Attached live CLIENT for RPC logs, attached pinned CLIENT with both block bounds, or retained execution CLIENT without block bounds. Retained execution reads do not require an attached TRANSPORT; detached pinned clients are rejected.
- `address` (ADDRESS; required; positional) — ADDRESS, NULL::ADDRESS for no emitter filter, or ADDRESS[]. A NULL or empty ADDRESS[] reads no logs. RPC address lists are de-duplicated and split into requests of at most 50 addresses.
- `event_abi` (JSON; required; positional) — JSON event fragment used for topic0 filtering and decoding. It must be foldable to add decoded output columns.
- `from_block` (BIGINT; required; positional) — Inclusive first block.
- `to_block` (BIGINT; required; positional) — Inclusive last block.
- `topic0` (BYTES32 or list; optional; named) — Exact value or OR-list at topic position 0. For RPC requests it replaces the event-derived selector; only logs of the declared event decode, and retained execution logs must also match the event selector.
- `topic3` (BYTES32 or list; optional; named) — Exact value or OR-list for the third indexed parameter; a constant or a column read per row.
- `topic1` (BYTES32 or list; optional; named) — Exact value or OR-list for the first indexed parameter; a constant or a column read per row.
- `topic2` (BYTES32 or list; optional; named) — Exact value or OR-list for the second indexed parameter; a constant or a column read per row.

### Result columns

Log columns plus decoded event columns

Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

- `address` (ADDRESS) — Log emitter.
- `block_hash` (BYTES32) — Containing block hash.
- `block_number` (BLOCK_NUMBER) — Containing block height.
- `block_timestamp` (TIMESTAMP) — Containing block time in UTC, from the provider's log, or the block header when the log lacks it.
- `transaction_hash` (BYTES32) — Emitting transaction hash.
- `transaction_index` (INTEGER) — Transaction position in the block.
- `log_index` (INTEGER) — Log position in the block.
- `data` (BYTES) — Encoded non-indexed parameters.
- `removed` (BOOLEAN) — Whether a reorganization removed the log.
- `topics` (BYTES32[]) — Ordered indexed event topics.
- `source_kind` (VARCHAR) — rpc for provider logs or execution for retained execution logs.
- `execution_id` (UUID) — Retained execution identifier.
- `step_index` (UINTEGER) — Retained execution step.
- `frame_index` (UINTEGER) — Retained call-frame index.
- `effect_status` (VARCHAR) — Retained effect status.
- `...` (ABI-derived columns; dynamic) — A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

### Dynamic columns

- Source: event_signature or event_abi
- Names: Event parameter names
- Types: Mapped from each event parameter type
- Description: A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

Log columns plus decoded event columns. Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

### Examples

_Named parameters · Needs RPC · RPC required_

```sql
-- Recent finalized-window WETH Transfer decoding with a JSON ABI
WITH head AS (
  SELECT number::BIGINT AS head_block
  FROM get_block($client, 'finalized')
)
SELECT transaction_hash, log_index, "from", "to", format_units(value, 18) AS weth_amount
FROM head,
get_logs(
  $client,
  '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'::ADDRESS,
  '{"type":"event","name":"Transfer","inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}]}'::JSON,
  head_block - 5,
  head_block
);
```

## Overload 7: get_logs(CLIENT, ADDRESS\[\], VARCHAR)

```sql
get_logs(CLIENT, ADDRESS[], VARCHAR)
```

Decodes a human-readable event signature for multiple emitters without explicit block bounds. Addresses are batched in groups of at most 50.

- Kind: table
- Execution context: Live RPC
- Behavior: Immediate Read
- Execution modes: Live Client, Execution Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: Zero Or More
- Determinism: External State
- Return shape: Table
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- client_state_context
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Attached live CLIENT for RPC logs, attached pinned CLIENT with both block bounds, or retained execution CLIENT without block bounds. Retained execution reads do not require an attached TRANSPORT; detached pinned clients are rejected.
- `address` (ADDRESS[]; required; positional) — ADDRESS, NULL::ADDRESS for no emitter filter, or ADDRESS[]. A NULL or empty ADDRESS[] reads no logs. RPC address lists are de-duplicated and split into requests of at most 50 addresses.
- `event_signature` (VARCHAR; required; positional) — Event declaration used for topic0 filtering and decoding. It must be foldable to add decoded output columns.
- `topic0` (BYTES32 or list; optional; named) — Exact value or OR-list at topic position 0. For RPC requests it replaces the event-derived selector; only logs of the declared event decode, and retained execution logs must also match the event selector.
- `topic3` (BYTES32 or list; optional; named) — Exact value or OR-list for the third indexed parameter; a constant or a column read per row.
- `topic1` (BYTES32 or list; optional; named) — Exact value or OR-list for the first indexed parameter; a constant or a column read per row.
- `topic2` (BYTES32 or list; optional; named) — Exact value or OR-list for the second indexed parameter; a constant or a column read per row.

### Result columns

Log columns plus decoded event columns

Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

- `address` (ADDRESS) — Log emitter.
- `block_hash` (BYTES32) — Containing block hash.
- `block_number` (BLOCK_NUMBER) — Containing block height.
- `block_timestamp` (TIMESTAMP) — Containing block time in UTC, from the provider's log, or the block header when the log lacks it.
- `transaction_hash` (BYTES32) — Emitting transaction hash.
- `transaction_index` (INTEGER) — Transaction position in the block.
- `log_index` (INTEGER) — Log position in the block.
- `data` (BYTES) — Encoded non-indexed parameters.
- `removed` (BOOLEAN) — Whether a reorganization removed the log.
- `topics` (BYTES32[]) — Ordered indexed event topics.
- `source_kind` (VARCHAR) — rpc for provider logs or execution for retained execution logs.
- `execution_id` (UUID) — Retained execution identifier.
- `step_index` (UINTEGER) — Retained execution step.
- `frame_index` (UINTEGER) — Retained call-frame index.
- `effect_status` (VARCHAR) — Retained effect status.
- `...` (ABI-derived columns; dynamic) — A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

### Dynamic columns

- Source: event_signature or event_abi
- Names: Event parameter names
- Types: Mapped from each event parameter type
- Description: A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

Log columns plus decoded event columns. Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

## Overload 8: get_logs(CLIENT, ADDRESS\[\], JSON)

```sql
get_logs(CLIENT, ADDRESS[], JSON)
```

Decodes a JSON event ABI without explicit block bounds; addresses are requested in groups of at most 50.

- Kind: table
- Execution context: Live RPC
- Behavior: Immediate Read
- Execution modes: Live Client, Execution Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: Zero Or More
- Determinism: External State
- Return shape: Table
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- client_state_context
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Attached live CLIENT for RPC logs, attached pinned CLIENT with both block bounds, or retained execution CLIENT without block bounds. Retained execution reads do not require an attached TRANSPORT; detached pinned clients are rejected.
- `address` (ADDRESS[]; required; positional) — ADDRESS, NULL::ADDRESS for no emitter filter, or ADDRESS[]. A NULL or empty ADDRESS[] reads no logs. RPC address lists are de-duplicated and split into requests of at most 50 addresses.
- `event_abi` (JSON; required; positional) — JSON event fragment used for topic0 filtering and decoding. It must be foldable to add decoded output columns.
- `topic0` (BYTES32 or list; optional; named) — Exact value or OR-list at topic position 0. For RPC requests it replaces the event-derived selector; only logs of the declared event decode, and retained execution logs must also match the event selector.
- `topic3` (BYTES32 or list; optional; named) — Exact value or OR-list for the third indexed parameter; a constant or a column read per row.
- `topic1` (BYTES32 or list; optional; named) — Exact value or OR-list for the first indexed parameter; a constant or a column read per row.
- `topic2` (BYTES32 or list; optional; named) — Exact value or OR-list for the second indexed parameter; a constant or a column read per row.

### Result columns

Log columns plus decoded event columns

Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

- `address` (ADDRESS) — Log emitter.
- `block_hash` (BYTES32) — Containing block hash.
- `block_number` (BLOCK_NUMBER) — Containing block height.
- `block_timestamp` (TIMESTAMP) — Containing block time in UTC, from the provider's log, or the block header when the log lacks it.
- `transaction_hash` (BYTES32) — Emitting transaction hash.
- `transaction_index` (INTEGER) — Transaction position in the block.
- `log_index` (INTEGER) — Log position in the block.
- `data` (BYTES) — Encoded non-indexed parameters.
- `removed` (BOOLEAN) — Whether a reorganization removed the log.
- `topics` (BYTES32[]) — Ordered indexed event topics.
- `source_kind` (VARCHAR) — rpc for provider logs or execution for retained execution logs.
- `execution_id` (UUID) — Retained execution identifier.
- `step_index` (UINTEGER) — Retained execution step.
- `frame_index` (UINTEGER) — Retained call-frame index.
- `effect_status` (VARCHAR) — Retained effect status.
- `...` (ABI-derived columns; dynamic) — A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

### Dynamic columns

- Source: event_signature or event_abi
- Names: Event parameter names
- Types: Mapped from each event parameter type
- Description: A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

Log columns plus decoded event columns. Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

## Overload 9: get_logs(CLIENT, ADDRESS\[\], VARCHAR, BIGINT)

```sql
get_logs(CLIENT, ADDRESS[], VARCHAR, BIGINT)
```

Decodes a human-readable event signature from an inclusive starting block; addresses are requested in groups of at most 50.

- Kind: table
- Execution context: Live RPC
- Behavior: Immediate Read
- Execution modes: Live Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: Zero Or More
- Determinism: External State
- Return shape: Table
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- attached_live_client
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Attached live CLIENT for RPC logs, attached pinned CLIENT with both block bounds, or retained execution CLIENT without block bounds. Retained execution reads do not require an attached TRANSPORT; detached pinned clients are rejected.
- `address` (ADDRESS[]; required; positional) — ADDRESS, NULL::ADDRESS for no emitter filter, or ADDRESS[]. A NULL or empty ADDRESS[] reads no logs. RPC address lists are de-duplicated and split into requests of at most 50 addresses.
- `event_signature` (VARCHAR; required; positional) — Event declaration used for topic0 filtering and decoding. It must be foldable to add decoded output columns.
- `from_block` (BIGINT; required; positional) — Inclusive first block.
- `topic0` (BYTES32 or list; optional; named) — Exact value or OR-list at topic position 0. For RPC requests it replaces the event-derived selector; only logs of the declared event decode, and retained execution logs must also match the event selector.
- `topic3` (BYTES32 or list; optional; named) — Exact value or OR-list for the third indexed parameter; a constant or a column read per row.
- `topic1` (BYTES32 or list; optional; named) — Exact value or OR-list for the first indexed parameter; a constant or a column read per row.
- `topic2` (BYTES32 or list; optional; named) — Exact value or OR-list for the second indexed parameter; a constant or a column read per row.

### Result columns

Log columns plus decoded event columns

Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

- `address` (ADDRESS) — Log emitter.
- `block_hash` (BYTES32) — Containing block hash.
- `block_number` (BLOCK_NUMBER) — Containing block height.
- `block_timestamp` (TIMESTAMP) — Containing block time in UTC, from the provider's log, or the block header when the log lacks it.
- `transaction_hash` (BYTES32) — Emitting transaction hash.
- `transaction_index` (INTEGER) — Transaction position in the block.
- `log_index` (INTEGER) — Log position in the block.
- `data` (BYTES) — Encoded non-indexed parameters.
- `removed` (BOOLEAN) — Whether a reorganization removed the log.
- `topics` (BYTES32[]) — Ordered indexed event topics.
- `source_kind` (VARCHAR) — rpc for provider logs or execution for retained execution logs.
- `execution_id` (UUID) — Retained execution identifier.
- `step_index` (UINTEGER) — Retained execution step.
- `frame_index` (UINTEGER) — Retained call-frame index.
- `effect_status` (VARCHAR) — Retained effect status.
- `...` (ABI-derived columns; dynamic) — A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

### Dynamic columns

- Source: event_signature or event_abi
- Names: Event parameter names
- Types: Mapped from each event parameter type
- Description: A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

Log columns plus decoded event columns. Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

## Overload 10: get_logs(CLIENT, ADDRESS\[\], JSON, BIGINT)

```sql
get_logs(CLIENT, ADDRESS[], JSON, BIGINT)
```

Decodes a JSON event ABI from an inclusive starting block; addresses are requested in groups of at most 50.

- Kind: table
- Execution context: Live RPC
- Behavior: Immediate Read
- Execution modes: Live Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: Zero Or More
- Determinism: External State
- Return shape: Table
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- attached_live_client
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Attached live CLIENT for RPC logs, attached pinned CLIENT with both block bounds, or retained execution CLIENT without block bounds. Retained execution reads do not require an attached TRANSPORT; detached pinned clients are rejected.
- `address` (ADDRESS[]; required; positional) — ADDRESS, NULL::ADDRESS for no emitter filter, or ADDRESS[]. A NULL or empty ADDRESS[] reads no logs. RPC address lists are de-duplicated and split into requests of at most 50 addresses.
- `event_abi` (JSON; required; positional) — JSON event fragment used for topic0 filtering and decoding. It must be foldable to add decoded output columns.
- `from_block` (BIGINT; required; positional) — Inclusive first block.
- `topic0` (BYTES32 or list; optional; named) — Exact value or OR-list at topic position 0. For RPC requests it replaces the event-derived selector; only logs of the declared event decode, and retained execution logs must also match the event selector.
- `topic3` (BYTES32 or list; optional; named) — Exact value or OR-list for the third indexed parameter; a constant or a column read per row.
- `topic1` (BYTES32 or list; optional; named) — Exact value or OR-list for the first indexed parameter; a constant or a column read per row.
- `topic2` (BYTES32 or list; optional; named) — Exact value or OR-list for the second indexed parameter; a constant or a column read per row.

### Result columns

Log columns plus decoded event columns

Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

- `address` (ADDRESS) — Log emitter.
- `block_hash` (BYTES32) — Containing block hash.
- `block_number` (BLOCK_NUMBER) — Containing block height.
- `block_timestamp` (TIMESTAMP) — Containing block time in UTC, from the provider's log, or the block header when the log lacks it.
- `transaction_hash` (BYTES32) — Emitting transaction hash.
- `transaction_index` (INTEGER) — Transaction position in the block.
- `log_index` (INTEGER) — Log position in the block.
- `data` (BYTES) — Encoded non-indexed parameters.
- `removed` (BOOLEAN) — Whether a reorganization removed the log.
- `topics` (BYTES32[]) — Ordered indexed event topics.
- `source_kind` (VARCHAR) — rpc for provider logs or execution for retained execution logs.
- `execution_id` (UUID) — Retained execution identifier.
- `step_index` (UINTEGER) — Retained execution step.
- `frame_index` (UINTEGER) — Retained call-frame index.
- `effect_status` (VARCHAR) — Retained effect status.
- `...` (ABI-derived columns; dynamic) — A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

### Dynamic columns

- Source: event_signature or event_abi
- Names: Event parameter names
- Types: Mapped from each event parameter type
- Description: A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

Log columns plus decoded event columns. Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

## Overload 11: get_logs(CLIENT, ADDRESS\[\], VARCHAR, BIGINT, BIGINT)

```sql
get_logs(CLIENT, ADDRESS[], VARCHAR, BIGINT, BIGINT)
```

Decodes a human-readable event signature for multiple emitters between inclusive block bounds. Addresses are batched in groups of at most 50.

- Kind: table
- Execution context: Live RPC
- Behavior: Immediate Read
- Execution modes: Live Client, Pinned Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: Zero Or More
- Determinism: External State
- Return shape: Table
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- client_state_context
- pinned_bounds_match_client_block
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Attached live CLIENT for RPC logs, attached pinned CLIENT with both block bounds, or retained execution CLIENT without block bounds. Retained execution reads do not require an attached TRANSPORT; detached pinned clients are rejected.
- `address` (ADDRESS[]; required; positional) — ADDRESS, NULL::ADDRESS for no emitter filter, or ADDRESS[]. A NULL or empty ADDRESS[] reads no logs. RPC address lists are de-duplicated and split into requests of at most 50 addresses.
- `event_signature` (VARCHAR; required; positional) — Event declaration used for topic0 filtering and decoding. It must be foldable to add decoded output columns.
- `from_block` (BIGINT; required; positional) — Inclusive first block.
- `to_block` (BIGINT; required; positional) — Inclusive last block.
- `topic0` (BYTES32 or list; optional; named) — Exact value or OR-list at topic position 0. For RPC requests it replaces the event-derived selector; only logs of the declared event decode, and retained execution logs must also match the event selector.
- `topic3` (BYTES32 or list; optional; named) — Exact value or OR-list for the third indexed parameter; a constant or a column read per row.
- `topic1` (BYTES32 or list; optional; named) — Exact value or OR-list for the first indexed parameter; a constant or a column read per row.
- `topic2` (BYTES32 or list; optional; named) — Exact value or OR-list for the second indexed parameter; a constant or a column read per row.

### Result columns

Log columns plus decoded event columns

Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

- `address` (ADDRESS) — Log emitter.
- `block_hash` (BYTES32) — Containing block hash.
- `block_number` (BLOCK_NUMBER) — Containing block height.
- `block_timestamp` (TIMESTAMP) — Containing block time in UTC, from the provider's log, or the block header when the log lacks it.
- `transaction_hash` (BYTES32) — Emitting transaction hash.
- `transaction_index` (INTEGER) — Transaction position in the block.
- `log_index` (INTEGER) — Log position in the block.
- `data` (BYTES) — Encoded non-indexed parameters.
- `removed` (BOOLEAN) — Whether a reorganization removed the log.
- `topics` (BYTES32[]) — Ordered indexed event topics.
- `source_kind` (VARCHAR) — rpc for provider logs or execution for retained execution logs.
- `execution_id` (UUID) — Retained execution identifier.
- `step_index` (UINTEGER) — Retained execution step.
- `frame_index` (UINTEGER) — Retained call-frame index.
- `effect_status` (VARCHAR) — Retained effect status.
- `...` (ABI-derived columns; dynamic) — A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

### Dynamic columns

- Source: event_signature or event_abi
- Names: Event parameter names
- Types: Mapped from each event parameter type
- Description: A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

Log columns plus decoded event columns. Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

## Overload 12: get_logs(CLIENT, ADDRESS\[\], JSON, BIGINT, BIGINT)

```sql
get_logs(CLIENT, ADDRESS[], JSON, BIGINT, BIGINT)
```

Decodes a JSON event ABI between inclusive block bounds; addresses are requested in groups of at most 50.

- Kind: table
- Execution context: Live RPC
- Behavior: Immediate Read
- Execution modes: Live Client, Pinned Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: Zero Or More
- Determinism: External State
- Return shape: Table
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- client_state_context
- pinned_bounds_match_client_block
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Attached live CLIENT for RPC logs, attached pinned CLIENT with both block bounds, or retained execution CLIENT without block bounds. Retained execution reads do not require an attached TRANSPORT; detached pinned clients are rejected.
- `address` (ADDRESS[]; required; positional) — ADDRESS, NULL::ADDRESS for no emitter filter, or ADDRESS[]. A NULL or empty ADDRESS[] reads no logs. RPC address lists are de-duplicated and split into requests of at most 50 addresses.
- `event_abi` (JSON; required; positional) — JSON event fragment used for topic0 filtering and decoding. It must be foldable to add decoded output columns.
- `from_block` (BIGINT; required; positional) — Inclusive first block.
- `to_block` (BIGINT; required; positional) — Inclusive last block.
- `topic0` (BYTES32 or list; optional; named) — Exact value or OR-list at topic position 0. For RPC requests it replaces the event-derived selector; only logs of the declared event decode, and retained execution logs must also match the event selector.
- `topic3` (BYTES32 or list; optional; named) — Exact value or OR-list for the third indexed parameter; a constant or a column read per row.
- `topic1` (BYTES32 or list; optional; named) — Exact value or OR-list for the first indexed parameter; a constant or a column read per row.
- `topic2` (BYTES32 or list; optional; named) — Exact value or OR-list for the second indexed parameter; a constant or a column read per row.

### Result columns

Log columns plus decoded event columns

Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

- `address` (ADDRESS) — Log emitter.
- `block_hash` (BYTES32) — Containing block hash.
- `block_number` (BLOCK_NUMBER) — Containing block height.
- `block_timestamp` (TIMESTAMP) — Containing block time in UTC, from the provider's log, or the block header when the log lacks it.
- `transaction_hash` (BYTES32) — Emitting transaction hash.
- `transaction_index` (INTEGER) — Transaction position in the block.
- `log_index` (INTEGER) — Log position in the block.
- `data` (BYTES) — Encoded non-indexed parameters.
- `removed` (BOOLEAN) — Whether a reorganization removed the log.
- `topics` (BYTES32[]) — Ordered indexed event topics.
- `source_kind` (VARCHAR) — rpc for provider logs or execution for retained execution logs.
- `execution_id` (UUID) — Retained execution identifier.
- `step_index` (UINTEGER) — Retained execution step.
- `frame_index` (UINTEGER) — Retained call-frame index.
- `effect_status` (VARCHAR) — Retained effect status.
- `...` (ABI-derived columns; dynamic) — A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

### Dynamic columns

- Source: event_signature or event_abi
- Names: Event parameter names
- Types: Mapped from each event parameter type
- Description: A foldable event_signature or event_abi appends one column per event parameter. Names and SQL types are determined during planning.

Log columns plus decoded event columns. Returns log metadata and appends decoded event fields when the event argument is foldable during planning. Both block bounds are inclusive.

## Guidance

### Request construction

from_block and to_block are inclusive. With both bounds, get_logs reads the range in chunks: the first spans 2000 blocks (or the CLIENT's max_block_range when smaller), and a chunk with fewer than 5000 logs doubles the next, up to max_block_range. A provider's range limit fixes the chunk for the rest of the read.

A NULL from_block or to_block raises; it never reads without bounds. from_block after to_block raises.

block_timestamp comes with each log from the provider, so a log's time needs no header read; a log without it (or with 0x0) takes its block header's, one batched read per such block.

- RPC ADDRESS[] values are split into requests of at most 50 addresses.
- Pinned clients require both from_block and to_block. Retained execution clients reject either bound.

### Failure handling

A request with both bounds retries retryable failures up to five times per chunk, then raises an error. A non-retryable provider failure raises immediately.

A request without both bounds that fails raises; an empty result always means no matching logs.

A log that is not the declared event keeps its row with NULL decoded columns: its topic0 differs, its topic count is not one plus the indexed inputs, or its data does not decode. ERC-20 and ERC-721 Transfer share topic0, and an ERC-721 Transfer carries its token id as a fourth topic.

### Reproducible and efficient reads

Resolve and persist numeric bounds from a finalized head when later runs must scan the same block window.

SQL LIMIT is applied after logs are fetched. Use emitter, topic, and block filters to reduce RPC work.

```sql
-- Recent finalized-window WETH Transfer decoding with a JSON ABI
WITH head AS (
  SELECT number::BIGINT AS head_block
  FROM get_block($client, 'finalized')
)
SELECT transaction_hash, log_index, "from", "to", format_units(value, 18) AS weth_amount
FROM head,
get_logs(
  $client,
  '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'::ADDRESS,
  '{"type":"event","name":"Transfer","inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}]}'::JSON,
  head_block - 5,
  head_block
);
```

### Topic matching

Topic filters are ANDed by position. A BYTES32[] value is an OR-list within one position.

For RPC requests, an explicit topic0 replaces the selector derived from a non-anonymous event.

Retained execution logs are decoded only when they match both the event selector and every explicit topic filter, including topic0.

- topic1, topic2, and topic3 correspond to the first three indexed event parameters.
- A WHERE comparing an indexed event field with a constant (= or IN) is sent to the node as that topic's filter; the WHERE still applies, so only the read narrows.
- A topic value is a BYTES32, or an ADDRESS padded as evm_abi_word pads it; encode other values with evm_abi_word. A NULL, an empty list or any other value raises. A topic from a column (LATERAL) is read per row.

```sql
WITH head AS (
  SELECT number AS head_block
  FROM get_block($client, 'finalized')
),
transfers AS (
  SELECT
    address,
    value
  FROM head,
  get_logs(
    $client,
    [
      '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
      '0xdAC17F958D2ee523a2206206994597C13D831ec7'
    ]::ADDRESS[],
    'event Transfer(address indexed from, address indexed to, uint256 value)',
    head_block - 5,
    head_block
  )
)
SELECT
  address AS token,
  count(*) AS transfer_count,
  sum(value) AS raw_value,
  format_units(sum(value), 6) AS token_value
FROM transfers
GROUP BY address
ORDER BY address;
```

### Topic filters

For ERC-20 Transfer(address indexed from, address indexed to, uint256 value), topic0 is the event selector, topic1 is from, and topic2 is to.

Addressless scans require a provider that supports unaddressed eth_getLogs requests.

- Build topic0 with event_signature instead of copying a hash.
- Build indexed address topics with evm_abi_word instead of manually padding addresses.
- Use BYTES32[] for an OR filter.

## Related functions

- [event_signature](/docs/functions/event_signature.md) — Usually After
- [event_decode_json](/docs/functions/event_decode_json.md) — Usually Before
- [block_range](/docs/functions/block_range.md) — Usually After
