
Description
Dima recommends rewriting this part to fit our VM specs
Virtual Machine parts to test:
- Layout of State Variables in Storage
https://github.com/arrayio/array-io-solidity/blob/master/miscellaneous.rst#layout-of-state-variables-in-storage
a) > ...are packed into a single storage slot if possible ...
A: Now it is not like that for Array
b) Whole Warning segment in this section should be out.
- Layout in Memory
https://github.com/arrayio/array-io-solidity/blob/master/miscellaneous.rst#layout-in-memory - Internals - Cleaning Up Variables
https://github.com/arrayio/array-io-solidity/blob/master/miscellaneous.rst#internals---cleaning-up-variables - Internals - The Optimizer
https://github.com/arrayio/array-io-solidity/blob/master/miscellaneous.rst#internals---the-optimizer - Source Mappings
https://github.com/arrayio/array-io-solidity/blob/master/miscellaneous.rst#source-mappings
Tips and Tricks
https://github.com/arrayio/array-io-solidity/blob/master/miscellaneous.rst#tips-and-tricks
Use
delete
on arrays to delete all its elements.
A: delete
doesn't work
Cheatsheet
https://github.com/arrayio/array-io-solidity/blob/master/miscellaneous.rst#cheatsheet
Doesn't work for Array:
-
New expression:
new <typename>
-
Unary operations:
delete
-
Exponentiation:
**
-
from the row 4 to 16 - remains to be tested...
Global Variables:
https://github.com/arrayio/array-io-solidity/blob/master/miscellaneous.rst#global-variables
Global vars which do not work for Array:
block.blockhash(uint blockNumber) returns (bytes32)
block.coinbase (address)
block.difficulty (uint)
block.gaslimit (uint)
block.number (uint)
gasleft() returns (uint256)
msg.data (bytes)
msg.gas (uint)
now (uint)
tx.gasprice (uint)
tx.origin (address)
revert()
keccak256(...) returns (bytes32)
sha3(...) returns (bytes32)
sha256(...) returns (bytes32):
ripemd160(...) returns (bytes20)
ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) returns (address)
addmod(uint x, uint y, uint k) returns (uint)
mulmod(uint x, uint y, uint k) returns (uint)
this
super
selfdestruct(address recipient)
suicide(address recipient)
<address>.send(uint256 amount) returns (bool)
Modifiers
https://github.com/arrayio/array-io-solidity/blob/master/miscellaneous.rst#modifiers
don't work:
anonymous
for events: Does not store event signature as topic.
indexed
for event parameters: Stores the parameter as topic.