/contracts

CityCoins give communities the power to improve and program their cities.

Primary LanguageClarityGNU General Public License v3.0GPL-3.0

CityCoins

Contract Tests codecov.io Discord Chat

Introduction

CityCoins give communities the power to improve and program their cities.

Contributing

PRs are welcome! Please see the open issues and comment if interested, or submit a PR for review.

Note: All PRs should be opened against the develop branch!

All code submitted should be thoroughly commented and tested where applicable.

Testing

Contracts are tested via clarinet using a custom typescript implementation.

To test the contract using clarinet, first install the tool to make it available on your system.

After installation, the standard clarinet commands can be used against the root directory, e.g. clarinet console.

Several commands are also available to help with testing via npm:

  • to run all tests:
    • npm test
    • npm run test
  • to run individual tests for cities:
    • npm run test:mia
    • npm run test:nyc
  • to run individual tests by type:
    • npm run test:cities
    • npm run test:base
    • npm run test:misc
  • to run more specific tests:
    • npm run test:mia:auth
    • npm run test:nyc:core
    • npm run test:base:token
    • npm run test:misc:tardis
    • npm run test:misc:utils
    • npm run test:misc:vote
  • to run specific clarinet functions
    • npm run clarinet:check
    • npm run clarinet:codecov
    • npm run clarinet:costs
    • npm run console, npm run clarinet:console

Definitions, Resources, and Links

CityCoins v1.0.0 Audit

CoinFabrik completed an audit on v1.0.0 of the protocol on March 14, 2022.

The resulting audit report is available in this repo, as well as the CityCoins developer responses.

CityCoins Resources

Additional Resources

Some quick definitions and additional resources related to the technology behind the project.

  • Stacks Blockchain: Stacks makes Bitcoin programmable, enabling decentralized apps and smart contracts that inherit all of Bitcoin’s powers.
  • Proof of Transfer (PoX): The consensus mechanism for the Stacks blockchain, which the CityCoins protocol is based on.
  • Clarity Language: A smart contract language developed by Blockstack (now Hiro) and Algorand, designed to be more safe, secure, and predictable.
  • Smart Contract: A computer program or a transaction protocol which is intended to automatically execute, control or document legally relevant events and actions according to the terms of a contract or an agreement.
  • Fungible Token: Digital assets that can be sent, received, combined, and divided.

References