# contract-template

> This template provides a template for contract development and operation, including tools and conventions. These are recommended and not mendatory. If you have a suggestion, please make a PR to the template.

Latest version **0.0.7** (published 2023-04-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install contract-template
pnpm add contract-template
yarn add contract-template
bun add contract-template
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2023-04-12 |
| First published | 2023-04-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Klaytn Team |
| Maintainers | ian0371 |
| Keywords | klaytn, smart-contracts |

## Links

- npm: https://www.npmjs.com/package/contract-template
- Repository: https://github.com/ian0371/contract-template
- Issues: https://github.com/ian0371/contract-template/issues
- npm.io page: https://npm.io/package/contract-template

## Dependencies (2)

- [dotenv](https://npm.io/package/dotenv.md) ^16.0.3
- [@nomicfoundation/hardhat-toolbox](https://npm.io/package/@nomicfoundation/hardhat-toolbox.md) ^2.0.2

## Recent versions

- 0.0.7 (latest) — 2023-04-12

## README

# Contract-template

This template provides a template for contract development and operation, including tools and conventions.
These are recommended and not mandatory.
If you have a suggestion, please make a PR to the template.

## Overview

### Directory Structure

The directory structure of this template is as follows:

- `contracts/`: solidity contracts
- `deploy/`: deployment scripts
- `lib/`: library functions to be published to NPM
- `script/`: scripts to interact with contracts
- `test/`: unit tests

## Must-do After Repo Creation

There are a few things that must be done after a new repo has been created using this template.

- Update `package.json` by running `npm init`
- Things to remove
  - `deployments/` directory
- Replace `README.md` with `README-TEMPLATE.md` and fill in information
  - Fill in each section or add/remove sections as you want
  - Replace "@klaytn/contract-template" with appropriate NPM package name
- Fill in `docs/*.md` for developer guide

## Configuration

This template ships default configurations. However, if you need to change it, here's are some options:

Here are the list of configurable files:

- `package.json`: package info. Need to be updated with `npm init` (see [this section](#must-do-after-repo-creation))
- `hardhat.config.ts` (please sync `foundry.toml` as well)
  - `defaultKey`: default key to be used if `env.PRIVATE_KEY` is empty. Default is the [well known key](https://hardhat.org/hardhat-network/docs/reference#accounts)
  - `network`: list of networks. Can be selected with `npx hardhat --network` flag. These can contain tags depending on the deployment purpose, such as `baobab-qa`
  - `namedAccounts`: accounts for `getNamedAccounts()` (see [deploy/deploy_lock.ts](deploy/deploy_lock.ts))
  - `etherscan`: required for etherscan-verify
  - `dodoc`: required for dodoc
  - `paths`: required for hardhat-deploy
  - `external`: required for hardhat-deploy
- `foundry.toml` (please sync `foundry.toml` as well)
  - `profile`: list of profiles. Can be selected with `HARDHAT_PROFILE` environment variable.
  - `rpc_endpoints`: alias for `cast`

---
_Source: https://npm.io/package/contract-template · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
