Synthèse automatique
Génère un fichier JSON compatible Safe Transaction Builder pour réclamer les récompenses de vote internes et externes sur le protocole Lithos.
Points forts
- Automatise la création de transactions multisig pour les récompenses de vote
- Vérifie les soldes suffisants des contrats de bribe pour éviter les échecs
- Prend en charge les primes internes (frais LP) et externes
Limites
- Spécifique au réseau Plasma mainnet (chain ID 9745) et au protocole Lithos
- Nécessite une configuration préalable de l'outil cast et d'un fichier .env
- Ne gère pas les cas où les récompenses sont verrouillées ou non réclamables
Utilisez cette compétence lorsque vous devez réclamer toutes les récompenses de vote pour un multisig sur Lithos en une seule transaction batch.
Évitez de l'utiliser pour des protocoles autres que Lithos ou sur des réseaux autres que Plasma mainnet.
Analyse de sécurité
SûrThe skill uses standard blockchain querying tools (cast) and file operations to generate a Safe multisig batch JSON. No destructive commands, external data exfiltration, or obfuscation. The script reference is not included, but the manual steps are safe.
Aucun point d'attention détecté
Comment cette analyse est faiteExemples
Generate a Safe batch JSON to claim all my voting rewards (internal fees and external bribes) for my multisig address 0x1234... on Lithos.Help me claim bribes for my veNFTs on Lithos. First check if there are any claimable rewards, then create the Safe transaction JSON.Create a Safe batch transaction to claim internal LP fee bribes from all gauges for address 0xABCD... on Lithos.name: claim-rewards description: Generate Safe UI compatible multisig batch JSON to claim voting rewards (internal LP fees and external bribes). Use when the user wants to claim bribes, collect voting rewards, or prepare claim transactions for a multisig wallet. allowed-tools: Bash, Read, Write, Glob, Grep
Claim Voting Rewards Safe Batch Generator
Generate Safe Transaction Builder compatible JSON for claiming all voting rewards (internal LP fees and external bribes) on the Lithos protocol.
Prerequisites
- The
.envfile must containRPC_URLfor Plasma mainnet - The owner address must be a multisig that owns veNFTs or has claimable rewards
Contract Addresses (Plasma Mainnet)
- Voter:
0x2AF460a511849A7aA37Ac964074475b0E6249c69 - VotingEscrow:
0x2Eff716Caa7F9EB441861340998B0952AF056686 - Chain ID:
9745
Key Concepts
Internal vs External Bribes
- Internal bribes (LP fees): Trading fees from liquidity provision, claimed via
claimFees() - External bribes: Third-party incentives for voting, claimed via
claimBribes()
Reward Ownership
Rewards accrue to the owner address, not individual veNFT tokenIds. The owner can claim all rewards in a single batch transaction.
Instructions
Step 1: Get all pools and gauges
# Get number of pools
source .env && cast call 0x2AF460a511849A7aA37Ac964074475b0E6249c69 "length()(uint256)" --rpc-url $RPC_URL
# Get pool at index
source .env && cast call 0x2AF460a511849A7aA37Ac964074475b0E6249c69 "pools(uint256)(address)" <INDEX> --rpc-url $RPC_URL
# Get gauge for pool
source .env && cast call 0x2AF460a511849A7aA37Ac964074475b0E6249c69 "gauges(address)(address)" <POOL_ADDRESS> --rpc-url $RPC_URL
Step 2: Get bribe contracts for each gauge
# Get internal bribe (LP fees)
source .env && cast call 0x2AF460a511849A7aA37Ac964074475b0E6249c69 "internal_bribes(address)(address)" <GAUGE_ADDRESS> --rpc-url $RPC_URL
# Get external bribe
source .env && cast call 0x2AF460a511849A7aA37Ac964074475b0E6249c69 "external_bribes(address)(address)" <GAUGE_ADDRESS> --rpc-url $RPC_URL
Step 3: Get reward tokens for each bribe
# Get number of reward tokens
source .env && cast call <BRIBE_ADDRESS> "rewardsListLength()(uint256)" --rpc-url $RPC_URL
# Get reward token at index
source .env && cast call <BRIBE_ADDRESS> "rewardTokens(uint256)(address)" <INDEX> --rpc-url $RPC_URL
Step 4: Check claimable amounts
# Check earned amount for owner
source .env && cast call <BRIBE_ADDRESS> "earned(address,address)(uint256)" <OWNER_ADDRESS> <TOKEN_ADDRESS> --rpc-url $RPC_URL
# IMPORTANT: Check bribe contract has sufficient balance
source .env && cast call <TOKEN_ADDRESS> "balanceOf(address)(uint256)" <BRIBE_ADDRESS> --rpc-url $RPC_URL
CRITICAL: Only include rewards where bribe_balance >= earned_amount. Underfunded bribes will cause the transaction to revert with "ERC20: transfer amount exceeds balance".
Step 5: Generate claim calldata
For internal bribes (LP fees):
cast calldata "claimFees(address[],address[][])" "[<BRIBE1>,<BRIBE2>,...]" "[[<TOKEN1A>,<TOKEN1B>],[<TOKEN2A>],...]"
For external bribes:
cast calldata "claimBribes(address[],address[][])" "[<BRIBE1>,<BRIBE2>,...]" "[[<TOKEN1A>,<TOKEN1B>],[<TOKEN2A>],...]"
Step 6: Create Safe batch JSON
Generate a JSON file with this structure:
{
"version": "1.0",
"chainId": "9745",
"createdAt": <UNIX_TIMESTAMP>,
"meta": {
"name": "Claim All Voting Rewards for <SHORT_ADDRESS>...",
"description": "Claim all internal (LP fees) and external bribes across <NUM_BRIBES> bribe contracts for address <FULL_ADDRESS>",
"txBuilderVersion": "1.16.5"
},
"transactions": [
{
"to": "0x2AF460a511849A7aA37Ac964074475b0E6249c69",
"value": "0",
"data": "<CLAIM_FEES_CALLDATA>",
"contractMethod": {
"inputs": [
{ "internalType": "address[]", "name": "_fees", "type": "address[]" },
{ "internalType": "address[][]", "name": "_tokens", "type": "address[][]" }
],
"name": "claimFees",
"payable": false
},
"contractInputsValues": {
"_fees": "[<BRIBE_ADDRESSES>]",
"_tokens": "[[<TOKEN_ARRAYS>]]"
}
},
{
"to": "0x2AF460a511849A7aA37Ac964074475b0E6249c69",
"value": "0",
"data": "<CLAIM_BRIBES_CALLDATA>",
"contractMethod": {
"inputs": [
{ "internalType": "address[]", "name": "_bribes", "type": "address[]" },
{ "internalType": "address[][]", "name": "_tokens", "type": "address[][]" }
],
"name": "claimBribes",
"payable": false
},
"contractInputsValues": {
"_bribes": "[<BRIBE_ADDRESSES>]",
"_tokens": "[[<TOKEN_ARRAYS>]]"
}
}
]
}
Step 7: Write to file
Save the JSON to safe-txs/safe.claim-bribes-<OWNER_SHORT>.json.
Using the Script
There is an existing script that automates this process:
npx tsx scripts/claimAllBribesForAddress.ts <OWNER_ADDRESS>
This script:
- Enumerates all 25+ gauges
- Gets internal and external bribes for each
- Checks all reward tokens and claimable amounts
- Verifies bribe contracts have sufficient balance (skips underfunded)
- Generates Safe batch JSON with
claimFeesandclaimBribestransactions - Outputs a summary of claimable and skipped rewards
Verification
Simulate the transactions before executing:
# Simulate claimFees
source .env && cast call 0x2AF460a511849A7aA37Ac964074475b0E6249c69 "<CLAIM_FEES_CALLDATA>" --from <OWNER_ADDRESS> --rpc-url $RPC_URL
# Simulate claimBribes
source .env && cast call 0x2AF460a511849A7aA37Ac964074475b0E6249c69 "<CLAIM_BRIBES_CALLDATA>" --from <OWNER_ADDRESS> --rpc-url $RPC_URL
Example Usage
User: "Claim all voting rewards for 0x495a98fd059551385Fc9bAbBcFD88878Da3A1b78"
- Run the script or manually enumerate all gauges
- Find claimable rewards:
- vAMM-WXPL/USDT0 (internal): 15,625 WXPL, 3,196 USDT0
- sAMM-msUSD/USDT0 (external): 3,330 USDT0
- vAMM-WXPL/LITH (internal): 91 WXPL, 3,719 LITH
- etc.
- Skip underfunded bribes (e.g., ELITE bribe with insufficient balance)
- Generate
safe-txs/safe.claim-bribes-0x495a98.json - Simulate both transactions
- Report success with rewards breakdown
Common Token Addresses
| Token | Address | Decimals | |-------|---------|----------| | WXPL | 0x6100E367285b01F48D07953803A2d8dCA5D19873 | 18 | | USDT0 | 0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb | 6 | | LITH | 0xAbB48792A3161E81B47cA084c0b7A22a50324A44 | 18 | | USDe | 0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34 | 18 | | msUSD | 0x29AD7fE4516909b9e498B5a65339e54791293234 | 18 | | WETH | 0x9895D81bB462A195b4922ED7De0e3ACD007c32CB | 18 | | ebUSD | 0xEf7B1A03E0897C33b63159e38d779e3970C0E2fc | 18 | | ELITE | 0x30C8Cf6B46AA4DF3F9fbC2857aca92F10a6cAd7f | 18 |
Common Mistakes to Avoid
-
Including underfunded bribes - Always check
balanceOf(bribe)>=earned(owner, token). Underfunded bribes will revert the entire batch. -
Including tokens with 0 claimable - Only include tokens where
earned() > 0. -
Using wrong address - Verify the owner address actually owns veNFTs or has earned rewards.
-
Missing reward tokens - Check ALL reward tokens in each bribe contract, not just the first one.
Notes
- Rewards accrue to the owner address, not individual tokenIds
- Internal bribes are LP trading fees (claimFees)
- External bribes are third-party incentives (claimBribes)
- Both can be batched into a single Safe transaction
- Always simulate before executing to catch revert conditions
- Underfunded bribes are a known issue - skip them and report to protocol team
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/claim-voting-rewards-safe-batch-generator-mm8o52k3/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/claim-voting-rewards-safe-batch-generator-mm8o52k3' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/claim-voting-rewards-safe-batch-generator-mm8o52k3/download' --output '.skill-downloads/claim-voting-rewards-safe-batch-generator-mm8o52k3/SKILL.md.part' && mv '.skill-downloads/claim-voting-rewards-safe-batch-generator-mm8o52k3/SKILL.md.part' '.skill-downloads/claim-voting-rewards-safe-batch-generator-mm8o52k3/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Outils déclarés par l’auteur (à vérifier dans votre agent) : Bash, Read, Write, Glob, Grep
Extrait original : Prerequisites
- The
.envfile must containRPC_URLfor Plasma mainnet - The owner address must be a multisig that owns veNFTs or has claimable rewards
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/claim-voting-rewards-safe-batch-generator-mm8o52k3/SKILL.md' && test -s '.skill-downloads/claim-voting-rewards-safe-batch-generator-mm8o52k3/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/claim-rewards' && cp -R '.skill-downloads/claim-voting-rewards-safe-batch-generator-mm8o52k3' '.claude/skills/claim-rewards'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/claim-voting-rewards-safe-batch-generator-mm8o52k3'openskills read 'claim-voting-rewards-safe-batch-generator-mm8o52k3'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/claim-voting-rewards-safe-batch-generator-mm8o52k3/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.