Skip to content

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 ​

CodeMeans
CQL1001a hex literal has an odd number of digits
CQL1002hex is written 0X. Use 0x.
CQL1003a hex literal or an address 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 opens and never closes
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. Backtick it or choose another name.
CQL1015take needs a whole-number literal
CQL1016a syntax error: what the parser found and what it expected. If CQL can tell what is missing, the hint says what to write.
CQL1017a second query after the end of the pipeline: a from or a let. A query has exactly one pipeline.
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
CQL2001a chain name or a chain id that is not configured. The message lists the configured chains.
CQL2002a 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.
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, or one whose JSON item name holds a parenthesis. The message quotes the reason.
CQL2010a function the contract's ABI does not have
CQL2011two overloads match. Name one with .call(sig).
CQL2012no 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.
CQL2013a constant argument out of range for its parameter type
CQL2014an event no ABI in the range defines
CQL2015a signature that does not parse, in .call, selector, topic0, abi_encode or abi_decode. A selector or topic0 signature must also have a name.
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+ with a string, or + on two bytes values. 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, or of a constant no 32-byte word holds: 2^256 or more, or less than -2^255
CQL2028concat mixing bytes and strings
CQL2029tohex of a type it cannot render, or of a negative constant
CQL2030a negative pow exponent
CQL2031a constant pow too large to compute
CQL2032address(chain, b) with a word, or a narrow value that is not a literal. 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. It also covers a constant slot number in slot() that is out of range.
CQL2040a named argument on anything but slot(), or a slot() argument without its name
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, or two fields of one record, with one name
CQL2047expand of something that is not an array
CQL2048a join key missing on one side
CQL2049two 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.
CQL2050an 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.
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.
CQL2056an integer address argument that is not a constant from 0 to 2^160 − 1. The hint says which way it missed.
CQL2057a 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.
CQL2059a 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.
CQL2060a 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.
CQL2061a 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.
CQL2062a 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.
CQL2063a 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.
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. Instead, bucket both sides by time with a column holding bin($sampleAt, 1h) on each side. Join on that column.
CQL3008no ABI for the address. Try check again in the Diagnostics tab, add the ABI to your library, or use .call().
CQL3009a 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().
CQL3010not reported yet — a proxy that delegates in a cycle
CQL3011not reported yet — a 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, not reported yet — an interval of a proxy was decoded with its implementation's ABI
CQL3905note, not reported yet — a diamond's history disagreed with its current facets and was reconciled
CQL3906note, not reported yet — 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, not reported yet — a diamond cut re-added a selector already present. It is 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, 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.
CQL4002not reported yet — the chain reorganised twice during the run. Today the first reorganisation fails the run as CQL4001.
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, not reported yet — the chain reorganised once. The affected rows were re-read.
CQL4901note — a division or average was rounded to 38 significant digits