SubQuery is an Open, Flexible, Fast and Universal data indexing framework for web3. Our mission is to help developers create the decentralised products of the future.
When dealing with dynamicDatasources, it cannot get data from the store
Example project
In the example:
handleInitialize (core.ts) is a dynamic datasource that updates pool when used
however, it fails to retrieve the pool data saved by handlePoolCreated (factory.ts)
Steps to Reproduce
[yarn && yarn codegen && yarn build ]
For the example project, you would have to manually update the "@subql/types" to "@subql/types-ethereum" to succeed yarn build
[ To run the project: yarn start:docker ]
It would then output the error in the screenshot above, as const pool = await Pool.get(event.address) in handleInitialize outputs undefined
Expected behavior: [What you expected to happen]
The dynamic datasource should be able to access poolActual behavior: [What actually happened]
Prerequisites
Description
The example project uses
subql-ethereum
https://github.com/subquery/subql-ethereumWhen dealing with dynamicDatasources, it cannot
get
data from the store Example project In the example:handleInitialize
(core.ts) is a dynamic datasource that updatespool
when used however, it fails to retrieve thepool
data saved byhandlePoolCreated
(factory.ts)Steps to Reproduce
yarn build
yarn start:docker
]const pool = await Pool.get(event.address)
inhandleInitialize
outputsundefined
Expected behavior: [What you expected to happen]
pool
Actual behavior: [What actually happened]