Appearance
Diagnostic codes
Every code CQL can report, one line each, grouped by when CQL finds it.
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. A code ending in 9xx is a warning or a note, never a refusal. Errors and diagnostics explains how to read one.
CQL does not report a code marked not reported yet. Each such code belongs to a feature that CQL does not have yet.
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 or an address 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 opens and never closes |
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. Backtick it or choose another name. |
CQL1015 | take needs a whole-number literal |
CQL1016 | a syntax error: what the parser found and what it expected. If CQL can tell what is missing, the hint says what to write. |
CQL1017 | a second query after the end of the pipeline: a from or a let. A query has exactly one pipeline. |
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 | a chain name or a chain id that is not configured. The message lists the configured chains. |
CQL2002 | a name that is not a column, an alias or a let, including a name a from writes that nothing binds. It also covers an abi: name only a later let binds, and r.name when r has no field name: a record without that field, or a value that is not a record. |
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, or one whose JSON item name holds a parenthesis. The message quotes the reason. |
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. Bytes are not a number in a function argument. Convert them with tobigint. It also covers x[i] when x is not an array or bytes, or i is not a bigint, -x when x is not a number or a duration, and arithmetic on two types that the operator does not take. For example, write $timestamp + 5s, not $timestamp + 5. |
CQL2013 | a constant argument out of range for its parameter type |
CQL2014 | an event no ABI in the range defines |
CQL2015 | a signature that does not parse, in .call, selector, topic0, abi_encode or abi_decode. A selector or topic0 signature must also have a name. |
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 | + with a string, or + on two bytes values. 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, or of a constant no 32-byte word holds: 2^256 or more, or less than -2^255 |
CQL2028 | concat mixing bytes and strings |
CQL2029 | tohex of a type it cannot render, or of a negative constant |
CQL2030 | a negative pow exponent |
CQL2031 | a constant pow too large to compute |
CQL2032 | address(chain, b) with a word, or a narrow value that is not a literal. 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. It also covers a constant slot number in slot() that is out of range. |
CQL2040 | a named argument on anything but slot(), or a slot() argument without its name |
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, or two fields of one record, 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. This includes x and the elements of xs in x in xs and in contains(xs, x). It also covers x in xs when xs is not an array. |
CQL2050 | an expression with no obvious column name. Write name: expr. An expand without as must expand a column of the row, so for anything else write expand … as name. |
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. |
CQL2056 | an integer address argument that is not a constant from 0 to 2^160 − 1. The hint says which way it missed. |
CQL2057 | a chain-blind address(n) other than address(0) as a mapping key or in pad32. Write address(chain, n). |
CQL2058 | $storage, .call or an ABI method such as .totalSupply() on a value typed as something other than an address. Such a value can be an event's number column or a list. Take it on the source alias, its $address, an address literal or a contract let. |
CQL2059 | a from over a let that names something other than a contract. Examples are let a = 5, an address address(…) computes, an ABI binding, or a list holding any of these, even beside contracts. Bind the let to an address literal, a let bound to one, or a list of them. |
CQL2060 | a with { caller } that is not an address or bytes20, a with { value } that is not a bigint, or a constant value below zero. A value computed per row outside 0 to 2^256 − 1 gives null for that row instead. |
CQL2061 | a column given the name of a source alias that still names the source after the stage, as expand pool.getDestinations() as pool does. The alias is read first, so the column could never be read. Give the column another name; the hint names a free one. |
CQL2062 | a source alias used as an address on a row where no column holds that source's address. After a join, extend b.$address takes the $address column's place, so a later a.f() has no address for a. A project or summarize that drops it does the same. Give the item its own name, as extend bAddress = b.$address, or keep the address. |
CQL2063 | a call through an address found at run time that has no ABI. Such an address is an expand element, the result of a call, or a column made from one of them. Attach the ABI where the address starts: expand … as d with { abi: v }, extend x = d with { abi: v }, or on the call, d.f() with { abi: v }. A .call(…) needs no ABI. |
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. Instead, bucket both sides by time with a column holding bin($sampleAt, 1h) on each side. Join on that column. |
CQL3008 | no ABI for the address. Try check again in the Diagnostics tab, add the ABI to your library, or use .call(). |
CQL3009 | a verification service did not answer for this address. Try again later. A service can also refuse every request for a chain, or every request with heto's key. If CQL3009 stays, add the ABI to your library, or use .call(). |
CQL3010 | not reported yet — a proxy that delegates in a cycle |
CQL3011 | not reported yet — 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, not reported yet — an interval of a proxy was decoded with its implementation's ABI |
CQL3905 | note, not reported yet — a diamond's history disagreed with its current facets and was reconciled |
CQL3906 | note, not reported yet — 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, not reported yet — a diamond cut re-added a selector already present. It is 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, or the chain reorganised and replaced a block that the run read. The message names the chain and the block. After a reorganisation, wait 20 seconds before you run the query again, or query finalized. |
CQL4002 | not reported yet — the chain reorganised twice during the run. Today the first reorganisation fails the run as CQL4001. |
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, not reported yet — the chain reorganised once. The affected rows were re-read. |
CQL4901 | note — a division or average was rounded to 38 significant digits |