Skip to content
A community-curated registry of marketplaces on the district0x Network.
Branch: master
Clone or download
Latest commit 3a80a35 Feb 4, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dev first commit Jun 18, 2018
resources
src/district_registry Reduce contract sizes Jan 24, 2019
test/district_registry/tests
.gitattributes Add .gitattributes make GitHub recognize *.sol files as Solidity for … Jun 19, 2018
.gitignore
.hgignore
.travis.yml first commit Jun 18, 2018
LICENSE first commit Jun 18, 2018
README.md
package-lock.json
project.clj Implement UI logic Oct 24, 2018

README.md

District Registry

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

Development

Compile contracts (assumes you have solc installed):

lein solc

Auto compile contracts on changes:

lein solc auto

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:

  • Instead of integrating challenges into registry entries, Challenge and ChallengeFactory are separate contracts which are used inside of RegistryEntry.
  • Functionality to stake district is split into separate StakeBank and StakeBankFactory contracts which are used inside of District.
  • Functionality for bonding curve math (power functions) is split into separate Power and PowerFactory contracts that are used in StakeBank.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.