Open wa0x6e opened 4 months ago
One implementation option would be to have a new dedicated SnapshotId/Profile package, which will handle everything related to the profile, like on Starknet.
This package will handle the actions (follow/unfollow/setAlias), as well as the api (loadFollows, loadAlias), so we can use it easily via something like:
import Profile from '...'
const profile = new Profile(userAddress);
const ids = profile.loadFollows();
profile.unfollow(spaceName);
profile.follow(spaceName);
const aliases = profile.loadAliases();
profile.setAlias(newAddress);
Context: https://github.com/snapshot-labs/sx-monorepo/pull/293#discussion_r1609551308
Some actions, such as
And api:
are not network specific, as it will always use sequencer from v1 as source of truth. Later, some user profile related actions/api, as well as email notifications handling would also fall in this use case.
Those actions and api would benefit from being moved out of networks, to avoid duplicated code, and move to a dedicated module/namespace(?)