Giter Site home page Giter Site logo

aneiosi / template-evm-contracts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wighawag/template-ethereum-contracts

0.0 0.0 0.0 610 KB

Template to develop ethereum smart contracts

License: MIT License

JavaScript 1.40% TypeScript 62.18% Solidity 36.42%

template-evm-contracts's Introduction

Boilerplate for ethereum solidity smart contract development

SCRIPTS

Some of the following pnpm scripts rely on utils/doAction.ts to allow parameterizing via command line argument (have a look inside if you need modifications).

pnpm prepare

As a standard lifecycle pnpm script, it is executed automatically upon install. It generates config files and typechain declarations to get you started with typesafe contract interactions.

pnpm format and pnpm format:fix

These will format check your code. the :fix version will modifiy the files to match the requirement specified in .prettierrc.json.

pnpm compile

This will compile your contracts.

pnpm void:deploy

This will deploy your contracts on the in-memory hardhat network and exit, leaving no trace. Quick way to ensure deployments work as intended without consequences.

pnpm test [mocha args...]

This will execute your tests using mocha. you can pass extra arguments to mocha.

pnpm coverage

This will produce a test coverage report in the coverage/ folder.

pnpm gas

This will produce a gas report for functions used in tests.

pnpm dev

These will run a local hardhat network on localhost:8545 and deploy your contracts on it. Plus it will watch for any changes and redeploy them.

pnpm local:dev

This assumes a local node it running on localhost:8545. It will deploy your contracts on it. Plus it will watch for any changes and redeploy them.

pnpm execute <network> <file.ts> [args...]

This will execute the script <file.ts> against the specified network.

pnpm deploy <network> [args...]

This will run the deploy scripts on the specified network.

Behind the scene it uses hardhat deploy command so you can append any argument for it.

pnpm export <network> <file.json>

This will export the abi+address of deployed contract to <file.json>

pnpm fork:execute <network> [--blockNumber <blockNumber>] [--deploy] <file.ts> [args...]

This will execute the script <file.ts> against a temporary fork of the specified network.

if --deploy is used, deploy scripts will be executed.

pnpm fork:deploy <network> [--blockNumber <blockNumber>] [args...]

This will deploy the contract against a temporary fork of the specified network.

Behind the scene it uses hardhat deploy command so you can append any argument for it.

pnpm fork:test <network> [--blockNumber <blockNumber>] [mocha args...]

This will test the contract against a temporary fork of the specified network.

pnpm fork:dev <network> [--blockNumber <blockNumber>] [args...]

This will deploy the contract against a fork of the specified network and it will keep running as a node.

Behind the scene it uses hardhat node command so you can append any argument for it.

template-evm-contracts's People

Contributors

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