Merge pull request #64 from 3esmit/develop

Fixes confirmation hash read
This commit is contained in:
Ricardo Guilherme Schmidt 2017-06-06 17:36:06 -03:00 committed by GitHub
commit dbf89e4e77
3 changed files with 4 additions and 4 deletions

View File

@ -74,7 +74,6 @@
(when-not (contains? params :gas)
{:gas
(estimate-gas from to value params)}))]
(log/debug "gas:" gas)
(log/debug "args:" args)
(eth-rpc
"personal_sendTransaction"

View File

@ -2,7 +2,7 @@
(:require [commiteth.eth.core :as eth]
[clojure.tools.logging :as log]))
(def confirmation-topic "0xe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda")
(def confirmation-topic "0x1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf32")
(defn get-owner
[contract index]
@ -29,7 +29,7 @@
confirmation-event (first (filter has-confirmation-event logs))
confirmation-data (:data confirmation-event)]
(when confirmation-data
(subs confirmation-data 66))))
(subs confirmation-data 2 66))))
(defn erc20-transfer
[contract token to amount]
@ -42,3 +42,4 @@
"0x60"
"0x44"
(eth/format-call-params "0xa9059cbb" to amount)))

View File

@ -349,7 +349,7 @@
(let [send-transaction-fn (aget js/web3 "eth" "sendTransaction")
payload {:from owner-address
:to contract-address
:value 1
:value 0
:data (str "0x797af627" confirm-hash)}]
(try
(apply send-transaction-fn [(clj->js payload)