chain-insights 0.66.0 → 0.66.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/graph-tools.md
CHANGED
|
@@ -328,6 +328,7 @@ links of a pair add up to it.
|
|
|
328
328
|
| Property | Meaning |
|
|
329
329
|
| ---------------------- | ----------------------------------------------------------------------- |
|
|
330
330
|
| `asset` | the token's contract in lowercase, or `native` for the chain's own coin |
|
|
331
|
+
| `asset_key` | bookkeeping: the server's own number for the token, never a name to query by; it differs per server and changes on a rebuild |
|
|
331
332
|
| `token_standard` | the standard of the token |
|
|
332
333
|
| `tx_count` | transfers of that token between the pair |
|
|
333
334
|
| `amount_raw_sum` | exact total in base units, as text; not dollars |
|
|
@@ -370,6 +371,12 @@ tokens, send one search per token, in one `graph_query_batch`. A read anchored
|
|
|
370
371
|
on a full address needs neither bound. Tokens are not dollars, and a token is
|
|
371
372
|
named by its full contract.
|
|
372
373
|
|
|
374
|
+
An `asset` that names no token of the graph, or a symbol such as `USDC`, is
|
|
375
|
+
refused with `anchor_missing` whose fix names the contract: the graph holds no
|
|
376
|
+
token at that address. Check the contract, all 42 characters in lowercase, and
|
|
377
|
+
send the same query again with the right one. The server turns the contract
|
|
378
|
+
into its own `asset_key` itself; a query never needs the key.
|
|
379
|
+
|
|
373
380
|
## Role labels and flags
|
|
374
381
|
|
|
375
382
|
The graph labels an address with role words: `Exchange`, `Scam`, `Victim` and
|
package/package.json
CHANGED
|
@@ -404,6 +404,7 @@ RETURN c.network AS remote_network, c.address AS endpoint, x.events AS events LI
|
|
|
404
404
|
`FLOWS_TO` is the pair's total over every token. `TRANSFERRED` splits that total by token: one link for each sender, receiver and token. `FLOWS_TO` stays the pair total, and the `TRANSFERRED` links of a pair add up to it. A link carries these properties:
|
|
405
405
|
|
|
406
406
|
- `asset`: the token's contract, in lowercase and in full (42 characters), or `native` for the chain's own coin.
|
|
407
|
+
- `asset_key`: bookkeeping, the number the server keeps beside `asset`. Never name a token by it and never copy one into a query: it differs from server to server and changes when a graph is rebuilt. Write `asset` with the full contract; the server turns it into the key itself.
|
|
407
408
|
- `token_standard`: the standard of the token.
|
|
408
409
|
- `tx_count`: the number of transfers of that token between the pair.
|
|
409
410
|
- `amount_raw_sum`: the exact total in base units, as text. It is not dollars and not a number of whole tokens.
|
|
@@ -441,6 +442,8 @@ ORDER BY received_usd DESC LIMIT 10
|
|
|
441
442
|
|
|
442
443
|
A `TRANSFERRED` search over the whole chain, with no address anchor, must name one `asset` literal and a lower bound `t.last_seen_timestamp >=` joined by `AND`. Without both, the server refuses it with `transfer_search_unbounded` before it runs. An `OR` of two assets is refused the same way: send one search per asset, in one `graph_query_batch` when there are several. Read `behind_transfers` on `Head` first, as for any whole-chain search. A read anchored on a full address needs neither bound.
|
|
443
444
|
|
|
445
|
+
An `asset` that names no token of the graph, or a symbol such as `USDC`, is refused with `anchor_missing` whose fix names the contract: the graph holds no token at that address. That refusal is not a family behind and not a missing anchor: do not ask for an address. Check the contract, all 42 characters in lowercase, and send the same query again with the right one.
|
|
446
|
+
|
|
444
447
|
How to answer from these rows:
|
|
445
448
|
|
|
446
449
|
- Tokens are not dollars. Say "tokens worth about 183 USD", never "sent 183 USD". Head the column "Tokens worth (USD)".
|