LindaMegaDrop: Interacting With Smart Contracts

LindaTheDog
7 min readMay 15, 2024

--

This article can be seen as a guide that will go through step-by-step on how one can interact with our LindaMegaDrop smart contract. This covers through the main action of the dapp which is making deposits to enter (getting entries).

Basic Info

Our smart contract is designed to intuitively know and calculate the number of entries based on deposit amount input.

For example, let’s say that each entry requires a deposit of 100,000 LINDA. As a user, you are looking to get five (5) entries. Rather than making 5 separate deposits of 100K each, you can simply make one deposit of 500,000. While the cost of gas fees are already really low on Linea Blockchain, you can still save on gas. With the way our smart contract is structured, users can experience up to 4.9x in reduce gas fees.

Another important point is how our smart contract intuitively handles deposits of excess amounts. Let’s say that a user mistakenly or intentionally makes a deposit of greater than five (5) entries but less than six (6). For example, a deposit of 520,000 LINDA.

User (you) inputs a deposit of 520,000 and signs transaction:

  • Smart contract will calculate and only transfer 500,000 LINDA because each entry only requires 100,000 tokens.
  • The ‘extra’ 20,000 is untouched and remains inside your wallet.
  • You are credited 5 entries.
  • You did not over-deposit / nothing is lost.
  • The smart contract code is intuitive.

The smart contract code is programmed to only transfer 500,000 (5 * 100,000) LINDA tokens, facilitates 5 entries, and ignore the remaining 20,000. In other words, the ‘excess’ 20,000 LINDA tokens never leaves your wallet.

You can have the peace of mind knowing that you won’t be losing tokens from human error inputs.

Our Website Interface

Our new interface is a way for people in the community to engage with Linda dapps, the Linea blockchain, and future applications.

The official link is ( app.lindathedog.com ). It is important to make sure you are always on the correct official website to avoid malicious scams / phishing attempts.

Interactions with LindaMegaDrop is broken down into 4 easy steps.

  • Pick a pool
  • Connect your wallet
  • Input LINDA token amount
  • Make your deposit by signing transaction on MetaMask wallet

Getting Started

You must navigate to the dapp page if you do not have a direct link.
The direct link is just ‘app’ followed by our official website.
Direct link: app.lindathedog.com

How To Navigate to Dapp page
But for new people, there is no a direct link on our homepage but rather you will have to go to our megadrop page (lindathedog.com/megadrop) and then click on “Launch App”.

Steps

The first thing you do is selecting which pool you wish to participate in. At the time of writing this, there is only one available pool.

Pool 1: 0x662e9fF493f51F9A6f812542745D5A7057655e31

After selecting the pool, you should arrive to an interface similar to that of the following image which will display 1) some info of the pool, 2) the specific contract address reference as a security aspect, 3) a way to connect your wallet, and 4) a field asking for your deposit input.

LindaMegaDrop Interface Reference

Go connect your wallet (such as MetaMask) to begin interacting. Enter the amount you wish to deposit in the input field which will automatically correspond to the number of entries based on the deposit per entry amount. Take note that the minimum required input is the deposit amount for one entry, in this case 100,000 LINDA tokens. If this is your first time, you will be prompt to Approve tokens before Deposit. The token approval transaction defaults to max allowance on MetaMask prompt, but with the low transaction gas fees on Linea Blockchain you can self input any amount or keep it at default for simplicity.

  • A) Your LINDA balance
  • B) The required minimum (ex. 100,000 Linda tokens)
  • 0) Type in number of LINDA tokens (input amount)
  • 1) APPROVE: sign tx to approve tokens (usually done just once)
  • 2) DEPOSIT: submit deposit by signing transaction to finalize

Note: smart contract code is intuitive and will calculate the number of entries based on your input. Only tokens corresponding to (deposit per entry) is used and excess tokens are not taken from your wallet.

Example: 215,000 input → 200,000 LINDA tokens are deposited for 2 entries & 15,000 are untouch / remain inside your wallet).

In the above image, you can see that the wallet balance (A) does not meet the minimum of 100,000 (B), and therefore will not be able to make a deposit. Attempts to make a deposit will fail and not prompt a MetaMask transaction. This user wallet will need to buy some more LINDA in the market to meet the minimal requirement.

This concludes the basic steps required to interact with LindaMegaDrop through our website interface.

Alternative Guide

With any given website interface, it provides a greater ease of access and usage for users, but some people may be hesitant due to possible security concern.

