Git Product home page Git Product logo

contracts's Introduction

Icons made by Eucalyp from www.flaticon.com

HQ20 contracts

HQ20/contracts is a Solidity project with contracts, libraries and examples to help you build fully-featured distributed applications for the real world.

Installation

Use the package manager yarn to install dependencies.

$ yarn add @hq20/contracts

Usage

pragma solidity ^0.6.0;
import "@hq20/contracts/contracts/access/Roles.sol"


contract MyContract is Roles {
	constructor() public Roles(msg.sender) {
		// do something
	}
}

Directories

Contracts go in contracts, test files go in test.

Inside the contracts folder the files are organized by topic and by type.

At the root of contracts are directories for each one of the topics, containing the simplest implementations that are in a mature state.

For contracts that are used as example implementations there is a contracts/examples directory with the appropriate topic folders inside.

For contracts that are under development there is a contracts/drafts directory with the appropriate topic folders inside.

For contracts that are used for testing of libraries or internal methods there is a contracts/test directory with the appropriate topic folders inside.

The test directory replicates the structure of the contracts directory.

At the time of this writing (Feb 2020), this is the directory structure:

contracts ──┬─── access
            │
            ├─── classifieds
            │
            ├─── drafts ───────┬─── classifieds
            │                  ├─── issuance
            |                  ├─── lists ──────────── mocks
            |                  ├─── strings
            |                  ├─── token
            |                  └─── voting
            │
            ├─── examples ─────┬─── access
            │                  ├─── dao
            │                  ├─── energy
            │                  └─── introspection
            │
            ├─── exchange
            ├─── issuance
            ├─── lists 
            ├─── state
            ├─── test
            ├─── token
            └─── utils

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

As well as bug fixes, we will welcome updates to the basic contracts that make them even easier to understand, examples of contracts implementing a particular feature, or advanced contracts that put together a number of features into a complete use case.

Please make sure to update tests as appropriate.

License

Apache-2.0

contracts's People

Contributors

alcueca avatar dependabot-preview[bot] avatar obernardovieira avatar uivlis avatar

Watchers

 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.