Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Zod schemas for Filters in utils [BOOST-4470] #514

Conversation

sammccord
Copy link
Contributor

@sammccord sammccord commented Aug 16, 2024

  • Implement Zod schemas for Filters in utils
  • Fix several explicit any's to resolve ts issues
  • Update Mint params schema to match number or FilterOperator
  • Update zod to support readonly usage in abitype

fix(utils): better zod lazy usage to fix type issues

chore(utils): ignore esoteric arrayoperator type error

chore(questdk): re-export zod schemas

chore(types): address build issues for unknown / any types

fix(utils): update zod to utilize abitype readonly

chore: fix formatting
@sammccord sammccord requested a review from a team as a code owner August 16, 2024 15:08
Copy link

changeset-bot bot commented Aug 16, 2024

🦋 Changeset detected

Latest commit: 94b09f0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 52 packages
Name Type
@rabbitholegg/questdk-plugin-utils Minor
@rabbitholegg/questdk-plugin-across Patch
@rabbitholegg/questdk-plugin-aerodrome Patch
@rabbitholegg/questdk-plugin-artblocks Patch
@rabbitholegg/questdk-plugin-balancer Patch
@rabbitholegg/questdk-plugin-base Patch
@rabbitholegg/questdk-plugin-basepaint Patch
@rabbitholegg/questdk-plugin-boost Patch
@rabbitholegg/questdk-plugin-camelot Patch
@rabbitholegg/questdk-plugin-connext Patch
@rabbitholegg/questdk-plugin-fabric Patch
@rabbitholegg/questdk-plugin-foundation Patch
@rabbitholegg/questdk-plugin-gmx Patch
@rabbitholegg/questdk-plugin-handlefi Patch
@rabbitholegg/questdk-plugin-hop Patch
@rabbitholegg/questdk-plugin-hyphen Patch
@rabbitholegg/questdk-plugin-jojo Patch
@rabbitholegg/questdk-plugin-kote Patch
@rabbitholegg/questdk-plugin-kwenta Patch
@rabbitholegg/questdk-plugin-lens Patch
@rabbitholegg/questdk-plugin-llama Patch
@rabbitholegg/questdk-plugin-manifold Patch
@rabbitholegg/questdk-plugin-mirror Patch
@rabbitholegg/questdk-plugin-moshicam Patch
@rabbitholegg/questdk-plugin-mux Patch
@rabbitholegg/questdk-plugin-neynar Patch
@rabbitholegg/questdk-plugin-okutrade Patch
@rabbitholegg/questdk-plugin-optimism Patch
@rabbitholegg/questdk-plugin-orbit Patch
@rabbitholegg/questdk-plugin-paragraph Patch
@rabbitholegg/questdk-plugin-paraswap Patch
@rabbitholegg/questdk-plugin-pendle Patch
@rabbitholegg/questdk-plugin-pods Patch
@rabbitholegg/questdk-plugin-polygon Patch
@rabbitholegg/questdk-plugin-rabbithole Patch
@rabbitholegg/questdk-plugin-registry Patch
@rabbitholegg/questdk-plugin-soundxyz Patch
@rabbitholegg/questdk-plugin-stargate Patch
@rabbitholegg/questdk-plugin-superbridge Patch
@rabbitholegg/questdk-plugin-sushi Patch
@rabbitholegg/questdk-plugin-symbiosis Patch
@rabbitholegg/questdk-plugin-synapse Patch
@rabbitholegg/questdk-plugin-tally Patch
@rabbitholegg/questdk-plugin-thirdweb Patch
@rabbitholegg/questdk-plugin-thruster Patch
@rabbitholegg/questdk-plugin-titles Patch
@rabbitholegg/questdk-plugin-traderjoe Patch
@rabbitholegg/questdk-plugin-treasure Patch
@rabbitholegg/questdk-plugin-uniswap Patch
@rabbitholegg/questdk-plugin-vela Patch
@rabbitholegg/questdk-plugin-woofi Patch
@rabbitholegg/questdk-plugin-zora Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -12,6 +12,7 @@
"noImplicitOverride": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitAny": false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was giving me guff trying to build, figured that at this point any any's we have right now are fine and we're unlikely to introduce a great deal more core functionality

| Primitive
| FilterObject
| FilterArray
| FilterOperator
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Quazia is this correct? I added the FilterOperator to Filter union type, and schema. Unsure if it's the move.

Copy link
Member

Choose a reason for hiding this comment

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

I think that is correct - some of the issues before may have been from not having it in this.

Copy link
Member

@Quazia Quazia left a comment

Choose a reason for hiding this comment

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

Looks good - this must have been a tough one 😅

Just for my edification why'd you end up casting the context as any when passing it through in the handlers?

| Primitive
| FilterObject
| FilterArray
| FilterOperator
Copy link
Member

Choose a reason for hiding this comment

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

I think that is correct - some of the issues before may have been from not having it in this.

@sammccord sammccord merged commit 8599abc into main Aug 20, 2024
@sammccord
Copy link
Contributor Author

Looks good - this must have been a tough one 😅

Just for my edification why'd you end up casting the context as any when passing it through in the handlers?

The context type unions don't always overlap with the operator type unions, especially when it comes to Record<string, unknown> vs transaction interfaces.

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

Successfully merging this pull request may close these issues.

2 participants