AccessKeys
In order to create any kind of drop, you need to first generate key pairs. You will need to create one key per drop.- The
linkdropcontract will store thepublicpart of the key. - You will give the
privatepart of the key to the user you want to receive the drop.
- 🌐 WebApp
- 🖥️ CLI
- Lantstool
$NEAR Drops
To create a $NEAR drop you will ask the contract to create a drop (create_drop), passing the public part of the keys you generated, and how much you want to drop on each key use (deposit_per_use).
The contract will create a drop and return the numerical ID that identifies it.
- 🌐 WebApp
- 🖥️ CLI
- Lantstool
To claim the drop, you will need to send the user a link with the private key
NFT Drops
To drop an existing NFT, you will (1) create a drop, and then (2) transfer the NFT to keypom.1. Creating the Drop
To create an NFT drop, you will call thecreate_drop method, now passing a nft argument, which will tell the linkdrop contract to wait for an NFT to be transferred.
The contract will then create a drop and return the numerical ID that identifies it.
- 🌐 WebApp
- 🖥️ CLI
- Lantstool
2. Transferring the NFT
Having the Drop ID, you now need to transfer the NFT to the linkdrop contract, specifying to which drop you want to add it.- 🌐 WebApp
- 🖥️ CLI
- Lantstool
FT Drops
The process to drop a Fungible Token is very similar to that of creating an NFT drop. You will first create the drop, and then fund it with FTs.1.Creating a drop
To create a FT drop you will call thecreate_drop method, now passing a ftData argument, which will tell the linkdrop contract to wait for a certain amount of FT to be transferred.
The contract will then create a drop and return the numerical ID that identifies it.
- 🌐 WebApp
- 🖥️ CLI
- Lantstool
2. Transferring FT
Having the Drop ID, you now need to transfer the fungible tokens to the linkdrop contract.To transfer FTs to an account, you need to first register the receiver account (e.g. the keypom contract) on the FT contract.
- 🌐 WebApp
- 🖥️ CLI
- Lantstool
Function Call Drop
Linkdrop contracts allow to createfunction call drops. These drops will execute one or more methods on a contract when the user claims the drop.
- 🌐 WebApp
- 🖥️ CLI
- Lantstool
Building drop links
To create a linkdrop link, simply append the private key to theclaim page:
