solidity/test/libsolidity/semanticTests/storage/empty_nonempty_empty.sol
Paweł Bylica c4b6f5f00b
test: Properly clear storage dirty flag
Clear storage dirty flag between transactions in EVMHost. The EIP-2200
dirty flag should be persisted only in a single transaction.
2022-11-08 18:13:17 +01:00

33 lines
933 B
Solidity

contract Test {
bytes x;
function set(bytes memory _a) public { x = _a; }
}
// ----
// set(bytes): 0x20, 3, "abc"
// storageEmpty -> 0
// set(bytes): 0x20, 0
// storageEmpty -> 1
// set(bytes): 0x20, 31, "1234567890123456789012345678901"
// storageEmpty -> 0
// set(bytes): 0x20, 36, "12345678901234567890123456789012", "XXXX"
// storageEmpty -> 0
// set(bytes): 0x20, 3, "abc"
// storageEmpty -> 0
// set(bytes): 0x20, 0
// storageEmpty -> 1
// set(bytes): 0x20, 3, "abc"
// storageEmpty -> 0
// set(bytes): 0x20, 36, "12345678901234567890123456789012", "XXXX"
// storageEmpty -> 0
// set(bytes): 0x20, 0
// storageEmpty -> 1
// set(bytes): 0x20, 66, "12345678901234567890123456789012", "12345678901234567890123456789012", "12"
// gas irOptimized: 111897
// gas legacy: 112756
// gas legacyOptimized: 112116
// storageEmpty -> 0
// set(bytes): 0x20, 3, "abc"
// storageEmpty -> 0
// set(bytes): 0x20, 0
// storageEmpty -> 1