1.3.0 • Published 3 years ago

@vittominacori/erc20-token v1.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

ERC20 Token

NPM Package CI Coverage Status MIT licensed

A simple Smart Contract for a Standard, Capped, Mintable, Burnable, Payable ERC20 Token.

Token has a Role Based Access Control so you can add the MINTER permission to users or Smart Contracts.

Token has a trasferEnabled property. Nobody can transfer tokens until the property will be enabled or you can define users as OPERATOR allowed to transfer also if not enabled.

Token has the ERC1363 behaviors. ERC1363 is an ERC20 compatible token that can make a callback on the receiver contract to notify token transfers or token approvals.

Install

npm install @vittominacori/erc20-token

Usage

pragma solidity ^0.7.0;

import "@vittominacori/erc20-token/contracts/ERC20Base.sol";

contract MyToken is ERC20Base {

    constructor (
        string memory name,
        string memory symbol,
        uint8 decimals,
        uint256 cap,
        uint256 initialSupply,
        bool isTransferEnabled
    ) ERC20Base(name, symbol, decimals, cap, initialSupply, isTransferEnabled) {}

  // your stuff
}

Development

Install dependencies

npm install

Usage (using Truffle)

Open the Truffle console

npm run truffle:console

Compile

npm run truffle:compile

Test

npm run truffle:test

Usage (using Hardhat)

Open the Hardhat console

npm run hardhat:console

Compile

npm run hardhat:compile

Test

npm run hardhat:test

Code Coverage

npm run hardhat:coverage

Linter

Use Solhint

npm run lint:sol

Use ESLint

npm run lint:js

Use ESLint and fix

npm run lint:fix

License

Code released under the MIT License.

1.3.0

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago