This is a Node.js project that interfaces with the Phantasma blockchain. It's designed to facilitate an airdrop, a process of distributing tokens to addresses, based on a list provided in a CSV file.
- Node.js (v14.0.0 or later)
- NPM (v6.0.0 or later, comes with Node.js)
- Clone this repository to your local machine.
git clone https://github.com/phantasma-io/Phantasma-Airdrop.git
- Navigate into the project directory.
cd Phantasma-Airdrop
- Install the project dependencies.
npm install
- Rename
.env.example
to.env
.
mv .env.example .env
- Open the
.env
file in your text editor and replace the placeholder values with your actual configuration.
API_URL=https://testnet.phantasma.io/rpc
NEXUS_NAME=testnet
CHAIN_NAME=main
PAYLOAD=Airdrop - Deposit
WIF=Your_WIF
FILE_PATH=airdrop/airdrop_tokens.csv
GAS_PRICE=100000
GAS_LIMIT=210000
Remember to replace Your_WIF
with your actual WIF.
You can run the project in development mode with:
npm run dev
This command will compile the TypeScript code to JavaScript and then run the index.ts
file with ts-node
.