errors reported as strings not bytes
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user