- Fork/clone the repo locally and follow the instructions in the main readme to load the SourceCred instance (you will need API keys for Github and Discord)
- If you already forked the repo, make sure to pull any changes from the master branch (since the discord bot updates ETH addresses in the ledger programmatically)
- Due to painfully long and unreliable method of loading contribution data locally using
yarn load
, we now use the following method from within the root of the XP repo, as advised by SC:- On
master
, fetch the latest updates from origin:git pull
. - Checkout the
output
directory of thegh-pages
branch:git checkout origin/gh-pages -- output
— (the graph data from the last run). - Run
yarn serve
to fire up the interface from xp.metagame.wtf with the latest data.
- On
- Open the admin interface at
localhost:6006
and go to the “Identities” tab. To merge accounts:- Search in 'Filter List' for the accounts to be merged.
- For each user, use the “Add Alias” field to search for their aliases.
- Click on all the accounts needing to be merged into the selected user.
- Repeat the process for any other users.
- Once you are done, click “Save ledger to disk”.
- Exit the running SC instance (
CTRL+C
in terminal).
- If you do need to activate players, you will want to commit the ledger, push changes and create a PR before progressing with Step 6, otherwise skip the rest of this step. Create a new branch along the lines of
git checkout -b activations/year-month-day
, commit changes toledger.json
, push, and open a PR. Once merged, we need to wait overnight for the runners to run again with the newly activated or merged players.
❢ If you activated players, confirm the GitHub actions have run (sometimes they fail) since your PR was merged. You will need to repeat Step 3 again to get the latest data before moving to Step 7 .
- Check this Observable notebook to see how many
seedsToMintForCurrentInterval
. This is based on 20 SEEDs per week per active contributor (where “active” players earned at least 20 XP). - Update the
config/grain.json
file with ~75% of theseedsToMint
amount going toRECENT
policy and ~25% going to theBALANCED
policy (e.g. if the number in Observable is 400, put 300 in Recent and 100 in Balanced). - Check the leaderboard in the UI to ensure the XP amounts for the distribution period make sense.
- In a new terminal window, run
yarn grain
to do the distribution. - Refresh the admin page and go to the SEED Accounts page to see the new SEED balance for each player, ensure these amounts make sense.
- Create a new branch at this point and name it something sane like
git checkout -b dist/day-month–day-month-year
. - Run
./scripts/seed-minting-disburse.mjs
in a terminal to generate the JSON & CSV files of ETH addresses and SEED amounts to disburse. (The script will use the first file constructed using theoutput-pattern
argument that doesn't exist for output.) - Keep track of the total amount of SEEDs to disburse. This value will be used later when verifying data for deducting from the ledger in Step C.
- Post the distribution to the community (to #seed-minting) using this Google Sheet (ask @luxumbra for edit access). Refer to previous sheets for formatting convention. We usually give 72 hours to raise issues. If you need to re-run a distribution,
git checkout ledger.json
before runningyarn grain
again. - Once discussion has concluded, commit and push all changes to Github, and make a PR to merge them into
master
.
⚠️ If there are merge conflicts, you may need to runscripts/rebase-ledger.js
.
⚠️ This step requires you to be a signer on the Polygon multisig.
- Reformat the final Google Sheet to match the same headings & columns as seen in
distros/Disbursal #23.SourceCred Airdrop.csv
. Note the addition of the leadingtoken_type
(erc20
) andtoken_address
(0xEAeCC18198a475c921B24b8A6c1C1f0f5F3F7EA0
) columns. - Go to the gnosis safe and sign in. Head to Apps → CSV Airdrop and upload the
.csv
file from the previous step. Next, you should see the contents of the file in the textfield. - Verify the data looks good, submit, and sign the transaction.
- Once the transaction is confirmed, grab the transaction URL, and post it in #multisig, pestering the signers until it's done.
- Relax… until the drop is done and you then need to move to step C — as soon as possible post distribution (after your distro branch has been merged) to avoid any ledger conflicts!
- Pull down the latest changes from origin (with data from the latest dist)
- Create a new branch from master and give it a sensible name eg:
deduction/#23
- Rerun
./scripts/seed-minting-disburse.js
with the following arguments:- Pass
--tx-url=
as the Polygonscan link for theseedAllocations
transaction from step A.10 above. - Pass
--tx-date=
as the date of the said transaction - Pass
-o
to cause the script to overwrite the last disbursal.
- Pass
- Run something akin to
./scripts/seed-minting-disburse.js --tx-url=https://polygonscan… --tx-date=2023-03-15 -o
, and ensure there's no errors or “Extra SEED Balance” messages logged. - Ensure that the
distros/Disbursal #${index}.SourceCred.*
files for the current distribution did not have any changes. This ensures that the on chain distribution exactly matches the ledger state. - Run
yarn serve
, and double check that the current balance in SEED Accounts is 0 for people in the distribution. - Commit the updates to
ledger.json
, push them, and make a new PR tomaster
.