GithubHelp home page GithubHelp logo

vovo999 / citycoin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from citycoins/contracts

0.0 0.0 0.0 455 KB

A smart contract implementation of the Proof of Transfer consensus mechanism, allowing for the mining and Stacking of a new fungible token on the Stacks blockchain with a portion of miner rewards going to a custodied account for a city to #pickupthebag.

Home Page: https://citycoins.co

License: GNU General Public License v3.0

Shell 4.08% TypeScript 95.92%

citycoin's Introduction

CityCoins on Stacks

Abstract

Support a city by mining, buying, or holding their CityCoin, all while generating yield in STX and BTC.

Coming very soon!

Contributing

For more information on the project, its goals, and technical details, please review the Product Requirements Document.

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

All code submitted should be thoroughly commented and tested where applicable. Configurable options for the smart contract or the web UI should be listed as constants.

Testing

Contracts are tested via clarinet and javascript.

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

The following commands are used to run the tests:

  • npm run clarinet:prepare
  • npm run clarinet:test, npm test, npm run test
  • npm run clarinet:check
  • npm run clarinet:console

A bash script is provided to prepare the tests as part of clarinet:prepare, and executes the following steps:

  1. copies all contract files from ./contracts to ./contracts/clarinet
  2. modifies address used in impl-trait by replacing it with a different address. e.g. (impl-trait 'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-10-ft-standard.ft-trait) is converted to: (impl-trait 'ST1HTBVD3JG9C05J7HBJTHGR0GGW7KXW28M5JS8QE.sip-10-ft-standard.ft-trait)
  3. appends at the end of file content of test add-on file with the same name, stored in ./contracts/test_addons

Note: clarinet:test, clarinet:check, and clarinet:console automatically execute clarinet:prepare.

Definitions and 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 is modified to implement the citycoins.
  • 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

citycoin's People

Contributors

hstove avatar jcnelson avatar lnow avatar whoabuddy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.