Skip to content
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
ChaituVR merged 13 commits into
masterfrom
feat-erc20-balance-starknet-strategy
Jul 2, 2025
Merged

[erc20-balance-starknet] feat: new erc20-balance-starknet strategy#1740
ChaituVR merged 13 commits into
masterfrom
feat-erc20-balance-starknet-strategy

Conversation

@wa0x6e

@wa0x6e wa0x6e commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

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:

@wa0x6e
wa0x6e requested a review from Copilot June 5, 2025 12:27
@wa0x6e wa0x6e added the strategy label Jun 5, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-starknet strategy in src/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', () => {

Comment thread src/strategies/erc20-balance-starknet/schema.json Outdated
Comment thread src/strategies/erc20-balance-starknet/index.ts Outdated
Comment thread src/strategies/erc20-balance-starknet/README.md Outdated
Comment thread src/strategies/erc20-balance-starknet/examples.json Outdated
wa0x6e and others added 6 commits June 5, 2025 16:29
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>
Comment thread src/strategies/erc20-balance-starknet/index.ts
Comment thread src/strategies/erc20-balance-starknet/README.md Outdated
Comment thread src/strategies/erc20-balance-starknet/index.ts Outdated
Comment thread test/strategy.test.ts Outdated
@wa0x6e
wa0x6e requested a review from ChaituVR July 1, 2025 14:52
@wa0x6e
wa0x6e force-pushed the feat-erc20-balance-starknet-strategy branch from 54241b6 to c9e838a Compare July 1, 2025 14:55

@ChaituVR ChaituVR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tAck

@ChaituVR
ChaituVR merged commit 50b5d8c into master Jul 2, 2025
8 checks passed
@ChaituVR
ChaituVR deleted the feat-erc20-balance-starknet-strategy branch July 2, 2025 03:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants