From cb836ad2a31a9829e87756914113c0a19628ff04 Mon Sep 17 00:00:00 2001 From: Tim Olson <> Date: Fri, 20 Oct 2023 01:10:33 -0400 Subject: [PATCH] errors reported as strings not bytes --- docs/solidity.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/solidity.md b/docs/solidity.md index 5794a58..8678c21 100644 --- a/docs/solidity.md +++ b/docs/solidity.md @@ -6,7 +6,6 @@ * `calldata` is a small read-only area for function arguments. you should rarely if ever need to use this keyword. reading from calldata takes the least gas of all. * word size is 256 bits. int and uint types are available for every 8-bit interval from `uint8`, `uint16`, `uint24`, ..., `uint256`. do not use the bare `uint` even though it's a legal alias for 256. * similarly to `uint?` types, there are value types `bytes1`, `bytes2`, ..., `bytes32` which is 256 bits. `bytes` by itself is an alias for the dynamic array `byte[]` -* do not use `string` type. use `bytes` instead. for reasons. * arrays have three types: dynamic storage array, dynamic memory array, and static array. * all arrays in storage (contract members) start as 0-length and may only be extended by `contractArray.push(item)` one at a time. remove with `pop()`. a storage array referenced inside a function as `Foo[] storage myArray = contractArray;` results in a reference to the storage area. * dynamic memory arrays `Foo[] memory myArray = new Foo[](length);` only this c++ style allocation is available for dynamic memory arrays, and the length must be known at creation time. you must then set each member of the array separately, in a loop.