nautechsystems/nautilus_trader · error

Proxy target code hash is invalid

Error message

Proxy target code hash is invalid

What it means

A proxy contract entry in the deployment manifest has a target code hash that does not parse as a valid B256; the expected bytecode hash of the implementation cannot be interpreted, so verification of the proxy target fails.

Source

Thrown at crates/adapters/blockchain/src/rpc/verification.rs:1298

            "Every deployed contract role requires at least one identity probe"
        );

        if let Some(proxy) = &contract.proxy {
            anyhow::ensure!(
                matches!(
                    proxy.kind.as_str(),
                    "eip1967_implementation" | "zeppelinos_implementation"
                ),
                "Proxy kind is unsupported"
            );
            B256::from_str(&proxy.storage_slot)
                .map_err(|_| anyhow::anyhow!("Proxy storage slot is invalid"))?;
            let storage_value = B256::from_str(&proxy.storage_value)
                .map_err(|_| anyhow::anyhow!("Proxy storage value is invalid"))?;
            let target = Address::from_str(&proxy.target_address)
                .map_err(|_| anyhow::anyhow!("Proxy target address is invalid"))?;
            let target_hash = B256::from_str(&proxy.target_code_hash)
                .map_err(|_| anyhow::anyhow!("Proxy target code hash is invalid"))?;
            anyhow::ensure!(
                target != Address::ZERO
                    && target != address
                    && target_hash != B256::ZERO
                    && storage_value[..12].iter().all(|byte| *byte == 0)
                    && storage_value[12..] == *target.as_slice(),
                "Proxy target binding is invalid"
            );
        }

        for probe in &contract.probes {
            Bytes::from_str(&probe.call_data)
                .map_err(|_| anyhow::anyhow!("Manifest probe call data is invalid"))?;
            Bytes::from_str(&probe.expected_output)
                .map_err(|_| anyhow::anyhow!("Manifest probe output is invalid"))?;
        }
    }

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Correct the implementation code hash in the manifest
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/adapters/blockchain/src/rpc/verification.rs:1298 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/a62b95f407bc33d3. Report an issue: GitHub.