snapshot-labs / sx-monorepo

Snapshot X monorepo
https://docs.snapshotx.xyz
MIT License
11 stars 10 forks source link

feat: add support for starknet account to offchain actions #383

Open wa0x6e opened 1 month ago

wa0x6e commented 1 month ago

Summary

Closes: #372 and https://github.com/snapshot-labs/pitches/issues/83

This PR add starknet wallet support for setAlias on offchain networks.

Once alias is created, a starknet account will be able to follow/unfollow a space and edit its user profile

Changes

How to test

Waiting merging of https://github.com/snapshot-labs/snapshot-sequencer/pull/400

TODO

wa0x6e commented 1 month ago

It's ready on sx side, waiting for update on backend (sequencer) side to accept starknet addresses

Sekhmet commented 1 month ago

I am trying to make this work via EthSig in Starknet, but it always fail with just undefined when trying to Follow a space with a starknet account.

If you are signed in using ArgentX (or Braavos, or any other Starknet wallet) you will get Starknet provider, starknet's EthereumSig client is supposed to work with Ethereum provider (so you can vote with Ethereum wallet on Starknet spaces), for doing actions with Starknet provider we need to use StarknetSig client (which I see has been updated now).

wa0x6e commented 1 month ago

I am trying to make this work via EthSig in Starknet, but it always fail with just undefined when trying to Follow a space with a starknet account.

If you are signed in using ArgentX (or Braavos, or any other Starknet wallet) you will get Starknet provider, starknet's EthereumSig client is supposed to work with Ethereum provider (so you can vote with Ethereum wallet on Starknet spaces), for doing actions with Starknet provider we need to use StarknetSig client (which I see has been updated now).

Yes, I just finally made it work with StarknetSig. A small thing I noticed is that there are no network switcher when the wallet is on the wrong network, and the signing will fail with "Invalid chain ID"

aurelianoB commented 1 week ago

A small thing I noticed is that there are no network switcher when the wallet is on the wrong network, and the signing will fail with "Invalid chain ID"

Shouldn't the alias and any hub-related action done with it be agnostic of the chain currently used in the wallet? That's at least how it works for evm wallets right now

Sekhmet commented 5 days ago

Is this PR supposed to work or it's missing sequencer support?

wa0x6e commented 5 days ago

refactoring in progress, to include features in the current cycle