This repository was archived by the owner on Aug 22, 2025. It is now read-only.
[erc20-balance-starknet] feat: new erc20-balance-starknet strategy#1740
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a new Snapshot strategy for fetching ERC-20 token balances on Starknet, including schema, implementation, tests, examples, and docs.
- Introduce
erc20-balance-starknetstrategy insrc/strategies - Update test suite to validate Starknet addresses
- Add schema, examples, and README for the new strategy
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/strategy.test.ts | Updated tests to handle Starknet vs EVM addresses |
| src/strategies/index.ts | Registered new erc20-balance-starknet strategy |
| src/strategies/erc20-balance-starknet/schema.json | JSON schema for Starknet strategy parameters |
| src/strategies/erc20-balance-starknet/index.ts | Strategy implementation using Multicaller |
| src/strategies/erc20-balance-starknet/examples.json | Example input for Starknet strategy |
| src/strategies/erc20-balance-starknet/README.md | Documentation and parameter guide |
Comments suppressed due to low confidence (1)
test/strategy.test.ts:114
- The test description refers to "checksum addresses," but Starknet addresses do not use an EVM checksum. Consider renaming this to something like "formatted addresses."
it('Returned addresses should be checksum addresses', () => {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ChaituVR
reviewed
Jun 24, 2025
bonustrack
reviewed
Jun 27, 2025
Co-authored-by: Less <bonustrack@users.noreply.github.com>
ChaituVR
reviewed
Jun 29, 2025
Co-authored-by: Chaitanya <yourchaitu@gmail.com>
wa0x6e
force-pushed
the
feat-erc20-balance-starknet-strategy
branch
from
July 1, 2025 14:55
54241b6 to
c9e838a
Compare
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Toward https://github.com/snapshot-labs/workflow/issues/562
This PR adds a new strategy to get scores, based on balance of a ERC-20 token on starknet
Depends on:
getProvider()andmulticall()and to networks.json snapshot.js#1155