Skip to main content

DeFi client for Sarcire — synchronous revert diagnosis without blocking the on-chain loop

Project description

sarcire-defi

DeFi client for Sarcire — synchronous revert diagnosis without blocking the on-chain loop.

Install

pip install sarcire-defi

Usage

from sarcire_defi import diagnose_revert, request_generation_async

result = diagnose_revert(
    error_trace,
    min_confidence=0.80,
    chain_id=8453,
    protocol="aave_v3_pool",
)

if result["action"] == "apply":
    # Safe to use — cached fix with sufficient confidence
    for step in result["fix_steps"]:
        print(step)
else:
    # No safe immediate fix — stop the on-chain loop
    # Trigger background generation for next time:
    request_generation_async(error_trace, chain_id=8453, protocol="aave_v3_pool")
    raise RuntimeError("No safe remediation available")

Critical: diagnose_revert always returns immediately. It never blocks waiting for LLM generation.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sarcire_defi-0.1.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sarcire_defi-0.1.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file sarcire_defi-0.1.2.tar.gz.

File metadata

  • Download URL: sarcire_defi-0.1.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for sarcire_defi-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5951f405e935a45627586933f99030188edbc3e22197c9a11a40f7049b3a7331
MD5 b5ed15c50ca272fccf6a05b15eacb7af
BLAKE2b-256 1b4b59f8414bc678d57207cb4e36096ed756adf70cd09fa76fd8f0fec70ed128

See more details on using hashes here.

File details

Details for the file sarcire_defi-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sarcire_defi-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for sarcire_defi-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 61ab17cf57769b3542c840e11b2cdc734f71e7862ffb78fdb0487e344508e23d
MD5 e32fa616b94cefd3094b094fac3f1493
BLAKE2b-256 fb917d91bf71b70f6eb2f4581b1f98d0369eda6a13c1613870bd619780076784

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page