Skip to content

📦 A smart contract that distributes a balance of tokens according to a merkle root

License

Notifications You must be signed in to change notification settings

Cryptorubic/merkle-distributor

 
 

Repository files navigation

Install Dependencies

yarn

Compile Contracts

yarn compile

Run Tests

yarn test

Deploy steps

  1. Create .env file using .env.example as example
  2. Fill the distribution.json file with data
  3. Change the names of generated files in generate-merkle-root.ts
fs.writeFileSync('scripts/<NAME>.front.json', JSON.stringify(parsed, null, 4));
fs.writeFileSync('scripts/<NAME>.qa.json', JSON.stringify(claims, null, 4));
  1. Generate the merkle root and proofs
yarn generate-merkle-root

Regular Distributor deployment

  1. Change data in the deployMerkleDistributor.js file
  const merkleDistributor = await MerkleDistributor.deploy(
    // Token Address
    '<TOKEN_ADDRESS>',
    // Merkle root
    '<MERKLE_ROOT>'
  )
  1. Deploy
yarn deploy --network <NETWORK>

To-Staking Distributor deployment

  1. Change data in the deployMerkleDistributorToStaking.js file
  const merkleDistributor = await MerkleDistributor.deploy(
    // Token Address
    '<TOKEN_ADDRESS>',
    // Merkle root
    '<MERKLE_ROOT>'
  )
  1. Deploy
yarn deploy-to-staking --network <NETWORK>

About

📦 A smart contract that distributes a balance of tokens according to a merkle root

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 72.0%
  • Solidity 25.0%
  • JavaScript 3.0%