
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
📦 Celo rewards CLI that uses a smart contract that distributes a balance of tokens according to a merkle root
The following assumes the use of node@>=10
.
yarn
yarn compile
yarn test
To get complete documentation for each command and its parameters use the --help
flag.
./bin/run rewards:generatemerkle --help
export NODE_OPTIONS="--max-old-space-size=8192"
It's best to fetch events until January, then fetch the rest and store in separate files, or else JSON can get too big for nodejs. Begin fetching next batch exactly one block after the previous batch ended using the --fromBlock
flag. There will soon be a fix to do this automatically.
./bin/run rewards:fetchevents --toDate 01/01/2021 --env mainnet
transfer-cusd-events-<fromBlock>-<toBlock>.json
attestation-events-<fromBlock<-<toBlock>.json
./bin/run rewards:generatemerkle \
--attestationEvents <attestation-events1.json> <attestation-events2.json>\
--transferEvents <transfer-events1.json> <transfer-events2.json>\
--balanceFromBlock 2000000 \
--balanceToBlock 3000000 \
--celoToUsd 3.08 \
--env mainnet
merkleTree.json
rewardsByAddress.json
rewardsCalculationState.json
./bin/run rewards:deploydistributor --merkleTree merkleTree.json --env local --from <address>
Distibutor address: 0xEdCF1a0003f84A97E4a28c904d888C6a2811fe
Merkle root: 0xb0071a0dc946557f936a848dfcdf7d8d06a01edbbadfca5fd034eb48110535af
Token address: 0xF194afDf50B03e69Bd7D057c1Aa9e10c9954E4C9
Total rewards: 849487996068222610
./bin/run rewards:distribute --merkleTree merkleTree.json --address <distributor address> --env local --from <address>
distribution-<distributor address>.json
with a mapping of each account to the transactionHash of their distribution tx.distribution-<distributor-address>.json
and rewardsByAddress.json
mapping accounts keys match (same number of lines in each json file). ./bin/run rewards:generatemerkle \
--verifyAgainstContract <merkle distributor address>
--attestationEvents <attestation-events1.json> <attestation-events2.json>\
--transferEvents <transfer-events1.json> <transfer-events2.json>\
--balanceFromDate 02/01/2021 \
--balanceToDate 02/08/2021 \
--celoToUsd 3.08 \
--env mainnet
merkleTree.json
rewardsByAccount.json
rewardsCalculationState.json
FAQs
📦 Celo rewards CLI that uses a smart contract that distributes a balance of tokens according to a merkle root
We found that celogive demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.