You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filter /api/plugin/evm/accounts so EVM smart-contract addresses already present in evm_contracts are not returned as EOA accounts.
Add a sqlite cursor regression test that seeds the mixed evm_accounts + evm_contracts state and verifies only the EOA remains visible.
Verification
go test $(find plugins/evm/dao -maxdepth 1 -name '*.go' ! -name '*_test.go' | sort) plugins/evm/dao/api_cursor_test.go -run '^TestAccountsCursor' -count=1 -> ok command-line-arguments 2.024s
Delivery Evidence Summary
Change:
Backend DAO change for /api/plugin/evm/accounts: the account cursor query now joins evm_contracts and excludes matching contract addresses, while preserving balance/cursor ordering for real EOA rows.
Objective Evidence:
Focused sqlite DAO validation passed: go test $(find plugins/evm/dao -maxdepth 1 -name '*.go' ! -name '*_test.go' | sort) plugins/evm/dao/api_cursor_test.go -run '^TestAccountsCursor' -count=1 -> ok command-line-arguments 2.024s. The new TestAccountsCursorExcludesSmartContracts reproduces the issue by inserting one EOA and one smart-contract address into evm_accounts, inserting the contract into evm_contracts, and asserting the accounts endpoint cursor returns only the EOA and returns no row when filtering by the contract address.
Visual Evidence:
n.a. Backend DAO/API behavior only; no UI, browser, or visual behavior was changed.
Risks / Not Covered:
Full package command go test ./plugins/evm/dao -run '^TestAccountsCursor' -count=1 is blocked by existing external dao_test bootstrap requiring ../../../configs/config.yaml plus live MySQL/Redis before test filtering. The executed validation isolates the changed DAO code and regression test with an in-memory sqlite database.
Change:
Backend DAO change for /api/plugin/evm/accounts: the account cursor query now joins evm_contracts and excludes matching contract addresses, while preserving balance/cursor ordering for real EOA rows.
Objective Evidence:
Focused sqlite DAO validation passed: go test $(find plugins/evm/dao -maxdepth 1 -name '*.go' ! -name '*_test.go' | sort) plugins/evm/dao/api_cursor_test.go -run '^TestAccountsCursor' -count=1 -> ok command-line-arguments 2.024s. The new TestAccountsCursorExcludesSmartContracts reproduces the issue by inserting one EOA and one smart-contract address into evm_accounts, inserting the contract into evm_contracts, and asserting the accounts endpoint cursor returns only the EOA and returns no row when filtering by the contract address.
Risks / Not Covered:
Backend-only change, so no screenshot evidence is applicable. Full package command go test ./plugins/evm/dao -run '^TestAccountsCursor' -count=1 is blocked by existing external dao_test bootstrap requiring ../../../configs/config.yaml plus live MySQL/Redis before test filtering. The executed validation isolates the changed DAO code and regression test with an in-memory sqlite database.
Backend DAO/API change for /api/plugin/evm/accounts: account cursor results now exclude addresses that are present in evm_contracts, keeping real EOA accounts separate from smart-contract accounts.
Objective Evidence:
go test -v -count=1 -run TestAccountsRouteExcludesSmartContracts ./plugins/evm/http exit code 0, passed: POST /api/plugin/evm/accounts with seeded mixed evm_accounts and evm_contracts returned only EOA 0x0000000000000000000000000000000000000001 with balance 10 and omitted contract 0x0000000000000000000000000000000000000002.
Playwright browser validation for http://localhost:3001/ homepage EVM Contract overview exit code 0, passed: Loaded the real Heima Explorer Next.js frontend, confirmed title Heima Explorer, no framework overlay, 200 responses from live Heima metadata/token/EVM transactions endpoints, and rendered homepage EVM Contract overview panel text EVM Contract Block 9,652,929, Transaction 2,122, EVM Account 1,318, EVM Contract 22.
Visual Evidence:
Source Screenshot Match: same product surface as the original issue screenshot: Heima homepage overview section titled EVM Contract, with visible cards EVM Contract Block, Transaction, EVM Account, and EVM Contract. The captured product section shows those same anchors and card layout.
The homepage counts are live Heima data and can change between captures; the visual proof is tied to the matching surface and labels rather than fixed counts.
Full DAO package command remains constrained by the repository's external config/service bootstrap; the focused HTTP regression test exercises the changed behavior with an in-memory sqlite fixture.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #16
Summary
/api/plugin/evm/accountsso EVM smart-contract addresses already present inevm_contractsare not returned as EOA accounts.evm_accounts+evm_contractsstate and verifies only the EOA remains visible.Verification
go test $(find plugins/evm/dao -maxdepth 1 -name '*.go' ! -name '*_test.go' | sort) plugins/evm/dao/api_cursor_test.go -run '^TestAccountsCursor' -count=1->ok command-line-arguments 2.024sDelivery Evidence Summary
Change:
Backend DAO change for
/api/plugin/evm/accounts: the account cursor query now joinsevm_contractsand excludes matching contract addresses, while preserving balance/cursor ordering for real EOA rows.Objective Evidence:
Focused sqlite DAO validation passed:
go test $(find plugins/evm/dao -maxdepth 1 -name '*.go' ! -name '*_test.go' | sort) plugins/evm/dao/api_cursor_test.go -run '^TestAccountsCursor' -count=1->ok command-line-arguments 2.024s. The newTestAccountsCursorExcludesSmartContractsreproduces the issue by inserting one EOA and one smart-contract address intoevm_accounts, inserting the contract intoevm_contracts, and asserting the accounts endpoint cursor returns only the EOA and returns no row when filtering by the contract address.Visual Evidence:
n.a. Backend DAO/API behavior only; no UI, browser, or visual behavior was changed.
Reviewer:
@repo Intake Reviewer
Risks / Not Covered:
Full package command
go test ./plugins/evm/dao -run '^TestAccountsCursor' -count=1is blocked by existing externaldao_testbootstrap requiring../../../configs/config.yamlplus live MySQL/Redis before test filtering. The executed validation isolates the changed DAO code and regression test with an in-memory sqlite database.