Note on Switchboard Integration: The Switchboard integration is currently implemented in a separate, non-main branch because we don't have a client to enable local testing.
We decided to keep a separate the integration in a separate branch since merging would cause tests to fail on localnet. However, we did test the integration on a deployed devnet program.
Moreover, the PR to merge Switchboard to main is here.
Bucket aims to be a composable stablecoin by aggregating a diversified pool of stablecoins to increase decentralization and decrease single points of failure. In a world of abundant stablecoins, bucket strives to provide value in 2 ways: protocol-to-bucket and consumer-to-bucket. For a more in depth description, please visit our website. Bucket builds on top of a variety open source programs in the Solana ecosystem: Crate Protocol, Saber's stable swap, and more.
The team started this project at mtnDAO for Solana's Riptide Hackathon. We are in active development. For the latest updates, follow our journey:
-
cli/
- Interact with the deployed bucket program via the CLI instead of the UI. There is 1-1 mapping between on-chain instructions and CLI commands. There are also some extra utility functions to help surface data currently stored on-chain, e.g. view bucket PDA attributes, see a user's parsed ATAs, etc.
-
programs/
- Folder containing all on-chain programs. We only deploy the bucket-program program. The pyth program is purely for localnet testing since pyth's oracle price feeds are not available locally.
-
scripts/
- Various bash scripts to make common actions easier such as setting up a dev environment, copying IDLs, deploying a program, etc.
-
sdk/
- The package that allows you to easily interact with a deployed bucket program. There is a 1-1 mapping between SDK functions and on-chain instructions. The SDK is beneficial because it abstracts away a lot of complexity of finding addresses, building transactions, and more.
-
tests/
- The directory containing code and helpers to test the end-to-end functionality of the bucket program. These tests are a great way to understand how the bucket program works + how to interact with the program.
These rust crates are produced by running anchor build.
Package | Description | Version | Docs |
---|---|---|---|
bucket-program |
Core bucket protocol | pending | pending |
These rust crates are imported across this repo's programs' Cargo.toml files. Disclaimer: our programs do not necessarily the latest versions, as displayed in the table below. Check the Cargo.toml or Cargo.lock for specific crate versions.
To interact with a deployed bucket from your own programa, use the JavaScript SDK.
You can install this package in your repo with the following command
npm i @bucket-program/sdk
You'll need to install a couple development tools if this is your first time developing on Solana. We recommend starting with the following getting started guides:
By this point, you should have
If not, it doesn't hurt to install these now. Many projects ues these tools. You will also need ts-mocha
installed globally to run our tests. You can install it via NPM like so:
npm i -g ts-mocha
You might need to run the above command with sudo
prepended. Verify it's installed by running ts-mocha
. You should see output like this:
Error: No test files found: "test"
We provide a simple script to install dependencies, build packages. Simply run
yarn setup
The respective projects' documentation sites and discords are a great place to start when troubleshooting issues.
Make sure you previously built the SDK and installed all relevant packages. Then, you can run all the tests with:
anchor test