- XP operators can:
award,revoke,setMerkleRoot. - Admins (DEFAULT_ADMIN_ROLE) can grant/revoke
XP_OPERATOR_ROLE.
pnpm ts-node scripts/xp/xp-grant-operators.ts \
--rpc $RPC \
--key $ADMIN_PK \
--contract $XP_ADDR \
--ops 0xOperator1,0xOperator2Use the same script with --revoke or call directly via a wallet:
xp.revokeRole(XP_OPERATOR_ROLE, 0xOperator1);- Generate canonical JSON output
pnpm ts-node scripts/xp/xp-generate-merkle.ts \
--in scripts/xp/data/allocs.json \
--out ./output/xp-distribution.json \
--id <N>- Publish root on-chain
pnpm ts-node scripts/xp/xp-publish-root.ts \
--rpc $RPC --key $OPERATOR_PK --contract $XP_ADDR \
--json ./output/xp-distribution.json- Grant role to new operator
- Switch backend to new key and publish next root
- Revoke old operator
- If a bad root is set, revoke the responsible operator. Use
revoke(user, amount)to remove illegitimate XP.