Skip to content

Commit

Permalink
Remove generic Hex primitive type
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Jan 11, 2024
1 parent 4882aa0 commit ebe9e21
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions apis/config/deposit_contract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ get:
- example: "1"
address:
allOf:
- $ref: ../../beacon-node-oapi.yaml#/components/schemas/Hex
- $ref: ../../beacon-node-oapi.yaml#/components/schemas/ExecutionAddress
- description: Hex encoded deposit contract address with 0x prefix
- example: "0x1Db3439a222C519ab44bb1144fC28167b4Fa6EE6"
- example: "0x00000000219ab540356cBB839Cbe05303d7705Fa"
"500":
$ref: ../../beacon-node-oapi.yaml#/components/responses/InternalError
2 changes: 0 additions & 2 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,6 @@ components:
$ref: './types/primitive.yaml#/Finalized'
Root:
$ref: './types/primitive.yaml#/Root'
Hex:
$ref: './types/primitive.yaml#/Hex'
Graffiti:
$ref: './types/primitive.yaml#/Graffiti'
Signature:
Expand Down
4 changes: 2 additions & 2 deletions types/altair/sync_committee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ Altair:
aggregation_bits:
allOf:
- description: 'A bit is set if a signature from the validator at the corresponding index in the subcommittee is present in the aggregate `signature`.'
- $ref: "../primitive.yaml#/Hex"
- example: "0x01"
- $ref: "../primitive.yaml#/Bitvector"
- example: "0xffffffffffffffffffffffffffffffff"
signature:
allOf:
- $ref: '../primitive.yaml#/Signature'
Expand Down
4 changes: 2 additions & 2 deletions types/p2p.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ MetaData:
attnets:
allOf:
- description: "Bitvector representing the node's persistent attestation subnet subscriptions."
- $ref: "./primitive.yaml#/Hex"
- $ref: "./primitive.yaml#/Bitvector"
- example: "0x0000000000000000"
syncnets:
allOf:
- description: "Bitvector representing the node's sync committee subnet subscriptions. This metadata is not present in phase0, but will be present in Altair."
- $ref: "./primitive.yaml#/Hex"
- $ref: "./primitive.yaml#/Bitvector"
- example: "0x0f"

Peer:
Expand Down
11 changes: 6 additions & 5 deletions types/primitive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ Graffiti:
example: "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
pattern: "^0x[a-fA-F0-9]{64}$"

Hex:
type: string
format: hex
pattern: "^0x[a-fA-F0-9]{2,}$"

Signature:
type: string
format: hex
Expand All @@ -93,6 +88,12 @@ BitList:
example: "0x01"
pattern: "^0x[a-fA-F0-9]+$"

Bitvector:
type: string
format: hex
example: "0x01"
pattern: "^0x[a-fA-F0-9]+$"

Uint8:
type: string
description: "Unsigned 8 bit integer, max value 255"
Expand Down

0 comments on commit ebe9e21

Please sign in to comment.