# connector-frontend-cryptopayments-v1.07

> Solidity Hardhat TypeScript Boilerplate

Latest version **1.0.0** (published 2023-09-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install connector-frontend-cryptopayments-v1.07
pnpm add connector-frontend-cryptopayments-v1.07
yarn add connector-frontend-cryptopayments-v1.07
bun add connector-frontend-cryptopayments-v1.07
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-09-22 |
| First published | 2023-09-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 2 |
| Unpacked size | 1.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | hardcoregor |

## Links

- npm: https://www.npmjs.com/package/connector-frontend-cryptopayments-v1.07
- npm.io page: https://npm.io/package/connector-frontend-cryptopayments-v1.07

## Dependencies (2)

- [@ethersproject/abi](https://npm.io/package/@ethersproject/abi.md) ^5.7.0
- [@ethersproject/providers](https://npm.io/package/@ethersproject/providers.md) ^5.7.2

## Recent versions

- 1.0.0 (latest) — 2023-09-22

## README

# Prerequisites

- Docker

```shell
pnpm install
alias escrow="pnpm run -C services/escrow"
escrow build # install solc and other tools in the docker image
```

Don't forget to copy the .env.example file to a file named .env, and then edit it to fill in the details.

# Running all the tests

```shell
escrow test
escrow test:trace       # shows logs + calls
escrow test:fresh       # force compile and then run tests
escrow test:coverage    # run tests with coverage reports
```

# Formatters & Linters

You can use the below packages,

- Solhint
- ESLint
- Prettier
- CSpell
- ShellCheck

```shell
escrow format
escrow lint
```

# Analyzers

You can use the below tools,

- Slither
- Mythril

```shell
escrow analyze:static path/to/contract
escrow analyze:security path/to/contract
escrow analyze:all path/to/contract
```

# Deploy Contract & Verification

To try out Etherscan verification, you first need to deploy a contract to an Ethereum network that's supported by Etherscan, such as Goerli.

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
- Goerli node URL (eg from Alchemy or Infura)
- The private key of the account which will send the deployment transaction.

With a valid .env file in place, first deploy your contract:

```shell
escrow compile
# related to scripts/deploy/<CONTRACT_FILE_NAME>.ts
escrow deploy goerli Escrow    

# related to scripts/deploy.ts
escrow deploy:all goerli
```

Also, you can add contract(s) manually to your tenderly projects from the output.
`https://dashboard.tenderly.co/contract/<NETWORK_NAME>/<CONTRACT_ADDRESS>`

And then verify it:

```shell
escrow verify <DEPLOYED_CONTRACT_ADDRESS> "<CONSTRUCTOR_ARGUMENT(S)>"    # hardhat.config.ts to see all networks
```

# Finder

```shell
escrow finder --path contracts/Workshop.sol --name Workshop abi --colorify --compact --prettify    # find contract outputs of specific contract
```

```shell
escrow finder --help    # see all supported outputs (abi, metadata, bytecode and more than 20+ outputs)
```

# Miscellaneous

```shell
escrow generate:docs    # generate docs according to the contracts/ folder
```

```shell
escrow generate:flatten ./path/to/contract     # generate the flatten file (path must be "./" prefixed)
escrow generate:abi ./path/to/contract         # generate the ABI file (path must be "./" prefixed)
escrow generate:bin ./path/to/contract         # generate the binary in a hex (path must be "./" prefixed)
escrow generate:metadata ./path/to/contract    # generate the metadata (path must be "./" prefixed)
escrow generate:all-abi
escrow generate:all-bin
escrow generate:all-metadata
```

```shell
escrow share    # share project folder with remix ide
```

- Smart contracts hardhat commands
```shell
1. yarn deploy-payment --network "<NETWORK_NAME>" #deploy Payment contract
2. yarn deploy-simple-escrow --network "<NETWORK_NAME>" #deploy Escrow contract
3.(OPTIONAL) yarn deploy-token --network "<NETWORK_NAME>" #deploy ERC20 FakeUSDT token for testing escrow
```

# TODO

- Increase diversity in the Workshop Contract
- Add Workshop Contract tests
- Add TSLint as a TypeScript linter

---
_Source: https://npm.io/package/connector-frontend-cryptopayments-v1.07 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
