Skip to content

TypeScript implementation of zkpepe's claimer via merkle-proof getting back-end zksyncpepe.com

Notifications You must be signed in to change notification settings

whonion/ts-zkpepe-claimer

Repository files navigation

Status Build TS Node Version ts-node viem Axios Version Ethers Version HitCount

zkpepe-claimer

ts-zkpepe-claimer

Preview VS Code

Preview VS Code

TypeScript impelementation of zkpepe's claimer via merkle-proof getting back-end zksyncpepe.com

Install Node.js

sudo apt install git
sudo apt install nodejs
sudo apt install npm
node -v
npm -v

Clone repo and install dependencies

git clone https://github.com/whonion/ts-zkpepe-claimer.git
cd ts-zkpepe-claimer
npm i
npm i -g typescript
npm i -g ts-node

Module's description:

  • main.ts - The direct module that performs obtaining proofs,amounts, claim and swap claimed tokens;
  • parsecsv.ts - The module parses a csv file with addresses and creates a list of clean addresses for the main script to work with;
    example.csv
1,0x4648451b5F87FF8F0F7D622bD40574bb97E25980,69420;;;;;
2,0xA807248277aa8b2CcD935E10aF6315F6C94Dc9C2,69420;;;;;
3,0x8FEd78F00B2992dd4E36884d11C21d6227FFa073,69420;;;;;
4,0x3c8c8718eeFBB8B85e2b859789410620Fa6e549E,69420;;;;;
5,0x4c5e78392cc2F1634391539990aa6E213c846Dc1,69420;;;;;
6,0x98032C58408e9681E1AFF9bA398436Bb315D3d30,69420;;;;;
7,0xbbBb0731fb53a7C1A87AF3280319E9a91e318b88,69420;;;;;
  • parselog.ts - The module for create data/tx_data/get_proof.json-file
  • getproof.ts - The module for getting merkle-proofs from the back-end;
  • getamount.ts - The module for getting amounts from the back-end;
  • claimer.ts - The module for claiming tokens from a token distributor contract;
  • swap.ts - The module for quick sales claimed tokens;

Required actions:

  • rename env.example to .env and add <TOKEN_CLAIMER_VIA_MERKLE_PROOF_ADDRESS>;
  • rename data/addresses.txt.example to data/addresses.txt and add your eligible addresses;
  • rename data/rpcs.txt.example to data/rpcs.txt and add your private instant rpc zkSync Era;
  • rename data/private_keys.txt.example to data/private_keys.txt and add the corresponding addresses.txt private keys;

Run Script

npm run start

Run individual modules:

npm run proof #get proofs
npm run amount #get amounts
npm run parsecsv #make addresses.txt from result.csv
npm run createjson #make 'get_proof.json' from logs
npm run claim #make claim
npm run swap #make swap

Releases

No releases published