This is an Snapshot X monorepository.
ui
: Snapshot X front-end written in Vue
yarn
yarn dev
yarn build
yarn lint
yarn test
yarn typecheck
You can run all local services (api, subgraph-api, mana, ui) with single command assuming you have all necessary environment variables set up. Local APIs will only be used for Ethereum Sepolia and Starknet Sepolia.
yarn dev:full
You need to have Docker running on your machine.
In apps/api
and apps/mana
copy .env.example
to .env
files.
In apps/mana/.env
you need to fill in following empty variables:
STARKNET_MNEMONIC
andETH_MNEMONIC
- if you want to use it as relayer.HERODOTUS_API_KEY
andHERODOTUS_LEGACY_API_KEY
- if you want to use L1<->L2 messaging (voting with strategies that use L1 proofs)
If you run yarn dev:full
it will take long time to sync all the blocks for the first time. To mitigate it you can just change starting block
for indexing here:
sx-monorepo/apps/api/src/overrrides.ts
Line 50 in 0f767b8
sx-monorepo/apps/subgraph-api/networks.json
Lines 12 to 21 in 0f767b8
If you do that make sure to create a new space, because spaces created before the new starting block you picked won't be available.
Packages are versioned using changesets
.
In most cases all you need to do is when adding new changes to versioned packages (right now it's just sx.js
)
is to execute yarn changeset
, specify package you updated, version bump per semver and description of your changes.
Then commit generated files in your PR.
Once merged changesets actions will create PR that can be used to release and publish those packages.