nautechsystems/nautilus_trader · error · anyhow::Error
Deployment manifest pool factory is invalid
Error message
Deployment manifest pool factory is invalid
What it means
Deployment manifest validation in validate_manifest_contracts: a pool contract address from the manifest failed hex/Checksum address parsing, so the manifest references an unparseable pool factory and execution setup is aborted.
Source
Thrown at crates/adapters/blockchain/src/execution/client.rs:468
"Allowed token pair {token_in} -> {token_out} is not fully pinned by the deployment manifest"
);
}
for limit in config.quote_spend_limits.as_deref().unwrap_or_default() {
let spend_token = validate_address(&limit.spend_token)?;
anyhow::ensure!(
token_decimals.get(&spend_token) == Some(&limit.spend_token_decimals),
"Quote spend limit decimals do not match the deployment manifest"
);
}
let pool_contracts = role_addresses(BlockchainContractRole::Pool)?;
for pool in &manifest.pools {
let pool_address = Address::from_str(&pool.address)
.map_err(|_| anyhow::anyhow!("Deployment manifest pool address is invalid"))?;
let pool_factory = Address::from_str(&pool.factory)
.map_err(|_| anyhow::anyhow!("Deployment manifest pool factory is invalid"))?;
let pool_quote = Address::from_str(&pool.quote_contract).map_err(|_| {
anyhow::anyhow!("Deployment manifest pool quote contract is invalid")
})?;
anyhow::ensure!(
pool_contracts.contains(&pool_address)
&& pool_factory == factory
&& pool_quote == quote_contract,
"Deployment manifest pool does not use the pinned pool, factory, and quote identities"
);
}
Ok(())
}
async fn fetch_native_currency_balance(&self) -> anyhow::Result<Money> {
let balance_u256 = self
.http_rpc_client
.get_balance_with_timeout(&self.wallet_address, None, Some(EXECUTION_RPC_TIMEOUT_SECS))
.await?;View on GitHub (pinned to 18893faf8b)
Solutions
- Fix the pool.factory string in the deployment manifest to a valid hex address
- Populate from the canonical Uniswap V3 factory address for the chain
- Run address validation before deploying the manifest
Example fix
// before factory = "factory-placeholder" // after factory = "0x1F98431c8aD98523631AE4a59f267346ea31F984"
Defensive patterns
Strategy: validation
Validate before calling
assert!(is_valid_address(&pool.factory), "invalid factory address in manifest");
Prevention
- Use templates with pre-filled canonical factory addresses per chain
- Run address linting on the manifest before deploy
- Keep factory addresses in one canonical registry
When it happens
Trigger: Calling preflight/validate_manifest_contracts where a manifest.pools[].factory string fails Address::from_str.
Common situations: Hand-edited manifest with a malformed factory address; template placeholder never replaced; chain migration left an old/malformed value.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- Deployment manifest pool address is invalid
- Deployment manifest pool quote contract is invalid
- Chart function must be callable, was {type(f)}
- Chart function must be callable, was {type(func)}
- Chart '{name}' not found.{suggestion_text} Available charts:
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/29ee667f058e928b.
Report an issue: GitHub.