Appearance
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
| Code | Means |
|---|---|
CQL1001 | a hex literal has an odd number of digits |
CQL1002 | hex is written 0X; use 0x |
CQL1003 | a hex literal runs straight into a word; put a space or operator between |
CQL1004 | an underscore in a number is somewhere other than between digit groups |
CQL1005 | an address is not chain:0x plus forty hex digits |
CQL1006 | a mixed-case address fails its checksum; the hint gives the corrected spelling |
CQL1007 | a string or block comment was opened and never closed |
CQL1008 | a duration unit is not one of s, m, h, d, w |
CQL1009 | every 0 or below |
CQL1010 | * is only allowed as the last argument of arg_max or arg_min |
CQL1011 | anonymous events are not supported |
CQL1012 | expr as name — in an expression as is a cast; name a column with name = expr or { name: expr } |
CQL1013 | a record literal names the same key twice |
CQL1014 | a keyword used as an alias or let name |
CQL1015 | take needs a whole-number literal |
CQL1016 | a syntax error: what was found and what was expected |
CQL1017 | text after the end of the pipeline; a query has exactly one |
CQL1018 | summarize with neither an aggregate nor by |
CQL1019 | every with a duration on a block range, or a number on a time range |
2xxx — the meaning
| Code | Means |
|---|---|
CQL2001 | an unknown chain name; the message lists the configured ones |
CQL2002 | a name that is not a column, an alias or a let |
CQL2003 | a column two sources both provide; qualify it |
CQL2004 | a column named by a keyword; backtick it, qualify it or rename it |
CQL2005 | two lets with one name |
CQL2006 | a let that reads from a row; use extend |
CQL2007 | a let named after a built-in ABI |
CQL2008 | an ABI name found neither among the built-ins nor in your library |
CQL2009 | an inline ABI that does not parse; the message quotes the parser |
CQL2010 | a function the contract's ABI does not have |
CQL2011 | two overloads match; name one with .call(sig) |
CQL2012 | no overload takes these argument types |
CQL2013 | a constant argument out of range for its parameter type |
CQL2014 | an event no ABI in the range defines |
CQL2015 | a .call signature that does not parse |
CQL2016 | a 4-byte selector in .call without its outputs argument |
CQL2017 | a .call signature that is not a constant string |
CQL2018 | .call cannot infer an argument's type; give the full signature |
CQL2019 | as T on something that is not a 32-byte word; use tobigint, todecimal or pad32 |
CQL2020 | a type as cannot cast to |
CQL2021 | revert_reason of something that is not a call |
CQL2022 | and, or, not or where given a non-boolean |
CQL2023 | + on strings or bytes; use concat |
CQL2024 | % on a decimal |
CQL2025 | division by a constant zero |
CQL2026 | keccak256 of something that is not bytes or a string; build the bytes with pad32, raw or abi_encode |
CQL2027 | pad32 of a type it cannot pad |
CQL2028 | concat mixing bytes and strings |
CQL2029 | tohex of a type it cannot render |
CQL2030 | a negative pow exponent |
CQL2031 | a constant pow too large to compute |
CQL2032 | address(chain, b) with other than 20 bytes; a 32-byte word takes as address |
CQL2033 | an address with no chain in a place with no row to take one from; use address(chain, bytes) |
CQL2034 | comparing bytes of two different widths |
CQL2035 | array elements of types that do not unify |
CQL2036 | [] where nothing says its element type |
CQL2037 | coalesce arguments of different types |
CQL2038 | a union column with different types on each side |
CQL2039 | a $storage index that is not a number in range or a bytes32 |
CQL2040 | a named argument on anything but slot() |
CQL2041 | with { block: … } that is not a bigint; use blockat() |
CQL2042 | with after something that is neither a call nor an address |
CQL2043 | an option other than abi, caller, block, value |
CQL2044 | an option reserved for a later version |
CQL2045 | arg_max(x, *) would duplicate a column; list the columns |
CQL2046 | two output columns with one name |
CQL2047 | expand of something that is not an array |
CQL2048 | a join key missing on one side |
CQL2049 | two values that cannot be compared |
CQL2050 | an expression with no obvious column name; write name: expr |
CQL2051 | an aggregate with no name |
CQL2052 | a function needing a constant signature string |
CQL2053 | a non-zero value on a function that is not payable |
CQL2054 | two sources in one query given the same alias; rename one |
CQL2055 | a key named once in on under rightouter or fullouter, whose two sides have different types; write on a.x == b.x |
CQL2900 | warning — a column shadows a let of the same name |
CQL2901 | warning — an address compared with a bare 0x… literal ignores the chain, and this query spans several |
3xxx — before the run
| Code | Means |
|---|---|
CQL3001 | a block beyond the chain's head |
CQL3002 | latest-N below block 0 |
CQL3003 | a constant with { block } outside the chain's range |
CQL3004 | a time range that starts after the head |
CQL3005 | every on a single block or an event source |
CQL3006 | a 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 |
CQL3008 | no ABI for the address; Check again, .call(), or your library |
CQL3009 | the verification services could not be reached for this address; try again |
CQL3010 | a proxy that delegates in a cycle |
CQL3011 | a proxy more than four hops deep |
CQL3012 | contracts in from [ … ] disagree on a function or event the query uses |
CQL3013 | a function or event defined in no interval of any contract in range |
CQL3014 | an operator would produce more than 100 000 rows; narrow, sample or summarize |
CQL3015 | an event source spanning more than 10 000 000 blocks |
CQL3016 | the run would need more than 50 000 requests; sample or narrow |
CQL3017 | a range that ends below its start |
CQL3018 | withdrawn — 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 |
CQL3019 | an operator would produce more bytes than the result or the run's memory allows; narrow, sample or summarize |
CQL3021 | an operator would output more than 7 812 columns, the most any operator may; project only the columns you need, or join fewer sources |
CQL3900 | note — the range was sampled at the step named, to stay under 10 000 rows |
CQL3901 | note — an event source with no at used the default window named |
CQL3902 | note — a time range's end was cut back to the head |
CQL3903 | note — one event name matched several signatures; $topics[0] tells them apart |
CQL3904 | note — an interval of a proxy was decoded with its implementation's ABI |
CQL3905 | note — a diamond's history disagreed with its current facets and was reconciled |
CQL3906 | note — the address looks like a proxy but its implementation slot is empty |
CQL3907 | note — one of the verification services was not asked for this address; the other's answer stands |
CQL3908 | note — a function that is not view was called; the result is a simulation |
CQL3909 | note — some logs were skipped because no selected signature decodes them |
CQL3910 | note — a diamond cut re-added a selector already present; treated as a replacement |
CQL3911 | note — some rows of a column are null because that interval's ABI has a different signature |
CQL3912 | note — 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
| Code | Means |
|---|---|
CQL4001 | a node stopped answering after retries; the message names the chain, block and method |
CQL4002 | the chain reorganised twice during the run; query finalized |
CQL4003 | a per-row with { block } beyond the head |
CQL4004 | an operator produced more than 100 000 rows |
CQL4005 | a pow too large to compute on row values |
CQL4006 | the run took longer than its timeout |
CQL4007 | the run was cancelled |
CQL4008 | the run issued more than 50 000 requests |
CQL4009 | the result grew past 512 MiB |
CQL4010 | the run held more in memory at once than it is allowed; narrow a range or summarize earlier |
CQL4900 | note — the chain reorganised once; the affected rows were re-read |
CQL4901 | note — a division or average was rounded to 38 significant digits |