The following give users an alternative by going into a step-by-step guide on how to directly interact with a LindaMegaDrop contract or any smart contract through a blockchain explorer.

Disclaimer: we do not have any control nor make any guarantees that LineaScan blockchain explorer is safe and will never be compromise. This is more of an informational guide where we provide an alternative solution for users to engage with smart contracts on the blockchain and generally people feel comfortable with using blockchain explorers.

Interact with Smart Contract Thru Blockchain Explorer

For those not comfortable going through our website, you can always interact with the LindaMegaDrop through a block explorer such as LineaScan. Another reason why you may use a blockchain explorer is if a website is down. Smart contracts live on the blockchain so users can engage in transactions even if particular website interface is not accessible, making it censorship resistant.

We will now go over some basic steps on how to participate with making a deposit. If this is your first time, there are two steps (or transactions) you must make just like with our website interface.

First step is approving LINDA tokens
For smart contracts such as LindaMegaDrop to take in or use ERC20 tokens, you must first approve the token usage (basically give a smart contract your permission). Depending on the amount you initially approve at, this is generally done once.

Second step is actually making your intended deposit for entry
Approving is simply giving permission but not sending any tokens yet. Only after you approve can you utilize the smart contract to making your token deposit.

Warning
It is IMPORTANT that before you approve or interact with any smart contract that you do your own research which can mean as simple as checking to see if you are using the correct official contract address to more thorough actions such as looking over the code if the smart contract is verified/open source/audit/etc.

Note that for Linda, all our contracts are open source and verified. If they are not, that is an immediate red flag and you should think twice before using.

Smart Contracts:

For the above mention steps, we will be interacting with two (2) smart contracts.

  1. The LINDA token contract to make ERC20 Token Approve:
    0x82cC61354d78b846016b559e3cCD766fa7E793D5
  2. The smart contract (in this case LindaMegaDrop) to make Deposit:
    0x662e9fF493f51F9A6f812542745D5A7057655e31

Token Approval Steps:

  • Open up the token contract address on the block explorer (LineaScan).
  • Go to the “Contract” screen and “Write Contract” tab.
  • Connect wallet (such as MetaMask).
    - there may be a “Connect to Web3” or “Connect Wallet” button.
  • Locate the “approve (0x095ea7b3)” function on the list.
    - for spender input: 0x662e9fF493f51F9A6f812542745D5A7057655e31
    -
    for amount, input allowance amount, for example: 100000000000000000000000000000 (represents 100 billion)
  • Click “write” to submit tx request and sign the Transaction which should pop up MetaMask on your browser.

Here is a convenient direct link: LINDA token on Lineascan

Reference image for making LINDA token approval on LineaScan explorer

For allowance (“amount”), as LINDA is an 18 decimal token, the value “1000000000000000000” represents 1 LINDA.

100000000000000000000000000000
The above amount input sets an allowance of 100 Billion (100 billion * 10¹⁸) LINDA tokens. You can also opt to only input lower amount. For instance, let’s say the minimum deposit amount for the smart contract is 100,000 LINDA (100,000 * 10¹⁸). You can approve “100000000000000000000000” amount but for any additional deposits, you will need to make subsequent approval txs (repeat token approve step).

Deposit Steps:

  • Open up the token contract address on the block explorer (LineaScan).
  • Go to the “Contract” screen and “Write Contract” tab.
  • Connect wallet (such as MetaMask).
    - there may be a “Connect to Web3” or “Connect Wallet” button.
  • Locate the “deposit (0xb6b55f25)” function on the list.
    - for ‘_tokens’ field, input deposit amount
    - example: 100000000000000000000000 (represents 100,000)
  • Click “write” to submit tx request and sign the Transaction which should pop up MetaMask on your browser.

Here is a convenient direct link: LindaMegaDrop on LineaScan

For information on how LindaMegaDrop works, please check out this article that goes more into detail: Overview of LindaMegaDrop.

Be sure to check out our official website and follow us on Twitter/X.

Official Links
Website: https://lindathedog.com
Twitter/X: https://twitter.com/LindaOnLinea
LindaMegaDrop: https://lindathedog.com/megadrop
Dapp Interface: https://app.lindathedog.com

--

--

LindaTheDog

Mascot of the Linea Network. Linda is the main community dog memecoin launched on the Linea Network, a L2 zkEVM Rollup by Consensys. https://lindathedog.com/