Skip to content

Commit

Permalink
Update lileilei.md
Browse files Browse the repository at this point in the history
10.15
  • Loading branch information
lillaaaaaa authored Oct 15, 2024
1 parent 1c9ec9f commit 7e64ee2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lileilei.md
Original file line number Diff line number Diff line change
Expand Up @@ -1101,5 +1101,15 @@ function auctionMint(uint256 quantity) external payable{
function hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? keccak256(abi.encodePacked(a, b)) : keccak256(abi.encodePacked(b, a));
}


### 2024.10.15
function toEthSignedMessageHash(bytes32 hash) public pure returns (bytes32) {
// 哈希的长度为32
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
hash签名,还可用web3签名



<!-- Content_END -->

0 comments on commit 7e64ee2

Please sign in to comment.