mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-25 11:47:57 +00:00
7d8fa75a0f
Storage keys and values are big endian. Keeping them LE was a pre-mature optimization because for the contract itself it this is a no-op and thus not observable. However we should consider the storage layout as part of the contract ABI. The endianness of transient storage values are still kept as-is. --------- Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
53 lines
1.1 KiB
Solidity
53 lines
1.1 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8;
|
|
|
|
/* runner.json
|
|
{
|
|
"actions": [
|
|
{
|
|
"Instantiate": {
|
|
"data": "0000000000000000000000000000000000000000000000000000000000000001"
|
|
}
|
|
},
|
|
{
|
|
"VerifyStorage": {
|
|
"contract": {
|
|
"Instantiated": 0
|
|
},
|
|
"key": "0000000000000000000000000000000000000000000000000000000000000000",
|
|
"expected": "0000000000000000000000000000000000000000000000000000000000000001"
|
|
}
|
|
},
|
|
{
|
|
"Call": {
|
|
"dest": {
|
|
"Instantiated": 0
|
|
},
|
|
"data": "cde4efa9"
|
|
}
|
|
},
|
|
{
|
|
"VerifyStorage": {
|
|
"contract": {
|
|
"Instantiated": 0
|
|
},
|
|
"key": "0000000000000000000000000000000000000000000000000000000000000000",
|
|
"expected": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
*/
|
|
|
|
contract Flipper {
|
|
bool coin;
|
|
|
|
constructor(bool _coin) {
|
|
coin = _coin;
|
|
}
|
|
|
|
function flip() public {
|
|
coin = !coin;
|
|
}
|
|
}
|