Questions tagged [the-graph]
The the-graph tag has no usage guidance.
50
questions
0
votes
0
answers
4
views
Data Fetching from an Aave subgraph
Hi guys I am writing a dApp which deals with liquidations flash loans etc,
The 1st step of development is to receive the user addresses who have borrowed more than zero from 'The Graph'
I use hardhat....
1
vote
0
answers
26
views
Convert UniSwap ID from Graph Query to position token id
I'm sure, the answer is very simple, still I can't figure it out.
I know I can get a list of all active UniSwap positions (not closed) positions by querying the subgraph (I'm on Arbitrum):
query ...
1
vote
0
answers
44
views
After successfully deploying a subgraph via The Graph to Mumbai it suddenly stops working for no apparent reason
so I have succesfully deployed a subgraph to a fork of the masterchef contract from sushiswap. Before beeing able to sync up properly, the subgraph suddenly throws an error and stops. The error ...
0
votes
0
answers
14
views
Live Price monitor
How does dexscreener or dextools websites keep up with the price changes efficiently on thousands of tokens? Can anyone provide a sample code for that? if not, then a roadmap of steps to be taken, ...
0
votes
0
answers
10
views
Is there any way to change the default ethereum template?
I'm here to ask a question about graph-ts.
If this is not the channel, please tell me.
Is there any way to change the default ethereum template?
I want to receive additional miner or nonce values ...
1
vote
1
answer
40
views
The simplest way to return a list of items + gas limits on long lists when using pragma experimental ABIEncoderV2?
This question has two parts.
I would like to return a list of items from my smart contract in a simple way, ideally a one-liner solution, something that I consume on the front-end.
I tried some of the ...
0
votes
0
answers
45
views
Not able to add `dataSource` to existing subgraph
I am new to GraphQL & The Graph protocol. I have an exisitng subgraph with already 2 dataSource and deployed. Now I want to add 1 more new dataSource to subgraph. According to The Graph docs, I ...
0
votes
1
answer
24
views
Is there a script to automatically re-deploy a subgraph?
I have a subgraph that is running on a EC2 Instance and I want to be able to re-compile it, re-generate it and re-deploy it every time a configuration changes. When I say configuration, I refer to the ...
0
votes
1
answer
72
views
How to get the subgraph hash once compiled and deployed?
I have a graph-node running in a EC2 instance. The subgraph has been compiled, created and deployed already and it is running with no issues.
I want to query its status by running the following ...
1
vote
1
answer
51
views
Subgraph returning null for some addresses
I have deployed a version of the open-zeppelin-subgraph (https://github.com/OpenZeppelin/openzeppelin-subgraphs) and I am tracking ERC20, ERC721 and ERC1155 tokens.
I am using this query:
{
...
1
vote
0
answers
126
views
Does the graph-node re-sync all blocks every time it gets restarted?
I am running an EC2 instance with graph-node, using docker.
Let's assume that I have a list of smart contracts that I want my subgraph to track and, at some point, that list gets updated; so I have to ...
2
votes
2
answers
661
views
What is the current size of a copy of the entire Polygon Mainnet chain?
I want to know the total size (in GB or TB) of the database on a node that has a copy of the entire Polygon Mainnet chain, so I can allocate resources for a production instance.
How can I know that? I ...
0
votes
1
answer
87
views
What is the size of Polygon Mumbai chain in GB?
I want to know the total size of the chain because I am running a The Graph Node on an EC2 instance and I have to allocate resources to that.
0
votes
0
answers
192
views
Graph deploy failure retrieving and parsing subgraph mainfest
I'm trying to deploy a subgraph created using the Graph cli tool (following the Building a Subgraph with Subgraph Studio tutorial), but after set the auth key for subgraph studio (graph auth --...
0
votes
1
answer
33
views
how define multiple @fulltext search in a GRT subgraph?
I have a graphql.schema file in my subgraph(GRT)
I try to write a search for 3 entity
but the graph accepts one @fulltext type like this:
type _Schema_
@fulltext(
name: "ABXsearch"
...
0
votes
1
answer
17
views
Is there a way to enable logs for graph commands?
I am running the following version of graph-cli: @graphprotocol/graph-cli/0.42.4 linux-x64 node-v18.15.0
Is there a way to setup a log or have more details after each command gets executed?
0
votes
1
answer
39
views
Deploy of subgraph fails in Amazon EC2 Instance
I want to run graph-node (The Graph) in an Amazon EC2 Instance.
I have setup everything with docker-compose and the 3 containers (graph-node, ipfs and postgres) are running smoothly.
I have also setup ...
2
votes
2
answers
128
views
How to use Open Zeppelin subgraphs to query ERC721 balance?
I have created an Open Zeppelin subgraph so I can track many different ERC20, ERC721 and ERC1155 smart contracts.
My config.json looks like this:
{
"output": "generated/sample."...
0
votes
1
answer
131
views
the Graph error : only rinkeby or mainnet!
I try to deploy my subgraph on the Goerli network,
in the subgraph.yaml and subgraph studio, I select Goerli Network
but, when I run the deploy command it shows me this error:
what should I do!?
0
votes
1
answer
464
views
How to fix a subgraph deployment?
I've deployed a subgraph to a graph-node that I'm hosting myself, however the subgraph has a bug and is continuously attempting to re-execute the event handler but continuously fails on that bug. I've ...
0
votes
0
answers
21
views
Subgraph Warning: the amount of traces goes over the maximum (500), please use 'after' and 'count' in your request
I have deployed a hosted subgraph here. In the logs it gives the following warning. Can someone explain what it means and how I can go about correcting it?
Trying again after trace_filter RPC call ...
1
vote
0
answers
77
views
Uniswap V3 Pool Subscription
I am trying to subscribe to uniswap v3 pool events and this is my query
subscription {
pool(id: "0x0001fcbba8eb491c3ccfeddc5a5caba1a98c4c28") {
id,
token0 {
id
symbol
...
0
votes
0
answers
146
views
Can't install Graph-CLI with yarn
I wanted to install graph CLI. So i ran yarn global add @graphprotocol/graph-cli as mentioned in docs.But it errors out as shown in image(below) -
I followed the link ETIMEDOUT LINK which is ...
1
vote
1
answer
231
views
Error during initialization of subgraph using Graph Indexing Protocol
I am trying to initialize a subgraph using the Graph Protocol but keep getting the error below. My npm version is 9.1.2, yarn version is 3.2.3, node version is 18.12.1, and graph version is 0.36.1. ...
1
vote
1
answer
309
views
How to Use Subgraph Enums in the Mapping?
Subgraph documentation mentions enums but does not show how to use them in mappings.
I tried to import it from the generated schema, along with other type definitions, but compiler gives error:
...
0
votes
1
answer
349
views
UniswapV3 analytics showing different TVL to subgraph query
Uniswap's official analytics page shows the USDC/ETH 0.05% pool as having TVL = $210.20m
When I query the same pool on The Graph I get TVL at $333m
example query:
{pool(id : "...
0
votes
2
answers
33
views
how to search for the destination of a transaction
I defined a subgraph without the contract address
- kind: ethereum/contract
name: Trove
network: mainnet
source:
abi: Trove
startBlock: 5
mapping:
kind: ethereum/...
0
votes
1
answer
172
views
How to develop a network or chain agnostic subgraph?
Multichain applications setup a network/chain config that could be simplified to an object where each key is a unique ID for a supported chain such as the chainId as follows:
// typescript:
enum ...
2
votes
0
answers
145
views
Cannot decode function call in subgraph code
This is with:
graph-cli v0.34.0
graph-ts v0.28.0
I'm trying to decode a function call in my subgraph mapping but it's not working. There is a tuple in the function input that seems to be causing the ...
0
votes
1
answer
357
views
Fetching IPFS data Subgraph Studio does not support mappings with ipfs methods
I am using the graph and am looking to get NFT meta data via ipfs in a transfer event. Everything works as expected unless I try to fetch meta data via ipfs
The schema looks like
type Example @entity {...
2
votes
1
answer
320
views
Can I tell to a local graph node (the graph) to not scan blocks on initialization?
I'm running a node graph locally using The Graph.
I connected it to a HardHat network.
As soon as I run the docker-compose I noticed that the graph starts scanning the whole blockchain history.
Can ...
1
vote
0
answers
44
views
How to use The Graph (GRT) with Quorum to index events and serve them via GraphQL?
I saw a few videos of using a graph node to index blockchain events, and serve them via graphql, which seemed very useful. The common pattern in these videos that I observed:
They are using Infura/...
0
votes
1
answer
56
views
net_version changes every time ganache starts
I'm running ganache with the --database.dbPath option to store the state between starts. I'm also using a graph-node instance to index the events of the smart-contracts. This works fine the first time ...
1
vote
0
answers
333
views
Is there a way to subscribe to a The Graph subgraph?
I want to use GraphQL subscription to be able to watch for all changes in the liquidity pools. Is there a way to do this with The Graph or another possible option?
0
votes
1
answer
109
views
Adding a groupby ability to subgraph of the graph protocol
How would I add the aggregation and grouping to a subgraph deployed as a hosted service on thegraph protocol? The schema.graphql does not support adding a type Query{...} or a type object in general ...
0
votes
1
answer
87
views
How to filter and access the unindexed event parameters?
I was doing a project, and I have an event
event AddedDoctor(
address indexed doctorAddress,
string indexed name,
string indexed doctorRegistrationId,
uint256 ...
0
votes
1
answer
595
views
How do I get GraphQL query to get data for a specific Pancake LP pair from pancake swap hosted graph
I am trying to get Pancake-Pair data by quering the subgraph (Hosted at : https://thegraph.com/hosted-service/subgraph/mmontes11/pancakeswap) .
I want to filter data by pair-contract address . I ...
1
vote
2
answers
260
views
subgraph resolve error: Serialization error: missing field `name`
I'm going though Patrick's solidity course. I'm on 28:36:52.
I'm trying to deploy my subgraph and I'm getting this error.
✖ Failed to deploy to Graph node https://api.studio.thegraph.com/deploy/: ...
3
votes
0
answers
88
views
Return transactions for a specific pair - TheGraph
I am trying to return the latest 1000 transactions for a specific pair in Uniswap V2 using The Graph playground.
The pair I am using is for USDC/WETH and its id is: ...
1
vote
1
answer
2k
views
Graph Deploy failed due to subgraph validation error
I'm going through Nader Dabit's Web3 Blog and everything works just fine until I have to run yarn deploy which runs a script from my package.json
{
"name": "casen-blog",
"...
1
vote
0
answers
78
views
API for find smart-contract deployed which chain?
Is there any API which gives me details that project smart-contract deployed on which chain via its smart-contract address?
e.g. How to know whether it deployed in polygon, avalanche, ethereum?
If is ...
1
vote
1
answer
340
views
Receive an error when trying to run yarn codegen using the graph to generate types for contract ABIs
Hello Team I Receive the Following Error when using the Graph yarn codegen command trying to generate types for contract ABIs
× Failed to generate types for contract ABIs: Failed to generate types for ...
0
votes
1
answer
106
views
Can the graph only index indexed parameters?
I have an event that looks like this:
event ItemListed(
address indexed seller,
address indexed nftAddress,
uint256 indexed tokenId,
uint256 price
);
And I'd ...
1
vote
1
answer
286
views
How to index internal transactions in subgraph?
I'm trying to create a subgraph using callHandlers. It doesn't seem to index function calls that come from a smart contract, only EOAs. Is there a way I can ensure these are included in the subgraph?...
0
votes
1
answer
231
views
How to call functions or access public mappings from inside of a subgraph?
I have this struct and mapping inside my smart-contract:
struct attrStruct {
uint256 generation;
string faction;
}
mapping(uint256 => attrStruct) public attributes;
I want to fetch and ...
1
vote
1
answer
210
views
Event Monitoring - TheGraph, AWS, Alchemy
I am looking for any ideas on the best way (from a production standpoint) to have a queryable way to get the balance of accounts in a smart contract which would be deployed on multiple EVM compatible ...
1
vote
1
answer
263
views
What Is The Best Way To Retrieve All Transactions of a Certain Token?
I am currently trying to better understand purchasing trends of certain NFTs (ERC-721). Currently, I am doing this using EtherScan's API. Now, the API calls return "up to a maximum of the last ...
1
vote
0
answers
43
views
Ethereum Node on AWS
I am running an Ethereum node on AWS. I am having problems connecting my Graph node that was built using Google provisioning services. Any suggestions for where to look for the error?
1
vote
3
answers
1k
views
Problem compiling subgraph with graph-ts new version
I'm getting this error: ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/value/Value | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/value/Value'.
I know it is for this ...
2
votes
1
answer
949
views
What is the default query limit on The Graph?
Say I have a GraphQL query like this, which I execute against a subgraph powered by The Graph:
{
foo {
id
bar
}
}
What is the default number of instances of foo that a subgraph returns?