- Deploy the contract, argument = address of the token to distribute
- Send distributed tokens into contract
- Send native token into the contract (stipends to recipients so that they can transfer the token forward)
- Call send, arguments = (array of the intended targets' addresses, respective array of token wei amounts)
- Call withdrawAll to return any extra tokens and native tokens to the deployer
To run the Stream-team distribution:
- Send tokens to the distributor contract
- Clone this repo and/or
cd brubeck-rewards
(enter commands from repository root) - Save the CSV file to
data/stream-team/2022-11-01.csv
(use today's date!) - export KEY=0x1234567890123456789012345678901234567890123456789012345678901234 (find the "distributor" private key in 1password)
scripts/stream-team.sh
Gas measurements using index.js
batch 10, gas 179857 (18000/target)
batch 30, gas 486143 (16200/target)
batch 100, gas 1558330 (15600/target)