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.

Owner
Anshu Jalan
Software Developer. Blockchain. Smart Contracts. DeFi. NFTs.
Anshu Jalan
Salted Crypto Python library

Salted Crypto Python library. Allows to encrypt and decrypt files and directories using popular cryptographic algorithms with salty key(s).

7 Jul 18, 2022
This is a simple Bitcoin non-deterministic wallet address generator coded in Python 3.

This is a simple Bitcoin non-deterministic wallet address generator coded in Python 3. It generates a Private Key in different formats (hex, wif and compressed wif) and corresponding Public Addresses

7 Dec 22, 2022
Privfiles - Encrypted file storage using Fernet with zero Javascript

Privfiles - Encrypted file storage using Fernet with zero Javascript Source code for the onion service: l3n6v6dm63frml22tlmzacnasvp7co7wylu4hhcs34ukxe

5 Jul 30, 2022
Privfiles - Encrypted file storage using Fernet with zero Javascript

Privfiles - Encrypted file storage using Fernet with zero Javascript Source code for the onion service: l3n6v6dm63frml22tlmzacnasvp7co7wylu4hhcs34ukxe

Ward 5 Jul 30, 2022
Generate Random ETH addresses and Private Keys and Saved to file.

ethgen.py Generate Random ETH addresses and Private Keys and Saved to file. ETH address the file is stored in ETH-address.txt. ETH private keys the fi

deanondroid 2 Dec 21, 2021
Zach Brewer 1 Feb 18, 2022
The (Python-based) mining software required for the Game Boy mining project.

The (Python-based) mining software required for the Game Boy mining project.

Ghidra Ninja 31 Nov 04, 2022
A Docker image for plotting and farming the Chia™ cryptocurrency on one computer or across many.

An easy-to-use WebUI for crypto plotting and farming. Offers Plotman, MadMax, Chiadog, Bladebit, Farmr, and Forktools in a Docker container. Supports Chia, Cactus, Chives, Flax, Flora, HDDCoin, Maize

Guy Davis 328 Jan 01, 2023
An extreme encryption for everyone, encrypt your text before sending to anyone.

An extreme encryption for everyone, encrypt your text before sending to anyone. Alphabets and numbers are going to be encrypted like a hell

Saad 6 Oct 28, 2022
This is a webpage that contains login and signup page by which the password is stored using elliptic curve cryptography

LoginPage_using_Elliptic_curve_cryptography- This is a webpage that contains login and signup page by which the password is stored using elliptic curv

1 Oct 15, 2021
SSEPy: Implementation of searchable symmetric encryption in pure Python

SSEPy: Implementation of searchable symmetric encryption in pure Python Searchable symmetric encryption, one of the research hotspots in applied crypt

33 Dec 05, 2022
Um sistema de Criptografia RSA feito totalmente em Python

Um sistema de Criptografia RSA feito totalmente em Python

Luis Müdder 3 Nov 23, 2021
BOT para o BombCrypto para infinitas contas em simultâneo!!!

BOT - MultiContas para BombCrypto - v 0.4.0 Funções extras: Envios de notificações via Telegram: Aviso de Inicialização do Bot Aviso de Conclusão de M

Rai Zancanaro 19 Dec 20, 2022
Highly decentralized and censorship-resistant way to store key data

Beacon coin Beacon coin is a Chia singelton coin that can store data that needs to be: always available censorship resistant versioned potentially imm

Sebastjan Trepca 24 Oct 04, 2022
This is simple Blockchain ,miner and wallet to send crypto using python

pythonBlockchain-SImple This is simple Blockchain ,miner and wallet to send crypto using python It is simple Blocchain so it can only dobasic work usi

3 Nov 22, 2022
Linear encryption software programmed with python

Echoder linear encryption software programmed with python How does it work? The text in the text section runs a function with two keys entered keys mu

Emre Orhan 4 Dec 20, 2021
BlockVis - Create beautiful visualizations of Bitcoin Blockheaders

BlockVis Create beautiful visualizations of Bitcoin Blockheaders How to run To r

Egge 2 Jan 05, 2022
Simple BRender SDK KeyGen.

Super Simple BRender KeyGen Simple BRender SDK KeyGen. Info This is just a super simple keygen for the BRender SDK installer coded in python. All test

1 Jan 15, 2022
A python-jvm wrapper for interacting with the Ergo blockchain.

ergpy A python-jvm wrapper for interacting with the Ergo blockchain. Usage Requires Java 8 or higher to be installed on system pip install JPype1 pip

mgpai 16 Oct 05, 2022
😈 Shining is a tool that enables engineers to remotely pull smart contract code in multi-file situations.

👑 Shining 😈 Shining is a tool that enables engineers to remotely pull smart contract code in multi-file situations. Shining is the name of one of my

xxxeyJ 15 Jun 17, 2022