Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.

feat: allow starknet aliases to flag proposals#550

Merged
wa0x6e merged 3 commits into
masterfrom
feat-allow-starknet-alias-to-flag-proposal
Jun 30, 2025
Merged

feat: allow starknet aliases to flag proposals#550
wa0x6e merged 3 commits into
masterfrom
feat-allow-starknet-alias-to-flag-proposal

Conversation

@wa0x6e

@wa0x6e wa0x6e commented Jun 30, 2025

Copy link
Copy Markdown
Contributor

Following snapshot-labs/snapshot.js#1164

This PR will allow starknet aliases to flag proposals, when it's a space admin or moderator

@wa0x6e
wa0x6e requested review from ChaituVR and Copilot June 30, 2025 14:57
@wa0x6e
wa0x6e marked this pull request as ready for review June 30, 2025 14:57

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

This PR extends the functionality to allow Starknet aliases to flag proposals by modifying the allowed executable types for aliases.

  • Introduces "flag-proposal" to the list of allowable types for Starknet aliases.
  • Integrates the new type into the existing optional types array.
Comments suppressed due to low confidence (1)

src/helpers/alias.ts:27

  • [nitpick] Consider adding a comment to explain why 'flag-proposal' is explicitly placed before the spread of OPTIONAL_TYPES_EXECUTABLE_BY_ALIAS. This would aid in understanding the intended ordering and any associated logic.
