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

Draft initial ethdebug/format/type schema #55

Merged
merged 1 commit into from
Jan 6, 2024
Merged

Draft initial ethdebug/format/type schema #55

merged 1 commit into from
Jan 6, 2024

Conversation

gnidan
Copy link
Member

@gnidan gnidan commented Jan 3, 2024

  • Define ethdebug/format/type as if/then/else

    • if the object is a known kind,
    • then the object must be a known elementary or complex type
    • else the object must be a valid base type with added constraints
  • Define ethdebug/format/type/elementary and ethdebug/format/type/elementary/{
    uint, int, ufixed, fixed, bool, bytes, string, address, contract, enum
    }

  • Define ethdebug/format/type/complex and ethdebug/format/type/complex/{
    alias, tuple, array, mapping, struct
    }

  • Define ethdebug/format/type/wrapper and ethdebug/format/type/reference to serve as more canonical forms that override the base schema equiv.

  • Add pages for all the type schemas

  • Move "key concepts" from base schema page to own page

  • Document schema overall

  • Test that all schemas have examples (except for permitted omissions)

@gnidan gnidan force-pushed the type-schema branch 3 times, most recently from 17ba96f to a354a4a Compare January 6, 2024 08:32
- Define ethdebug/format/type as if/then/else
  - `if` the object is a known kind,
  - `then` the object must be a known elementary or complex type
  - `else` the object must be a valid base type with added constraints

- Define ethdebug/format/type/elementary and
  ethdebug/format/type/elementary/{
    uint, int, ufixed, fixed, bool, bytes, string, address, contract,
    enum
  }

- Define ethdebug/format/type/complex and
  ethdebug/format/type/complex/{
    alias, tuple, array, mapping, struct
  }

- Define ethdebug/format/type/wrapper and ethdebug/format/type/reference
  to serve as more canonical forms that override the base schema equiv.

- Add pages for all the type schemas

- Move "key concepts" from base schema page to own page

- Document schema overall

- Test that all schemas have examples (except for permitted omissions)
@gnidan gnidan changed the title [wip] Add type schema Draft initial ethdebug/format/type schema Jan 6, 2024
@gnidan gnidan marked this pull request as ready for review January 6, 2024 08:40
@gnidan gnidan merged commit 0b8da47 into main Jan 6, 2024
4 checks passed
@gnidan gnidan deleted the type-schema branch January 6, 2024 08:46
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.

1 participant