The colonyNetwork repository is developed as free software; if you are interested in contributing, or want to report an issue or bug, please see the GitHub repository.
The Colony Network is a large set of contracts that together define how all colonies operate and interact with people and other smart contracts on the Ethereum blockchain.
Colony is designed to be modular, upgradable, and eternally backwards-compatible. This is achieved through a sophisticated contract architecture that requires a bit of exposition. It is recommended that any developer seeking to understand the Colony Network solidity implementation first read the Colony Whitepaper, or at the very least, the whitepaper Whitepaper TL;DR.
Overview of Contracts
Broadly speaking, the Colony Network contracts can be divided into a few categories:
Core contracts that facilitate upgrades, versioning, and emergency functions
Interface contracts that collate and register public functions on the network.
Authority contracts that define who can call which registered functions.
Colony contracts that define the state of an individual colony, such as funding pots, tasks, domains, and skills.
Network contracts that define a global state shared by all colonies, such as reputation, token auctions and ENS.
Reputation Mining contracts that define a consensus protocol for validators of the global reputation state.
Token contracts that define the CLNY token.
The Colony Network contracts are separated out into functional layers, and named according to their context.
Starting from the lowest level, all data types are declared in a DataTypes contract.
All storage variables are declared and stored in a storage contract, which inherits a DataTypes contract.
The actual logic of functions is implemented in separate contracts, which inherit a storage contract. All functions which are implemented in this layer must only modify storage varibles declared in the appropriate storage contract.
Finally, all public functions are composed from all logic contracts into a single interface contract, which is used to register functions with EtherRouter (see the next section).