Skip to content

Commit 90faef6

Browse files
committed
Add uint256:MemorySize/MemoryEncode
1 parent 6cd98d2 commit 90faef6

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

std/std.solc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2672,6 +2672,18 @@ instance bytes4:MemoryEncode {
26722672
}
26732673
}
26742674

2675+
instance uint256:MemorySize {
2676+
function len(v: uint256) -> word {
2677+
return 32;
2678+
}
2679+
}
2680+
2681+
instance uint256:MemoryEncode {
2682+
function encodeInto(v: uint256, target: word) -> () {
2683+
mstore(target, Typedef.rep(v));
2684+
}
2685+
}
2686+
26752687
instance memory(bytes):MemorySize {
26762688
function len(v: memory(bytes)) -> word {
26772689
return mload(Typedef.rep(v));

0 commit comments

Comments
 (0)