Skip to content

Commit

Permalink
utf8 is always void length
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-p committed Jun 4, 2024
1 parent d3d9c94 commit 2898394
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ export default class Compiler {
if (typeString === 'itxnparams') return { kind: 'base', type: 'itxn' };
if (typeString === 'bytes32') return { kind: 'staticArray', length: 32, base: { kind: 'base', type: 'byte' } };
if (typeString === 'bytes64') return { kind: 'staticArray', length: 64, base: { kind: 'base', type: 'byte' } };
if (typeString === 'utf8void') return { kind: 'base', type: 'string' };
if (typeString === 'utf8') return { kind: 'base', type: 'string' };

if (type.isBoolean()) return { kind: 'base', type: 'bool' };

Expand Down
2 changes: 1 addition & 1 deletion types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ declare type byte = { __byte: true };
declare type bytes<Length = void> = Byteslice<Length>;
declare type bytes32 = Byteslice<32>;
declare type bytes64 = Byteslice<64>;
declare type utf8<Length = void> = bytes<Length>;
declare type utf8 = bytes<void>;

declare type TxnVerificationTests = {
/** assert that the value is less than the given value */
Expand Down

0 comments on commit 2898394

Please sign in to comment.