Developer tools for integrating with the 0xSplits contracts and subgraph data
| Package | Description |
|---|---|
| splits-sdk | Core package for integrating with 0xSplits |
| splits-sdk-react | A wrapper of splits-sdk with helpful React Hooks |
| splits-kit | Pre-built React components for 0xSplits |
Update the .env file with appropriate values for the variables present here. If you see any failing forked tests it could be because of the outdated block number, make sure to update it to the most recent one. This should be automated in the future.
Run mocked tests with pnpm run test.
Run forked tests with pnpm run vitest.
note: when writing forked tests make sure to add fork in the test file name. e.g. my-test-fork.test.ts.
From the root directory:
pnpm install
pnpm run lerna-buildCan use yalc to link the locally built sdk to other projects.
pnpm install -g yalcIn the package you want to link, run:
yalc publishIn the project you want to link to, run (replace @0xsplits/splits-sdk with whatever package you are linking to the local package):
yalc add @0xsplits/splits-sdkTo unlink the package, run:
yalc remove @0xsplits/splits-sdkFrom the root directory:
pnpm run lerna-versionFrom each package directory that you want to publish:
pnpm publishIf you want to publish an alpha/beta version, apply the appropriate tag:
pnpm publish --tag betaOnce you are done publishing all the packages, create a release on GitHub. The release version should match the version you published to npm. Use the Generate release notes button to automatically generate the release notes.
- You will need to be added to the
0xsplitsnpm organization to publish packages. Ask a team member to add you. - You will need to be logged in to npm on your local machine. Run
npm loginand enter your credentials. - Set the scope to
@0xsplitsby runningnpm config set scope 0xsplits