Files
revive/crates/integration/contracts/flipper.sol
T
xermicus 7d8fa75a0f storage keys and values should be big endian (#277)
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>
2025-04-07 10:34:44 +02:00

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;
}
}