Skip to content

Instantly share code, notes, and snippets.

@dimiandre
Last active May 24, 2023 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimiandre/d16486880aed316443156dfff303caae to your computer and use it in GitHub Desktop.
Save dimiandre/d16486880aed316443156dfff303caae to your computer and use it in GitHub Desktop.

How to Claim Neutron Airdrop from the Command Line (No Country Restrictions)

Note: I do not recommend following this guide as, if you are not using a Ledger, it involves copying and pasting your private key, which dramatically decreases the security of your wallet. Additionally, it is a complex procedure if you have never used the command line before. First, try using various VPNs from different providers and claim from the official website. Use this guide only if you can't find a better alternative.

Note 2: This guide may be illegal in your country, although it is not in mine. Use it at your own risk.

Installation of Software

To proceed with this guide, we will need the Neutron chain binary, which we will use to sign and broadcast transactions directly to the chain.

Linux

If you are a Linux user, you can download the pre-built binary from GitHub in the releases section here and save it in an easily accessible location.

macOS / Windows

You need to build the binary yourself.

  1. Go to the Releases section of the Neutron GitHub page here.
  2. Download the source code as a zip file here.
  3. Unzip the source code by double-clicking it or using your favorite archive manager such as WinZip or WinRAR.
  4. Now, we need to install Go. You can do this by simply downloading the installer from the official website and following the guided procedure:
  5. Open a new Terminal or PowerShell window and navigate to the unzipped folder. To do this, simply type "cd " followed by a space and the path of the folder. If you don't know the path, just drag and drop the folder into the terminal window, and it will automatically fill it. Press Enter to confirm the command.
  6. Once inside the folder, type "make install" and press Enter to build the binary and install it on your computer.

Please refer to this animation for a better understanding of the process: ezgif-5-04ce82fa05

Initializing the Account

First things first, we need to initialize our Neutron account by sending some ATOM or USDC to it.

The easiest way is to use the TFM Bridge from this link with the wallet of your choice.

An alternative is to use Satellite or Squid. However, please note that at the time of writing, Squid and Satellite only support USDC from Osmosis.

Claiming from the Command Line

Now, let's move on to the most complicated part of the claim process: claiming from the command line.

Importing Keys in the Command Line

Let's import our key into the command line:

macOS

~/go/bin/neutrond keys add <yourname> --recover

Windows

%USERPROFILE%/go/bin/neutrond keys add <yourname> --recover

It will ask for your mnemonic, which you should paste and press Enter. If you have a ledger, replace the --recover flag with --ledger while having your ledger connected via USB. This way, the mnemonic will not leave your device, and the whole operation will be much safer.

Finding Your Claim Proofs

We need to find the claim proof related to our address, as we will need it to build the claim command.

The easiest way is to ask one of your trusted friends to go to this URL, replacing "neutron1mszqfjrh2af5k3jr4r3deukgrzdylkr258wrjd" with your address. Alternatively, you can open it with Brave in a private window with Tor (on macOS: CMD + Option + N):

https://launch.neutron.org/api/airdrop?address=neutron1mszqfjrh2af5k3jr4r3deukgrzdylkr258wrjd

That page should provide you with something similar to this JSON response:

{"address":"neutron1mszqfjrh2af5k3jr4r3deukgrzdylkr258wrjd","amount":"8843888526","proof":["497184b06d1f52f70fa24906d876e12373f13e1dc224abd3f7d4cdc0cb5fa683","04ffade5e5e40efe23895ad261164e975242aabf03a10ed835c5784c71f281cc","92fac95b736aa0b4e6e43aec847bf7aefc2061d5fd26b6c628984550b9d0d424","aa572d85c8297a0781759de81bd4ff137134e51963696386b082c0f1beffacaf"]}

Don't worry! This data is not sensitive and can be shared without any issues.

Note: Usually, airdrop creators publish all the proofs on GitHub so that anybody can access them easily. However, Neutron decided to block the API endpoint strongly and not publish the proof at all. The API endpoint is also protected by Cloudflare WAF, which not only blocks by country but also blocks all bots and scrapers, making this data extremely difficult to access and share.

Forging the Command and Running It

The command we are going to use needs to be customized with the proof you found earlier.

The basic command is as follows:

neutrond tx wasm execute neutron198sxsrjvt2v2lln2ajn82ks76k97mj72mtgl7309jehd0vy8rezs7e6c56 '{"claim":{"amount": "", "proof": [] } }' --fees 20000ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9 --gas 400000 --chain-id neutron-1 --node https://rpc.cosmos.directory:443/neutron --from <your key>

The part that needs to be replaced is this:

{ "claim": { "amount": "", "proof": [] } }

Include your amount and the proof in the command.

Final command for macOS:

~/go/bin/neutrond tx wasm execute neutron198sxsrjvt2v2lln2ajn82ks76k97mj72mtgl7309jehd0vy8rezs7e6c56 '{"claim":{"amount":"8843888526","proof": ["497184b06d1f52f70fa24906d876e12373f13e1dc224abd3f7d4cdc0cb5fa683","04ffade5e5e40efe23895ad261164e975242aabf03a10ed835c5784c71f281cc","92fac95b736aa0b4e6e43aec847bf7aefc2061d5fd26b6c628984550b9d0d424","aa572d85c8297a0781759de81bd4ff137134e51963696386b082c0f1beffacaf"]}}' --fees 20000ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9 --gas 400000 --chain-id neutron-1 --node https://rpc.cosmos.directory:443/neutron --from <your key>

Final command for Windows:

%USERPROFILE%/neutrond tx wasm execute neutron198sxsrjvt2v2lln2ajn82ks76k97mj72mtgl7309jehd0vy8rezs7e6c56 '{"claim":{"amount":"8843888526","proof":["497184b06d1f52f70fa24906d876e12373f13e1dc224abd3f7d4cdc0cb5fa683","04ffade5e5e40efe23895ad261164e975242aabf03a10ed835c5784c71f281cc","92fac95b736aa0b4e6e43aec847bf7aefc2061d5fd26b6c628984550b9d0d424","aa572d85c8297a0781759de81bd4ff137134e51963696386b082c0f1beffacaf"]}}' --fees 20000ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9 --gas 400000 --chain-id neutron-1 --node https://rpc.cosmos.directory:443/neutron --from <your key>

That's it! You can find an example video here. Please note that the video may not match the exact steps outlined in this text guide, but it provides a general idea of the process.

Remember to double check the final transaction hash on mintscan or another explorer to make sure the transaction is successfull.

Remember, this guide is provided as-is, and I cannot guarantee its accuracy or security. Proceed at your own risk and make sure to take the necessary precautions to protect your private keys and funds.

@zhaoyanfei07
Copy link

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment