Development Guidelines

Before starting development, please create an issue to open the discussion, validate that the PR is wanted and coordinate with the team.

Please check this document to make sure your contributions are merged as soon as possible.

Table of Contents

Pull Requests (PRs)

As a contributor, you are expected to fork this repository, work on your own fork and then submit pull requests. The pull requests will be reviewed and eventually merged into the repository. See "Fork-a-Repo" for how to work.

The typical PR includes:

  • a branch associated with the PR should be rebased to the head of develop
  • documentation that complies with the PR template. Make sure every section of it is properly fullfilled

Code Reviews

Maintainers will review your code and ask for changes if necessary you code can be merged into the repository. Be mindful and forgiving as we might not be available right on.

Many of the issues we are facing during the code review are due to a lack of context. Do not hesitate to explain why you are doing what you are doing.

IMPORTANT Pay attention to the maintainer's feedback and do the changes accordingly.

Environment

The project uses a number of tools. Make sure you have installed them in order to develop and test:

Once you have forked/cloned the repository, you should create a .env.devnet.json file at the root of the project. You can simply copy the content of .env.template.json if you plan to use the devnet on the default port and with the account associated with the seed 0!

Useful Commands

  • (1) fetch the project cairo dependencies
scarb fetch
  • (2) build the project artifacts
scarb build
  • (3) execute starknet foundry tests
# you can also use: snforge test
scarb test
  • (4) start starknet-devnet on the default port
starknet-devnet --seed=0
  • (5) create a configuration file to run the project against the devnet
cp .env.template.json .env.devnet.json
  • (6) install node dependencies
npm install
  • (7) execute the npm test scripts with a specific test suite
npm run test -- simple_account.test.ts
  • (8) start mitmproxy with the browser UI on port 8080 and redirect all the requests to the default starknet. You can then change the url in .env.devnet.json so that you run the tests through http://localhost:8080
mitmweb --mode reverse:http://localhost:5050

Getting ETH on Sepolia

To get ETH on Starknet Sepolia

Learning Starknet/Cairo

If you are not used to Starknet and Cairo yet, a good starting point is to learn is the list of ressources below:

Do not hesitate to join the Starkware Discord and some Telegram Developer Groups...

More questions

If you have any questions, feel free to post them as an issues.

Thanks for your time and code!