# Contract Inspection Execute Pact code across chains to inspect smart contracts, query module information, and analyze on-chain state. ## PactQuery: Multi-Chain Contract Inspection Execute arbitrary Pact code across multiple chains simultaneously to inspect smart contract modules and retrieve contract details. ```graphql query PactContract($pactQuery: [PactQuery!]!) { pactQuery(pactQuery: $pactQuery) { result } } ``` **Variables** ```json { "pactQuery": [ { "code": "(describe-module \"coin\")", "chainId": "0" }, { "code": "(describe-module \"coin\")", "chainId": "1" } ] } ``` **Response** *(truncated for brevity)* ```json { "data": { "pactQuery": [ { "result": "{\"hash\":\"klFkrLfpyLW-M3xjVPSdqXEMgxPPJibRt_D6qiBws6s\",\"interfaces\":[\"fungible-xchain-v1\",\"fungible-v2\"],\"name\":\"coin\",\"code\":\"(module coin GOVERNANCE...\"}" } ] } } ``` **Use Cases** - Smart contract module inspection - Contract code verification across chains - Module interface discovery - On-chain state queries - Development and debugging tools **Notes** - Query all 20 chains by providing 20 objects with chainIds "0" through "19" - Use `(describe-module "module-name")` for contract metadata - Supports arbitrary Pact read-only queries - Results are JSON-encoded strings containing module information