Coder Social home page Coder Social logo

dr-data / evm-contract-scaffold Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 0xflair/evm-contract-scaffold

0.0 1.0 0.0 423 KB

A Typescript Hardhat-based template to develop evm-based smart contracts with all the tooling you need.

Home Page: https://flair.finance

License: MIT License

Shell 11.90% JavaScript 7.47% Solidity 7.88% TypeScript 72.75%

evm-contract-scaffold's Introduction

EVM-based Smart Contract Scaffold

A Typescript Hardhat-based template to develop evm-based smart contracts with all the tooling you need.

Features

  • Uses hardhat-deploy to keep track of deployments (upgradable or normal)
  • Uses typechain to auto-generate typescript bindings for compiled contracts, useful for auto-completion in your frontend dApps
  • Uses semantic-release and commitlint for a streamline CI
  • Uses Github Actions to publish versioned contracts to NPM, along with their Typescript bindings, ABIs (useful for interacting from your dApp) and bytecodes (useful when deploying contracts using ethers.js or web3).
  • Supports multiple chains
  • Gas cost reporter using CoinMarketCap APIs for your contract deployment and each interaction
  • Contract size calculator plugin for Hardhat
  • Automated Etherscan verification for deployed contracts

Getting Started

  1. Clone this repo (or click on "Use Template" button above in Github), then update the .github/CODEOWNERS:

    git clone https://github.com/0xflair/evm-contract-scaffold my-amazing-contracts
    vi my-amazing-contracts/.github/CODEOWNERS
  2. Create a .env file based on .env.example and update the values.

  3. Create your first contract in src/.

  4. Compile the contracts:

    npm run compile

Deploying

When you are ready, let's deploy the contract on the blockchain and have it verified in corresponding block scanner.

  1. Deploy the contracts:

    npm run deploy:rinkeby
  2. Verify the contracts on Etherscan:

    npm run verify:rinkeby

Releasing

If you want your contract to be released as an NPM package you can:

  1. Create a new Automation token in your NPM account.
  2. Add a new secret called NPM_TOKEN in your Github repository > Settings > Secrets > Actions.
  3. Commit anything on main branch then automatically you'll get a new release.

Ensure your main branch is either does not require status checking, or has "bypass" exception for semantic-release-bot so that it can push new tags and releases on the Github repo.

Testing

  1. Write your tests in test/ directory.

  2. Execute them:

    npm run test

License

This repository is under MIT license.

evm-contract-scaffold's People

Contributors

aramalipoor avatar semantic-release-bot 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.