Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@0xflair/evm-contract-scaffold

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xflair/evm-contract-scaffold

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

  • 1.0.0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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.

FAQs

Package last updated on 29 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc