⚠️ The code within this repository was created during the Legends of Lightning Tournament. It is now archived and replaced by https://github.com/get10101/10101
This project requires Flutter and Rust. Rust toolchain can be installed via Rustup. In order to setup Flutter (as well as mobile simulators etc), please see the excellent Flutter guide here
A lot of complexity for building the app has been encapsulated in a Makefile.
To see the available commands, simply run make help or make.
To install necessary project dependencies for all targets, run the following:
make depsThis project uses flutter-rust-bridge. It is strongly encouraged to read its documentation before jumping into the project in order to understand the project's structure, conventions and ways of integrating between Rust and Flutter.
The instructions below allow building the Rust backend for 10101 application.
Bindings for Flutter can be generated with the following command:
make genmake nativemake iosFor building for target devices, run:
make androidmake android-simWe strive to keep the code consistent, therefore before submitting PRs one should run: make format to ensure code is properly formatted.
Static analysers (clippy and flutter analyze) can be run by calling make lint.
After compiling the relevant Rust backend in the previous section, invoke Flutter:
flutter runnote: Flutter might ask you which target you'd like to run.
Running 10101 for web target is currently unsupported.
To run on regtest you have to change the default network (testnet) to regtest by setting the NETWORK environment variable.
Example command for maker:
make maker
(make runs prepend NETWORK=regtest automatically)
Example command for taker:
NETWORK=regtest flutter run
Note that the iOS simulator will not pick up the environment variable, so make sure you run on a native target when testing with regtest!
For regtest you need to run a local electrs server on localhost:50000.
We make use of nigiri for this.
Run
nigiri startTo get some money run
nigiri faucet <address>To generate a block, simply call the faucet again.
DATA_DIR=$(pwd)
docker run -v$DATA_DIR:/data -p8000 -p9045 ghcr.io/bonomat/10101:main