Add evm collectibles command for NFT listings with spam filtering#34
Add evm collectibles command for NFT listings with spam filtering#34ivpusic wants to merge 1 commit intosim/evm-transactionsfrom
Conversation
ivpusic
commented
Mar 12, 2026
- GET /v1/evm/collectibles/{address} with --chain-ids, --filter-spam, --show-spam-scores, --limit, --offset
- Text table shows CHAIN, NAME, SYMBOL, TOKEN_ID, STANDARD, BALANCE plus SPAM/SPAM_SCORE when --show-spam-scores is set
- Full OpenAPI spec coverage including metadata, spam explanations with json.RawMessage for polymorphic values
- 6 E2E tests: text, JSON, filter-spam disabled, spam scores JSON, spam scores text columns, pagination
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryLow Risk Overview Supports both raw JSON output and a text table view, optionally adding Adds E2E tests covering text vs JSON output, spam filtering toggle, spam score inclusion, and pagination via Written by Cursor Bugbot for commit 8a633b2. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Attribute value typed as string, not RawMessage
- Changed collectibleAttribute.Value from string to json.RawMessage to properly handle polymorphic NFT attribute values (strings, numbers, booleans) consistent with the codebase pattern.
Or push these changes by commenting:
@cursor push 9d59d3b559
Preview (9d59d3b559)
diff --git a/cmd/sim/evm/collectibles.go b/cmd/sim/evm/collectibles.go
--- a/cmd/sim/evm/collectibles.go
+++ b/cmd/sim/evm/collectibles.go
@@ -69,9 +69,9 @@
}
type collectibleAttribute struct {
- Key string `json:"key"`
- Value string `json:"value"`
- Format string `json:"format,omitempty"`
+ Key string `json:"key"`
+ Value json.RawMessage `json:"value"`
+ Format string `json:"format,omitempty"`
}
type spamExplanation struct {Comment @cursor review or bugbot run to trigger another review on this PR
|
|
||
| type collectibleAttribute struct { | ||
| Key string `json:"key"` | ||
| Value string `json:"value"` |
There was a problem hiding this comment.
Attribute value typed as string, not RawMessage
Medium Severity
collectibleAttribute.Value is typed as string, but NFT metadata attribute values are commonly polymorphic (strings, numbers, booleans). The codebase consistently uses json.RawMessage for polymorphic API values — spamExplanation.Value in the same file and functionInput.Value in activity.go both do this. If the API returns a non-string attribute value, json.Unmarshal in the text-output path will fail, breaking the entire command for any NFT with numeric traits.
bcff9e1 to
a0d205d
Compare
8a633b2 to
991a36a
Compare
a0d205d to
fbcafd8
Compare
991a36a to
2d53c17
Compare
fbcafd8 to
a7bacad
Compare
2d53c17 to
a49f933
Compare
- GET /v1/evm/collectibles/{address} with --chain-ids, --filter-spam, --show-spam-scores, --limit, --offset
- Text table shows CHAIN, NAME, SYMBOL, TOKEN_ID, STANDARD, BALANCE plus SPAM/SPAM_SCORE when --show-spam-scores is set
- Full OpenAPI spec coverage including metadata, spam explanations with json.RawMessage for polymorphic values
- 6 E2E tests: text, JSON, filter-spam disabled, spam scores JSON, spam scores text columns, pagination
a7bacad to
f381fe4
Compare
a49f933 to
d56f07a
Compare



