Skip to content

Latest commit

 

History

History
81 lines (54 loc) · 1.67 KB

CONTRIBUTING.md

File metadata and controls

81 lines (54 loc) · 1.67 KB

Contributing

Setup

Note: We use uv to manage our monorepo. You can install it with the following command:

curl -fsSL https://docs.astral.sh/uv/install.sh | sh

Then, you can clone the repository and install the dependencies:

  1. Clone the pragma-sdk repository:
git clone [email protected]:astraly-labs/pragma-sdk.git
  1. Install dependencies with uv:
sh scripts/uv_install.sh

It will create a .venv virtualenv for each package of our monorepo that you can later activate, for example for the sdk:

cd pragma-sdk
source .venv/bin/activate

!!! note In case you are working on other packages that depend on the SDK & utils and you want to make it editable you should always update the dependencies with the following command:

 ```shell
 uv sync --all-extras
 ```

Running Tests Locally

We use starknet-devnet-rs for our integration tests, you can install it through Rust's package manager, cargo.

  1. Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Install Starknet-devnet
cargo install starknet-devnet
  1. Now, you can run tests, for example in the pragma-sdk repository:
cd pragma-sdk
source .venv/bin/activate
coverage run -m pytest --net=devnet --client=full_node -v --reruns 5 --only-rerun aiohttp.client_exceptions.ClientConnectorError tests

Updating pragma-oracle ABIs

  1. Upgrade submodule
git submodule update --remote
  1. Compile contracts
cd pragma-oracle && scarb build
  1. Update ABIs
poe update_abis