This repository contains a collection of demos that showcase how to use the Honeycomb Protocol.
There are two ways to setup the demos:
- Run the setup script located at the root of this repo. The script will install all dependencies and generate everything for you. If you're on Windows, you'll need to run the .sh file in Bash since it's a Unix shell script.
./setup.sh-
Make sure to install Solana CLI (needed for generating keys).
-
Run
yarnornpm install --legacy-peer-depsto install all dependencies. -
Generate the keys needed for the demos. You can do this by running the following command:
solana-keygen new --outfile ./keys/admin.jsonsolana-keygen new --outfile ./keys/user.json- Airdrop some SOL to the admin and user accounts. You can do this by running the following command:
solana airdrop 1000 --url https://rpc.test.honeycombprotocol.com/ --keypair ./keys/admin.jsonsolana airdrop 1000 --url https://rpc.test.honeycombprotocol.com/ --keypair ./keys/user.json- Create a
.envfile at the root of this repo and add the following:
API_URL="https://edge.test.honeycombprotocol.com/"
RPC_URL="https://rpc.test.honeycombprotocol.com/"
DAS_API_URL="https://rpc.test.honeycombprotocol.com/"
DEBUG_LOGS=false
ERROR_LOGS=trueYou're all set, you can now run the demos (see the next section for details on how to run the demos).
Each demo covers a different use-case of Honeycomb. The demos are written as tests that can be run either individually or all at once.
To run all the demos, use the following command:
If you're using Yarn:
yarn testWhen using NPM:
npm run testTo run a specific demo, use the following command:
yarn test <file/folder name without .test.ts>For example:
yarn test hive-controlOR
yarn test missions stakingThe last command will run both the missions and staking demos.