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
/
node_modules
/
@ethersproject
/
hash
/
src.ts
/
id.ts
7 lines
(5 loc)
•
195 B
text/typescript
View Raw
1
2
3
4
5
6
7
import
{ keccak256 }
from
"@ethersproject/keccak256"
;
import
{ toUtf8Bytes }
from
"@ethersproject/strings"
;
export
function
id
(
text
:
string
):
string
{
return
keccak256
(
toUtf8Bytes
(text)); }