Skip to content

Commit

Permalink
Add another builtinByteStringToInteger property, fix incorrect proper…
Browse files Browse the repository at this point in the history
…ty specification
  • Loading branch information
kozross committed Dec 8, 2023
1 parent 7b0c9cf commit 04b001e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CIP-XXXX/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,13 @@ builtinByteStringToInteger True (consByteString 0x01 (consByteString 0x01
```

We also describe properties that any `builtinByteStringToInteger` implementation
must have. Throughout, `i` is not negative, and `0 <= w8 <= 255`.
must have. Throughout, `i` is not negative, `0 <= w8 <= 255`, and `bs` is not
empty.

1. `builtinByteStringToInteger b (builtinIntegerToByteString b k i) = i`
1. `builtinByteStringToInteger b (builtinIntegerToByteString b 0 i) = i`
2. `builtinByteStringToInteger b (consByteString w8 emptyByteString) = w8`
3. `builtinIntegerToByteString b (lengthOfByteString bs) (builtinByteStringToInteger b bs) =
bs`

## Rationale: how does this CIP achieve its goals?

Expand Down

0 comments on commit 04b001e

Please sign in to comment.