Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

⚖ Gasless ERC20 token distribution for virtual airdrops

Notifications You must be signed in to change notification settings

ItsNickBarry/implicit-balance-token

Repository files navigation

Implicit Balance Token

ERC20 token which allocates a non-zero initial balance to all addresses. Based on the ERC20 implementation provided by OpenZeppelin version 3.0.1.

This repository was generated from a template or is the template itself. For more information, see docs/TEMPLATE.md.

Usage

Included are several abstract contracts containing basic implementation of an implicit-balance ERC20 token. A fully implemented contract must call all base contract constructors, including that of ERC20.

contract constructor signature description
ImplicitFixedBalanceToken uint base each account is allocated an implicit balance equal to base; base is immutable and may not be updated
ImplicitRandomBalanceToken uint min, uint mod, uint mul each account is allocated an implicit balance between min * mul and (min + mod) * mul, determined by the uint representation of its address
ImplicitVariableBalanceToken uint base each account is allocated an implicit balance equal to the value of base at the time of account activation; base may be updated

Development

Install dependencies via Yarn:

yarn install

Compile contracts via Buidler:

yarn run buidler compile

Networks

By default, Buidler uses the BuidlerEVM.

To use Ganache, append commands with --network localhost, after having started ganache-cli in a separate process:

yarn run ganache-cli

To use an external network via URL, set the URL environment variable and append commands with --network generic:

URL="https://mainnet.infura.io/v3/[INFURA_KEY]" yarn run buidler test --network generic

Testing

Test contracts via Buidler:

yarn run buidler test

If using a supported network (such as Ganache), activate gas usage reporting by setting the REPORT_GAS environment variable to true:

REPORT_GAS=true yarn run buidler test --network localhost

Generate a code coverage report for Solidity contracts:

yarn run buidler coverage

About

⚖ Gasless ERC20 token distribution for virtual airdrops

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published