hemilabs / pure.finance

Pure.Finance website and web3 dapp
https://pure.finance
MIT License
23 stars 3 forks source link

Pure Finance website monorepo

Development

npm install
npx lerna run --stream dev

Then open the browser at http://localhost:3000.

Adding a new mini-app

  1. Add the new page component at site/pages.
  2. Add it to the Utilities component so it appears in the home page.
  3. Go from there!

Testing

Merkle claims

Go to packages/merkle-box-lib and create a list of recipients as a JSON file:

[
  {
    "account": "0x0000000000000000000000000000000000000010",
    "amount": "1000000000000000000"
  },
  {
    "account": "0x0000000000000000000000000000000000000020",
    "amount": "2000000000000000000"
  }
]

Create the dataset:

node scripts/create-dataset.js recipients.json > dataset.json

And copy the data set file to the development web server at site/public.

Set NODE_URL, MNEMONIC and create the claim group:

node scripts/create-claim-group.js WETH http://localhost:3000/test20241231.json 2024-12-31

End-to-end tests

Set the following environment variables: BASE_NODE_URL, MNEMONIC. Then run the tests:

npm run test:e2e