Decidim Decode connector is a tool that makes it easy for decidim application to comunicate with the decode eco-system, in particular, with the ledger.
So basically, decode-connector abstracts the ledger and the contracts from the application
- Install docker
- Install docker-compose
Have a local copy of the Chainspace repository in the xplore
branch. For example:
git clone \
--single-branch --branch xplore \
https://github.com/DECODEproject/chainspace.git
Create and run a Docker Chainspace image:
cd CHAINSPACE_REPO_PATH
docker build -t chainspace .
docker run -ti --rm --name chainspace -p 5000:5000 chainspace
You can use Ctrl+C
to stop the local Chainspace when you are done running petition commands.
Build the docker images with the following command:
make build
All petition commands create a TOR container. If you want to stop it AFTER executing a command, you can run:
make stop
If no parameters are specified when running petition commands, by default it will use the settings for the local environment.
- Generate a key pair in
keys/key.json
with the following command:
make keygen
- Create petition in local Chainspace
make create
- Count current number of signatures in local Chainspace
make count
- Close petition in local Chainspace
make close
In order to run the petition commands in the boxes, make sure to provide the tor=true
parameter and the actual URLs.
- Generate a key pair in
keys/key.json
with the following command:
make keygen
- Create petition in boxes
make create \
tor=true \
CHAINSPACE_API_URL=<chainspace_api_url>
- Count current number of signatures in boxes
make count \
tor=true \
CHAINSPACE_API_URL=<chainspace_api_url>
- Close petition in boxes
make close \
tor=true \
CHAINSPACE_API_URL=<chainspace_api_url> \
DECIDIM_MOCK_URL=<decidim_mock_url>
Run linter:
make lint
Run tests:
make test
Watch files and run tests on change:
make test/watch