status-go is an underlying part of Status. It heavily depends on go-ethereum which is forked and slightly modified by us.
- Nix (Installed automatically)
- Docker (only if cross-compiling).
go is provided by Nix
git clone https://github.com/status-im/status-go
cd status-go
status-go uses nix in the Makefile to provide every tools required.
To get started, let’s build the Ethereum node Command Line Interface tool, called statusd
.
make status-backend
Once that is completed, you can start it straight away by running
./build/bin/status-backend --address=localhost:12345
This will provide full API at http://localhost:12345.
Checkout status-backend docs
for more details.
make install-gomobile
make statusgo-cross # statusgo-android or statusgo-ios to build for specific platform
If you’re using Visual Studio Code, you can rename the .vscode/launch.example.json file to .vscode/launch.json so that you can run the statusd server with the debugger attached.
In order to see the log files while debugging on an Android device, do the following:
- Ensure that the app can write to disk by granting it file permissions. For that, you can for instance set your avatar from a file on disk.
- Connect a USB cable to your phone and make sure you can use adb. Run
adb shell tail -f sdcard/Android/data/im.status.ethereum.debug/files/Download/geth.log
make lint
Next, run unit tests:
make test
Unit tests can also be run using go test
command. If you want to launch specific test, for instance RPCSendTransactions
, use the following command:
go test -tags gowaku_skip_migrations -v ./api/ -testify.m ^RPCSendTransaction$
Note -testify.m as testify/suite is used to group individual tests.
To run a single test in a test suite (e.g. TestTransferringKeystoreFiles
, which is part of SyncDeviceSuite
):
go test -tags gowaku_skip_migrations -v ./server/pairing -test.run TestSyncDeviceSuite -testify.m ^TestTransferringKeystoreFiles$
Note: TestSyncDeviceSuite
is not the name of the test suite, but the name of the test function that runs the SyncDeviceSuite
suite.