From 074f510aa5c86c8cd83db8e0ab7c9543180c6554 Mon Sep 17 00:00:00 2001 From: Teemu Patja Date: Thu, 17 Aug 2017 13:32:59 +0300 Subject: [PATCH] Un-hardcode another hex method ID --- src/clj/commiteth/eth/multisig_wallet.clj | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/clj/commiteth/eth/multisig_wallet.clj b/src/clj/commiteth/eth/multisig_wallet.clj index 99f77b8..002c310 100644 --- a/src/clj/commiteth/eth/multisig_wallet.clj +++ b/src/clj/commiteth/eth/multisig_wallet.clj @@ -5,7 +5,8 @@ (defonce confirmation-topic "0xc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e51") (defonce method-ids - {:submit-transaction (eth/sig->method-id "submitTransaction(address,uint256,bytes)")}) + {:submit-transaction (eth/sig->method-id "submitTransaction(address,uint256,bytes)") + :withdraw-everything (eth/sig->method-id "withdrawEverything(address)")}) (defn execute @@ -34,11 +35,14 @@ (defn send-all [contract to] (log/debug "multisig.send-all(contract, to)" contract to) - (eth/execute (eth/eth-account) - contract - (:submit-transaction method-ids) - contract - 0 - "0x60" - "0x24" - (eth/format-call-params "0xf750aaa6" to))) + (let [params (eth/format-call-params + (:withdraw-everything method-ids) + to)] + (eth/execute (eth/eth-account) + contract + (:submit-transaction method-ids) + contract + 0 + "0x60" + "0x24" + params)))