2.3.2 • Published 1 year ago

@promos/contracts v2.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

NPM Package

Installation

$ npm i @promos/contracts

Usage

Once installed, import and inherit the Promos contract

Please, pay particular attention to comments for mintPromos function below

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 {}
}
2.3.2

1 year ago

2.3.1

1 year ago

2.3.0

1 year ago

2.2.1

1 year ago

2.2.0

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago