bobo-k2/dapps-staking-indexer

Typescript Build Error on the entity EraReward, Call, Stake, and Contract & Problems running the app.

Closed this issue · 5 comments

Hello

I follow all the instruction until build the project section using yarn build. it throws this error instead

yarn run v1.22.19
$ subql build
 ›   Error: [tsl] ERROR in /home/corlys/Dev/dapps-staking-indexer/src/mappings/dappsStakingCallHandlers.ts(51,17)
 ›         TS2554: Expected 5 arguments, but got 1.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

after some digging, the entities mention above will throw an error if the values are not initialized directly on the parameters. Is this also like this on your side? do you use a different version?

Also if i then suplied the values directly to the parameters and run the docker-compose pull && docker-compose up command is it suppose to print anything other than this or are we suppose to wait longer?

Attaching to dapps-staking-indexer-graphql-engine-1, dapps-staking-indexer-postgres-1, dapps-staking-indexer-subquery-node-1

I also check http://localhost:3000 and there is nothing there

Hi @corlys,

thank you for reporting. It looks like SubQuery changed a way how types are genrated with subql codegen, so I decided to add all types to the project. Please pull main branch. Now you can skip yarn codegen part from readme, since all types are part of the project.

hello bobo-k2, thank you for answering, i just pull the latest man branch and it does not have any of the errors anymore. But i still having problems running the app (at least i think so). When i already pull the image using docker compose pull & docker compose up the app just stays like this for a long time. Is it supposed to be like this?

➜  dapps-staking-indexer git:(main) docker compose up
[+] Building 0.0s (0/0)                                                                                                                                                                
[+] Running 4/4
 ✔ Network dapps-staking-indexer_default             Created                                                                                                                      0.1s 
 ✔ Container dapps-staking-indexer-postgres-1        Created                                                                                                                      0.1s 
 ✔ Container dapps-staking-indexer-subquery-node-1   Created                                                                                                                      0.1s 
 ✔ Container dapps-staking-indexer-graphql-engine-1  Created                                                                                                                      0.1s 
Attaching to dapps-staking-indexer-graphql-engine-1, dapps-staking-indexer-postgres-1, dapps-staking-indexer-subquery-node-1

http://localhost:3000 also refusde to connect

you should see something like

docker-compose up
[+] Running 3/0
 ⠿ Container dapps-staking-indexer-postgres-1        Running                                                                                              0.0s
 ⠿ Container dapps-staking-indexer-subquery-node-1   Running                                                                                              0.0s
 ⠿ Container dapps-staking-indexer-graphql-engine-1  Running                                                                                              0.0s
Attaching to dapps-staking-indexer-graphql-engine-1, dapps-staking-indexer-postgres-1, dapps-staking-indexer-subquery-node-1
dapps-staking-indexer-subquery-node-1   | 2023-07-11T14:58:19.640Z <BlockDispatcherService> INFO Enqueueing blocks 3579021...3579021, total 1 blocks 
dapps-staking-indexer-subquery-node-1   | 2023-07-11T14:58:19.640Z <BlockDispatcherService> INFO fetch block [3579021,3579021], total 1 blocks 
dapps-staking-indexer-subquery-node-1   | 2023-07-11T14:58:28.983Z <BlockDispatcherService> INFO Enqueueing blocks 3579023...3579023, total 1 blocks 

Maybe to check subquery-node-1 logs in Docker. Also I am not sure where Network dapps-staking-indexer_default comes from. Did you change docker-compose.yml

Hey @corlys is this still a problem?

corlys commented

Sorry for the long resposnse, i forgot about this. It works somehow after updating the subquery library. Closing this now, thanks!