Annotate Memory-Safe Assembly (#3392)

This commit is contained in:
Kartik0099
2022-05-07 04:19:02 +05:30
committed by GitHub
parent 3b9381dfb1
commit 3bdf4bfd29
3 changed files with 4 additions and 0 deletions

View File

@ -64,6 +64,7 @@ library ECDSA {
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
@ -75,6 +76,7 @@ library ECDSA {
bytes32 vs;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
vs := mload(add(signature, 0x40))