# token_with_distribution

> token distribution smart contracts

Latest version **1.2.4** (published 2023-09-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install token_with_distribution
pnpm add token_with_distribution
yarn add token_with_distribution
bun add token_with_distribution
```

## 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.2.4 |
| Published | 2023-09-30 |
| First published | 2023-08-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 37.7 KB |
| Known vulnerabilities | 0 (+8 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | mikakzm |
| Maintainers | mahdiidarabi |

## Links

- npm: https://www.npmjs.com/package/token_with_distribution
- Repository: https://github.com/mikakzm/token-distribution-contracts
- Homepage: https://github.com/mikakzm/token-distribution-contracts#readme
- Issues: https://github.com/mikakzm/token-distribution-contracts/issues
- npm.io page: https://npm.io/package/token_with_distribution

## Dependencies (10)

- [yarn](https://npm.io/package/yarn.md) ^1.22.18
- [config](https://npm.io/package/config.md) ^3.3.6
- [mermaid](https://npm.io/package/mermaid.md) ^8.10.1
- [@chainlink/contracts](https://npm.io/package/@chainlink/contracts.md) ^0.2.1
- [@remix-project/remixd](https://npm.io/package/@remix-project/remixd.md) ^0.5.2
- [@uniswap/v2-periphery](https://npm.io/package/@uniswap/v2-periphery.md) ^1.1.0-beta.0
- [@openzeppelin/contracts](https://npm.io/package/@openzeppelin/contracts.md) ^4.3.3
- [@openzeppelin/test-helpers](https://npm.io/package/@openzeppelin/test-helpers.md) ^0.5.10
- [@openzeppelin/hardhat-upgrades](https://npm.io/package/@openzeppelin/hardhat-upgrades.md) ^1.12.0
- [@openzeppelin/contracts-upgradeable](https://npm.io/package/@openzeppelin/contracts-upgradeable.md) ^4.3.3

## Recent versions

- 1.2.4 (latest) — 2023-09-30
- 1.2.3 — 2023-08-26
- 1.2.2 — 2023-08-26
- 1.2.1 — 2023-08-25
- 1.2.0 — 2023-08-22

## README

#Token Smart Contracts

The flow charts provided below are generated with mermaid.js package and can be used to understand the flows of the contracts:

#### Operator Flows
.![Operator States](./graphs/OperatorFlow.jpeg)

#### Master Minter Flows
.![User States](./graphs/MasterMinterFlow.jpeg)

#### Minter Flows
.![User States](./graphs/MinterFlow.jpeg)


#### How to run

-   Deploy to testnet (goerli in the below example)

```
yarn
PROJECT_ID="infura id" PRIVATE_KEY"priavete key to deploy the contracts from" yarn deploy:goerli
```

-   Deploy to local (requires ganache to run on local)


You can find more information in the `scripts-info` section in the `package.json` file.


#### How to deploy

-   Deploy to bsc_testnet

```
yarn clean

yarn prepare

NODE_ENV=default PRIVATE_KEY=<your-private-key> yarn deploy:bsc_testnet
```

-   Deploy to bsc mainnet


```
NODE_ENV=production PRIVATE_KEY=<your-private-key> yarn deploy:bsc
```

-   Deploy to Polygon (Matic) mainnet


```
NODE_ENV=polygon_production PRIVATE_KEY=<your-private-key> yarn deploy:matic
```


#### How to verify a contract

- Verify on bsc_testnet

You will first need an API key from your account on https://bscscan.com/login

then run 

```
ETHERSCAN_KEY=<your-api-key> npx hardhat verify --network bsc_testnet <contract-address> "constructor's-first-arg" "constructor's-second-arg" "constructor's-third-arg" "constructor's-forth-arg"
```

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