All Projects → paulrberg → contracts

paulrberg / contracts

Licence: MIT license
Off-the-shelf Solidity smart contracts

Programming Languages

solidity
1140 projects
shell
77523 projects

Projects that are alternatives of or similar to contracts

gas-reporting
Reference documentation on every gas price API and all the different formats
Stars: ✭ 85 (-15%)
Mutual labels:  smart-contracts, erc20
Eden Smart Contracts
EDEN - EDN Smart Token & Smart Contracts
Stars: ✭ 109 (+9%)
Mutual labels:  smart-contracts, erc20
Uniswap V1
🐍Uniswap V1 smart contracts
Stars: ✭ 313 (+213%)
Mutual labels:  smart-contracts, erc20
dala-smart-contracts
Smart contracts for the Dala token sale and ERC20 token
Stars: ✭ 19 (-81%)
Mutual labels:  smart-contracts, erc20
Ico Contracts
Ethereum smart contracts that have been used during successful ICOs
Stars: ✭ 160 (+60%)
Mutual labels:  smart-contracts, erc20
hardhat-dependency-compiler
📦 Compile Solidity sources directly from NPM dependencies
Stars: ✭ 19 (-81%)
Mutual labels:  smart-contracts, hardhat
Uniflash
A simple and decentralized protocol for flash loan. https://t.me/Uniflash
Stars: ✭ 64 (-36%)
Mutual labels:  smart-contracts, erc20
ERC884-reference-implementation
An Interface and Reference Implementation of the ERC-884 DGCL Token.
Stars: ✭ 42 (-58%)
Mutual labels:  smart-contracts, erc20
Set Protocol Contracts
🎛 Set Protocol Smart Contracts
Stars: ✭ 151 (+51%)
Mutual labels:  smart-contracts, erc20
Alpha Wallet Android
An advanced Ethereum mobile wallet
Stars: ✭ 133 (+33%)
Mutual labels:  smart-contracts, erc20
hardhat-abi-exporter
🧰 Export Solidity contract ABIs on compilation ⚙️
Stars: ✭ 29 (-71%)
Mutual labels:  smart-contracts, hardhat
Awesome Blockchain Kor
<블록체인의 정석>, <하이퍼레저 블록체인 개발> 소스코드 및 참고자료 저장소
Stars: ✭ 243 (+143%)
Mutual labels:  smart-contracts, erc20
nftfy-v1-core
A decentralized protocol for NFT fractionalization
Stars: ✭ 62 (-38%)
Mutual labels:  smart-contracts, erc20
Uniswap V2 Periphery
🎚 Peripheral smart contracts for interacting with Uniswap V2
Stars: ✭ 267 (+167%)
Mutual labels:  smart-contracts, erc20
erc1363-payable-token
Code implementation for the ERC-1363 Payable Token
Stars: ✭ 83 (-17%)
Mutual labels:  smart-contracts, erc20
Uniswap V2 Core
🎛 Core smart contracts of Uniswap V2
Stars: ✭ 889 (+789%)
Mutual labels:  smart-contracts, erc20
hardhat-contract-sizer
Output Ethereum contract sizes with Hardhat 📐
Stars: ✭ 55 (-45%)
Mutual labels:  smart-contracts, hardhat
typescript-eth-starter
🔌 Ethereum Dapp Basic Typescript Starter
Stars: ✭ 125 (+25%)
Mutual labels:  smart-contracts, hardhat
Hashed Timelock Contract Ethereum
Hashed Timelock Contracts for ETH, ERC20 and ERC721 on Ethereum
Stars: ✭ 128 (+28%)
Mutual labels:  smart-contracts, erc20
Erc20 Generator
Create an ERC20 Token for FREE in less than a minute with the most used Smart Contract Generator for ERC20 Token. No login. No setup. No coding required.
Stars: ✭ 202 (+102%)
Mutual labels:  smart-contracts, erc20

PRBContracts GitHub Actions Foundry Styled with Prettier License: MIT

Off-the-shelf Solidity smart contracts.

  • Designed for Solidity >=0.8.4
  • Uses custom errors instead of revert reason strings
  • Complementary to OpenZeppelin Contracts
  • Well-documented via NatSpec comments
  • Thoroughly tested with Foundry

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.

Install

Foundry

First, run the install step:

forge install --no-commit paulrberg/prb-contracts

Then, add the following line to your remappings.txt file:

@prb/contracts/=lib/prb-contracts/src/

Hardhat

yarn add @prb/contracts

Usage

Once installed, you can use the contracts like this:

// SPDX-License-Identifier: MIT
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 is requisite.

Set Up

Clone this repository including submodules:

$ git clone --recurse-submodules -j8 [email protected]:paulrberg/prb-contracts.git

Then, inside the project's directory, run this to install the Node.js dependencies:

$ yarn install

Now you can start making changes.

Syntax Highlighting

You will need the following VSCode extensions:

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 contact me via Keybase.

Related Efforts

License

MIT © Paul Razvan Berg

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