You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on a local subgraph for tracking events on an Ethereum smart contract. I aim to query specific entities, but I'm encountering an error when attempting to do so. The error message I'm receiving is: '"message": "Failed to get entities from store: Odd number of digits, query = from \"sgd2\".\"task_created\"[*]{id = 1} order none first 100 at 0 query_id 7316f7c8141c25f5-6dc8c4ef99f8cc6a"'" . I am honestly pretty noob on this, so I would greatly appreciate your help.
Steps to reproduce the problem
Started a local blockchain with npx hardhat node --hostname 0.0.0.0
I've never seen that before, either. I assume that it is caused by somehow having a string with a hex value in it with an odd number of digits (i.e., 0xbee instead of 0xbeef) But I have no idea how that could happen
Bug report
Basic explanation of the problem
I'm currently working on a local subgraph for tracking events on an Ethereum smart contract. I aim to query specific entities, but I'm encountering an error when attempting to do so. The error message I'm receiving is:
'"message": "Failed to get entities from store: Odd number of digits, query = from \"sgd2\".\"task_created\"[*]{id = 1} order none first 100 at 0 query_id 7316f7c8141c25f5-6dc8c4ef99f8cc6a"'"
. I am honestly pretty noob on this, so I would greatly appreciate your help.Steps to reproduce the problem
Started a local blockchain with
npx hardhat node --hostname 0.0.0.0
Configured my
hardhat.config.ts
as follows:localhost: {
chainId: 1337,
url: "htpp://0.0.0.0:8545"
Compiled my smart contract and deployed it to the hardhat node, which generated the following message:
Contract deployment: Web3Task
Contract address: 0xec20dcbf0380f1c9856ee345af41f62ee45a95a1
Transaction: 0xf8f0de6b1a4a2895dffc30db1f7dc56853c1b94570190ea43e2aa331b9dd3214
From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
Value: 0 ETH
Gas used: 4006332 of 4006332
Block #38359529: 0x50ae5ffd41dee3d39dbc32ae9d5fcc95fac9830d2d7d1700795977e7027305ef
I cloned the graph-node repository inside my main contracts directory
in
docker/docker-compose.yml
I configured the file as follows:version: "3"
services:
graph-node:
image: graphprotocol/graph-node
ports:
- "8000:8000"
- "8001:8001"
- "8020:8020"
- "8030:8030"
- "8040:8040"
depends_on:
- ipfs
- postgres
extra_hosts:
- host.docker.internal:host-gateway
environment:
postgres_host: postgres
postgres_user: graph-node
postgres_pass: let-me-in
postgres_db: graph-node
ipfs: "ipfs:5001"
ethereum: "mainnet:http://host.docker.internal:8545"
GRAPH_LOG: info
ETHEREUM_REORG_THRESHOLD: 1
ETHEREUM_ANCESTOR_COUNT: 1
ipfs:
image: ipfs/kubo:v0.14.0
ports:
- "5001:5001"
volumes:
- ./data/ipfs:/data/ipfs
postgres:
image: postgres:14
ports:
- "5432:5432"
command:
[
"postgres",
"-cshared_preload_libraries=pg_stat_statements",
"-cmax_connections=200",
]
environment:
POSTGRES_USER: graph-node
POSTGRES_PASSWORD: let-me-in
POSTGRES_DB: graph-node
# FIXME: remove this env. var. which we shouldn't need. Introduced by
# #3511, maybe as a
# workaround for docker/for-mac#6270?
PGDATA: "/var/lib/postgresql/data"
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
volumes:
- ./data/postgres:/var/lib/postgresql/data
Run the command
docker-compose up
(log in Relevant log output)And the hardhat log keeps going with the same values in a loop.
eth_getBlockByNumber
eth_getBlockByHash
eth_getBlockByNumber (2)
eth_getLogs
eth_getBlockByHash
eth_getBlockByNumber (2)
npm run create-local
npm run deploy-local
which shows:
**Build completed: QmS2ppDqbW1Lg3B2DSkd8nK51vepDgdwsuCFg7vKufntHY
Deployed to http://localhost:8000/subgraphs/name/web3task_subraph/graphql
Subgraph endpoints:
Queries (HTTP): http://localhost:8000/subgraphs/name/web3task_subraph**
10. And then my query and the error:
I tried to run some local tests to generate traffic to query it.
How do I solve this error and what is causing it?
Edit:
My subgraph.yaml:
Relevant log output
IPFS hash
No response
Subgraph name or link to explorer
No response
Some information to help us out
OS information
None
The text was updated successfully, but these errors were encountered: