diff --git a/apps/api/src/hackproof/integrations/adapters/reflector.py b/apps/api/src/hackproof/integrations/adapters/reflector.py index 762fbfd..c804586 100644 --- a/apps/api/src/hackproof/integrations/adapters/reflector.py +++ b/apps/api/src/hackproof/integrations/adapters/reflector.py @@ -8,6 +8,7 @@ from hackproof.indexer.rpc import SorobanRpc from hackproof.integrations.adapters.base import Adapter +from hackproof.integrations.adapters.sources import observe_package, observe_repo from hackproof.integrations.catalog import Network, ProfileContract from hackproof.integrations.chain import ContractSnapshot, Reading from hackproof.integrations.soroban import view @@ -120,6 +121,10 @@ class ReflectorAdapter(Adapter): async def observe( self, http: httpx.AsyncClient, network: Network, contract: ProfileContract ) -> ContractSnapshot | None: + if contract.kind == "package": + return await observe_package(http, contract) + if contract.kind == "repo": + return await observe_repo(http, contract) return await observe(SorobanRpc(http, network.rpc_url), network, contract) async def probe( diff --git a/apps/api/src/hackproof/integrations/adapters/sources.py b/apps/api/src/hackproof/integrations/adapters/sources.py new file mode 100644 index 0000000..a13e8d7 --- /dev/null +++ b/apps/api/src/hackproof/integrations/adapters/sources.py @@ -0,0 +1,79 @@ +from typing import Any + +import httpx +from pydantic import BaseModel, ConfigDict, Field + +from hackproof.integrations.catalog import ProfileContract +from hackproof.integrations.chain import ContractSnapshot + + +class Release(BaseModel): + model_config = ConfigDict(extra="ignore") + + versions: dict[str, Any] = Field(default_factory=dict) + time: dict[str, str] = Field(default_factory=dict) + dist_tags: dict[str, str] = Field(default_factory=dict, alias="dist-tags") + + +class Repository(BaseModel): + model_config = ConfigDict(extra="ignore") + + open_issues_count: int = 0 + stargazers_count: int = 0 + forks_count: int = 0 + pushed_at: str = "" + archived: bool = False + + +async def observe_package( + http: httpx.AsyncClient, contract: ProfileContract +) -> ContractSnapshot | None: + registry = await http.get( + f"https://registry.npmjs.org/{contract.id.replace('/', '%2F')}" + ) + if registry.status_code != 200: + return None + release = Release.model_validate(registry.json()) + stamps = { + version: stamp + for version, stamp in release.time.items() + if version not in {"created", "modified"} + } + latest_stamp = max(stamps.values()) if stamps else "" + downloads = await http.get( + f"https://api.npmjs.org/downloads/point/last-month/{contract.id}" + ) + monthly = ( + downloads.json().get("downloads") if downloads.status_code == 200 else None + ) + tags = ", ".join(f"{tag} {version}" for tag, version in release.dist_tags.items()) + return ContractSnapshot( + facts={ + "tags": tags, + "versions": len(release.versions), + "published": latest_stamp[:10], + "downloads_month": monthly, + }, + items=sorted(release.versions)[-12:], + ) + + +async def observe_repo( + http: httpx.AsyncClient, contract: ProfileContract +) -> ContractSnapshot | None: + response = await http.get( + f"https://api.github.com/repos/{contract.id}", + headers={"Accept": "application/vnd.github+json"}, + ) + if response.status_code != 200: + return None + repository = Repository.model_validate(response.json()) + return ContractSnapshot( + facts={ + "open_issues": repository.open_issues_count, + "stars": repository.stargazers_count, + "forks": repository.forks_count, + "pushed": repository.pushed_at[:10], + "archived": "TRUE" if repository.archived else "FALSE", + } + ) diff --git a/apps/api/src/hackproof/integrations/adapters/trustless_work.py b/apps/api/src/hackproof/integrations/adapters/trustless_work.py index dca43d9..a598be6 100644 --- a/apps/api/src/hackproof/integrations/adapters/trustless_work.py +++ b/apps/api/src/hackproof/integrations/adapters/trustless_work.py @@ -8,6 +8,7 @@ from hackproof.indexer.rpc import SorobanRpc from hackproof.integrations.adapters.base import Adapter +from hackproof.integrations.adapters.sources import observe_package, observe_repo from hackproof.integrations.catalog import Network, ProfileContract from hackproof.integrations.chain import ContractSnapshot @@ -53,24 +54,6 @@ class Schema(BaseModel): paths: dict[str, dict[str, Any]] = Field(default_factory=dict) -class Release(BaseModel): - model_config = ConfigDict(extra="ignore") - - versions: dict[str, Any] = Field(default_factory=dict) - time: dict[str, str] = Field(default_factory=dict) - dist_tags: dict[str, str] = Field(default_factory=dict, alias="dist-tags") - - -class Repository(BaseModel): - model_config = ConfigDict(extra="ignore") - - open_issues_count: int = 0 - stargazers_count: int = 0 - forks_count: int = 0 - pushed_at: str = "" - archived: bool = False - - async def observe_api( http: httpx.AsyncClient, contract: ProfileContract ) -> ContractSnapshot | None: @@ -112,60 +95,6 @@ async def observe_api( ) -async def observe_package( - http: httpx.AsyncClient, contract: ProfileContract -) -> ContractSnapshot | None: - registry = await http.get( - f"https://registry.npmjs.org/{contract.id.replace('/', '%2F')}" - ) - if registry.status_code != 200: - return None - release = Release.model_validate(registry.json()) - stamps = { - version: stamp - for version, stamp in release.time.items() - if version not in {"created", "modified"} - } - latest_stamp = max(stamps.values()) if stamps else "" - downloads = await http.get( - f"https://api.npmjs.org/downloads/point/last-month/{contract.id}" - ) - monthly = ( - downloads.json().get("downloads") if downloads.status_code == 200 else None - ) - tags = ", ".join(f"{tag} {version}" for tag, version in release.dist_tags.items()) - return ContractSnapshot( - facts={ - "tags": tags, - "versions": len(release.versions), - "published": latest_stamp[:10], - "downloads_month": monthly, - }, - items=sorted(release.versions)[-12:], - ) - - -async def observe_repo( - http: httpx.AsyncClient, contract: ProfileContract -) -> ContractSnapshot | None: - response = await http.get( - f"https://api.github.com/repos/{contract.id}", - headers={"Accept": "application/vnd.github+json"}, - ) - if response.status_code != 200: - return None - repository = Repository.model_validate(response.json()) - return ContractSnapshot( - facts={ - "open_issues": repository.open_issues_count, - "stars": repository.stargazers_count, - "forks": repository.forks_count, - "pushed": repository.pushed_at[:10], - "archived": "TRUE" if repository.archived else "FALSE", - } - ) - - async def observe_wasm( http: httpx.AsyncClient, network: Network, contract: ProfileContract ) -> ContractSnapshot | None: diff --git a/apps/api/src/hackproof/integrations/detect.py b/apps/api/src/hackproof/integrations/detect.py index 68b78f2..56bb683 100644 --- a/apps/api/src/hackproof/integrations/detect.py +++ b/apps/api/src/hackproof/integrations/detect.py @@ -54,14 +54,14 @@ def add(method: Method, evidence: str, path: str) -> None: ) for path, text in files.items(): - for contract_id in ids: - if contract_id in text: - add("contract", contract_id, path) name = PurePosixPath(path).name if PurePosixPath(path).suffix in PROSE_SUFFIXES or name.lower().startswith( "readme" ): continue + for contract_id in ids: + if contract_id in text: + add("contract", contract_id, path) if not profile.in_context(text): continue for signal in profile.signals: diff --git a/apps/api/tests/test_integrations.py b/apps/api/tests/test_integrations.py index fb45590..1214db7 100644 --- a/apps/api/tests/test_integrations.py +++ b/apps/api/tests/test_integrations.py @@ -345,3 +345,16 @@ def test_private_signals_and_checks_never_reach_the_public_profile(): assert public.checks == [] assert "public-api-key" in {item.slug for item in internal.signals} assert "public-api-key" in catalog.private_signals()["trustless-work"] + + +def test_a_contract_id_listed_in_prose_is_not_an_integration(): + files = { + "README.md": "Feed CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W", + ".agents/skills/ecosystem.md": "CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN", + } + assert detect(files, get_catalog(), "someone") == [] + files = { + ".env.testnet": "ORACLE=CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W" + } + found = {item.method for item in detect(files, get_catalog(), "someone")} + assert "contract" in found diff --git a/data/2026/4ward.yml b/data/2026/4ward.yml index 8b1ffa1..5dd924a 100644 --- a/data/2026/4ward.yml +++ b/data/2026/4ward.yml @@ -33,9 +33,6 @@ integrations: - method: capture detail: tickers:USD file_url: https://github.com/ygk94/4ward/blob/HEAD/contracts/mock-oracle/src/lib.rs - - method: contract - detail: CBKGPWGKSKZF52CFHMTRR23TBWTPMRDIYZ4O2P5VS65BMHYH4DXMCJZC - file_url: https://github.com/ygk94/4ward/blob/HEAD/README.fr.md - method: contract detail: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W file_url: https://github.com/ygk94/4ward/blob/HEAD/.env.testnet @@ -44,15 +41,6 @@ integrations: file_url: https://github.com/ygk94/4ward/blob/HEAD/scripts/crash.sh profile: contracts: - - slug: mainnet-fx - id: CBKGPWGKSKZF52CFHMTRR23TBWTPMRDIYZ4O2P5VS65BMHYH4DXMCJZC - name: Fiat FX - network: mainnet - kind: feed - explorer_url: https://stellar.expert/explorer/public/contract/CBKGPWGKSKZF52CFHMTRR23TBWTPMRDIYZ4O2P5VS65BMHYH4DXMCJZC - attributes: - source: fx - asset_kind: other - slug: testnet-fx id: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W name: Fiat FX diff --git a/data/2026/arqueo.yml b/data/2026/arqueo.yml index 972e9e5..db6f215 100644 --- a/data/2026/arqueo.yml +++ b/data/2026/arqueo.yml @@ -24,35 +24,6 @@ integrations: - method: package detail: '@creit.tech/stellar-wallets-kit' file_url: https://github.com/Dabuca/arqueo/blob/HEAD/app-lib/package.json -- slug: reflector - name: Reflector - evidence: - - method: contract - detail: CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN - file_url: https://github.com/Dabuca/arqueo/blob/HEAD/.agents/skills/standards/ecosystem.md - - method: contract - detail: CALI2BYU2JE6WVRUFYTS6MSBNEHGJ35P4AVCZYF3B6QOE3QKOB2PLE6M - file_url: https://github.com/Dabuca/arqueo/blob/HEAD/.agents/skills/standards/ecosystem.md - profile: - contracts: - - slug: mainnet-exchanges - id: CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN - name: CEX and DEX - network: mainnet - kind: feed - explorer_url: https://stellar.expert/explorer/public/contract/CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN - attributes: - source: exchanges - asset_kind: other - - slug: mainnet-stellar-pubnet - id: CALI2BYU2JE6WVRUFYTS6MSBNEHGJ35P4AVCZYF3B6QOE3QKOB2PLE6M - name: Stellar Pubnet DEX - network: mainnet - kind: feed - explorer_url: https://stellar.expert/explorer/public/contract/CALI2BYU2JE6WVRUFYTS6MSBNEHGJ35P4AVCZYF3B6QOE3QKOB2PLE6M - attributes: - source: stellar-pubnet - asset_kind: stellar tools: - slug: stellar-scaffold name: Scaffold Stellar diff --git a/data/2026/atahanyild-koul.yml b/data/2026/atahanyild-koul.yml index 52708d6..0e03302 100644 --- a/data/2026/atahanyild-koul.yml +++ b/data/2026/atahanyild-koul.yml @@ -17,37 +17,6 @@ commits_in_window: 2 stack: soroban-sdk: null '@stellar/stellar-sdk': 16.0.1 -integrations: -- slug: reflector - name: Reflector - evidence: - - method: capture - detail: tickers:USD - file_url: https://github.com/atahanyild/koul/blob/HEAD/contracts/koul_mock_fx/src/lib.rs - - method: contract - detail: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W - file_url: https://github.com/atahanyild/koul/blob/HEAD/docs/phase0.md - - method: signal - detail: reads-last-price - file_url: https://github.com/atahanyild/koul/blob/HEAD/contracts/koul_mock_fx/src/lib.rs - profile: - contracts: - - slug: testnet-fx - id: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W - name: Fiat FX - network: testnet - kind: feed - explorer_url: https://stellar.expert/explorer/testnet/contract/CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W - attributes: - source: fx - asset_kind: other - signals: - - slug: reads-last-price - group: read - label: Reads the latest price - captures: - tickers: - - USD agents: - slug: claude-code name: Claude Code diff --git a/data/2026/caravel.yml b/data/2026/caravel.yml index 021f105..f611eb6 100644 --- a/data/2026/caravel.yml +++ b/data/2026/caravel.yml @@ -29,12 +29,6 @@ integrations: - method: capture detail: tickers:USD file_url: https://github.com/rcusans-code/Caravel/blob/HEAD/contracts/oracle/src/lib.rs - - method: contract - detail: CAVLP5DH2GJPZMVO7IJY4CVOD5MWEFTJFVPD2YY2FQXOQHRGHK4D6HLP - file_url: https://github.com/rcusans-code/Caravel/blob/HEAD/scripts/README.md - - method: contract - detail: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W - file_url: https://github.com/rcusans-code/Caravel/blob/HEAD/scripts/README.md - method: contract detail: CCYOZJCOPG34LLQQ7N24YXBM7LL62R7ONMZ3G6WZAAYPB5OYKOMJRN63 file_url: https://github.com/rcusans-code/Caravel/blob/HEAD/.env @@ -46,24 +40,6 @@ integrations: file_url: https://github.com/rcusans-code/Caravel/blob/HEAD/docs/board.html profile: contracts: - - slug: testnet-stellar-pubnet - id: CAVLP5DH2GJPZMVO7IJY4CVOD5MWEFTJFVPD2YY2FQXOQHRGHK4D6HLP - name: Stellar Pubnet DEX - network: testnet - kind: feed - explorer_url: https://stellar.expert/explorer/testnet/contract/CAVLP5DH2GJPZMVO7IJY4CVOD5MWEFTJFVPD2YY2FQXOQHRGHK4D6HLP - attributes: - source: stellar-pubnet - asset_kind: stellar - - slug: testnet-fx - id: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W - name: Fiat FX - network: testnet - kind: feed - explorer_url: https://stellar.expert/explorer/testnet/contract/CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W - attributes: - source: fx - asset_kind: other - slug: testnet-exchanges id: CCYOZJCOPG34LLQQ7N24YXBM7LL62R7ONMZ3G6WZAAYPB5OYKOMJRN63 name: CEX and DEX diff --git a/data/2026/chateaux-meridian.yml b/data/2026/chateaux-meridian.yml index b944ca3..18bd89b 100644 --- a/data/2026/chateaux-meridian.yml +++ b/data/2026/chateaux-meridian.yml @@ -15,48 +15,6 @@ stack: soroban-sdk: null '@stellar/stellar-sdk': ^17.2.1 '@stellar/typescript-wallet-sdk': ^5.1.0 -integrations: -- slug: reflector - name: Reflector - evidence: - - method: contract - detail: CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN - file_url: https://github.com/elszalencia/chateaux-meridian/blob/HEAD/research/raven-scope.md - - method: contract - detail: CALI2BYU2JE6WVRUFYTS6MSBNEHGJ35P4AVCZYF3B6QOE3QKOB2PLE6M - file_url: https://github.com/elszalencia/chateaux-meridian/blob/HEAD/research/raven-scope.md - - method: contract - detail: CBKGPWGKSKZF52CFHMTRR23TBWTPMRDIYZ4O2P5VS65BMHYH4DXMCJZC - file_url: https://github.com/elszalencia/chateaux-meridian/blob/HEAD/research/raven-scope.md - profile: - contracts: - - slug: mainnet-exchanges - id: CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN - name: CEX and DEX - network: mainnet - kind: feed - explorer_url: https://stellar.expert/explorer/public/contract/CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN - attributes: - source: exchanges - asset_kind: other - - slug: mainnet-stellar-pubnet - id: CALI2BYU2JE6WVRUFYTS6MSBNEHGJ35P4AVCZYF3B6QOE3QKOB2PLE6M - name: Stellar Pubnet DEX - network: mainnet - kind: feed - explorer_url: https://stellar.expert/explorer/public/contract/CALI2BYU2JE6WVRUFYTS6MSBNEHGJ35P4AVCZYF3B6QOE3QKOB2PLE6M - attributes: - source: stellar-pubnet - asset_kind: stellar - - slug: mainnet-fx - id: CBKGPWGKSKZF52CFHMTRR23TBWTPMRDIYZ4O2P5VS65BMHYH4DXMCJZC - name: Fiat FX - network: mainnet - kind: feed - explorer_url: https://stellar.expert/explorer/public/contract/CBKGPWGKSKZF52CFHMTRR23TBWTPMRDIYZ4O2P5VS65BMHYH4DXMCJZC - attributes: - source: fx - asset_kind: other chain: contracts: 0 wasm_uploads: 0 diff --git a/data/2026/kado-hackmeridian.yml b/data/2026/kado-hackmeridian.yml index 89c0a55..15e2355 100644 --- a/data/2026/kado-hackmeridian.yml +++ b/data/2026/kado-hackmeridian.yml @@ -12,36 +12,6 @@ evidence_tier: verified commits_in_window: 32 stack: '@stellar/stellar-sdk': 17.2.1 -integrations: -- slug: reflector - name: Reflector - evidence: - - method: contract - detail: CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN - file_url: https://github.com/eduruizhipolito/kado-hackmeridian/blob/HEAD/.agents/skills/standards/ecosystem.md - - method: contract - detail: CALI2BYU2JE6WVRUFYTS6MSBNEHGJ35P4AVCZYF3B6QOE3QKOB2PLE6M - file_url: https://github.com/eduruizhipolito/kado-hackmeridian/blob/HEAD/.agents/skills/standards/ecosystem.md - profile: - contracts: - - slug: mainnet-exchanges - id: CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN - name: CEX and DEX - network: mainnet - kind: feed - explorer_url: https://stellar.expert/explorer/public/contract/CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN - attributes: - source: exchanges - asset_kind: other - - slug: mainnet-stellar-pubnet - id: CALI2BYU2JE6WVRUFYTS6MSBNEHGJ35P4AVCZYF3B6QOE3QKOB2PLE6M - name: Stellar Pubnet DEX - network: mainnet - kind: feed - explorer_url: https://stellar.expert/explorer/public/contract/CALI2BYU2JE6WVRUFYTS6MSBNEHGJ35P4AVCZYF3B6QOE3QKOB2PLE6M - attributes: - source: stellar-pubnet - asset_kind: stellar tools: - slug: stellar-raven name: Stellar Raven diff --git a/data/2026/koul-me-koul.yml b/data/2026/koul-me-koul.yml index 9f8a973..e289a22 100644 --- a/data/2026/koul-me-koul.yml +++ b/data/2026/koul-me-koul.yml @@ -27,26 +27,14 @@ integrations: - method: capture detail: tickers:XLM file_url: https://github.com/koul-me/koul/blob/HEAD/contracts/koul_router/src/lib.rs - - method: contract - detail: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W - file_url: https://github.com/koul-me/koul/blob/HEAD/docs/phase0.md - method: contract detail: CCYOZJCOPG34LLQQ7N24YXBM7LL62R7ONMZ3G6WZAAYPB5OYKOMJRN63 - file_url: https://github.com/koul-me/koul/blob/HEAD/README.md + file_url: https://github.com/koul-me/koul/blob/HEAD/keeper/scripts/competition.ts - method: signal detail: reads-last-price file_url: https://github.com/koul-me/koul/blob/HEAD/contracts/koul_mock_fx/src/lib.rs profile: contracts: - - slug: testnet-fx - id: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W - name: Fiat FX - network: testnet - kind: feed - explorer_url: https://stellar.expert/explorer/testnet/contract/CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W - attributes: - source: fx - asset_kind: other - slug: testnet-exchanges id: CCYOZJCOPG34LLQQ7N24YXBM7LL62R7ONMZ3G6WZAAYPB5OYKOMJRN63 name: CEX and DEX diff --git a/data/2026/nilo.yml b/data/2026/nilo.yml index dbf149f..f236964 100644 --- a/data/2026/nilo.yml +++ b/data/2026/nilo.yml @@ -20,10 +20,13 @@ integrations: evidence: - method: contract detail: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W - file_url: https://github.com/Nearx-Labs/nilo/blob/HEAD/README.md + file_url: https://github.com/Nearx-Labs/nilo/blob/HEAD/packages/core/src/config.ts - method: contract detail: CCYOZJCOPG34LLQQ7N24YXBM7LL62R7ONMZ3G6WZAAYPB5OYKOMJRN63 - file_url: https://github.com/Nearx-Labs/nilo/blob/HEAD/README.md + file_url: https://github.com/Nearx-Labs/nilo/blob/HEAD/packages/core/src/config.ts + - method: signal + detail: reads-last-price + file_url: https://github.com/Nearx-Labs/nilo/blob/HEAD/apps/web/src/prices.ts profile: contracts: - slug: testnet-fx @@ -44,6 +47,10 @@ integrations: attributes: source: exchanges asset_kind: other + signals: + - slug: reads-last-price + group: read + label: Reads the latest price agents: - slug: cursor name: Cursor diff --git a/data/2026/rebalancing-vault.yml b/data/2026/rebalancing-vault.yml index 69a00a3..c4b0d83 100644 --- a/data/2026/rebalancing-vault.yml +++ b/data/2026/rebalancing-vault.yml @@ -32,10 +32,10 @@ integrations: file_url: https://github.com/synt-tech/rebalancing_vault/blob/HEAD/contracts/cl_aquarius/src/clients.rs - method: contract detail: CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN - file_url: https://github.com/synt-tech/rebalancing_vault/blob/HEAD/testing/fork/README.md + file_url: https://github.com/synt-tech/rebalancing_vault/blob/HEAD/contracts/cl_aquarius/src/test_fork.rs - method: contract detail: CALI2BYU2JE6WVRUFYTS6MSBNEHGJ35P4AVCZYF3B6QOE3QKOB2PLE6M - file_url: https://github.com/synt-tech/rebalancing_vault/blob/HEAD/testing/fork/README.md + file_url: https://github.com/synt-tech/rebalancing_vault/blob/HEAD/contracts/cl_aquarius/src/test_fork.rs - method: signal detail: client-pulse file_url: https://github.com/synt-tech/rebalancing_vault/blob/HEAD/contracts/cl_aquarius/src/cl_core.rs diff --git a/data/2026/seidar.yml b/data/2026/seidar.yml index 458dd08..b1ac7d4 100644 --- a/data/2026/seidar.yml +++ b/data/2026/seidar.yml @@ -58,6 +58,9 @@ integrations: - method: contract detail: CBKGPWGKSKZF52CFHMTRR23TBWTPMRDIYZ4O2P5VS65BMHYH4DXMCJZC file_url: https://github.com/seidar-hq/seidar/blob/HEAD/services/api/src/prices.ts + - method: signal + detail: reads-last-price + file_url: https://github.com/seidar-hq/seidar/blob/HEAD/services/api/src/prices.ts profile: contracts: - slug: mainnet-exchanges @@ -87,6 +90,10 @@ integrations: attributes: source: fx asset_kind: other + signals: + - slug: reads-last-price + group: read + label: Reads the latest price chain: contracts: 0 wasm_uploads: 0 diff --git a/data/2026/seyf-p.yml b/data/2026/seyf-p.yml index d911f00..26c1ac3 100644 --- a/data/2026/seyf-p.yml +++ b/data/2026/seyf-p.yml @@ -44,16 +44,19 @@ integrations: evidence: - method: contract detail: CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLN - file_url: https://github.com/Seyfert-Labs/SEYF-P/blob/HEAD/docs/stellar-ecosystem.md + file_url: https://github.com/Seyfert-Labs/SEYF-P/blob/HEAD/src/lib/stellar/reflector.ts - method: contract detail: CBKGPWGKSKZF52CFHMTRR23TBWTPMRDIYZ4O2P5VS65BMHYH4DXMCJZC - file_url: https://github.com/Seyfert-Labs/SEYF-P/blob/HEAD/docs/stellar-ecosystem.md + file_url: https://github.com/Seyfert-Labs/SEYF-P/blob/HEAD/src/lib/stellar/reflector.ts - method: contract detail: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W - file_url: https://github.com/Seyfert-Labs/SEYF-P/blob/HEAD/docs/stellar-ecosystem.md + file_url: https://github.com/Seyfert-Labs/SEYF-P/blob/HEAD/src/lib/stellar/reflector.ts - method: contract detail: CCYOZJCOPG34LLQQ7N24YXBM7LL62R7ONMZ3G6WZAAYPB5OYKOMJRN63 - file_url: https://github.com/Seyfert-Labs/SEYF-P/blob/HEAD/docs/stellar-ecosystem.md + file_url: https://github.com/Seyfert-Labs/SEYF-P/blob/HEAD/src/lib/stellar/reflector.ts + - method: signal + detail: reads-last-price + file_url: https://github.com/Seyfert-Labs/SEYF-P/blob/HEAD/src/lib/stellar/reflector.ts profile: contracts: - slug: mainnet-exchanges @@ -92,6 +95,10 @@ integrations: attributes: source: exchanges asset_kind: other + signals: + - slug: reads-last-price + group: read + label: Reads the latest price tools: - slug: stellar-skills name: Stellar Skills diff --git a/data/2026/shake.yml b/data/2026/shake.yml index e32f0ff..8ad3878 100644 --- a/data/2026/shake.yml +++ b/data/2026/shake.yml @@ -20,7 +20,10 @@ integrations: evidence: - method: contract detail: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W - file_url: https://github.com/franciscogfsm/shake/blob/HEAD/README.md + file_url: https://github.com/franciscogfsm/shake/blob/HEAD/scripts/fx.mjs + - method: signal + detail: reads-last-price + file_url: https://github.com/franciscogfsm/shake/blob/HEAD/scripts/fx.mjs profile: contracts: - slug: testnet-fx @@ -32,6 +35,10 @@ integrations: attributes: source: fx asset_kind: other + signals: + - slug: reads-last-price + group: read + label: Reads the latest price agents: - slug: claude-code name: Claude Code diff --git a/data/2026/trust-meridian.yml b/data/2026/trust-meridian.yml index 9e66465..0184f0c 100644 --- a/data/2026/trust-meridian.yml +++ b/data/2026/trust-meridian.yml @@ -118,6 +118,9 @@ integrations: - method: contract detail: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W file_url: https://github.com/Wilivms/trust-meridian/blob/HEAD/src/chain/index.js + - method: signal + detail: reads-last-price + file_url: https://github.com/Wilivms/trust-meridian/blob/HEAD/src/live.js profile: contracts: - slug: testnet-fx @@ -129,6 +132,10 @@ integrations: attributes: source: fx asset_kind: other + signals: + - slug: reads-last-price + group: read + label: Reads the latest price agents: - slug: claude-code name: Claude Code diff --git a/data/2026/tsuna.yml b/data/2026/tsuna.yml index 2eb1dd1..8133422 100644 --- a/data/2026/tsuna.yml +++ b/data/2026/tsuna.yml @@ -29,7 +29,7 @@ integrations: evidence: - method: contract detail: CCYOZJCOPG34LLQQ7N24YXBM7LL62R7ONMZ3G6WZAAYPB5OYKOMJRN63 - file_url: https://github.com/CHAAIISE/tsuna/blob/HEAD/README.md + file_url: https://github.com/CHAAIISE/tsuna/blob/HEAD/deployments/sdk.testnet.json - method: signal detail: client-pulse file_url: https://github.com/CHAAIISE/tsuna/blob/HEAD/contracts/oracle_router/src/sources.rs diff --git a/data/integrations.yaml b/data/integrations.yaml index 643e920..bce833b 100644 --- a/data/integrations.yaml +++ b/data/integrations.yaml @@ -393,7 +393,23 @@ partners: rpc_url: https://mainnet.sorobanrpc.com passphrase: Public Global Stellar Network ; September 2015 explorer: https://stellar.expert/explorer/public/contract + npm: + rpc_url: https://registry.npmjs.org + passphrase: npm + explorer: https://www.npmjs.com/package + github: + rpc_url: https://api.github.com + passphrase: github + explorer: https://github.com context: [reflector, '\bPulseClient\b', '\bBeamClient\b', '\bFlareClient\b', '\bReflector\w*Client\b'] + surfaces: + - {slug: pkg-contract-client, id: "@reflector/contract-client", name: Contract client, network: npm, kind: package} + - {slug: pkg-dao-client, id: "@reflector/dao-client", name: DAO client, network: npm, kind: package} + - {slug: pkg-subscription-client, id: "@reflector/subscription-client", name: Subscription client, network: npm, kind: package} + - {slug: repo-contract, id: reflector-network/reflector-contract, name: Oracle contract, network: github, kind: repo} + - {slug: repo-client, id: reflector-network/contract-client-js, name: Contract client source, network: github, kind: repo} + - {slug: repo-node, id: reflector-network/reflector-node, name: Oracle node, network: github, kind: repo} + - {slug: repo-subscription, id: reflector-network/reflector-subscription-contract, name: Subscription contract, network: github, kind: repo} contracts: - {slug: testnet-fx, id: CCSSOHTBL3LEWUCBBEB5NJFC2OKFRC74OWEIJIZLRJBGAAU4VMU5NV4W, name: Fiat FX, network: testnet, kind: feed, attributes: {source: fx, asset_kind: other}} - {slug: testnet-exchanges, id: CCYOZJCOPG34LLQQ7N24YXBM7LL62R7ONMZ3G6WZAAYPB5OYKOMJRN63, name: CEX and DEX, network: testnet, kind: feed, attributes: {source: exchanges, asset_kind: other}} @@ -415,13 +431,13 @@ partners: - {slug: client-beam, group: client, label: Beam client, patterns: ['\bBeamClient\b', '\bReflectorBeamClient\b']} - {slug: client-flare, group: client, label: Flare client, patterns: ['\bFlareClient\b']} - {slug: client-dao, group: client, label: DAO client, patterns: ['\bDaoClient\b']} - - {slug: reads-last-price, group: read, label: Reads the latest price, patterns: ['\.lastPrice\(', '\blastprice\s*\(', '\blast_price\s*\(']} + - {slug: reads-last-price, group: read, label: Reads the latest price, patterns: ['\.lastPrice\(', '\blastprice\s*\(', '\blast_price\s*\(', '["''`]last_?[pP]rice["''`]']} - {slug: reads-history, group: read, label: Reads price history, patterns: ['\.prices\(\s*&?[\w"''`]', '\bTWAP\b', '\btwap\b']} - {slug: reads-decimals, private: true, group: safety, label: Reads decimals(), patterns: ['\.decimals\(\s*\)', '\bdecimals\(\s*\)']} - {slug: reads-resolution, private: true, group: safety, label: Reads resolution(), patterns: ['\.resolution\(\s*\)', '\bresolution\(\s*\)']} - - {slug: checks-age, private: true, group: safety, label: Checks the quote age, patterns: ['ledger\(\)\.timestamp\(\)[^;\n]{0,80}timestamp', 'timestamp[^;\n]{0,80}ledger\(\)\.timestamp\(\)', 'Date\.now\(\)[^;\n]{0,80}timestamp', 'timestamp[^;\n]{0,80}Date\.now\(\)', '\b[sS]tale\w*', 'max_?[aA]ge', '[aA]ge_?[sS]ec', 'resolution\s*\*\s*\d']} + - {slug: checks-age, private: true, group: safety, label: Checks the quote age, patterns: ['ledger\(\)\.timestamp\(\)[^;\n]{0,80}timestamp', 'timestamp[^;\n]{0,80}ledger\(\)\.timestamp\(\)', '(?:Date\.now\(\)|\bnow\w*|\bnowSec\w*)[^;\n]{0,60}-\s*[\w.]*timestamp', 'timestamp[^;\n]{0,60}(?:Date\.now\(\)|\bnow\w*)', '[mM]ax_?[aA]ge', 'MAX_?AGE', '[aA]ge(?:Sec\w*|_sec\w*)?\s*(?:>|>=|<|<=)', 'resolution\s*\*\s*\d', '[sS]tale(?:ness)?\w*(?:\s*[:=(]|\s*\?)']} - {slug: checks-expiry, private: true, group: safety, label: Checks feed expiry, patterns: ['\.expires\(', '\bexpires\(\s*&?\w']} - - {slug: hardcoded-decimals, private: true, group: risk, label: Assumes 7 decimals, patterns: ['[pP]rice[^;\n]{0,60}(?:\b1e7\b|10\s*\*\*\s*7\b|\b10_?000_?000\b|Math\.pow\(\s*10\s*,\s*7\s*\))', '(?:\b1e7\b|10\s*\*\*\s*7\b|\b10_?000_?000\b)[^;\n]{0,60}[pP]rice']} + - {slug: hardcoded-decimals, private: true, group: risk, label: Hardcodes the price decimals, patterns: ['[pP]rice[^;\n]{0,60}(?:\b1e7\b|10\s*\*\*\s*7\b|\b10_?000_?000\b|Math\.pow\(\s*10\s*,\s*7\s*\))', '(?:\b1e7\b|10\s*\*\*\s*7\b|\b10_?000_?000\b)[^;\n]{0,60}[pP]rice', '\b1e14\b', '10\s*\*\*\s*14\b', '\b100_?000_?000_?000_?000\b', '(?i)\b\w*decimals\w*\s*(?:[:=]|\?\?|\|\|)\s*14\b', '(?i)\bdecimals\w*\s*\)?\s*\.catch\(\s*\(\)\s*=>\s*14\s*\)']} - {slug: number-cast, private: true, group: risk, label: Casts the price with Number(), patterns: ['Number\(\s*[\w.]*\.price\s*\)', 'Number\(\s*(?:quote|data|price)\w*\s*\)']} captures: - slug: tickers @@ -435,7 +451,7 @@ partners: - 'Other\(\s*["'']([A-Z0-9]{2,10})["'']\s*\)' checks: - {slug: no-age-check, severity: warn, private: true, label: Reads prices without checking how old they are, requires: [reads-last-price], missing: [checks-age]} - - {slug: assumed-decimals, severity: warn, private: true, label: Scales prices as if they had 7 decimals, requires: [hardcoded-decimals, reads-last-price], missing: [reads-decimals]} + - {slug: assumed-decimals, severity: warn, private: true, label: Hardcodes the price decimals instead of reading them, requires: [hardcoded-decimals, reads-last-price], missing: [reads-decimals]} - {slug: lossy-price, severity: warn, private: true, label: Turns a 14 decimal bigint price into a Number, requires: [number-cast, reads-last-price], missing: []} - {slug: wrong-network, severity: fail, private: true, label: Only points at mainnet feeds while the event runs on testnet, only_networks: [mainnet]}