Skip to content

knobs-dev/contracts

Repository files navigation

NPM Build License


Stars Twitter


Logo

KNOBS/contracts

A set of useful contract for building the Web3

About The Project 🎙️

Contains a set of useful contracts for building web3 applications.

(back to top)

Built With

Hardhat + Solidity + Typescript + Solidity Coverage

(back to top)

Getting Started

Prerequisites

Install the npm package or copy our contract interface

  • npm
    npm install @knobs/contracts@latest

Installation

Import the contract or the interface you need

import "@knobs/contracts/[contract_name]/[contract_name].sol";

(back to top)

Roadmap 🛣️

  • Release Merkleproof Indexed library
  • Release ShuffledIds library

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing 🧑‍🔧

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License ©️

Distributed under the MIT License. See the LICENSE file for more information.

(back to top)

Contact 📬

Your Name - @KnobsBlockchain - info@knobs.it

Project Link: https://github.com/knobs-dev/contracts

(back to top)

Acknowledgments

(back to top)

For developers 👨‍💻

Run locally

Try running some of the following tasks:

npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
npx hardhat help
REPORT_GAS=true npx hardhat test
npx hardhat coverage
npx hardhat run scripts/deploy.ts
TS_NODE_FILES=true npx ts-node scripts/deploy.ts
npx eslint '**/*.{js,ts}'
npx eslint '**/*.{js,ts}' --fix
npx prettier '**/*.{json,sol,md}' --check
npx prettier '**/*.{json,sol,md}' --write
npx solhint 'contracts/**/*.sol'
npx solhint 'contracts/**/*.sol' --fix

Etherscan verification

To try out Etherscan verification, you first need to deploy a contract to an Ethereum network that's supported by Etherscan, such as Ropsten.

In this project, copy the .env.example file to a file named .env, and then edit it to fill in the details. Enter your Etherscan API key, your Ropsten node URL (eg from Alchemy), and the private key of the account which will send the deployment transaction. With a valid .env file in place, first deploy your contract:

hardhat run --network ropsten scripts/sample-script.ts

Then, copy the deployment address and paste it in to replace DEPLOYED_CONTRACT_ADDRESS in this command:

npx hardhat verify --network ropsten DEPLOYED_CONTRACT_ADDRESS "Hello, Hardhat!"

Performance optimizations

For faster runs of your tests and scripts, consider skipping ts-node's type checking by setting the environment variable TS_NODE_TRANSPILE_ONLY to 1 in hardhat's environment. For more details see the documentation.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published