const TYPES_EXECUTABLE_BY_STARKNET_ALIAS = [

@wa0x6e
wa0x6e force-pushed the feat-allow-starknet-alias-to-flag-proposal branch from 615f556 to 60c0051 Compare June 30, 2025 14:59
Comment thread src/helpers/alias.ts Outdated

@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.

utAck

@wa0x6e
wa0x6e merged commit b69015e into master Jun 30, 2025
2 checks passed
@wa0x6e
wa0x6e deleted the feat-allow-starknet-alias-to-flag-proposal branch June 30, 2025 17:59
wa0x6e added a commit that referenced this pull request Aug 12, 2025
* feat: allow starknet aliases to flag proposals

* Update src/helpers/alias.ts

Co-authored-by: Chaitanya <yourchaitu@gmail.com>

---------

Co-authored-by: Chaitanya <yourchaitu@gmail.com>
wa0x6e added a commit that referenced this pull request Aug 22, 2025
* feat: validate space strategies

* fix: duplicate request preventor for EIP-1271 requests (#515)

* fix: duplicate request preventor for EIP-1271 requests

* fix test

* chore: increase follow limit for Turbo users (#516)

* chore: allows 50 follows for turbo users

* chore: allows 50 follows for turbo users

* fix: allow copeland on production (#517)

* fix: all copeland on production

* fix: remove unused variable

* feat: use unified API to check if SX space exists (#520)

* feat: add mnt, ape, curtis to networks whitelist (#521)

Updated mantle to mnt as it's new NetworkID for it.

* chore(deps): bump @snapshot-labs/snapshot.js from 0.12.54 to 0.12.55 (#524)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.12.54 to 0.12.55.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.12.54...v0.12.55)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @snapshot-labs/snapshot.js from 0.12.55 to 0.12.56 (#525)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.12.55 to 0.12.56.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.12.55...v0.12.56)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @snapshot-labs/snapshot.js from 0.12.56 to 0.12.57 (#526)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.12.56 to 0.12.57.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.12.56...v0.12.57)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: sync spaces custom domain with walletconnect allowed origins (#487)

* feat: sync spaces custom domain with walletconnect allowed origins

* refactor: better variable name

* Update .env.example

Co-authored-by: Less <bonustrack@users.noreply.github.com>

* chore: only use domain without protocol prefix

---------

Co-authored-by: Chaitanya <yourchaitu@gmail.com>
Co-authored-by: Less <bonustrack@users.noreply.github.com>

* fix: prevent non-premium networks (#522)

* feat: prevent non-premium networks

* add testcases

* Improve network filtering and fix test case

* fix: allow turbo spaces to create proposals with non-premuim networks (#528)

* feat: use correct network when fetching shib space controller (#527)

* feat: use correct network when fetching shib space controller

* chore: use network realm instead of chain id

* fix: allow network param override

* chore(deps): bump @snapshot-labs/snapshot.js from 0.12.57 to 0.12.58 (#531)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.12.57 to 0.12.58.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.12.57...v0.12.58)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.12.58
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add turbo tracking (#523)

* feat: add turbo tracking every 10s

* fix: correct syntax for GetSpaces query

* ci: deactivate schnaps for tests

* refactor: rename to turbo_expiration

* chore: remove quotes around url in .env.example

Co-authored-by: Chaitanya <yourchaitu@gmail.com>

* refactor: only track if SCHNAPS_API_URL is set

* chore: remove log

* chore: remove dead env var

Co-authored-by: Wan <495709+wa0x6e@users.noreply.github.com>

* refactor: move while loop out of if condition

Co-authored-by: Wan <495709+wa0x6e@users.noreply.github.com>

* lint: fix

* chore: remove track turbo status

* ci: move loop in if condition

* refactor: move while loop out of if condition

* fix: process only relevant spaces for the instance network

* fix: use sentry to capture errors

* fix: use fech with keep alive

* fix: fix invalid comparison

* docs: add note about future feature

* fix: only update `turbo_expiration` field

* fix: improve sql query

---------

Co-authored-by: Chaitanya <yourchaitu@gmail.com>
Co-authored-by: Wan <495709+wa0x6e@users.noreply.github.com>

* chore(deps): bump @snapshot-labs/snapshot.js from 0.12.58 to 0.12.59 (#532)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.12.58 to 0.12.59.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.12.58...v0.12.59)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.12.59
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @snapshot-labs/snapshot.js from 0.12.59 to 0.12.60 (#533)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.12.59 to 0.12.60.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.12.59...v0.12.60)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.12.60
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: use pineapple gateway to get JSON on poke (#535)

* fix: skip indexing from outdated schnaps api (#537)

* fix: assign fallback value (#538)

* fix: infer turbo status from turbo expiration date (#539)

* fix: infer turbo status from turbo expiration date

* fix: update schema.sql

* chore: mark eden-online-override strategy as overriding

* chore(deps): bump @snapshot-labs/snapshot.js from 0.12.60 to 0.12.62 (#540)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.12.60 to 0.12.62.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.12.60...v0.12.62)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.12.62
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @snapshot-labs/snapshot.js from 0.12.62 to 0.12.63 (#543)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.12.62 to 0.12.63.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.12.62...v0.12.63)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.12.63
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @snapshot-labs/snapshot.js from 0.12.63 to 0.12.64 (#544)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.12.63 to 0.12.64.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.12.63...v0.12.64)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.12.64
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @snapshot-labs/snapshot.js from 0.12.64 to 0.12.65 (#545)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.12.64 to 0.12.65.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.12.64...v0.12.65)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.12.65
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @snapshot-labs/snapshot.js from 0.12.65 to 0.13.0 (#546)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.12.65 to 0.13.0.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.12.65...v0.13.0)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add delay before finalizing proposal scores (#541)

* feat: add delay before finalising proposal scores

* Revert "feat: add delay before finalising proposal scores"

This reverts commit f174357.

* fix: add delay up to 1min after proposal close

* Update src/scores.ts

Co-authored-by: Chaitanya <yourchaitu@gmail.com>

* Update src/scores.ts

* Update src/scores.ts

Co-authored-by: Chaitanya <yourchaitu@gmail.com>

---------

Co-authored-by: Chaitanya <yourchaitu@gmail.com>

* refactor: remove unused requestEonKey function from shutter helper (#549)

* feat: allow vote and proposal handling from starknet aliases (#542)

* feat: allow vote and proposal handling from starknet aliases

* Update src/helpers/alias.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* test: update test name

* feat: allow starknet aliases to update proposal

* test: test improvement

* fix: remove duplicate

* test: improve tests

* refactor: code improvement

* fix: fix invalid date comparison

* fix: allow optional alias to update proposal

* fix lint here for now

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Chaitanya <yourchaitu@gmail.com>

* chore(deps): bump @snapshot-labs/snapshot.js from 0.13.0 to 0.14.1 (#552)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.13.0 to 0.14.1.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.13.0...v0.14.1)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.14.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: remove duplicate promisification of Pool and Connection in mysql helper (#551)

Co-authored-by: Chaitanya <yourchaitu@gmail.com>

* feat: allow starknet aliases to flag proposals (#550)

* feat: allow starknet aliases to flag proposals

* Update src/helpers/alias.ts

Co-authored-by: Chaitanya <yourchaitu@gmail.com>

---------

Co-authored-by: Chaitanya <yourchaitu@gmail.com>

* fix: add split-delegation to list of override strategies (#547)

* refactor: simplify retry logic in fetchWithRetry method (#553)

* fix: remove duplicate promisification of Pool and Connection in mysql helper

* refactor: simplify retry logic in fetchWithRetry method

---------

Co-authored-by: Chaitanya <yourchaitu@gmail.com>

* chore(deps): bump @snapshot-labs/snapshot.js from 0.14.1 to 0.14.2 (#556)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.14.1 to 0.14.2.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.14.1...v0.14.2)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.14.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: update `network` column to support starknet chain id (#558)

* chore(deps): bump @snapshot-labs/snapshot.js from 0.14.2 to 0.14.4 (#559)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.14.2 to 0.14.4.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.14.2...v0.14.4)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.14.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: prevent spaces from setting themselves as parent or child (#560)

- Add validation to prevent circular references in space hierarchy
- Reject when space.parent equals the space ID
- Reject when space.children array contains the space ID
- Add comprehensive tests for parent/child validation
- Ensure proper error messages for validation failures

* chore(deps): bump @snapshot-labs/snapshot.js from 0.14.4 to 0.14.5 (#561)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.14.4 to 0.14.5.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.14.4...v0.14.5)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.14.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add support for sonic domain name (#562)

* feat: add support for sonic domain name

* fix: fix wrong sonic network

* chore: add sonic-staked-balance to override strategy (#568)

* chore: remove matic from sx (#573)

* chore(deps): bump @snapshot-labs/snapshot.js from 0.14.5 to 0.14.6 (#565)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.14.5 to 0.14.6.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.14.5...v0.14.6)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.14.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wan <495709+wa0x6e@users.noreply.github.com>

* chore(deps): bump @snapshot-labs/pineapple from 1.1.0 to 1.2.0 (#564)

Bumps @snapshot-labs/pineapple from 1.1.0 to 1.2.0.

---
updated-dependencies:
- dependency-name: "@snapshot-labs/pineapple"
  dependency-version: 1.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wan <495709+wa0x6e@users.noreply.github.com>

* chore(deps): bump @snapshot-labs/snapshot.js from 0.14.6 to 0.14.7 (#575)

Bumps [@snapshot-labs/snapshot.js](https://github.com/snapshot-labs/snapshot.js) from 0.14.6 to 0.14.7.
- [Release notes](https://github.com/snapshot-labs/snapshot.js/releases)
- [Commits](snapshot-labs/snapshot.js@v0.14.6...v0.14.7)

---
updated-dependencies:
- dependency-name: "@snapshot-labs/snapshot.js"
  dependency-version: 0.14.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: validate space strategies

* chore: lint fix

* feat: validate space strategies

* chore: lint fix

* refactor: better strategies handling

refactor:

refactor:

* fix: stop infinite loop on app shutdown

* refactor: remove magic number

* fix: update error message to reflect disabled status

* refactor: remove useless try/catch

* test: reset mock after each test

* feat: only allow override strategies on pro spaces (#581)

* refactor: better filename to avoid confusion

* fix: increase refresh interval to 5min

* fix: start express app only after loading all strategies

* tests: mock strategies list

* Update src/helpers/strategies.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* tests: fix race condition in E2E tests

* fix: strategy should honor the Strategy signature

* fix: throw error on internal error from score-api

* fix: use getter to avoid reference invalidation

* refactor: use default argument

* fix: use single quote

* fix: delay first strategies loop run

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Chaitanya <yourchaitu@gmail.com>
Co-authored-by: Less <bonustrack@users.noreply.github.com>
Co-authored-by: Wiktor Tkaczyński <wiktor.tkaczynski@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pscott <30843220+pscott@users.noreply.github.com>
Co-authored-by: Yoginth <hey@yoginth.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants