Question : solidity signature r s v
Answered by : prickly-porcupine-ftnh3gp758ln
bytes sig = ...;
bytes32 r;
bytes32 s;
uint8 v;
assembly { r := mload(add(sig, 32)) s := mload(add(sig, 64)) v := and(mload(add(sig, 65)), 255)
}
if (v < 27) v += 27;
Source : https://ethereum.stackexchange.com/questions/26434/whats-the-best-way-to-transform-bytes-of-a-signature-into-v-r-s-in-solidity/32908 | Last Update : Thu, 23 Sep 21