Code Monkey home page Code Monkey logo

prb-contracts's Introduction

Contracts Coverage Status Styled with Prettier Commitizen Friendly license: Unlicense

Off-the-shelf Solidity smart contracts. Built with my beloved Solidity template.

  • Designed for Solidity >=0.8.4
  • Complementary to OpenZeppelin Contracts
  • Promotes PRBMath as a fixed-point math library for Solidity
  • Well-documented via NatSpec comments
  • Thoroughly tested with Hardhat and Waffle

I created this library for my own use, to avoid having to maintain the same contracts in different repositories. If you find it useful too, that's a win-win.

Caveat Emptor

This is experimental software and is provided on an "as is" and "as available" basis. I do not give any warranties and will not be liable for any loss, direct or indirect through continued use of this codebase.

Install

With yarn:

$ yarn add @prb/contracts

Or npm:

$ npm install @prb/contracts

Usage

Once installed, you can use the contracts like this:

// SPDX-License-Identifier: Unlicense
pragma solidity >=0.8.4;

import "@prb/contracts/token/erc20/ERC20.sol";
import "@prb/contracts/token/erc20/ERC20Permit.sol";

contract MyToken is ERC20, ERC20Permit {
  constructor(
    string memory name_,
    string memory symbol_,
    uint8 decimals_
  ) ERC20Permit(name_, symbol_, decimals_) {}
}

Contributing

Feel free to dive in! Open an issue, start a discussion or submit a PR.

Pre Requisites

You will need the following software on your machine:

In addition, familiarity with Solidity, TypeScript and Hardhat is requisite.

Set Up

Install the dependencies:

$ yarn install

Then, follow the .env.example file to add the requisite environment variables in the .env file. Now you can start making changes.

Security

While I set a high bar for code quality and test coverage, you shouldn't assume that this project is completely safe to use. The contracts have not been audited by a security researcher.

Caveat Emptor

This is experimental software and is provided on an "as is" and "as available" basis. I do not give any warranties and will not be liable for any loss, direct or indirect through continued use of this codebase.

Contact

If you discover any security issues, please report them via Keybase.

Related Efforts

License

Unlicense © Paul Razvan Berg

prb-contracts's People

Contributors

paulrberg avatar clemlak avatar surbhiaudichya avatar transmissions11 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.