mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 19:38:01 +00:00
ea63991617
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
21 lines
374 B
Solidity
21 lines
374 B
Solidity
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.8;
|
|
|
|
contract MSize {
|
|
uint[] public data;
|
|
|
|
function mSize() public pure returns (uint size) {
|
|
assembly {
|
|
size := msize()
|
|
}
|
|
}
|
|
|
|
function mStore100() public pure returns (uint size) {
|
|
assembly {
|
|
mstore(100, msize())
|
|
size := msize()
|
|
}
|
|
}
|
|
}
|