Utility function for computing topic-id

* added utility function for computing topic ID hex-string from event signature
This commit is contained in:
Teemu Patja 2017-08-17 14:52:38 +03:00
parent 074f510aa5
commit 902129d639
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C

View File

@ -142,6 +142,10 @@
(let [s (apply str (take 8 (sha3 signature)))]
(str "0x" s)))
(defn event-sig->topic-id [signature]
(let [s (sha3 signature)]
(str "0x" s)))
(defn valid-address?
"Validate given ethereum address. Checksum validation is performed
and input is case-sensitive"