0.1.1-alpha.1 • Published 5 years ago

@laborx/airdrop v0.1.1-alpha.1

Weekly downloads
-
License
AGPL-3.0
Repository
gitlab
Last release
5 years ago

Airdrop

Provides Ethereum smart contract that allows to perform token airdrop using merkle tree and merkle proof to record and check allowance for token withdrawals.

Using

Install package using npm or yarn package managers:

  • npm install @laborx/airdrop -D

or

  • yarn add @laborx/airdrop

Contracts

Airdrop smart contract.

It allowes to:

  • provide basic token (ERC20 or ERC223 standards) that will be used for airdropping;
  • provide airdrop campaign name;
  • setting up merkle root of a Merkle tree that is based on list of records of allowed withdrawals
  • claiming tokens if you are allowed to do that; user needs to provide a merkle proof to finally withdraw tokens.

For managing Merkle trees for airdrops we use package @laborx/merkletree.

More information about Airdrop contract you can find in documentation;

ScopedAirdrop smart contract.

  • introduces term of "program" that could be deposited by different (more than one at once) tokens;
  • allows to claim several tokens providing proof for each of them.

More information about ScopedAirdropInterface interface you can find in documentation;

Publishing

Lerna tool have some issue with checking changed packages and publishing only REALLY updated modules. Until this issue will be fixed (MR is here) we need to do the following:

  • remove —first-parent in @lerna/describe-ref/lib/describe-ref.js

    	It will look into all tags to check changes from this point (event other branches)