- Rust engine: real bootstrap/wiring preflight (guardrail-agent), execution layer (retry/router/pre-trade/post-trade/reconciliation), guardrail-doctor diagnostics with allowlist-drift guard. - guardrail-cli: extracted pure helpers into util.rs (split in progress). - 6 Track-2 skills + ensemble; python-lab analytics (regime/drawdown/montecarlo/dossier/ensemble/journal/seed); clients (ts/py/go/mcp/langchain/web-lite/proof-verifier); alert relay; scenarios; helm/k8s/compose; docs. - dashboard/vercel.json + docs/VERCEL_DEPLOY.md for Vercel deployment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
44 lines
1.2 KiB
Python
44 lines
1.2 KiB
Python
"""ERC-8004 Identity Registry specific configuration.
|
|
|
|
Env surface (module-scoped, ``ERC8004_`` prefix):
|
|
ERC8004_REGISTRY_ADDRESS — override registry_contract
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from ..config import resolve_network
|
|
from ..core.config import get_env
|
|
|
|
ERC8004_ENV_PREFIX = "ERC8004_"
|
|
|
|
|
|
def get_erc8004_config(network: str = "bsc-testnet") -> dict[str, Any]:
|
|
"""Get ERC-8004 network configuration lazily.
|
|
|
|
Applies ``ERC8004_REGISTRY_ADDRESS`` env override (when set) on top of
|
|
the resolved network preset. Global ``RPC_URL`` overrides are handled
|
|
inside ``resolve_network``.
|
|
"""
|
|
nc = resolve_network(network)
|
|
registry_override = get_env("REGISTRY_ADDRESS", prefix=ERC8004_ENV_PREFIX)
|
|
return {
|
|
"name": nc.name,
|
|
"chain_id": nc.chain_id,
|
|
"rpc_url": nc.rpc_url,
|
|
"paymaster_url": nc.paymaster_url or "",
|
|
"paymaster": nc.use_paymaster,
|
|
"registry_contract": registry_override or nc.registry_contract,
|
|
}
|
|
|
|
|
|
from .._version import __version__ as _sdk_version
|
|
|
|
BUILT_WITH_KEY = "built_with"
|
|
_BUILT_WITH_URL = "https://github.com/bnb-chain/bnbagent-sdk"
|
|
|
|
|
|
def get_built_with_value() -> str:
|
|
return f"{_BUILT_WITH_URL}#v{_sdk_version}"
|