Un-hardcode another hex method ID

This commit is contained in:
Teemu Patja 2017-08-17 13:32:59 +03:00
parent c0fa786225
commit 074f510aa5
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
1 changed files with 13 additions and 9 deletions

View File

@ -5,7 +5,8 @@
(defonce confirmation-topic "0xc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e51") (defonce confirmation-topic "0xc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e51")
(defonce method-ids (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 (defn execute
@ -34,6 +35,9 @@
(defn send-all (defn send-all
[contract to] [contract to]
(log/debug "multisig.send-all(contract, to)" contract to) (log/debug "multisig.send-all(contract, to)" contract to)
(let [params (eth/format-call-params
(:withdraw-everything method-ids)
to)]
(eth/execute (eth/eth-account) (eth/execute (eth/eth-account)
contract contract
(:submit-transaction method-ids) (:submit-transaction method-ids)
@ -41,4 +45,4 @@
0 0
"0x60" "0x60"
"0x24" "0x24"
(eth/format-call-params "0xf750aaa6" to))) params)))