district0x / district-registry

A community-curated registry of marketplaces on the district0x Network.
Eclipse Public License 1.0
11 stars 9 forks source link

District Registry

CircleCI

A community-curated registry of marketplaces on the district0x Network.

Development

Compile contracts (assumes you have truffle installed):

truffle migrate --f 2 --to 2;

Start server:

ganache-cli -p 8549
lein repl
(start-server!)
node dev-server/district-registry.js
# Redeploy all smart contracts
(district-registry.server.dev/redeploy)

Start UI:

lein repl
(start-ui!)
# go to http://localhost:4177/

Start tests:

ganache-cli -p 8549
lein test-dev

Smart Contract Architecture

Contract architecture mostly follows that of Meme Factory as District Registry was initially forked from Meme Factory. The primary differences are related to minimizing contract sizes. Meme Factory uses a RegistryEntryLib library to provide most of the functionality for registry entries. However, District Registry entries may need to accommodate multiple challenges and District (the primary registry entry) has substantial additional functionality, so District Registry takes a different approach. The primary differences are as follows:

Using Makefile

The Docker-compose file and Makefile provide convenient way to automate routine procedures. Try running make to see the list of available commands. For example to build docker images for one the given environments, simply run:

make build-images  BUILD_ENV={prod|qa|dev}

Those images will get tags similar to registry-ui:${COMMIT_ID}-${BUILD_ENV}.

It is also possible to build and start a dev image that contains all the necessary tools to build, test and run distirct-registry:

make init            # --> create docker volumes, networks and build containers
make build-dev-image # ---> to build base dev image with all the tools included
make exec            #---> start dev container and enter interactive shell

Github Actions CI

The CI checks for this repository include: