From f5d4b834a2702119d01172b85633f9c0395e928b Mon Sep 17 00:00:00 2001 From: Oba Date: Thu, 19 Sep 2024 10:46:30 +0200 Subject: [PATCH] doc: byteArrayToString docstring --- src/CairoLib.sol | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/CairoLib.sol b/src/CairoLib.sol index b1eb8e8..af8f883 100644 --- a/src/CairoLib.sol +++ b/src/CairoLib.sol @@ -191,12 +191,13 @@ library CairoLib { /// @dev A ByteArray is represented as: /** * pub struct ByteArray { - * data_len: felt252, - * data: [], - * pending_word: felt252, - * pending_word_len: usize, - * } - * where `data` is an array of 31-byte packed words, and `pending_word` word of size `pending_word_len`. + * full_words_len: felt252, + * full_words: [], + * pending_word: felt252, + * pending_word_len: usize, + * } + * where `full_words` is an array of 31-byte packed words, and `pending_word` word of size `pending_word_len`. + * Note that those full words are 32 bytes long, but only 31 bytes are used. */ /// @param data The Cairo representation of the ByteArray serialized to bytes. function byteArrayToString(bytes memory data) internal pure returns (string memory) {