Token drop template on Tezos blockchain, based on Merkle Tree Distribution mechanism.

Overview

🛬 Token Drop Template

This is a template to perform token drops efficiently on Tezos blockchain. The drop is handled using Merkle Tree Distribution mechanism that highly reduces the cost for the drop admin, and the claimers just have to pay the minimal gas and storage fee.

What's there in the Repository?

  • contracts: Smart Contracts written in SmartPy to handle the drop. Separate contracts are provided for FA1.2 and FA2 standard of tokens on Tezos.
  • deploy: Utility scripts to automatically prepare the merkle tree data structure and deploy the drop contract.
  • frontend: A basic React dapp to portray a possible way to integrate the drop contract with the frontend.

Deploying and Running

Prerequisites

  • Globally installed SmartPy Cli [0.8.7]
  • Node [14.17.1]
  • Yarn [1.22.11]

Steps

Once you have cloned the repository, the following steps and sub-steps written in the respective folders are to be followed sequentially-

  • Create Merkle Tree and deploy Drop Contract: This step requires that you already have a deployed token contract (FA1.2 / FA2). Follow the steps specified in the deploy folder to continue.
  • Prepare and run dapp: Once you have generated the merkle tree and deployed the drop contract, follow the steps specified in the frontend folder to run the dapp.

Resources

Although the deployment can be done without the knowledge of Merkle Tree Distribution technique, it is recommended that you go through the following resources to get an idea of the mechanism.

Improvement Scope

There are aspects of this template primarily on the frontend side that can be improved during production level implementation. It is recommended that you take into consideration the following bare minimum changes in order to provide a seamless experience to the end user.

  • The merkle tree proof data generated in /deploy/src/merkle_build folder and used at /frontend/src/mrklData.ts should ideally be served from an http backend on a per-address basis. For a large drop of say ~100,000 users, the proof file could be as large as ~100mb, which would be too much data to push into the source of a web app.
  • A check for users who have already claimed the tokens and showing an appropriate message for them instead of the claim button.

Disclaimer

The code is provided as is. The smart contracts are not formally auditted by a third party. Users are advised to do their own research before using the template . The author is not liable for any failure or loss of funds.

You might also like...
A repository for Algogenous Smart Contracts created on the Algorand Blockchain.

Smart Contacts This Repository is dedicated to code for Alogrand Smart Contracts using Choice Coin. Read Docs for how to implement Algogenous Smart Co

High Performance Blockchain Deserializer

bitcoin_explorer is an efficient library for reading bitcoin-core binary blockchain file as a database (utilising multi-threading).

Python implementation of a blockchain.

The goal of this project is to explain and to make clearer how is a blockchain structured at the very core. It's not built with the intention to replicate an advanced blockchain like Bitcoin or Ethereum

A little side-project API for me to learn about Blockchain and Tokens

BlockChain API I built this little side project to learn more about Blockchain and Tokens. It might be maintained and implemented to other projects bu

A workshop to build an NFT smart contract on the polygon blockchain
A workshop to build an NFT smart contract on the polygon blockchain

Polygon NFT Workshop This is an interactive workshop that guides you through the steps to deploy an NFT smart contract on the Polygon blockchain. By t

Blockchain Python Implementation

Blockchain Python Implementation

Accounting Cycle Program with Blockchain Component

In the first iteration of my accounting cycle program, I talked about adding in a blockchain component that allows the user to verify the inegrity of

Best blockchain in the world

alphachain Best blockchain in the world!!! Can be used to implement Layer 2 cryptocurrency protocol just click alphachain.py and it will execute autom

Cryptocurrency with implementet Blockchain

Cryptocurrency with implementet Blockchain

Owner
Anshu Jalan
Software Developer. Blockchain. Smart Contracts. DeFi. NFTs.
Anshu Jalan
Tools for running airdrop and token distribution campaigns on the Solana blockchain.

Overview This repository contains some of the scripts we have used for running our airdrop campaigns and other distributions. Initially, all of these

null 147 Nov 17, 2022
Implementation of Smart Batch Auction for NFT launches on Tezos.

NFT Smart Batch Auction Smart Batch Auctions are an improvement over the traditional first come first serve (FCFS) NFT drops. FCFS design has been in

Anshu Jalan 5 May 6, 2022
An BlockChain Based solution for storing the medical records

Blockchain-based Medical Records ?? Abstract Blockchain has the ability to keep an incorruptible, decentralized, and transparent log of all patient da

Yuvraj Singh Deora 3 Jan 14, 2022
Distributed, blockchain based hashtables middleware for deduplication of file uploads to the cloud

distributed-blockchain-based-secure-file-dedupe Searching is Distributed, Block and Access List for each upload is unique and it is stored in a single

Abhishek Tangod 1 Dec 2, 2021
Ethereum ETL lets you convert blockchain data into convenient formats like CSVs and relational databases.

Python scripts for ETL (extract, transform and load) jobs for Ethereum blocks, transactions, ERC20 / ERC721 tokens, transfers, receipts, logs, contracts, internal transactions.

Blockchain ETL 2.3k Jan 1, 2023
Learn Blockchains by Building One, A simple Blockchain in Python using Flask as a micro web framework.

Blockchain ✨ Learn Blockchains by Building One Yourself Installation Make sure Python 3.6+ is installed. Install Flask Web Framework. Clone this repos

Vaibhaw 46 Jan 5, 2023
seno-blockchain is just a fork of Chia, designed to be efficient, decentralized, and secure

seno-blockchain https://seno.uno Seno is just a fork of Chia, designed to be efficient, decentralized, and secure. Here are some of the features and b

Denis Erygin 27 Jul 2, 2022
Ceres is a combine harvester designed to harvest plots for Chia blockchain and its forks using proof-of-space-and-time(PoST) consensus algorithm.

Ceres Combine-Harvester Ceres is a combine harvester designed to harvest plots for Chia blockchain and its forks using proof-of-space-and-time(PoST) c

null 38 Nov 14, 2022
blockchain address database

Blockchain Address Ownership Database The database is in data/addresses.db This is a SQLite database of addresses from several blockchains. It's obtai

null 37 Nov 26, 2022
A repository for Algogenous Smart Contracts created on the Algorand Blockchain.

Smart Contacts Alogrand Smart Contracts using Choice Coin. Read Docs for how to implement Algogenous Smart Contracts for your own applications. Smart

Choice Coin 3 Dec 20, 2022