The Electrum ABC source repository has been merged into the Bitcoin ABC repository, and the development is now taking place at reviews.bitcoinabc.org.
Please read the main CONTRIBUTING.md document to familiarize yourself with the development philosophy and find out how to set up the Bitcoin ABC repository.
The original Electrum ABC github repository is maintained as a mirror of the electrum/
directory in the main repository.
The rest of this document provides instructions that are specific to Electrum ABC.
Join the Electrum ABC telegram group to get in contact with developers or to get help from the community.
All commands in this document assume that your current working directory is the
electrum/
directory that resides at the root of the Bitcoin ABC repository.
Python 3.9 or above is required to run Electrum ABC.
If your system lacks Python 3.7+, you can use pyenv
to install newer versions, or
install an alternative python distribution
in addition to your system’s version.
The simplest way to install all needed packages is to run the following command:
pip install .[all]
This will install Electrum ABC and all its dependencies as a python package and application.
This is equivalent to:
pip install .
pip install .[gui]
pip install .[hardware]
If you do not want to install Electrum ABC as a package, you can install only the dependencies using the following commands:
pip3 install -r contrib/requirements/requirements.txt
pip3 install -r contrib/requirements/requirements-binaries.txt
pip3 install -r contrib/requirements/requirements-hw.txt
If you installed the application as a python package, you can run it from anywhere
using electrum-abc
(assuming that your system has the python script directory in
its PATH).
If you installed all dependencies, you can also start the application by invoking
the ./electrum-abc
script. See the following sections for additional instructions
and optional dependencies.
If your Linux distribution has a version of python 3 lower than the minimum required version, it is recommended to do a user dir install with pyenv. This allows Electrum ABC to run completely independently of your system configuration.
pyenv
in your user
account. Follow the printed instructions about updating your environment
variables and .bashrc
, and restart your shell to ensure that they are
loaded.pyenv install 3.9.7
. This will download and compile that version of
python, storing it under .pyenv
in your home directory.cd
into the Electrum ABC directory. Run pyenv local 3.9.7
which inserts
a file .python-version
into the current directory.You need to install either MacPorts or HomeBrew. Follow the instructions on either site for installing (Xcode from Apple’s developer site is required for either).
git clone https://github.com/Bitcoin-ABC/ElectrumABC && cd ElectrumABC
brew install python3
python3 -m pip install --user pyqt5
Running unit tests:
python3 test_runner.py
This can also be run as a ninja
target in the context of a Bitcoin ABC build:
ninja check-electrum
Functional tests can be run with the following command:
pytest electrumabc/tests/regtest
This requires docker
and additional python dependencies:
pip3 install -r contrib/requirements/requirements-regtest.txt
Compiling libsecp256k1 is highly-recommended when running from source, to use fast cryptographic algorithms instead of using fallback pure-python algos.
It is required when using CashFusion, as slow participants can cause a fusion round to fail.
On Debian or Ubuntu linux:
sudo apt-get install libtool automake
./contrib/make_secp
On MacOS:
brew install coreutils automake
./contrib/make_secp
or if using MacPorts: sudo port install coreutils automake
If you change or add any icons to the icons
subdirectory, you need to run the following
script before you can use them in the application:
contrib/gen_icons.sh
This requires the pyrcc5
command which can be installed using your package manager.
For instance for Ubuntu or Debian, run:
sudo apt-get install pyqt5-dev-tools
sudo apt-get install python-requests gettext
./contrib/make_locale
For plugin development, see the plugin documentation.
See the Building the release files section in contrib/release.md
Electrum or Electron Cash features, refactoring commits or bug fixes can be backported into Electrum ABC.
To do this, first add the remote repositories:
git remote add electrum https://github.com/spesmilo/electrum.git
git remote add electroncash https://github.com/Electron-Cash/Electron-Cash.git
Then fetch the remote git history:
git fetch electrum
git fetch electroncash
This step must be repeated every time you want to backport a commit that is more recent than the last time you fetched the history.
Then you can cherry-pick the relevant commits:
git cherry-pick -Xsubtree=electrum <commit hash>