Make factory contract address configurable

This commit is contained in:
Teemu Patja 2017-08-20 11:54:11 +03:00
parent c52c10e555
commit 9c71e37e2a
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
1 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
(ns commiteth.eth.multisig-wallet (ns commiteth.eth.multisig-wallet
(:require [commiteth.eth.core :as eth] (:require [commiteth.eth.core :as eth]
[commiteth.config :refer [env]]
[clojure.tools.logging :as log])) [clojure.tools.logging :as log]))
(defonce method-ids (defonce method-ids
@ -17,12 +18,13 @@
{:factory-create (eth/event-sig->topic-id "Create(address,address)") {:factory-create (eth/event-sig->topic-id "Create(address,address)")
:submission (eth/event-sig->topic-id "Submission(uint256)")}) :submission (eth/event-sig->topic-id "Submission(uint256)")})
(defonce factory-contract-addr "0xb1d6Bf03e99bB2e9c5eBE010ecB0fc910a1CD65b") (defn factory-contract-addr []
(env :contract-factory-addr "0xb1d6Bf03e99bB2e9c5eBE010ecB0fc910a1CD65b"))
(defn create-new (defn create-new
[owner1 owner2 required] [owner1 owner2 required]
(eth/execute (eth/eth-account) (eth/execute (eth/eth-account)
factory-contract-addr (factory-contract-addr)
(:create method-ids) (:create method-ids)
0x40 0x40
0x2 0x2