Graph-cli
and mustache
is being used for genearting the Assemblyscript and subgraph yam specifiication
- graph-cli : https://github.com/graphprotocol/graph-cli
- mustache : https://github.com/janl/mustache.js
In the project directory, you can run:
Generates AssemblyScript types for smart contract ABIs and the subgraph schema.
Compiles a subgraph to WebAssembly.
Generates subgraph.yaml based on subgraph template for the speicific network and network configuration
Deploys a subgraph to a Graph Node(onomyprotocol/ograph)
The link to the Graph playground: https://thegraph.com/legacy-explorer/subgraph/onomyprotocol/ograph
The WNOMTransaction entity is the reflection of the BondingNOM Transaction event emitted by the contract.
{
wnomtransactions(
first: 1000,
skip: 0,
orderBy: timestamp,
orderDirection: desc
) {
id
senderAddress
amountNOM
amountETH
price
supply
buyOrSell
slippage
timestamp
}
}
WNOMHistoricalFrame is aggregated price change entities within the supported frames (Min, Hour, Day and etc). The aggregation is based on BondingNOM Transaction event emitted by the contract, so in case there are no events within the frame, the frame won't exist.
{
wnomhistoricalFrames(
first: 1000,
skip: 0,
where: { type: Minute },
orderBy: startTime,
orderDirection:desc
) {
id
type
updateTime
startTime
startPrice
endTime
endPrice
minPrice
maxPrice
transactionsCount
}
}