UNPKG
check-ethereum-scanner
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
Safety checks for new Ethereum tokens
check-ethereum-scanner
/
Ethereum-Renounced-Contract-Scanner-backup
/
node_modules
/
@ethersproject
/
keccak256
/
src.ts
/
index.ts
10 lines
(6 loc)
•
211 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
"use strict"
;
import
sha3
from
"js-sha3"
;
import
{ arrayify,
BytesLike
}
from
"@ethersproject/bytes"
;
export
function
keccak256
(
data: BytesLike
): string {
return
'0x'
+ sha3.
keccak_256
(
arrayify
(data)); }