All Projects → HQ20 → Contracts

HQ20 / Contracts

Licence: apache-2.0
A set of reusable smart-contracts

Programming Languages

typescript
32286 projects
solidity
1140 projects

Projects that are alternatives of or similar to Contracts

bodhi-core
Smart Contracts for the Bodhi Prediction Market
Stars: ✭ 32 (-68.32%)
Mutual labels:  smart-contracts, truffle
0xdeca10b
Sharing Updatable Models (SUM) on Blockchain
Stars: ✭ 285 (+182.18%)
Mutual labels:  smart-contracts, truffle
idex-contracts-whistler
IDEX 2.0 smart contracts
Stars: ✭ 43 (-57.43%)
Mutual labels:  smart-contracts, truffle
mortgage-blockchain-demo
A demo DApp on Ethereum to process mortgage loans and payments
Stars: ✭ 42 (-58.42%)
Mutual labels:  smart-contracts, truffle
Eth.social
An Ethereum dApp for posting social events.
Stars: ✭ 17 (-83.17%)
Mutual labels:  smart-contracts, truffle
ethereum-contracts
Knowledge Ethereum Smart Contracts
Stars: ✭ 41 (-59.41%)
Mutual labels:  smart-contracts, truffle
Solidity Idiosyncrasies
Solidity gotchas, pitfalls, limitations, and idiosyncrasies.
Stars: ✭ 267 (+164.36%)
Mutual labels:  smart-contracts, truffle
contracts
Alice smart contracts
Stars: ✭ 57 (-43.56%)
Mutual labels:  smart-contracts, truffle
Eth Crypto
Cryptographic javascript-functions for ethereum and tutorials to use them with web3js and solidity
Stars: ✭ 420 (+315.84%)
Mutual labels:  smart-contracts, truffle
React Ethereum Dapp Example
A starter boilerplate for an Ethereum dapp using web3.js v1.0, truffle, react, and parity
Stars: ✭ 384 (+280.2%)
Mutual labels:  smart-contracts, truffle
erc1363-payable-token
Code implementation for the ERC-1363 Payable Token
Stars: ✭ 83 (-17.82%)
Mutual labels:  smart-contracts, truffle
Supply Chain
Supply chain management on blockchain using Angular 4 + Truffle + IPFS + Ethereum
Stars: ✭ 76 (-24.75%)
Mutual labels:  smart-contracts, truffle
etherbrite
🗓 Clone eventbrite on Ethereum, built in Solidity, TruffleJS, Web3js and React/Redux.
Stars: ✭ 19 (-81.19%)
Mutual labels:  smart-contracts, truffle
nifty-game
🃏🎮A NFT(ERC721) card game build on Ethereum, Truffle, Ganache and hosting on IPFS.
Stars: ✭ 222 (+119.8%)
Mutual labels:  smart-contracts, truffle
tvdapp
Blockchain DApp using React, Next.js and MobX
Stars: ✭ 66 (-34.65%)
Mutual labels:  smart-contracts, truffle
Truffle Flattener
Truffle Flattener concats solidity files from Truffle and Buidler projects with all of their dependencies
Stars: ✭ 254 (+151.49%)
Mutual labels:  smart-contracts, truffle
starter-kit-gsn
An OpenZeppelin starter kit focused on GSN.
Stars: ✭ 39 (-61.39%)
Mutual labels:  smart-contracts, truffle
web3j-example
Android web3j example
Stars: ✭ 27 (-73.27%)
Mutual labels:  smart-contracts, truffle
Love Ethereum
区块链学习
Stars: ✭ 323 (+219.8%)
Mutual labels:  smart-contracts, truffle
Solidity Smart Contracts
smart contracts which are built on ethereum wallet mist,truffle compiler using solidity language.
Stars: ✭ 11 (-89.11%)
Mutual labels:  smart-contracts, truffle
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.

Disclaimer: The contracts are expected to be used as smart contract patterns for you to draw inspiration from, and for them to be easy to understand they have been kept deliberately simple. If you decide to reuse the contracts, or to copy and paste code in them, make sure that you look for and close the vulnerabilities. If you plan to go to the mainnet, please get a third party audit done.

In a Nutshell

At the time of this writing (May 2020), this are the contents of this repository:

contracts ──┬─── access        - Access Control Contracts, some of them built on top of `AccessControl.sol`
            ├─── classifieds   - Example of a decentralized classifieds market for ERC721
            ├─── dao           - Example of building a decentralized venture capital fund
            ├─── energy        - Example of building a decentralized market for energy distribution
            ├─── exchange      - The Uniswap decentralized market contracts, with solidity tests
            ├─── introspection - Example of using ERC165 to verify contract types before casting
            ├─── issuance      - Example of an ICO, can be used as well for share issuances
            ├─── lists         - Reusable implementations of different types of linked lists
            ├─── math          - Reusable implementation of a lightweight fixed point math library
            ├─── state         - Reusable implementation of a fully-featured state machine
            ├─── token         - Token implementations, including a reusable dividend-bearing ERC20
            ├─── utils         - Reusable library to cast between `uint` and `int`.
            └─── voting        - Example implementations of token-based and address-based votings

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 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.

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].