Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

feat: lastEventResolver #42

Merged
merged 3 commits into from
Aug 3, 2022
Merged

Conversation

zhengow
Copy link
Contributor

@zhengow zhengow commented Jul 26, 2022

This is for #3570 and #3571, query latest event with condition interaction.
The same implement as rmrk, only logic about passionList remove.

@zhengow
Copy link
Contributor Author

zhengow commented Jul 26, 2022

I want to give a picture about query data, but it seems no event happen.

image

image

@vikiival
Copy link
Member

Basically copy-paste from kodadot/magick

@vikiival
Copy link
Member

Oh you tested that against the latest main?

@zhengow
Copy link
Contributor Author

zhengow commented Jul 27, 2022

Oh you tested that against the latest main?

Now I try the latest main, however it seems there is error( is this my bug or not?).
My step:

  1. just up
  2. just codegen
  3. just reset
  4. just process
  5. just serve

image

npm run build

> @kodadot1/snek@0.0.1-rc.0 build
> rm -rf lib && tsc

node -r dotenv/config lib/processor.js
●  note      Welcome to the Processor! https://basilisk-rococo.play.hydration.cloud/v1/graphql
Prometheus metrics are served at port 63813
☐  pending   [COLECTTION++]: 12153
.isLatest, .asLatest properties are deprecated, if you believe this is a mistake, please leave a comment at https://github.com/subsquid/squid/issues/9
⬤  debug     collection: {
  "caller": "bXj4uMHTrBtVfmVMDpQ1AyUUNbnvLaRPcBDVTeLffL2h2U3KE",
  "blockNumber": "12153",
  "timestamp": "2022-05-05T08:09:12.202Z",
  "id": "1",
  "metadata": "",
  "type": "LiquidityMining"
}
⬤  debug     metadata: ipfs://ipfs/bafkreiazeqysfmeuzqcnjp6rijxfu5h7sj3t4h2rxehi7rlyegzfy7lxeq
…  watching  [IPFS] 200 ipfs://ipfs/bafkreiazeqysfmeuzqcnjp6rijxfu5h7sj3t4h2rxehi7rlyegzfy7lxeq
✔  success   [COLLECTION] 1
☐  pending   [COLECTTION++]: 497726
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  (0, assert_1.default)(this.isV48)

    at NftClassCreatedEvent.get asV48 [as asV48] (/Users/brownzheng/Documents/UGit/snek1/lib/types/events.js:220:30)
    at NftClassCreatedEvent.get asLatest [as asLatest] (/Users/brownzheng/Documents/UGit/snek1/lib/types/events.js:229:21)
    at getCreateCollectionEvent (/Users/brownzheng/Documents/UGit/snek1/lib/mappings/utils/getters.js:17:60)
    at unwrap (/Users/brownzheng/Documents/UGit/snek1/lib/mappings/utils/extract.js:18:23)
    at handleCollectionCreate (/Users/brownzheng/Documents/UGit/snek1/lib/mappings/index.js:63:40)
    at /Users/brownzheng/Documents/UGit/snek1/node_modules/@subsquid/substrate-processor/lib/processor.js:285:35
    at /Users/brownzheng/Documents/UGit/snek1/node_modules/@subsquid/substrate-processor/lib/db.js:69:19
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}
error: Recipe `process` failed on line 4 with exit code 1

@zhengow
Copy link
Contributor Author

zhengow commented Jul 28, 2022

I try the latest main branch, the same behavior, too.

@vikiival
Copy link
Member

vikiival commented Aug 1, 2022

Plese try to pull the latest main

@zhengow
Copy link
Contributor Author

zhengow commented Aug 1, 2022

It works!
image

@yangwao
Copy link
Member

yangwao commented Aug 3, 2022

is this good to go?

📟 @vikiival

Copy link
Member

@vikiival vikiival left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2022-08-03 at 15 22 06

@vikiival
Copy link
Member

vikiival commented Aug 3, 2022

@zhengow please test it next time 🙏

@vikiival vikiival merged commit 5cd19f5 into kodadot:main Aug 3, 2022
@vikiival
Copy link
Member

vikiival commented Aug 3, 2022

🦑 Releasing the squid at git@github.com:kodadot/snek.git#5cd19f51b705e0812492ad683997d39a0f657bdd

@zhengow
Copy link
Contributor Author

zhengow commented Aug 7, 2022

@zhengow please test it next time 🙏

My bad. Actually I test it but not fully tested 😿 . Unfortunately no value larger than bigint when I tested.

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants