Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
1060700
chore(deps): bump floki from 0.38.0 to 0.38.1 (#14174)
dependabot[bot] Apr 1, 2026
521035a
chore(deps): bump phoenix_live_view from 1.1.27 to 1.1.28 (#14171)
dependabot[bot] Apr 1, 2026
8c27d1f
chore(deps): bump cbor from 1.0.1 to 1.0.2 (#14173)
dependabot[bot] Apr 1, 2026
a100d2d
chore(deps): bump ex_cldr_units from 3.20.2 to 3.20.3 (#14172)
dependabot[bot] Apr 2, 2026
7fccfa5
chore: Add swagger generation for Arc and Suave chain types (#14181)
vbaranov Apr 2, 2026
5f51ada
chore: Remove deprecated "transaction actions" indexer (#14183)
vbaranov Apr 2, 2026
9c2f48e
chore: Remove deprecated files from the root folder (#14186)
vbaranov Apr 2, 2026
23e71da
chore: Add Block.full_refetch (#14180)
Qwerty5Uiop Apr 2, 2026
ce43429
Remove "INDEXER_TX_ACTIONS_" from docker envs, add CODE_OF_CONDUCT.md…
vbaranov Apr 2, 2026
a9f4bb4
fix: Update transaction from receipt in PendingTransactionsSanitizer …
Qwerty5Uiop Apr 2, 2026
4dcadf1
chore: remove Polygon zkEVM support (#14188)
vbaranov Apr 2, 2026
b85de6f
perf: use tuple-based comparison to utlize index (#14178)
sl1depengwyn Apr 3, 2026
f6cd8b9
chore: update credo config (#14147)
sl1depengwyn Apr 3, 2026
4c846e1
fix: implementation address hash retrieval logic in the old UI (#14192)
vbaranov Apr 3, 2026
34196d3
chore: Cover counters to multichain export with unit tests (#14193)
vbaranov Apr 3, 2026
2d0dd8e
refactor: deduplicate json_rpc_named_arguments (#14194)
vbaranov Apr 5, 2026
62d3e89
refactor: Refactor RollupReorgMonitorQueue (#14196)
vbaranov Apr 6, 2026
f5e3d40
chore: Add Celo OpenAPI specs (#14197)
vbaranov Apr 6, 2026
3256ed4
doc: add .dialyzer-ignore hygiene guideline to CONTRIBUTING (#14199)
vbaranov Apr 6, 2026
b165300
chore: Remove transaction_hash from internal transactions (#14099)
Qwerty5Uiop Apr 6, 2026
e1c1c83
fix: prevent duplicate missing block range inserts (#14138)
vbaranov Apr 6, 2026
7dddb59
fix: handle RPC errors in ContractCreator, limit retries to 5 (#14136)
vbaranov Apr 6, 2026
06ccc62
perf: Improve performance of /api/v2/tokens API endpoint (#14158)
vbaranov Apr 7, 2026
812e9f3
perf: remove join to "blocks" in api/v2/blocks/:block_number/transact…
vbaranov Apr 7, 2026
fd80973
fix: Fix contract internal transactions preload (#14203)
vbaranov Apr 7, 2026
c1c1b20
fix: Optimize token1155tx API v1 endpoint (#14202)
nikitosing Apr 7, 2026
da6016b
feat: add toggle to disable transactions / token transfers BENS prelo…
vbaranov Apr 7, 2026
8d9546d
feat: Async CSV export (#14028)
nikitosing Apr 7, 2026
dcb4507
chore: Add batch size env for FillInternalTransactionsAddressIds migr…
Qwerty5Uiop Apr 7, 2026
262e3ba
chore: Remove timeout between successful migrations (#14198)
Qwerty5Uiop Apr 7, 2026
61e897b
v11
vbaranov Apr 7, 2026
a1b26d9
fix: Update changed constraint name in shrink IT migration (#14205)
Qwerty5Uiop Apr 7, 2026
2eaff0f
Update CHANGELOG with 14205 to v11
vbaranov Apr 7, 2026
59b498e
Update README and cspell config
vbaranov Apr 7, 2026
218708f
Remove duplicates from CHANGELOG
vbaranov Apr 8, 2026
f19bfd3
perf: Optimize on demand hot contracts performance (#14179)
nikitosing Apr 8, 2026
4c055de
Update CHANGELOG
vbaranov Apr 8, 2026
bae60b0
Merge branch 'master' of github.com:/blockscout/blockscout
vbaranov Apr 8, 2026
73fa613
chore: FillInternalTransactionsAddressIds improvements (#14208)
Qwerty5Uiop Apr 8, 2026
f4835d7
Update CHANGELOG
vbaranov Apr 8, 2026
15b6b5f
fix: include bridged token query params in OpenAPI spec (#14209)
vbaranov Apr 8, 2026
e4e0680
Update CHANGELOG
vbaranov Apr 8, 2026
b8bd726
Update CHANGELOG
vbaranov Apr 8, 2026
212a839
chore: Filter blocks by BLOCK_RANGES in add_ranges_by_block_numbers (…
Qwerty5Uiop Apr 9, 2026
25159c4
Update CHANGELOG
vbaranov Apr 9, 2026
223edb8
fix: handle partial errors in ContractCode fetch_codes (#14211)
vbaranov Apr 9, 2026
28084ed
perf: optimize optional address preloads across tx endpoints (#14165)
vbaranov Apr 9, 2026
4548133
Update CHANGELOG
vbaranov Apr 9, 2026
4301916
fix: Remove internal transaction error field references (#14213)
Qwerty5Uiop Apr 12, 2026
c58eb3e
Update CHANGELOG
vbaranov Apr 12, 2026
2f8a92b
chore: Prevent deadlocks in IT fields removing migration (#14215)
Qwerty5Uiop Apr 13, 2026
9a215b2
chore: Remove unused Explorer.Chain.Address.find_contract_addresses/2…
vbaranov Apr 13, 2026
7b20b94
chore(deps-dev): bump credo from 1.7.17 to 1.7.18 (#14224)
dependabot[bot] Apr 14, 2026
b2d348f
fix: Fix timeouts for API v1 tokentx endpoint (#14219)
nikitosing Apr 14, 2026
f5386f0
Update CHANGELOG
vbaranov Apr 14, 2026
e3efe61
chore: Improve internal transactions migrations (#14233)
Qwerty5Uiop Apr 15, 2026
47ebe38
fix: Celo epoch OpenAPI schema issues and missing test coverage (#14229)
akolotov Apr 15, 2026
7b69a11
Update CHANGELOG
vbaranov Apr 15, 2026
7906807
fix: Fix PendingTransactionsSanitizer (#14235)
Qwerty5Uiop Apr 15, 2026
9445547
chore: Add Autoscout promo in the logs (#14234)
vbaranov Apr 15, 2026
2cfd442
Update Changelog
vbaranov Apr 15, 2026
e444547
fix: Address ids usage improvements (#14240)
Qwerty5Uiop Apr 16, 2026
a31acf5
Update Changelog
vbaranov Apr 16, 2026
fca1752
fix: guard missing ETS table in contract creator fetcher (#14241)
vbaranov Apr 16, 2026
5f770d6
fix: Fix OnDemand.InternalTransaction fetcher (#14242)
Qwerty5Uiop Apr 16, 2026
0a05ac1
Update Changelog
vbaranov Apr 16, 2026
2a6b61a
fix: Internal transactions on-demand fetcher: check existence of dele…
vbaranov Apr 17, 2026
90e236e
Update Changelog
vbaranov Apr 17, 2026
a2eeaee
feat: make token balances import chunk size configurable (#14250)
vbaranov Apr 19, 2026
d7c73af
feat: `/api/legacy/*` wrappers for three ES-compatible RPC endpoints …
akolotov Apr 20, 2026
da699ea
Update CHANGELOG
vbaranov Apr 20, 2026
1b56375
fix: Fix filecoin view error (#14255)
vbaranov Apr 20, 2026
872cdf8
Update CHANGELOG
vbaranov Apr 20, 2026
c491f77
chore: Expand action of API_DISABLE_CONTRACT_CREATION_INTERNAL_TRANSA…
vbaranov Apr 20, 2026
db8bf48
Update CHANGELOG
vbaranov Apr 20, 2026
482d286
chore: Increase default timeout for FillInternalTransactionsAddressId…
Qwerty5Uiop Apr 21, 2026
8051019
Update CHANGELOG
vbaranov Apr 21, 2026
cd3a521
chore: Remove timeout for test for FillInternalTransactionsAddressIds…
Qwerty5Uiop Apr 22, 2026
c196b37
Update CHANGELOG
vbaranov Apr 22, 2026
1a6d9c3
chore: Update LICENCE (#14201)
vbaranov Apr 22, 2026
b67f11f
Update CHANGELOG
vbaranov Apr 22, 2026
548a91a
feat: restore BENS preloads on the main page under toggle and add blo…
vbaranov Apr 22, 2026
9e5e272
Update CHANGELOG
vbaranov Apr 22, 2026
3766602
Update CHANGELOG
vbaranov Apr 22, 2026
7ebfbcc
Update CHANGELOG
vbaranov Apr 22, 2026
b8c509f
WIP: Merge upstream v11.0.0 (has conflicts)
github-actions[bot] Apr 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
66 changes: 66 additions & 0 deletions .agents/skills/elixir-clause-grouping/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
name: elixir-clause-grouping
description: Use when refactoring Elixir multi-clause functions, extracting helper functions, or fixing Credo readability warnings caused by placing `defp` helpers between clauses of the same function. Keeps function clauses contiguous and moves helpers below the full clause group.
---

## Overview

In Elixir modules, all clauses of the same function should stay together. Inserting a `defp` helper between clauses of a `def` or `defp` makes the function harder to read and can trigger Credo readability warnings. When shared logic needs to be extracted, keep the original clause group contiguous and place the helper after the full group.

## When to Use

- When refactoring a multi-clause `def` or `defp`
- When extracting duplicated logic from multiple function clauses
- When addressing Credo warnings about clause grouping or readability
- When editing controller, view, or context modules with several clauses of the same function
- During review when a helper was added in the middle of another function's clauses

## Core Rule

- Keep all clauses of the same function contiguous
- Do not place `defp` helpers between clauses of another function
- Extract shared logic into a helper placed after the full clause group

## Anti-Pattern

```elixir
def decoded_input_data(%Transaction{to_address: nil}, _, _, _, _), do: {:error, :no_to_address}

defp decode_input_data_with_fallback(data, abi, input, hash, skip_sig_provider?, options, methods_map, abi_map) do
...
end

def decoded_input_data(%Transaction{to_address: %NotLoaded{}}, _, _, _, _), do: {:error, :contract_not_verified, []}
```

This splits the `decoded_input_data/5` clause group and makes the function harder to scan.

## Preferred Pattern

```elixir
def decoded_input_data(%Transaction{to_address: nil}, _, _, _, _), do: {:error, :no_to_address}

def decoded_input_data(%Transaction{to_address: %NotLoaded{}}, _, _, _, _), do: {:error, :contract_not_verified, []}

def decoded_input_data(%Transaction{to_address: %{smart_contract: smart_contract}} = transaction, skip_sig_provider?, options, methods_map, abi_map) do
...
end

defp decode_input_data_with_fallback(data, abi, input, hash, skip_sig_provider?, options, methods_map, abi_map) do
...
end
```

## Refactoring Checklist

1. Identify every clause of the function being edited.
2. Keep those clauses adjacent to each other.
3. Extract shared logic only after the full clause group.
4. Re-check that no unrelated `def` or `defp` appears inside the group.
5. Run formatting after the refactor.

## Notes

- This applies to both public and private multi-clause functions.
- If a helper is only used by one clause group, place it immediately after that group.
- Preserving clause grouping is preferred even when the extracted helper is small.
42 changes: 42 additions & 0 deletions .agents/skills/update-common-blockscout-env/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: update-common-blockscout-env
description: Ensure every newly introduced environment variable is also added to docker-compose/envs/common-blockscout.env so local Docker setups stay aligned with runtime configuration.
---

## Overview

This skill keeps environment-variable documentation and defaults in sync for Docker users.

When adding or changing runtime env vars (for example in config/runtime.exs), also update docker-compose/envs/common-blockscout.env in the same task.

## Mandatory Rule

- Every new env variable introduced in code/config must be added to docker-compose/envs/common-blockscout.env.
- Do not postpone this to a follow-up task.

## How To Apply

1. Identify newly added env vars in changed files (typically config/runtime.exs, config/*.exs, or modules reading System.get_env/1-2).
2. Add each variable to docker-compose/envs/common-blockscout.env.
3. Place it in the most relevant section (for example API flags near other API_* variables).
4. Prefer non-breaking defaults:
- Use a commented example line for optional flags (for example # MY_FLAG=false).
- Use an uncommented value only when the project convention requires a default to be active.
5. Keep naming and formatting consistent with existing entries.

## Checklist

- New env var exists in code.
- Matching entry exists in docker-compose/envs/common-blockscout.env.
- Placement is logical and discoverable.
- Default value does not change behavior unexpectedly.

## Example

If code adds:

- DISABLE_TRANSACTIONS_BENS_PRELOAD

Then docker-compose/envs/common-blockscout.env should include:

- # DISABLE_TRANSACTIONS_BENS_PRELOAD=false
131 changes: 131 additions & 0 deletions .agents/skills/with-to-case-refactor/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
---
name: with-to-case-refactor
description: Replace `with` expressions that contain only a single `<-` clause and an `else` branch with a `case` expression. This addresses the Credo warning "with contains only one <- clause and an else branch, consider using case instead" and produces cleaner, more idiomatic Elixir code.
---

## Overview

Elixir's `with` construct is designed for chaining multiple pattern-matching steps. When only one `<-` clause is present alongside an `else` branch, `with` adds no value over a plain `case`. Credo flags this as:

```
[R] → `with` contains only one <- clause and an `else` branch, consider using `case` instead
```

Always prefer `case` in this situation.

## When to Use

- When a `with` expression has exactly one `<-` clause and one or more `else` arms.
- When refactoring code to address the Credo `Credo.Check.Refactor.WithClauses` warning.

## Anti-Pattern (Avoid)

```elixir
# ❌ BAD: single-clause with/else — should be a case
with {:ok, response} <- json_rpc(params, opts) do
process(response)
else
{:error, reason} ->
Logger.error("RPC failed: #{inspect(reason)}")
:error
end
```

```elixir
# ❌ BAD: single-clause with/else wrapping a nested case
with {:ok, response} <- json_rpc(params, opts) do
case parse(response) do
{:ok, value} -> value
_ -> :error
end
else
{:error, reason} ->
Logger.error("RPC failed: #{inspect(reason)}")
:error
end
```

## Best Practice (Use Instead)

```elixir
# ✅ GOOD: flat case replaces with/else
case json_rpc(params, opts) do
{:ok, response} ->
process(response)

{:error, reason} ->
Logger.error("RPC failed: #{inspect(reason)}")
:error
end
```

```elixir
# ✅ GOOD: nested case is fine when the outer with is replaced
case json_rpc(params, opts) do
{:ok, response} ->
case parse(response) do
{:ok, value} -> value
_ -> :error
end

{:error, reason} ->
Logger.error("RPC failed: #{inspect(reason)}")
:error
end
```

## Transformation Rules

1. Move the expression on the right-hand side of `<-` to become the subject of `case`.
2. Turn the left-hand side of `<-` into the matching branch of `case`.
3. Move the body of the `with` block as the body of that `case` branch.
4. Move each arm of the `else` block as additional `case` branches.
5. Remove the `with`/`else`/`end` wrapper.

## Real-World Example (from this codebase)

### Before

```elixir
with {:ok, response} <-
params
|> Map.merge(%{id: 0})
|> Nonce.request()
|> json_rpc(json_rpc_named_arguments) do
case Nonce.from_response(%{id: 0, result: response}, id_to_params) do
{:ok, %{nonce: 0}} -> handle_zero_nonce(...)
{:ok, %{nonce: nonce}} when nonce > 0 -> handle_nonzero_nonce(...)
_ -> retry(...)
end
else
{:error, reason} ->
Logger.error("Error: #{inspect(reason)}")
retry(...)
end
```

### After

```elixir
case params
|> Map.merge(%{id: 0})
|> Nonce.request()
|> json_rpc(json_rpc_named_arguments) do
{:ok, response} ->
case Nonce.from_response(%{id: 0, result: response}, id_to_params) do
{:ok, %{nonce: 0}} -> handle_zero_nonce(...)
{:ok, %{nonce: nonce}} when nonce > 0 -> handle_nonzero_nonce(...)
_ -> retry(...)
end

{:error, reason} ->
Logger.error("Error: #{inspect(reason)}")
retry(...)
end
```

## Notes

- If the `with` has **two or more** `<-` clauses, keep it as `with`; this refactor only applies to the single-clause case.
- If there is no `else` branch at all, `with` is also acceptable for a single clause — but a `case` is still clearer and preferred.
- After refactoring, run `mix format` to ensure correct indentation.
Loading
Loading