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

feat(protocol-parser): add abiTypesToSchema #1100

Merged
merged 3 commits into from
Jul 5, 2023
Merged

Conversation

alvrs
Copy link
Member

@alvrs alvrs commented Jul 3, 2023

  • add util to sort a list of abi types into a Schema object (with staticFields and dynamicFields)

@alvrs alvrs requested a review from holic as a code owner July 3, 2023 19:27
@changeset-bot
Copy link

changeset-bot bot commented Jul 3, 2023

🦋 Changeset detected

Latest commit: 412864e

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

This PR includes changesets to release 1 package
Name Type
@latticexyz/protocol-parser Minor

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

import { DynamicAbiType, SchemaAbiType, StaticAbiType, isDynamicAbiType } from "@latticexyz/schema-type";
import { Schema } from "./common";

export function abiTypesToSchema(abiTypes: SchemaAbiType[]): Schema {
Copy link
Member

Choose a reason for hiding this comment

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

love that this is a hint towards order-preserving schemas (instead of restricted to static-then-dynamic) 👀

holic
holic previously approved these changes Jul 4, 2023
@alvrs alvrs force-pushed the alvrs/encode-key-tuple branch from bb79f48 to 1ca9345 Compare July 4, 2023 11:55
@alvrs alvrs force-pushed the alvrs/abi-types-to-schema branch from 9342865 to 03b57ec Compare July 4, 2023 11:55
@alvrs alvrs force-pushed the alvrs/encode-key-tuple branch from 1ca9345 to 90a48c5 Compare July 4, 2023 12:17
@alvrs alvrs force-pushed the alvrs/abi-types-to-schema branch from 03b57ec to 7682320 Compare July 4, 2023 12:17
@alvrs alvrs force-pushed the alvrs/encode-key-tuple branch from 90a48c5 to 935011b Compare July 5, 2023 21:29
@alvrs alvrs force-pushed the alvrs/abi-types-to-schema branch from 7682320 to 1719618 Compare July 5, 2023 21:30
Base automatically changed from alvrs/encode-key-tuple to main July 5, 2023 22:43
@alvrs alvrs dismissed holic’s stale review July 5, 2023 22:43

The base branch was changed.

@alvrs alvrs force-pushed the alvrs/abi-types-to-schema branch from 1719618 to 0269bf5 Compare July 5, 2023 22:55
@alvrs
Copy link
Member Author

alvrs commented Jul 5, 2023

merging since nothing changed since last approval except adding a changeset

@alvrs alvrs merged commit b98e518 into main Jul 5, 2023
@alvrs alvrs deleted the alvrs/abi-types-to-schema branch July 5, 2023 22:59
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