Skip to content

streamr-dev/brubeck-rewards

Repository files navigation

Token distribution contract

CI tests

Smart contract

  1. Deploy the contract, argument = address of the token to distribute
  2. Send distributed tokens into contract
  3. Send native token into the contract (stipends to recipients so that they can transfer the token forward)
  4. Call send, arguments = (array of the intended targets' addresses, respective array of token wei amounts)
  5. Call withdrawAll to return any extra tokens and native tokens to the deployer

Usage

To run the Stream-team distribution:

  1. Send tokens to the distributor contract
  2. Clone this repo and/or cd brubeck-rewards (enter commands from repository root)
  3. Save the CSV file to data/stream-team/2022-11-01.csv (use today's date!)
  4. export KEY=0x1234567890123456789012345678901234567890123456789012345678901234 (find the "distributor" private key in 1password)
  5. scripts/stream-team.sh

Costs

Gas measurements using index.js

batch 10, gas 179857 (18000/target)
batch 30, gas 486143 (16200/target)
batch 100, gas 1558330 (15600/target)

About

Token distribution smart contract + script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •