Skip to content

Latest commit

 

History

History
 
 

airdrop

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

airdrop-distributor logo

Overview

An airdrop is an application where a set number of users are able to claim a specific amount of an asset. In today's ecosystem, this is often used to distribute assets to an application's user base that has previously interacted with their project.

In order to verifiably prove that a user has a claim to an airdrop and avoiding the expensive transaction of storing every address on chain, a Merkle Proof is used. By storing the Merkle root, a single b256 hash, the airdrop application can cryptographically prove a user's validity to their claim.

Note This application implements the Binary Merkle Proof Verification Library.

More information can be found in the specification and interface.

Project structure

The project consists of two smart contracts.

airdrop
├── project
│   ├── contracts
│   │   └── distributor-contract
│   │       ├── src/main.sw
│   │       └── tests/harness.rs
│   ├── README.md
│   └── SPECIFICATION.md
├── ui
│   ├── README.md
│   └── SPECIFICATION.md
└── README.md

Running the project

User interface

TODO: The user interface does not currently exist therefore its README.md and SPECIFICATION.md are empty.

Project

In order to run the subsequent commands change into the following directory /path/to/airdrop/project/<here>.

Program compilation

forc build --locked

Running the tests

Before running the tests the programs must be compiled with the command above.

cargo test --locked