Skip to content

vivekascoder/launchpad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laucndpad for Seashrine.

Points to consider.

  • Mint function can only be called by the admin of the creator.
    • Which means
  • ESCROW.

Sale Info Command

Example of the command:

pnpm client sale-info --node devnet -a 0x3b37c8dd0ff885b8ceb75495a9307b473f193b50de35e53481d90517d0d450dc  -t 0xa7a24b18c42461bdba97461d18619f6b2c1c9b2d6aad66119b28754c1389de64 --collection-name "Crowdsale Demo One" --collection-creator "0x3b37c8dd0ff885b8ceb75495a9307b473f193b50de35e53481d90517d0d450dc"

Returns something like the following.

{
  "airdrop_index": "0",
  "current_index": "2",
  "is_paused": false,
  "presale_index": "2",
  "presale_limit": "2",
  "presale_price": "10000000",
  "presale_start": "1674231543",
  "presale_total": "20",
  "publicsale_limit": "3",
  "publicsale_minted": {
    "handle": "0x6defaa6073ef630277b4369e640a66a65fd020046ffd8dc492e01a53d7573146"
  },
  "publicsale_price": "20000000",
  "publicsale_start": "1674238733",
  "shares": [
    {
      "addr": "0x33384090ec2eca5cad6e977536b23edeb19d746a405e28343a6c9b0b5d79959e",
      "d": "10000",
      "n": "10000"
    }
  ],
  "token_matrix": {
    "handle": "0x1f48784e4032ee34ac12bcbe64acaa350b440657607a8862a5992d5dd919578f"
  },
  "total": "100",
  "whitelist": [
    "0x33384090ec2eca5cad6e977536b23edeb19d746a405e28343a6c9b0b5d79959e"
  ],
  "whitelist_minted": {
    "handle": "0xb4d9cf3c780a10c654e56ad1d07060d057d0dbf474b3e2d67ad6edd2d7c2d90e"
  }
}

Info on the fields

total: Total number of NFTs to be sold.

presale_price: publicsale_price: Gives price in Octas

presale_total: Max amount of NFTs to be sold in presale.

current_index: represents total minted NFTs

airdrop_index: represents total number of NFTs airdropped to users by admin.

presale_start: and publicsale_start represents the unix timestamp of starting time of presale and publicsale.

whitelist: Is a vector of addresses representing the whitelisted address.

Init Sale

Deploy modules if not already

aptos move publish --bytecode-version 6 --url https://fullnode.testnet.aptoslabs.com --included-artifacts none
cd client
pnpm client create-collection \
    --node devnet \
    --collection-name "Crowdsale Demo One" \
    --collection-desc "This is a demo collection to test crowdsale" \
    --uri "https://placekitten.com/100/100" \
    --max-supply 3000

pnpm ts-node ./offerSignerCapability.ts --recipient "0x8b10ed5957d19d640e07b14273bb3584876b541ee1725d0aa1a51c826b41b61e"

pnpm ts-node ./initSaleTest.ts \
  --collection-creator "0x3b37c8dd0ff885b8ceb75495a9307b473f193b50de35e53481d90517d0d450dc" --collection-name "Crowdsale Demo One"

pnpm ts-node ./togglePause.ts \
  --collection-creator "0x3b37c8dd0ff885b8ceb75495a9307b473f193b50de35e53481d90517d0d450dc" --collection-name "Crowdsale Demo One"
pnpm client create-collection \
    --node testnet \
    --collection-name "2Phobos" \
    --collection-desc "2Phobos is the cutest collection on Aptos that consist of 1212 unique NFTs which features Eternal Finance x HoustonSwap characters — These NFTs are not just any ordinary collectibles, the collection serves as a celebration for the successful IDO run as a memory and reward for the carnival participants. Each NFT grants you a role and access to a members-only room (The Phobos Lounge). Join Eternal Finance’s Discord server (https://discord.gg/tUh3mZEjEz) for more details and updates." \
    --uri "https://cdn.seashrine.io/seashrine/launchpad/evolved-leftoverz/avatar.webp" \
    --max-supply 1212

https://explorer.aptoslabs.com/txn/0xa622f1bac3aa846f6e0a4b4a57b3fa4cf7d7b1b4e0bfd47c0373652fe10f23dd/events

Info on sales

  1. Access Cards
  2. Machina Mystery Boxes
  3. Evolved Leftoverz
  4. 2Phobos (free)

TBD

  1. Flying fish

pnpm client create-collection
--node testnet
--collection-name "Flying Fish"
--collection-desc "Flying Fish is a project launching on Aptos blockchain. We are going to develop play to earn games for our holders and also have other cool utilities for our community! Fishes are gonna fly to the moon!"
--uri "https://cdn.seashrine.io/seashrine/launchpad/2phobos/avatar.webp"
--max-supply 650

How to launch a sale.

You can still do it with the scripts here are the steps

  1. Create the collection, for example.
   pnpm client create-collection \
    --node testnet \
    --collection-name "Flying Fish" \
    --collection-desc "Flying Fish is a project launching on Aptos blockchain. We are going to develop play to earn games for our holders and also have other cool utilities for our community\! Fishes are gonna fly to the moon\!" \
    --uri "https://cdn.seashrine.io/seashrine/launchpad/flying-fish/avatar.webp" \
    --max-supply 650
  1. Add necessary parameters in the initSaleTest file (since there are a lot of parameters, I'm not using command line args for this)

  2. Init the sale.

   pnpm client init-sale-test --node testnet --collection-creator "0xcf3297503b35abcb29a246a54471a692d955b68e7bd02b194452b85d1d571370" --collection-name "Flying Fish"
  1. Toggle the pause variable as by default it's true.
   pnpm client toggle-pause -n testnet --collection-creator "0xcf3297503b35abcb29a246a54471a692d955b68e7bd02b194452b85d1d571370" --collection-name "Flying Fish"
  1. The sale is live, to fetch all the sale information of a collection use the following command (only to check info).
   pnpm client sale-info --collection-creator "0xcf3297503b35abcb29a246a54471a692d955b68e7bd02b194452b85d1d571370" --collection-name "Flying Fish" -n testnet -a "0xcf3297503b35abcb29a246a54471a692d955b68e7bd02b194452b85d1d571370"

Airdrop

For presale.

pnpm ts-node ./manualWhitelist.ts --collection-creator "0xcf3297503b35abcb29a246a54471a692d955b68e7bd02b194452b85d1d571370" --collection-name "Test Flying Fish"

For membersale

pnpm ts-node ./membersaleWhitelist.ts --collection-creator "0xcf3297503b35abcb29a246a54471a692d955b68e7bd02b194452b85d1d571370" --collection-name "Test Flying Fish" --node testnet

How to calculate the time in unix timestamp

let d = new Date("29 July 2023 8:00 PM UTC");
d.getTime() / 1000;

Use this site to verify the the timestamp.

https://www.epochconverter.com/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors