A repository of publicly verifiable token Sale contracts

Overview

Token-Sale-Plutus-Contract

A repository of publicly verifiable token sale and royalty contracts. This will be the storage solution since it is easily attainable and usable. A more decentralized solution will come in the future but for now this will be the solution.

The repository will work in a very similar fashion to the Cardano Foundation's token registry. It will allow users to add their contribution to the repository so everyone can use a collection of trusted smart contracts. The goal is to create a micro-ecosystem of contracts that are simple enough to read and quick to compile.

To add a token sale contract to the repository: please fork the repo, add in the contract addition, public verification key, and compiled plutus script into the correct contracts folder following the directions below then use a pull request to add in your contribution into the smart contract repository when finished.

The folder containing the contract to be compiled will be placed in the correct contracts folder. The name of the folder will be the pubkeyhash, allowing a quick search method for a single seller, followed by an under score then the price of the shop in lovelace. Please see the example_token_sale_addition or example_royalty_sale_addition folders for an example additions.

Usage

After forking the repo, clone the repo onto your system. Make a copy of the default folder into the correct contracts folder. Change the name of the copied folder into the pubKeyHash of the wallet that will be receiving payments for tokens sold followed by the price of tokens inside this contract. Additions will not be granted if the naming scheme is not followed. Place a copy of the wallets vkey, the public verification key, and any additional required information into the copied folder.

A user will only need to edit the token-sale/src/TokenSale.hs or token-sale-with-royalty/src/TokenSaleWithRoyalty.hs files. The haskell code requires only few changes, any other changes will result in a failed contract addition. The user will only need to update the pubkeyhash and the price of the tokens. After the changes are made to the TokenSale.hs or TokenSaleWithRoyalty.hs file, the user will need to compile the Haskell into Plutus such that other users can verify the correct output as well as have the correct plutus script file for usage.

Finding the public key hash

The user will be required to get the pubKeyHash using the cardano-cli. This will be used to name the folder inside the contracts folder.

cardano-cli address key-hash --payment-verification-key-file FILE # Filepath of the payment verification key.
# or use this command depending on the use case
cardano-cli address key-hash --payment-verification-key STRING    # Payment verification key (Bech32-encoded)
# For additional help please check out: cardano-cli address key-hash --help

How the contract works

The contract is very simple. To spend the UTxo of the token inside the smart contract. The buyer will attach the correct Datum and will create two UTxOs. One UTxo will go directly to the seller with the predefined lovelace amount and the other UTxo will be the token being sent to the buyer's address. The datum value is known before hand because it follows the standard of hashing the hash of the concatentation of the policy id and token name. Please refer to scripts/transaction.py file,

FINGERPRINT = get_token_identifier(policy_id, token_name)
DATUM_HASH  = get_hash_value('"{}"'.format(FINGERPRINT)).replace('\n', '')

NOTE: Tokens inside these smart contracts can only be removed with a succesful validation i.e. the token must be purchased. If a seller wants to remove their token from a smart contract then they must purchase the token from themselves.

Using the App

The app is designed to be the frontend for interacting with the collection of smart contracts. The user has the choice of working with contracts by hand or by using the app provided in the app folder. The app is based around running a local webserver and displaying the tokens for sale in a convenient way. Please refer to the Application_Guide.md for more information.

Owner
Logical Mechanism
SPO & Dev | Donate ADA | addr1qx3l7jd3ww7u37uh3cc2gmv8xmxfpfjnxlw9e2yxmuu0q78dc8pxvuxutwq04jqdxrv2gp00xpshnejqrp5x3zplhdvqzsy6cq
Logical Mechanism
A discord.py extension for sending, receiving and handling ui interactions in discord

discord-ui A discord.py extension for using discord ui/interaction features pip package ▪ read the docs ▪ examples Introduction This is a discord.py u

34 Dec 29, 2022
Role Discord Members (by username) from File

Role Discord Members (by username) from File Bot Setup Navigate to https://discord.com/developers/applications Create a new application Navigate to th

Dylan Orrell 3 Jan 06, 2022
search different Streaming Platforms for movie titles.

Install git clone and cd to directory install Selenium download chromedriver.exe to same directory First Run Use --setup True for the first run. Platf

34 Dec 25, 2022
Python Library for Secp256k1 Bitcoin curve to do fast ECC calculation

