Skip to main content

QuantumScan client for Olas (Autonolas) and other Python-based autonomous agents — pre-transaction safety checks billed per-call via x402.

Project description

quantumscan-olas

QuantumScan client for Olas (Autonolas) skills and other Python-based autonomous agents — pre-transaction safety checks and contract scans, billed per call.

Not a heavyweight Autonolas FSM component — it's a plain HTTP client any skill/behaviour can import. Wire it into your Behaviour.act() before submitting a transaction to the Safe/multisig.

Install

pip install quantumscan-olas
# or, with autonomous x402 micropayments:
pip install "quantumscan-olas[x402]"

Usage

from quantumscan_olas import QuantumScanClient

client = QuantumScanClient(
    wallet_private_key=self.params.quantumscan_wallet_key,  # optional, see below
)

result = client.check_transaction_safety(address="0x...", calldata="0x...", network=8453)
if not result["safe"]:
    self.context.logger.warning(f"QuantumScan blocked tx: {result.get('reason')}")
    return  # do not submit to the Safe

contract_scan = client.check_contract_safety(address="0x...", network=8453)

Paying for calls

Three modes, checked in this order:

  1. wallet_private_key (recommended — install with [x402] extra) — pays a fraction of a cent in USDC per call via the x402 protocol, automatically, capped at $0.05/call.
  2. api_key — prepaid credits, free at POST https://quantumscan.io/api/agent/register.
  3. Neither — falls back to QuantumScan's small free daily trial per IP. Fine for development.

Both can also be set via environment variables: QUANTUMSCAN_WALLET_PRIVATE_KEY, QUANTUMSCAN_API_KEY, QUANTUMSCAN_API_URL.

Status

This is a plain Python HTTP client, tested and published independently of the Autonolas package registry. A registered Autonolas component (with an on-chain IPFS package hash, for use via autonomy packages add) is a natural next step once there's real usage — open an issue if that's what you need.

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

quantumscan_olas-0.1.0.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.

quantumscan_olas-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file quantumscan_olas-0.1.0.tar.gz.

File metadata

  • Download URL: quantumscan_olas-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for quantumscan_olas-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d7e6eb660e294539843ac8d06c8e91e6156cd86c8ef9abe1418a94b9853f9dc1
MD5 154e92ece2d9cf6062129a4940cdabe5
BLAKE2b-256 34c81de7c59316dac2ae61215b5b4447df53d7fd6bea9d33769375d23b605604

See more details on using hashes here.

Provenance

The following attestation bundles were made for quantumscan_olas-0.1.0.tar.gz:

Publisher: publish.yml on quantumscan-io/quantumscan-olas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quantumscan_olas-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for quantumscan_olas-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ef308429767591aa663780e820cc70e32299db0590998e86db057db960440b4
MD5 3ff2044cef93175c1ad99b6d2b6343ca
BLAKE2b-256 f496c7e340eed75581cefdb0a152a35d704975bc20f2a815e8d55469b1bfb387

See more details on using hashes here.

Provenance

The following attestation bundles were made for quantumscan_olas-0.1.0-py3-none-any.whl:

Publisher: publish.yml on quantumscan-io/quantumscan-olas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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