A monorepository containing all the contracts and packages related to Andromeda Protocol. Full documentation for all the contracts can be found here.
| Module | Description | Documentation |
|---|---|---|
| address-list | A module used to whitelist/blacklist a list of addresses to interact with the ADO. | Gitbook |
| rates | A module used to add rates (taxes/royalties) on fund transfers | Gitbook |
| cw721-bids | Module that can be attached to the cw721 ADO as another way to buy and sell NFTs. | Gitbook |
| receipts | A module that can be attached to ADOs that saves the events of messages. | Gitbook |
| Contract | Description |
|---|---|
| andromeda_protocol | Package used to define message types and various utility methods used by Andromeda ADO Contracts. |
The pacakges also includes the ado_base. Since all our ADOs are built using the same architecture, redundency was inevitable. So we decided to bundle up all the functions/messages/structures that are used by all ADOs into the ado_base which can be referenced by any new ADOs.
All tests can be run using:
cargo test --workspace
All contracts and packages can be built by running the build script:
./build_all.sh
This will build all contract .wasm files in to the artifacts directory at the project root.
To build a single contract, you need to have wasm-opt Then run:
./build.sh [contract name] or ./build.sh [catogory name]
Examples:
./build.sh andromda vault to build the vault contract.
or
./build.sh finance to build all contracts under the finance category.
They can also be chained to build multiple directories at the same time:
./build.sh andromeda_app non-fungible-tokens to build the app contract and all contracts under the non-fungible-tokens category.
Make sure you run rustfmt before creating a PR to the repo. You need to install the nightly version of rustfmt.
rustup toolchain install nightlyTo run rustfmt,
cargo fmtYou should run clippy also. This is a lint tool for rust. It suggests more efficient/readable code.
You can see the clippy document for more information.
You need to install nightly version of clippy.
rustup toolchain install nightlycargo clippy --all --all-targets -- -D warningsAndromeda is deployed on many of the Cosmos chains. Usually this will require you to set up an environment for each chain. Luckily, Andromeda has built the Andromeda CLI, an all in one tool to build, interact, and manage ADOs and wallets for any of the chains. The CLI documentation can be found here.
