Skip to content

Diagnostic codes ​

Every code CQL can report, one line each, grouped by when it is found.

The first digit is the band — 1 the text, 2 its meaning, 3 the chain and the caps before the run, 4 the run itself — and a code ending in 9xx is a warning or a note, never a refusal. Errors and diagnostics explains how to read one.

1xxx — the text ​

CodeMeans
CQL1001a hex literal has an odd number of digits
CQL1002hex is written 0X; use 0x
CQL1003a hex literal runs straight into a word; put a space or operator between
CQL1004an underscore in a number is somewhere other than between digit groups
CQL1005an address is not chain:0x plus forty hex digits
CQL1006a mixed-case address fails its checksum; the hint gives the corrected spelling
CQL1007a string or block comment was opened and never closed
CQL1008a duration unit is not one of s, m, h, d, w
CQL1009every 0 or below
CQL1010* is only allowed as the last argument of arg_max or arg_min
CQL1011anonymous events are not supported
CQL1012expr as name — in an expression as is a cast; name a column with name = expr or { name: expr }
CQL1013a record literal names the same key twice
CQL1014a keyword used as an alias or let name
CQL1015take needs a whole-number literal
CQL1016a syntax error: what was found and what was expected
CQL1017text after the end of the pipeline; a query has exactly one
CQL1018summarize with neither an aggregate nor by
CQL1019every with a duration on a block range, or a number on a time range

2xxx — the meaning ​

CodeMeans
CQL2001an unknown chain name; the message lists the configured ones
CQL2002a name that is not a column, an alias or a let
CQL2003a column two sources both provide; qualify it
CQL2004a column named by a keyword; backtick it, qualify it or rename it
CQL2005two lets with one name
CQL2006a let that reads from a row; use extend
CQL2007a let named after a built-in ABI
CQL2008an ABI name found neither among the built-ins nor in your library
CQL2009an inline ABI that does not parse; the message quotes the parser
CQL2010a function the contract's ABI does not have
CQL2011two overloads match; name one with .call(sig)
CQL2012no overload takes these argument types
CQL2013a constant argument out of range for its parameter type
CQL2014an event no ABI in the range defines
CQL2015a .call signature that does not parse
CQL2016a 4-byte selector in .call without its outputs argument
CQL2017a .call signature that is not a constant string
CQL2018.call cannot infer an argument's type; give the full signature
CQL2019as T on something that is not a 32-byte word; use tobigint, todecimal or pad32
CQL2020a type as cannot cast to
CQL2021revert_reason of something that is not a call
CQL2022and, or, not or where given a non-boolean
CQL2023+ on strings or bytes; use concat
CQL2024% on a decimal
CQL2025division by a constant zero
CQL2026keccak256 of something that is not bytes or a string; build the bytes with pad32, raw or abi_encode
CQL2027pad32 of a type it cannot pad
CQL2028concat mixing bytes and strings
CQL2029tohex of a type it cannot render
CQL2030a negative pow exponent
CQL2031a constant pow too large to compute
CQL2032address(chain, b) with other than 20 bytes; a 32-byte word takes as address
CQL2033an address with no chain in a place with no row to take one from; use address(chain, bytes)
CQL2034comparing bytes of two different widths
CQL2035array elements of types that do not unify
CQL2036[] where nothing says its element type
CQL2037coalesce arguments of different types
CQL2038a union column with different types on each side
CQL2039a $storage index that is not a number in range or a bytes32
CQL2040a named argument on anything but slot()
CQL2041with { block: … } that is not a bigint; use blockat()
CQL2042with after something that is neither a call nor an address
CQL2043an option other than abi, caller, block, value
CQL2044an option reserved for a later version
CQL2045arg_max(x, *) would duplicate a column; list the columns
CQL2046two output columns with one name
CQL2047expand of something that is not an array
CQL2048a join key missing on one side
CQL2049two values that cannot be compared
CQL2050an expression with no obvious column name; write name: expr
CQL2051an aggregate with no name
CQL2052a function needing a constant signature string
CQL2053a non-zero value on a function that is not payable
CQL2054two sources in one query given the same alias; rename one
CQL2055a key named once in on under rightouter or fullouter, whose two sides have different types; write on a.x == b.x
CQL2900warning — a column shadows a let of the same name
CQL2901warning — an address compared with a bare 0x… literal ignores the chain, and this query spans several

3xxx — before the run ​

CodeMeans
CQL3001a block beyond the chain's head
CQL3002latest-N below block 0
CQL3003a constant with { block } outside the chain's range
CQL3004a time range that starts after the head
CQL3005every on a single block or an event source
CQL3006a call on another chain's address with no block; use with { block: blockat(chain(x), $timestamp) }
CQL3007$block compared across two chains, which the message names; bucket both sides by time instead, a column holding bin($sampleAt, 1h) on each side, and join on it
CQL3008no ABI for the address; Check again, .call(), or your library
CQL3009the verification services could not be reached for this address; try again
CQL3010a proxy that delegates in a cycle
CQL3011a proxy more than four hops deep
CQL3012contracts in from [ … ] disagree on a function or event the query uses
CQL3013a function or event defined in no interval of any contract in range
CQL3014an operator would produce more than 100 000 rows; narrow, sample or summarize
CQL3015an event source spanning more than 10 000 000 blocks
CQL3016the run would need more than 50 000 requests; sample or narrow
CQL3017a range that ends below its start
CQL3018withdrawn — it refused a query that read more than one chain, before one could; no query raises it now, and an old run's record may still carry it
CQL3019an operator would produce more bytes than the result or the run's memory allows; narrow, sample or summarize
CQL3021an operator would output more than 7 812 columns, the most any operator may; project only the columns you need, or join fewer sources
CQL3900note — the range was sampled at the step named, to stay under 10 000 rows
CQL3901note — an event source with no at used the default window named
CQL3902note — a time range's end was cut back to the head
CQL3903note — one event name matched several signatures; $topics[0] tells them apart
CQL3904note — an interval of a proxy was decoded with its implementation's ABI
CQL3905note — a diamond's history disagreed with its current facets and was reconciled
CQL3906note — the address looks like a proxy but its implementation slot is empty
CQL3907note — one of the verification services was not asked for this address; the other's answer stands
CQL3908note — a function that is not view was called; the result is a simulation
CQL3909note — some logs were skipped because no selected signature decodes them
CQL3910note — a diamond cut re-added a selector already present; treated as a replacement
CQL3911note — some rows of a column are null because that interval's ABI has a different signature
CQL3912note — the two sides of a join on $block or $sampleAt are sampled at different steps, so rows match only where the steps meet; give both sides the same every

4xxx — during the run ​

CodeMeans
CQL4001a node stopped answering after retries; the message names the chain, block and method
CQL4002the chain reorganised twice during the run; query finalized
CQL4003a per-row with { block } beyond the head
CQL4004an operator produced more than 100 000 rows
CQL4005a pow too large to compute on row values
CQL4006the run took longer than its timeout
CQL4007the run was cancelled
CQL4008the run issued more than 50 000 requests
CQL4009the result grew past 512 MiB
CQL4010the run held more in memory at once than it is allowed; narrow a range or summarize earlier
CQL4900note — the chain reorganised once; the affected rows were re-read
CQL4901note — a division or average was rounded to 38 significant digits