J
jb-multi-currency
Handle Juicebox V5 multi-currency projects (ETH vs USDC accounting).\nUse when: (1) building UI that displays currency labels (ETH vs USDC),\n(2) sending transactions that require currency parameter,\n(3) configuring fund access limits or accounting contexts for new
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Handle Juicebox V5 multi-currency projects (ETH vs USDC accounting).\nUse when: (1) building UI that displays currency labels (ETH vs USDC),\n(2) sending transactions that require currency parameter,\n(3) configuring fund access limits or accounting contexts for new rulesets,\n(4) querying project balance/surplus with correct token,\n(5) debugging \
How to use
- Zainstaluj skill jb-multi-currency w swoim projekcie Juicebox V5, dodając go do dostępnych narzędzi agenta.
- Pobierz wartość baseCurrency z metadanych rulesetów projektu — będzie to 1 dla ETH lub 2 dla USDC — i użyj jej do dynamicznego ustawienia etykiet walut w interfejsie zamiast hardkodowania "ETH" lub "USDC".
- Przy wysyłaniu transakcji terminalowych (sendPayoutsOf, useAllowanceOf) przekaż prawidłową wartość baseCurrency jako parametr zamiast wartości stałej, aby uniknąć błędów "wrong currency".
- Konfigurując limity dostępu do funduszy lub konteksty rachunkowe dla nowych rulesetów, upewnij się, że wartość currency w JBAccountingContext jest kodowana jako uint32(uint160(tokenAddress)), a nie jako 1 lub 2.
- Jeśli modal do wypłaty pokazuje nieprawidłową walutę zwrotu (np. ETH zamiast USDC), sprawdź, czy detekcja baseCurrency jest poprawna i czy wszystkie komponenty używają tej samej wartości.
- Wykorzystaj udostępniane przez skill stałe sieciowe (nazwy sieci, adresy explorerów) w wielu komponentach modalnych, aby zachować spójność danych łańcuchowych.