improve exception when contract cannot be loaded

This commit is contained in:
Martin Klepsch 2018-02-22 10:03:31 +01:00 committed by Tetiana Churikova
parent d3afe111a2
commit dd700ab3d3
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@
([addr]
(println "addr" addr)
(let [contract (load-tokenreg-contract addr)]
(assert contract (format "Could not load contract for addr %s" addr))
;(assert (.isValid contract)) ;; web3j's isValid can't be trusted...
(let [token-count (-> contract .tokenCount .get .getValue)]
(log/debug "token-count" token-count)