redact_rpc_urls

Documentation for eth_defi.rpc_url.redact_rpc_urls function.

redact_rpc_urls(text)

Shorten registered RPC URLs in diagnostic text.

Other URLs are preserved. Request targets in urllib3-style exception text are also shortened, even when the transport omitted the URL’s scheme.

Parameters

text (str) – Diagnostic text, never a value used for network requests.

Returns

Sanitised text.

Return type

str