Skip to content

Commit 9b0ce58

Browse files
author
Neo
committed
Fix ACTION_MAP wiring: repoint 5 mis-routed actions to real service methods
The capability catalog routed 5 actions to service methods that don't exist (surfaced once Fix 2 let the dispatch-integration test run): - liquid_stake_lido / liquid_stake_rocketpool were mapped to 'staking' (StakingService) but the methods live on RestakingService -> repointed the catalog service field to 'restaking'. - oracle_price_query / oracle_vrf_request / oracle_weather_query named OracleGateway.query_price/request_vrf/query_weather, which didn't exist -> added three thin public wrappers that forward to the generic request() with oracle_type price_feed / random_vrf / weather. Full platform suite now 492 passed (was 5 failed / 436 passed / 51 errors before the Py3.9 + wiring fixes). Testnet; no security logic touched.
1 parent e0bb594 commit 9b0ce58

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

ABI_VERIFICATION_NEEDED.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Default network: **Base Sepolia (84532)**. Non-custodial invariant preserved
7171
### 11. restaking (EigenLayer / Symbiotic / Karak / Lido / Rocket Pool)
7272
- **Config:** `services.restaking.strategy_manager_address`/`.strategy_address`/`.delegation_manager_address` (EigenLayer), `.symbiotic_vault_address`, `.karak_vault_address`, `.lido_steth_address`, `.rocketpool_deposit_address`.
7373
- **Verify ABI:** EigenLayer `StrategyManager.depositIntoStrategy(strategy,token,amount)`, `DelegationManager.delegateTo(...)`; Lido `submit(address)`; Rocket Pool deposit. **Verify each manager/strategy address + signature** against the live deployments (these differ per network and have changed across EigenLayer upgrades).
74-
- **DISPATCH WIRING BUG (separate, flagged):** `ACTION_MAP` routes `liquid_stake_lido` / `liquid_stake_rocketpool` to **`StakingService`**, which has no such methods — the real methods are on **`RestakingService`**. Fix `ACTION_MAP` (in the untouched `service_dispatcher.py`) to repoint these two actions. (See also FIX 2's note.)
74+
- **DISPATCH WIRING BUG — FIXED:** the capability catalog routed `liquid_stake_lido` / `liquid_stake_rocketpool` to `staking` (StakingService, no such methods); repointed to `restaking` (RestakingService, where the methods live). The three `oracle_*` actions named non-existent `OracleGateway` methods; added thin `query_price` / `request_vrf` / `query_weather` wrappers that forward to the generic `request()`. Full suite now 492 passed.
7575

7676
### 12. nft_lending (BendDAO / NFTfi / Arcade)
7777
- **Config:** `services.nft_lending.pool_address` (per protocol).

runtime/blockchain/services/oracle_gateway/gateway.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,25 @@ async def request_safe(
248248
"timestamp": int(time.time()),
249249
}
250250

251+
# ------------------------------------------------------------------
252+
# Named action wrappers — used by the capability catalog / ACTION_MAP.
253+
# The dispatcher calls a bare method name with **params; these forward to
254+
# the generic request() with the correct oracle_type so each catalogued
255+
# oracle action resolves to a real method.
256+
# ------------------------------------------------------------------
257+
258+
async def query_price(self, **params: Any) -> dict[str, Any]:
259+
"""ACTION ``oracle_price_query`` → a price-feed oracle request (read-only)."""
260+
return await self.request_safe("price_feed", params)
261+
262+
async def request_vrf(self, **params: Any) -> dict[str, Any]:
263+
"""ACTION ``oracle_vrf_request`` → a Chainlink VRF randomness request."""
264+
return await self.request("random_vrf", params)
265+
266+
async def query_weather(self, **params: Any) -> dict[str, Any]:
267+
"""ACTION ``oracle_weather_query`` → a weather oracle request (read-only)."""
268+
return await self.request_safe("weather", params)
269+
251270
# ------------------------------------------------------------------
252271
# Dispatch & handlers
253272
# ------------------------------------------------------------------

runtime/capabilities/catalog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ def _cap(
149149
_cap("restake_karak", "Restake on Karak", "staking", "restaking", "restake_karak", subcategory="restaking", protocol="karak", available=False),
150150
_cap("delegate_to_operator", "Delegate to Operator", "staking", "restaking", "delegate_to_operator", subcategory="restaking", available=False),
151151
_cap("withdraw_restake", "Withdraw Restake", "staking", "restaking", "withdraw_restake", subcategory="restaking", available=False),
152-
_cap("liquid_stake_lido", "Liquid Stake with Lido", "staking", "staking", "liquid_stake_lido", subcategory="liquid", protocol="lido", available=False),
153-
_cap("liquid_stake_rocketpool", "Liquid Stake (Rocket)", "staking", "staking", "liquid_stake_rocketpool", subcategory="liquid", protocol="rocketpool", available=False),
152+
_cap("liquid_stake_lido", "Liquid Stake with Lido", "staking", "restaking", "liquid_stake_lido", subcategory="liquid", protocol="lido", available=False),
153+
_cap("liquid_stake_rocketpool", "Liquid Stake (Rocket)", "staking", "restaking", "liquid_stake_rocketpool", subcategory="liquid", protocol="rocketpool", available=False),
154154

155155
# ── Staking (core) ─────────────────────────────────────────────────────
156156
_cap("stake", "Stake Tokens", "staking", "staking", "stake", feed_event="tokens_staked"),

0 commit comments

Comments
 (0)