secp256k1 Python Library for Secp256k1 Bitcoin curve to do fast ECC calculation Example Usage import secp256k1 as ice print('[C]',privatekey_to_addres

iceland 49 Jan 01, 2023
Listen to the radio station from your favorite broadcast

Latest news Listen to the radio station from your favorite broadcast MyCroft Radio Skill for testing and copy at docker skill About Play regional radi

1 Dec 22, 2021
pyDuinoCoin is a simple python integration for the DuinoCoin REST API, that allows developers to communicate with DuinoCoin Master Server

PyDuinoCoin PyDuinoCoin is a simple python integration for the DuinoCoin REST API, that allows developers to communicate with DuinoCoin Main Server. I

BackrndSource 6 Jul 14, 2022
A VCVideoPlayer Bot for Telegram made with 💞 By @ProErrorXD

VC Video Player How To Host ✨ Heroku Deploy ✨ The easiest way to deploy this Bot is via Heroku. Credit 🔥 |🇮🇳 Louis |🇮🇳 Sammy |🇮🇳 Blaze Marsha

丂ムᄊᄊƳ 95 May 17, 2022
Jupyter notebooks and AWS CloudFormation template to show how Hudi, Iceberg, and Delta Lake work

Modern Data Lake Storage Layers This repository contains supporting assets for my research in modern Data Lake storage layers like Apache Hudi, Apache

Damon P. Cortesi 25 Oct 31, 2022
🚀 An asynchronous python API wrapper meant to replace discord.py - Snappy discord api wrapper written with aiohttp & websockets

Pincer An asynchronous python API wrapper meant to replace discord.py ❗ The package is currently within the planning phase 📌 Links |Join the discord

Pincer 125 Dec 26, 2022
Grocy-create-product - A script supports the batch creation of new products in Grocy

grocy-create-product This script supports the batch creation of new products in

André Heuer 6 Jul 28, 2022
Repository for the IPvSeeYou talk at Black Hat 2021

IPvSeeYou Geolocation Lookup Tool Overview IPvSeeYou.py is a tool to assist with geolocating EUI-64 IPv6 hosts. It takes as input an EUI-64-derived MA

57 Nov 08, 2022
📢 Video Chat Stream Telegram Bot. Can ⏳ Stream Live Videos, Radios, YouTube Videos & Telegram Video Files On Your Video Chat Of Channels & Groups !

Telegram Video Chat Bot (Beta) 📢 Video Chat Stream Telegram Bot 🤖 Can Stream Live Videos, Radios, YouTube Videos & Telegram Video Files On Your Vide

brut✘⁶⁹ // ユスフ 15 Dec 24, 2022
Documentation and Samples for the Official HN API

Hacker News API Overview In partnership with Firebase, we're making the public Hacker News data available in near real time. Firebase enables easy acc

Y Combinator Hacker News 9.6k Jan 03, 2023
CoWIN Vaccination slot booking telegram bot with auto captcha resolver & alerting feature.Now, never miss a slot.

COWIN VACCINATION SLOT AUTO BOOKING (Bot with captcha solving & alerting capabilities. Never miss the vaccine slot.) June-10-2021/ 0030 hrs: 23 succes

Shashank Bafna 17 Nov 12, 2022
Simple bot to receive feedback,same as livegram bot but with more features & full control over bot

Kontak Simple bot to receive feedback,same as livegram bot but with more features & full control over bot Deploy to VPS

Mahin Ahmed 2 Dec 16, 2021
GUI Pancakeswap V2 and Uniswap V3 trading client (and bot) MOST ADVANCE TRADING BOT SUPPORT WINDOWS LINUX MAC (BUY TOKEN ON LAUNCH)

GUI Pancakeswap 2 and Uniswap 3 SNIPER BOT 🏆 🥇 (MOST ADVANCE TRADING BOT SUPPORT WINDOWS LINUX MAC) (AUTO BUY TOKEN ON LAUNCH AFTER ADD LIQUIDITY) S

HYDRA 16 Dec 22, 2021
A multipurpose bot designed to make Discord better for everyone, written in Python.

Hadum A multipurpose bot that makes Discord better for everyone Features A Fully Functional Moderation component: manage your staff, members and permi

1 Jan 25, 2022
One destination for all the developer's learning resources.

DevResources One destination for all the developer's learning resources. Find all of your learning resources under one roof and add your own. Live ✨ Y

Gaurav Sharma 33 Oct 21, 2022
Discord group chat leaver.

Discord group chat leaver I know many people who have fallen victim to these weird group chat spammers including me. I made this script to help those

cliphd 3 Feb 27, 2022
SystemSix is an e-Ink "desk accessory" running on a Raspberry Pi. It is a bit of nostalgia that can function as a calendar, display the weather

SystemSix is an e-Ink "desk accessory" running on a Raspberry Pi. It is a bit of nostalgia that can function as a calendar, display the weather, the c

John Calhoun 372 Jan 02, 2023