# @promos/contracts

Latest version **2.3.2** (published 2022-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @promos/contracts
pnpm add @promos/contracts
yarn add @promos/contracts
bun add @promos/contracts
```

## 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 | 2.3.2 |
| Published | 2022-11-21 |
| First published | 2022-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 199.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | promos |
| Keywords | solidity, ethereum, smart, contracts, promos, gomint |

## Links

- npm: https://www.npmjs.com/package/@promos/contracts
- Repository: https://github.com/gomintnft/promos
- Homepage: https://promos.wtf
- Issues: https://github.com/gomintnft/promos/issues
- npm.io page: https://npm.io/package/@promos/contracts

## Dependencies (1)

- [@openzeppelin/contracts](https://npm.io/package/@openzeppelin/contracts.md) ^4.7.3

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.3.2 (latest) — 2022-11-21
- 2.3.1 — 2022-11-21
- 2.3.0 — 2022-11-21
- 2.2.1 — 2022-11-18
- 2.2.0 — 2022-11-18
- 2.1.0 — 2022-11-18
- 2.0.0 — 2022-11-17
- 1.0.8 — 2022-11-17
- 1.0.7 — 2022-11-17
- 1.0.6 — 2022-11-10
- 1.0.5 — 2022-11-10
- 1.0.4 — 2022-11-10
- 1.0.3 — 2022-11-08
- 1.0.2 — 2022-11-07
- 1.0.1 — 2022-11-07
- … 1 more at https://npm.io/package/@promos/contracts/versions

## README

<p align="center">
  <img src="https://github.com/gomintnft/promos/blob/main/logo.png?raw=true" width="150" alt="Promos">
</p>
<div align="center">

[![NPM Package](https://img.shields.io/npm/v/@promos/contracts.svg)](https://www.npmjs.org/package/@promos/contracts)

</div>

### Installation

```console
$ npm i @promos/contracts
```

### Usage

Once installed, import and inherit the `Promos` contract

**Please, pay particular attention to comments for `mintPromos` function below**

```solidity
pragma solidity ^0.8.0;

import "@promos/contracts/Promos.sol";
import "erc721a/contracts/ERC721A.sol";

contract ERC721 is ERC721A, Promos {
    constructor()
        // Specify Promos max supply and contract: promosProxyContractMainnet or promosProxyContractTestnet
        ERC721A("", "")
        Promos(500, promosProxyContractTestnet) {}

    // Promos mint function
    // IMPORTANT! Must use `MintPromos` modifier
    function mintPromos(address _to, uint256 _amount)
        external
        payable
        override
        MintPromos(_to, _amount)
    {
        // IMPORTANT!
        // Add custom logic here
        // Make sure to implement guardrails like supply, max per wallet, etc.

        // IMPORTANT!
        // Avoid using msg.sender and use _to argument instead
        _safeMint(_to, _amount);
    }

    // Required to support `IPromos.sol`
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721A, Promos)
        returns (bool)
    {
        return
            Promos.supportsInterface(interfaceId) ||
            super.supportsInterface(interfaceId);
    }

    // IMPORTANT! Implement this function in order
    // to receive funds from Promos to your contract
    receive() external payable override {}
}
```

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