diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 0000000..d4726f1
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,48 @@
+# Clojure CircleCI 2.0 configuration file
+#
+# Check https://circleci.com/docs/2.0/language-clojure/ for more details
+#
+version: 2
+jobs:
+ build:
+ docker:
+ # specify the version you desire here
+ - image: circleci/clojure:lein-2.8.1-browsers
+
+ # Specify service dependencies here if necessary
+ # CircleCI maintains a library of pre-built images
+ # documented at https://circleci.com/docs/2.0/circleci-images/
+ # - image: circleci/postgres:9.4
+ - image: circleci/postgres:9.6
+ environment:
+ - POSTGRES_USER=commiteth
+ - POSTGRES_DB=commiteth
+
+ working_directory: ~/repo
+
+ environment:
+ LEIN_ROOT: "true"
+ # Customize the JVM maximum heap limit
+ JVM_OPTS: -Xmx3200m
+
+ steps:
+ - checkout
+
+ # Download and cache dependencies
+ - restore_cache:
+ keys:
+ - v1-dependencies-{{ checksum "project.clj" }}
+ # fallback to using the latest cache if no exact match is found
+ - v1-dependencies-
+
+ - run: lein deps
+
+ - save_cache:
+ paths:
+ - ~/.m2
+ key: v1-dependencies-{{ checksum "project.clj" }}
+
+ - run: echo $ETH_WALLET_JSON > $ETH_WALLET_FILE
+
+ # run tests!
+ - run: lein test
diff --git a/.gitignore b/.gitignore
index 39c20db..b57d8ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,4 +26,3 @@ node_modules
/config-prod.edn
/config-dev.edn
/config-test.edn
-/src/java
diff --git a/README.md b/README.md
index 887e6f5..66ddc01 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,7 @@ The `develop` branch is automatically deployed here.
- [Prerequisites](#prerequisites)
- [Application config](#application-config)
- [GitHub integration](#github-integration)
+- [Contracts](#contracts)
- [Running](#running)
- [Testing](#testing)
- [More info](#more-info)
@@ -37,28 +38,6 @@ psql postgres -c "CREATE USER commiteth WITH PASSWORD 'commiteth';"
psql postgres -c "CREATE DATABASE commiteth;"
```
-### solc
-
-Solidity compiler (latest version, currently [0.4.20](https://github.com/ethereum/solidity/releases/tag/v0.4.20)) is required and needs to be in $PATH.
-Detailed [installation instructions for various platforms](https://solidity.readthedocs.io/en/develop/installing-solidity.html) can be found in the official Solidity documentation.
-
-In order to install version 0.4.20 on macOS using Homebrew:
-```
-brew tap ethereum/ethereum
-brew install https://raw.githubusercontent.com/ethereum/homebrew-ethereum/76432c9aa279b6907e5b1323b9195f2681c30844/solidity.rb
-```
-
-### web3j
-
-Web3j (latest version, currently [3.3.1](https://github.com/web3j/web3j/releases/tag/v3.3.1)) is required and the command line tools need to be in $PATH.
-Installation instructions for the command line tools can be found in the [Web3j Command Line Tools documentation](https://docs.web3j.io/command_line.html).
-
-In order to install version 3.3.1 on macOS using Homebrew:
-```
-brew install https://raw.githubusercontent.com/web3j/homebrew-web3j/master/web3j.rb
-```
-
-
## Application config
Make sure to create `/config-dev.edn` and populate it correctly, which is based on `env/dev/resources/config.edn`. Description of config fields is given below:
@@ -93,6 +72,10 @@ Follow the steps [here](https://developer.github.com/apps/building-oauth-apps/cr
### GitHub App
Follow the steps [here](https://developer.github.com/apps/building-github-apps/creating-a-github-app/). Be sure to specify `:server-address` + `/webhook-app` as "Webhook URL", and `:webhook-secret` as "Webhook Secret".
+## Contracts
+
+All information related to development of OpenBounty smart contracts can be found in [`contracts/`](/contracts/)
+
## Running
### Ethereum node
@@ -196,7 +179,21 @@ lein with-profile test figwheel devcards
Open http://localhost:3449/cards.html
-### Update landing page
+### CircleCI
+
+We use CircleCI to run unit tests. The following env vars need to be set for this to work:
+
+> These env vars override configuration parameters that are usually set using the `config.edn` file.
+
+- `ETH_ACCOUNT` - as in `config.edn`
+- `ETH_PASSWORD` - as in `config.edn`
+- `ETH_RPC_URL` - as in `config.edn`
+- `ETH_WALLET_FILE` - as in `config.edn`
+- `ETH_WALLET_JSON` - contents of this will be written to `ETH_WALLET_FILE`
+
+:bulb: Ideally we'd create those parameters in a script. PR welcome.
+
+## Update landing page
Landing page is static and different CSS and JS due to time constraints.
diff --git a/contracts/README.md b/contracts/README.md
new file mode 100644
index 0000000..f92dc0e
--- /dev/null
+++ b/contracts/README.md
@@ -0,0 +1,31 @@
+# OpenBounty Contracts
+
+This directory contains all the underlying smart contracts used by the OpenBounty platform.
+
+- A script `contracts/build.sh` is part of this repository and can be used to
+compile the contracts and copy Java interfaces into `src/java/`.
+
+In order to run the script the following dependencies have to be met:
+
+- [solc](#solc)
+- [web3j](#web3j)
+
+### solc
+
+Solidity compiler [0.4.15](https://github.com/ethereum/solidity/releases/tag/v0.4.15) is required and needs to be in $PATH.
+Detailed [installation instructions for various platforms](https://solidity.readthedocs.io/en/develop/installing-solidity.html) can be found in the official Solidity documentation.
+
+```
+brew install https://raw.githubusercontent.com/ethereum/homebrew-ethereum/de1da16f7972a899fc8dd1f3f04299eced6f4312/solidity.rb
+brew pin solidity
+```
+
+### web3j
+
+Web3j [2.3.0](https://github.com/web3j/web3j/releases/tag/v2.3.0) is required and the command line tools need to be in $PATH.
+Installation instructions for the command line tools can be found in the [Web3j Command Line Tools documentation](https://docs.web3j.io/command_line.html).
+
+```
+brew install https://raw.githubusercontent.com/web3j/homebrew-web3j/881cf369b551a5f2557bd8fb02fa8b7b970256ca/web3j.rb
+brew pin web3j
+```
\ No newline at end of file
diff --git a/build_contracts.sh b/contracts/build.sh
similarity index 100%
rename from build_contracts.sh
rename to contracts/build.sh
diff --git a/doc/core_testing_workflow.md b/doc/core_testing_workflow.md
index 55c54c9..fc98cc6 100644
--- a/doc/core_testing_workflow.md
+++ b/doc/core_testing_workflow.md
@@ -6,14 +6,17 @@ How to test PR? Steps below could help a bit!
### Prerequisites
Requirements for PRs to be tested:
* should be in `To test` column in `Pipeline For Pull Requests` project
+* should be updated to last develop. If button `Update` is avaivable on particular PR, click it and wait until it will be built.
* shouldn't have conflicts with `develop` branch
* should have a successful build in Jenkins [status-openbounty-app](https://jenkins.status.im/job/status-openbounty/job/status-openbounty-app/view/change-requests/)
### Deployment
-In order to deploy feature to [testing env](https://testing.openbounty.status.im/) you should **rebuild** PR you are about to test.
+In order to deploy feature to [testing env](https://testing.openbounty.status.im/) you should **rebuild** PR you are about to test (all open PRs are in [Jenkins](https://jenkins.status.im/job/status-openbounty/job/status-openbounty-app/view/change-requests/)).
-Only one PR can be deployed on [testing env](https://testing.openbounty.status.im/)
+When PR is successfully build and deployed, [testing env](https://testing.openbounty.status.im/) with deployed PR is accessible in 2-3 mins.
+
+Only one at one time PR can be deployed on [testing env](https://testing.openbounty.status.im/)
Fresh develop branch with last changes is deployed automatically on [staging env](https://openbounty.status.im:444)
@@ -21,7 +24,8 @@ Fresh develop branch with last changes is deployed automatically on [staging env
1) Move appropriate PR card to IN TESTING on the [Board](https://github.com/status-im/open-bounty/projects/3) and let people know you are on it - assign it to yourself! :)
2) Сheck the functionality current PR fixes / delivers (positive/negative tests related to the feature). In curtain cases it's worth to look in 'Files changed' tab in GitHub to check the list of what was changed to get understanding of the test coverage or "weak" places that have to be covered. Ask PR-author in #openbounty channel in slack what was changed if it's not clear from the notes in PR.
3) Check reasonable regression using [SOB-general test suite](https://ethstatus.testrail.net/index.php?/suites/view/27&group_by=cases:section_id&group_order=asc)
-4) No issues? Perfect! Put appropriate label to the PR (`Tested - OK`), merge it to develop and move the PR instance to `Merged to develop`.
-5) Found issues? Check for duplicates before adding one. Hint: make sure the issue is really introduced by current PR - check latest `develop` branch on [staging env](https://openbounty.status.im:444) . Issue exists in develop? Check existing issues list and make sure you are not adding duplicates before creating your own bug :) **All PR-specific issues should be added as comments to tested PR.**
+4) No issues? Perfect! Put appropriate label to the PR (`Tested - OK`), merge it to develop (using `Rebase-Merge`) and move the PR instance to `Merged to develop`.
+5) Found issues? Check for duplicates before adding one. Hint: make sure the issue is really introduced by current PR - check latest `develop` branch on [staging env](https://openbounty.status.im:444) . Issue exists in develop? Check existing issues list and make sure you are not adding duplicates before creating your own bug :)
+**All PR-specific issues should be added as comments to tested PR.**
Once all issues are logged put label `Tested-issues` to the PR and notify developer that there are several problems that are preventing the PR to merge. Move the PR to `Reviewing, waiting for contributor` on the board if PR is developed by external contributor, and to `Developing` - if it is presented by core contributor.
diff --git a/doc/decisions/0003-include-compiled-web3j-contracts-in-git.md b/doc/decisions/0003-include-compiled-web3j-contracts-in-git.md
new file mode 100644
index 0000000..89c5bfb
--- /dev/null
+++ b/doc/decisions/0003-include-compiled-web3j-contracts-in-git.md
@@ -0,0 +1,44 @@
+# 0003. Include Compiled Web3j Contracts in Git
+
+| Date | Tags |
+|---|---|
+| 2018-03-20 | contracts, tooling |
+
+
+## Status
+
+Accepted
+
+## Context
+
+The OpenBounty project utilizes smart contracts to make certain core
+aspects of it's product work without centralized trust.
+
+In order to develop the platform a Java interface to these contracts needs to
+be built beforehand. To create those interfaces various tools are required
+(`web3j` & `solc`), often in specific versions that are not easily available
+via widespread package managers.
+
+This hurdle also applies to any other situations where the application is set
+up from scratch, e.g. continuous integration.
+
+## Decision
+
+Instead of forcing every contributor to install those tools we will include
+the compiled Java interfaces in our Git repository. This removes a significant
+setup cost and hopefully allows people to get going much faster.
+
+Installing `web3j` and `solc` will only be required when hacking on the
+contracts itself which are much more stable than the majority of the code.
+
+An alternative would be implementing scripts that install those tools in a
+platform independent manner but this would require more work. Once we have
+the time or someone wants to work on creating those scripts we can easily
+revert the decision outlined in this document.
+
+## Consequences
+
+- The compiled Java interfaces may get out of date.
+ This could perhaps be addressed by some clever use of checksums.
+- By having changes to the contract interfaces be part of a changeset it may
+ be easier to spot what changes are required/how APIs are changing.
diff --git a/externs/web3-externs.js b/externs/web3-externs.js
deleted file mode 100644
index 4600afa..0000000
--- a/externs/web3-externs.js
+++ /dev/null
@@ -1,12 +0,0 @@
-
-/*
-externs for web3 injected into js context. needed for things to work with advanced cljs compilation
-
-TODO: probably not a good idea to maintain this manually in the long run*/
-
-var web3 = {
- eth: {
- accounts: [],
- sendTransaction: function() {}
- }
-};
diff --git a/project.clj b/project.clj
index 6fab5ab..919810c 100644
--- a/project.clj
+++ b/project.clj
@@ -9,7 +9,7 @@
[reagent-utils "0.2.1"]
[reagent "0.7.0"]
[org.clojure/clojurescript "1.9.946"]
- [org.clojure/clojure "1.8.0"]
+ [org.clojure/clojure "1.9.0"]
[selmer "1.11.1"]
[com.taoensso/tufte "1.3.0"]
[markdown-clj "1.0.1"]
@@ -66,25 +66,18 @@
:plugins [[lein-cprop "1.0.1"]
[migratus-lein "0.4.1"]
[lein-cljsbuild "1.1.7"]
- [lein-auto "0.1.2"]
[lein-less "1.7.5"]
- [lein-shell "0.5.0"]
[lein-sha-version "0.1.1"]]
:less {:source-paths ["src/less"]
:target-path "resources/public/css"}
- :auto {"build-contracts" {:file-pattern #"\.(sol)\n"
- :paths ["./contracts"]}}
-
- :aliases {"build-contracts" ["shell" "./build_contracts.sh"]}
-
:ring {:destroy commiteth.scheduler/stop-scheduler}
:uberjar-exclusions [#"public/README.md" #"public/cards.html"]
:clean-targets ^{:protect false}
- [:target-path :java-source-paths [:cljsbuild :builds :app :compiler :output-dir] [:cljsbuild :builds :app :compiler :output-to]]
+ [:target-path [:cljsbuild :builds :app :compiler :output-dir] [:cljsbuild :builds :app :compiler :output-to]]
:figwheel
{:http-server-root "public"
:nrepl-port 7002
@@ -94,7 +87,7 @@
:profiles
{:uberjar {:jvm-opts ["-server" "-Dconf=config-prod.edn"]
:omit-source true
- :prep-tasks ["build-contracts" "javac" "compile" ["cljsbuild" "once" "min"] ["less" "once"]]
+ :prep-tasks ["javac" "compile" ["cljsbuild" "once" "min"] ["less" "once"]]
:cljsbuild
{:builds
{:min
diff --git a/resources/sql/queries.sql b/resources/sql/queries.sql
index 7737a51..4f866af 100644
--- a/resources/sql/queries.sql
+++ b/resources/sql/queries.sql
@@ -193,20 +193,6 @@ AND i.contract_address IS NULL
AND i.transaction_hash IS NOT NULL;
--- :name list-failed-deployments :? :*
--- :doc retrieves failed contract deployments
-SELECT
- i.issue_id as issue_id,
- i.transaction_hash as transaction_hash,
- u.address as owner_address
-FROM issues i, users u, repositories r
-WHERE r.user_id = u.id
-AND i.repo_id = r.repo_id
-AND i.contract_address IS NULL
-AND i.transaction_hash IS NOT NULL
-AND i.updated < now() at time zone 'UTC' - interval '1 hour';
-
-
-- Pull Requests -------------------------------------------------------------------
-- :name save-pull-request! :! :n
@@ -249,7 +235,10 @@ WHERE pr_id = :pr_id;
-- :doc bounty issues where deploy contract has failed
SELECT
i.issue_id AS issue_id,
- u.address AS owner_address
+ i.issue_number AS issue_number,
+ r.owner AS owner,
+ u.address AS owner_address,
+ r.repo AS repo
FROM issues i, users u, repositories r
WHERE
r.user_id = u.id
@@ -464,8 +453,9 @@ SELECT
i.updated AS updated,
i.winner_login AS winner_login,
r.repo AS repo_name,
- o.address AS owner_address
-FROM issues i, users o, repositories r
+ o.address AS owner_address,
+ u.address AS payout_address
+FROM users o, repositories r, issues i LEFT OUTER JOIN users u ON u.login = i.winner_login
WHERE
r.repo_id = i.repo_id
AND r.user_id = o.id
diff --git a/src/clj/commiteth/bounties.clj b/src/clj/commiteth/bounties.clj
index 19d995b..13661ae 100644
--- a/src/clj/commiteth/bounties.clj
+++ b/src/clj/commiteth/bounties.clj
@@ -20,6 +20,26 @@
(let [labels (:labels issue)]
(some #(= label-name (:name %)) labels)))
+(defn deploy-contract [owner owner-address repo issue-id issue-number]
+ (if (empty? owner-address)
+ (log/error "Unable to deploy bounty contract because"
+ "repo owner has no Ethereum addres")
+ (do
+ (log/info "deploying contract to " owner-address)
+ (if-let [transaction-hash (multisig/deploy-multisig owner-address)]
+ (do
+ (log/info "Contract deployed, transaction-hash:"
+ transaction-hash)
+ (let [resp (github/post-deploying-comment owner
+ repo
+ issue-number
+ transaction-hash)
+ _ (log/info "post-deploying-comment response:" resp)
+ comment-id (:id resp)]
+ (issues/update-comment-id issue-id comment-id))
+ (issues/update-transaction-hash issue-id transaction-hash))
+ (log/error "Failed to deploy contract to" owner-address)))))
+
(defn add-bounty-for-issue [repo repo-id issue]
(let [{issue-id :id
issue-number :number
@@ -29,24 +49,7 @@
owner :owner} (users/get-repo-owner repo-id)]
(log/debug "Adding bounty for issue " repo issue-number "owner address: " owner-address)
(if (= 1 created-issue)
- (if (empty? owner-address)
- (log/error "Unable to deploy bounty contract because"
- "repo owner has no Ethereum addres")
- (do
- (log/debug "deploying contract to " owner-address)
- (let [transaction-hash (multisig/deploy-multisig owner-address)]
- (if (nil? transaction-hash)
- (log/error "Failed to deploy contract to" owner-address)
- (do
- (log/info "Contract deployed, transaction-hash:"
- transaction-hash)
- (->> (github/post-deploying-comment owner
- repo
- issue-number
- transaction-hash)
- :id
- (issues/update-comment-id issue-id))))
- (issues/update-transaction-hash issue-id transaction-hash))))
+ (deploy-contract owner owner-address repo issue-id issue-number)
(log/debug "Issue already exists in DB, ignoring"))))
(defn maybe-add-bounty-for-issue [repo repo-id issue]
@@ -102,3 +105,44 @@
(do
(log/info "Updating changed title for issue" (:id gh-issue))
(issues/update-issue-title (:id gh-issue) (:title gh-issue)))))))
+
+(defn assert-keys [m ks]
+ (doseq [k ks]
+ (when-not (find m k)
+ (throw (ex-info (format "Expected key missing from provided map: %s" k) {:map m})))))
+
+(defn bounty-state
+ "Given a map as returned by `owner-bounties` return the state the provided bounty is in.
+
+ The lifecycle of a bounty is a sequence of the following states:
+ :opened > :funded > :claimed > :merged > :paid
+
+ As well as various states that are only reached under specific conditins:
+ - :multiple-claims
+ - :pending-contributor-address
+ - :pending-maintainer-confirmation"
+ [bounty]
+ (assert-keys bounty [:winner_login :payout_address :confirm_hash :payout_hash
+ :claims :tokens :contract_address])
+ (if-let [merged? (:winner_login bounty)]
+ (cond
+ (nil? (:payout_address bounty)) :pending-contributor-address
+ (nil? (:confirm_hash bounty)) :pending-maintainer-confirmation
+ (:payout_hash bounty) :paid
+ :else :merged)
+ (cond ; not yet merged
+ (< 1 (count (:claims bounty))) :multiple-claims
+ (= 1 (count (:claims bounty))) :claimed
+ (seq (:tokens bounty)) :funded
+ (:contract_address bounty) :opened)))
+
+(comment
+ (def user 97496)
+
+ (clojure.pprint/pprint
+ (count (bounties/owner-bounties user)))
+
+ (clojure.pprint/pprint
+ (frequencies (map bounty-state (bounties/owner-bounties user))))
+
+ )
diff --git a/src/clj/commiteth/db/issues.clj b/src/clj/commiteth/db/issues.clj
index a32634a..fe4b6ce 100644
--- a/src/clj/commiteth/db/issues.clj
+++ b/src/clj/commiteth/db/issues.clj
@@ -63,12 +63,6 @@
(jdbc/with-db-connection [con-db *db*]
(db/list-pending-deployments con-db)))
-
-(defn list-failed-deployments
- []
- (jdbc/with-db-connection [con-db *db*]
- (db/list-failed-deployments con-db)))
-
(defn update-eth-balance
[contract-address balance-eth]
(jdbc/with-db-connection [con-db *db*]
diff --git a/src/clj/commiteth/eth/core.clj b/src/clj/commiteth/eth/core.clj
index 3ec9528..f3158f3 100644
--- a/src/clj/commiteth/eth/core.clj
+++ b/src/clj/commiteth/eth/core.clj
@@ -127,13 +127,17 @@
result (safe-read-str (:body response))]
(log/debug body "\n" result)
- (if (= (:id result) request-id)
- (:result result)
- (do
- (log/error "Geth returned an invalid json-rpc request ID,"
- "ignoring response")
- (when-let [error (:error result)]
- (log/error "Method: " method ", error: " error))))))
+ (cond
+ ;; Ignore any responses that have mismatching request ID
+ (not= (:id result) request-id)
+ (log/error "Geth returned an invalid json-rpc request ID, ignoring response")
+
+ ;; If request ID matches but contains error, throw
+ (:error result)
+ (throw (ex-info "Error submitting transaction via eth-rpc" (:error result)))
+
+ :else
+ (:result result))))
(defn hex->big-integer
[hex]
diff --git a/src/clj/commiteth/eth/token_registry.clj b/src/clj/commiteth/eth/token_registry.clj
index d7e4687..25f3d3a 100644
--- a/src/clj/commiteth/eth/token_registry.clj
+++ b/src/clj/commiteth/eth/token_registry.clj
@@ -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)
diff --git a/src/clj/commiteth/github/core.clj b/src/clj/commiteth/github/core.clj
index e51ce95..a121461 100644
--- a/src/clj/commiteth/github/core.clj
+++ b/src/clj/commiteth/github/core.clj
@@ -275,7 +275,7 @@
(defn post-deploying-comment
[owner repo issue-number tx-id]
(let [comment (generate-deploying-comment owner repo issue-number tx-id)]
- (log/debug "Posting comment to" (str owner "/" repo "/" issue-number) ":" comment)
+ (log/info "Posting comment to" (str owner "/" repo "/" issue-number) ":" comment)
(issues/create-comment owner repo issue-number comment (self-auth-params))))
(defn make-patch-request [end-point positional query]
diff --git a/src/clj/commiteth/routes/services.clj b/src/clj/commiteth/routes/services.clj
index 5057eb5..ce5d426 100644
--- a/src/clj/commiteth/routes/services.clj
+++ b/src/clj/commiteth/routes/services.clj
@@ -61,18 +61,21 @@
github-repos))))
+(defn ^:private enrich-owner-bounties [owner-bounty]
+ (let [claims (map
+ #(update % :value_usd usd-decimal->str)
+ (bounties-db/bounty-claims (:issue_id owner-bounty)))
+ with-claims (assoc owner-bounty :claims claims)]
+ (-> with-claims
+ (update :value_usd usd-decimal->str)
+ (assoc :state (bounties/bounty-state with-claims)))))
+
(defn user-bounties [user]
(let [owner-bounties (bounties-db/owner-bounties (:id user))]
- (into {}
- (for [ob owner-bounties
- :let [b (update ob :value_usd usd-decimal->str)]]
- [(:issue_id b)
- (conj b
- (let [claims (map
- #(update % :value_usd usd-decimal->str)
- (bounties-db/bounty-claims (:issue_id b)))]
- {:claims claims}))]))))
-
+ (->> owner-bounties
+ (map enrich-owner-bounties)
+ (map (juxt :issue_id identity))
+ (into {}))))
(defn top-hunters []
(let [renames {:user_name :display-name
diff --git a/src/clj/commiteth/routes/webhooks.clj b/src/clj/commiteth/routes/webhooks.clj
index e12ccd6..3a7e44f 100644
--- a/src/clj/commiteth/routes/webhooks.clj
+++ b/src/clj/commiteth/routes/webhooks.clj
@@ -82,28 +82,33 @@
(when (issues/is-bounty-issue? issue-id)
(issues/update-open-status issue-id true)))
-(def ^:const keywords
- [#"(?i)close:?\s+#(\d+)"
- #"(?i)closes:?\s+#(\d+)"
- #"(?i)closed:?\s+#(\d+)"
- #"(?i)fix:?\s+#(\d+)"
- #"(?i)fixes:?\s+#(\d+)"
- #"(?i)fixed:?\s+#(\d+)"
- #"(?i)resolve:?\s?#(\d+)"
- #"(?i)resolves:?\s+#(\d+)"
- #"(?i)resolved:?\s+#(\d+)"])
+(defn pr-keywords [prefix]
+ (mapv
+ #(re-pattern (str "(?i)" %1 ":?\\s+" prefix "(\\d+)"))
+ ["close"
+ "closes"
+ "closed"
+ "fix"
+ "fixes"
+ "fixed"
+ "resolve"
+ "resolves"
+ "resolved"]))
(defn extract-issue-number
- [pr-body pr-title]
+ [owner repo pr-body pr-title]
(let [cleaned-body (str/replace pr-body #"(?m)^\[comment.*$" "")
+ keywords (concat (pr-keywords "#")
+ (when-not (or (str/blank? owner) (str/blank? repo))
+ (pr-keywords (str "https://github.com/" owner "/" repo "/issues/"))))
extract (fn [source]
(mapcat #(keep
- (fn [s]
- (try (let [issue-number (Integer/parseInt (second s))]
- (when (pos? issue-number)
- issue-number))
- (catch NumberFormatException _)))
- (re-seq % source)) keywords))]
+ (fn [s]
+ (try (let [issue-number (Integer/parseInt (second s))]
+ (when (pos? issue-number)
+ issue-number))
+ (catch NumberFormatException _)))
+ (re-seq % source)) keywords))]
(log/debug cleaned-body)
(concat (extract cleaned-body)
(extract pr-title))))
@@ -169,7 +174,7 @@
pr-body :body
pr-title :title} :pull_request}]
(log/info "handle-pull-request-event" event-type owner repo repo-id login pr-body pr-title)
- (if-let [issue (some->> (extract-issue-number pr-body pr-title)
+ (if-let [issue (some->> (extract-issue-number owner repo pr-body pr-title)
(first)
(issues/get-issue repo-id))]
(if-not (:commit_sha issue) ; no PR has been merged yet referencing this issue
diff --git a/src/clj/commiteth/scheduler.clj b/src/clj/commiteth/scheduler.clj
index daaa2e1..8400033 100644
--- a/src/clj/commiteth/scheduler.clj
+++ b/src/clj/commiteth/scheduler.clj
@@ -84,34 +84,17 @@
(log/info "Exit update-issue-contract-address"))
-(defn deploy-contract [owner-address issue-id]
- (let [transaction-hash (multisig/deploy-multisig owner-address)]
- (if (nil? transaction-hash)
- (log/error "Failed to deploy contract to" owner-address)
- (log/info "Contract deployed, transaction-hash:"
- transaction-hash ))
- (issues/update-transaction-hash issue-id transaction-hash)))
-
-
-(defn redeploy-failed-contracts
- "If the bot account runs out of gas, we end up with transaction-id in db, but with nothing written to blockchain. In this case we should try to re-deploy the contract."
- []
- (doseq [{issue-id :issue_id
- transaction-hash :transaction_hash
- owner-address :owner_address} (issues/list-failed-deployments)]
- (when (nil? (eth/get-transaction-receipt transaction-hash))
- (log/info "Detected nil transaction receipt for pending contract deployment for issue" issue-id ", re-deploying contract")
- (deploy-contract owner-address issue-id))))
-
-
(defn deploy-pending-contracts
"Under high-concurrency circumstances or in case geth is in defunct state, a bounty contract may not deploy successfully when the bounty label is addded to an issue. This function deploys such contracts."
[]
- (p :deploy-pending-contracts
- (doseq [{issue-id :issue_id
- owner-address :owner_address} (db-bounties/pending-contracts)]
+ (p :deploy-pending-contracts
+ (doseq [{issue-id :issue_id
+ issue-number :issue_number
+ owner :owner
+ owner-address :owner_address
+ repo :repo} (db-bounties/pending-contracts)]
(log/debug "Trying to re-deploy failed bounty contract deployment, issue-id:" issue-id)
- (deploy-contract owner-address issue-id))))
+ (bounties/deploy-contract owner owner-address repo issue-id issue-number))))
(defn self-sign-bounty
"Walks through all issues eligible for bounty payout and signs corresponding transaction"
@@ -400,8 +383,7 @@
;; TODO: disabled for now. looks like it may cause extraneus
;; contract deployments and costs
(run-tasks
- [;;redeploy-failed-contracts
- deploy-pending-contracts
+ [deploy-pending-contracts
update-issue-contract-address
update-confirm-hash
update-payout-receipt
diff --git a/src/cljs/commiteth/common.cljs b/src/cljs/commiteth/common.cljs
index 60f6a31..7b87894 100644
--- a/src/cljs/commiteth/common.cljs
+++ b/src/cljs/commiteth/common.cljs
@@ -2,10 +2,14 @@
(:require [reagent.core :as r]
[re-frame.core :as rf]
[clojure.string :as str]
+ [goog.object :as gobj]
[goog.date.relative]
[goog.i18n.DateTimePatterns :as DateTimePatterns])
(:import (goog.i18n DateTimeFormat)))
+(defn web3 []
+ (gobj/get js/window "web3"))
+
(defn input [val-ratom props]
(fn []
[:input
diff --git a/src/cljs/commiteth/core.cljs b/src/cljs/commiteth/core.cljs
index 3e62083..62a27dd 100644
--- a/src/cljs/commiteth/core.cljs
+++ b/src/cljs/commiteth/core.cljs
@@ -74,19 +74,17 @@
(defn tabs [mobile?]
(let [user (rf/subscribe [:user])
+ owner-bounties (rf/subscribe [:owner-bounties])
current-page (rf/subscribe [:page])]
- (fn []
- (let [tabs (apply conj [[:bounties (str (when-not @user "Open ") "Bounties")]
- [:activity "Activity"]]
- (when @user
- [
- ;; NOTE(oskarth) Disabling this as repo management happens through GH app
- #_[:repos "Repositories"]
- [:manage-payouts (str (when-not mobile? "Manage ") "Payouts")]
- (when (:status-team-member? @user)
- [:usage-metrics "Usage metrics"])]))]
+ (fn tabs-render []
+ (let [tabs [[:bounties (str (when-not @user "Open ") "Bounties")]
+ [:activity "Activity"]
+ (when (seq @owner-bounties)
+ [:manage-payouts (str (when-not mobile? "Manage ") "Payouts")])
+ (when (:status-team-member? @user)
+ [:usage-metrics "Usage metrics"])]]
(into [:div.ui.attached.tabular.menu.tiny]
- (for [[page caption] tabs]
+ (for [[page caption] (remove nil? tabs)]
(let [props {:class (str "ui item"
(when (= @current-page page) " active"))
:on-click #(commiteth.routes/nav! page)}]
diff --git a/src/cljs/commiteth/handlers.cljs b/src/cljs/commiteth/handlers.cljs
index 65a7c0c..0f436dc 100644
--- a/src/cljs/commiteth/handlers.cljs
+++ b/src/cljs/commiteth/handlers.cljs
@@ -12,7 +12,8 @@
[akiroz.re-frame.storage
:as rf-storage
:refer [reg-co-fx!]]
- [commiteth.ui-model :as ui-model]))
+ [commiteth.ui-model :as ui-model]
+ [commiteth.common :as common]))
(rf-storage/reg-co-fx! :commiteth-sob {:fx :store
@@ -49,7 +50,7 @@
(reg-event-fx
:initialize-web3
(fn [{:keys [db]} [_]]
- (let [injected-web3 (-> js/window .-web3)
+ (let [injected-web3 (common/web3)
w3 (when (boolean injected-web3)
(do
(println "Using injected Web3 constructor with current provider")
diff --git a/src/cljs/commiteth/manage_payouts.cljs b/src/cljs/commiteth/manage_payouts.cljs
index a3272cc..32f4f06 100644
--- a/src/cljs/commiteth/manage_payouts.cljs
+++ b/src/cljs/commiteth/manage_payouts.cljs
@@ -78,10 +78,9 @@
[:container
[:div.ui.active.inverted.dimmer
[:div.ui.text.loader "Loading"]]]
- (let [web3 (.-web3 js/window)
- bounties (vals @owner-bounties)]
+ (let [bounties (vals @owner-bounties)]
[:div.ui.container
- (when (nil? web3)
+ (when (nil? (common/web3))
[:div.ui.warning.message
[:i.warning.icon]
"To sign off claims, please view Status Open Bounty in Status, Mist or Metamask"])
diff --git a/src/java/commiteth/eth/contracts/ERC20.java b/src/java/commiteth/eth/contracts/ERC20.java
new file mode 100644
index 0000000..87c61f6
--- /dev/null
+++ b/src/java/commiteth/eth/contracts/ERC20.java
@@ -0,0 +1,183 @@
+package commiteth.eth.contracts;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.Future;
+import org.web3j.abi.EventEncoder;
+import org.web3j.abi.EventValues;
+import org.web3j.abi.TypeReference;
+import org.web3j.abi.datatypes.Address;
+import org.web3j.abi.datatypes.Event;
+import org.web3j.abi.datatypes.Function;
+import org.web3j.abi.datatypes.Type;
+import org.web3j.abi.datatypes.generated.Uint256;
+import org.web3j.crypto.Credentials;
+import org.web3j.protocol.Web3j;
+import org.web3j.protocol.core.DefaultBlockParameter;
+import org.web3j.protocol.core.methods.request.EthFilter;
+import org.web3j.protocol.core.methods.response.Log;
+import org.web3j.protocol.core.methods.response.TransactionReceipt;
+import org.web3j.tx.Contract;
+import org.web3j.tx.TransactionManager;
+import rx.Observable;
+import rx.functions.Func1;
+
+/**
+ * Auto generated code.
+ * Do not modify!
+ * Please use the web3j command line tools, or {@link org.web3j.codegen.SolidityFunctionWrapperGenerator} to update.
+ *
+ *
Generated with web3j version 2.3.0.
+ */
+public final class ERC20 extends Contract {
+ private static final String BINARY = "";
+
+ private ERC20(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
+ super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit);
+ }
+
+ private ERC20(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
+ super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit);
+ }
+
+ public List Generated with web3j version 2.3.0.
+ */
+public final class MultiSigTokenWallet extends Contract {
+ private static final String BINARY = "6060604052341561000f57600080fd5b5b6127718061001f6000396000f300606060405236156101bc5763ffffffff60e060020a60003504166301e336678114610207578063025e7c2714610231578063173825d91461026357806320ea8d8614610284578063273cbaa01461029c5780632f54bf6e146103035780633411c81c14610336578063342b7e711461036c57806336756a23146103bd5780634f383934146104105780634f64b2be146104615780635143a9fe14610493578063523fba7f14610501578063547415251461053257806358e2cd76146105615780637065cb4814610582578063784547a7146105a35780638b51d13f146105cd5780638f4ffcb1146105f55780639ace38c214610663578063a0e67e2b14610722578063a878aee614610789578063a8abe69a146107aa578063affed0e014610821578063b5dc40c314610846578063b77bf600146108b0578063b97fd9e1146108d5578063ba51a6df146108f6578063c01a8c841461090e578063c0ee0b8a14610926578063c64274741461098d578063cd49952314610a04578063d74f8edd14610a42578063dc8452cd14610a67578063e20056e614610a8c578063e3004b5714610ab3578063ee22610b14610b14578063f750aaa614610b2c575b5b60003411156102045733600160a060020a03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3460405190815260200160405180910390a25b5b005b341561021257600080fd5b610204600160a060020a0360043581169060243516604435610b4d565b005b341561023c57600080fd5b610247600435610c5c565b604051600160a060020a03909116815260200160405180910390f35b341561026e57600080fd5b610204600160a060020a0360043516610c8e565b005b341561028f57600080fd5b610204600435610e43565b005b34156102a757600080fd5b6102af610f25565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156102ef5780820151818401525b6020016102d6565b505050509050019250505060405180910390f35b341561030e57600080fd5b610322600160a060020a0360043516610f8e565b604051901515815260200160405180910390f35b341561034157600080fd5b610322600435600160a060020a0360243516610fa3565b604051901515815260200160405180910390f35b341561037757600080fd5b6102046004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843750949650610fc395505050505050565b005b34156103c857600080fd5b61020460046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437509496505093359350610ffc92505050565b005b341561041b57600080fd5b610204600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284375094965061113a95505050505050565b005b341561046c57600080fd5b610247600435611168565b604051600160a060020a03909116815260200160405180910390f35b341561049e57600080fd5b61020460048035600160a060020a0390811691602480359260443516919060849060643590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061119a95505050505050565b005b341561050c57600080fd5b610520600160a060020a0360043516611270565b60405190815260200160405180910390f35b341561053d57600080fd5b61052060043515156024351515611282565b60405190815260200160405180910390f35b341561056c57600080fd5b610204600160a060020a03600435166112f1565b005b341561058d57600080fd5b610204600160a060020a03600435166113e0565b005b34156105ae57600080fd5b61032260043561151a565b604051901515815260200160405180910390f35b34156105d857600080fd5b6105206004356115ae565b60405190815260200160405180910390f35b341561060057600080fd5b61020460048035600160a060020a0390811691602480359260443516919060849060643590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061162d95505050505050565b005b341561066e57600080fd5b610679600435611640565b604051600160a060020a03851681526020810184905281151560608201526080604082018181528454600260001961010060018416150201909116049183018290529060a0830190859080156107105780601f106106e557610100808354040283529160200191610710565b820191906000526020600020905b8154815290600101906020018083116106f357829003601f168201915b50509550505050505060405180910390f35b341561072d57600080fd5b6102af611673565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156102ef5780820151818401525b6020016102d6565b505050509050019250505060405180910390f35b341561079457600080fd5b610204600160a060020a03600435166116dc565b005b34156107b557600080fd5b6102af60043560243560443515156064351515611911565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156102ef5780820151818401525b6020016102d6565b505050509050019250505060405180910390f35b341561082c57600080fd5b610520611a3f565b60405190815260200160405180910390f35b341561085157600080fd5b6102af600435611a45565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156102ef5780820151818401525b6020016102d6565b505050509050019250505060405180910390f35b34156108bb57600080fd5b610520611bc5565b60405190815260200160405180910390f35b34156108e057600080fd5b610204600160a060020a0360043516611bcb565b005b341561090157600080fd5b610204600435611ce1565b005b341561091957600080fd5b610204600435611d77565b005b341561093157600080fd5b61020460048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611e6895505050505050565b005b341561099857600080fd5b61052060048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650611e7a95505050505050565b60405190815260200160405180910390f35b3415610a0f57600080fd5b610247600160a060020a0360043516602435611e9a565b604051600160a060020a03909116815260200160405180910390f35b3415610a4d57600080fd5b610520611edc565b60405190815260200160405180910390f35b3415610a7257600080fd5b610520611ee1565b60405190815260200160405180910390f35b3415610a9757600080fd5b610204600160a060020a0360043581169060243516611ee7565b005b3415610abe57600080fd5b61020460048035600160a060020a03169060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506120a895505050505050565b005b3415610b1f57600080fd5b610204600435612139565b005b3415610b3757600080fd5b610204600160a060020a036004351661229a565b005b60008083600160a060020a0381161515610b6657600080fd5b30600160a060020a031633600160a060020a0316141515610b8657600080fd5b60008411610b9357600080fd5b600160a060020a038616600090815260056020526040902054925082841115610bbb57600080fd5b600160a060020a038616600081815260056020526040808220878703905563a9059cbb918891889190516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610c2c57600080fd5b6102c65a03f11515610c3d57600080fd5b5050506040518051925050811515610c5157fe5b5b5b5b505050505050565b6000805482908110610c6a57fe5b906000526020600020900160005b915054906101000a9004600160a060020a031681565b60008030600160a060020a031633600160a060020a0316141515610cb157600080fd5b600160a060020a038316600090815260066020526040902054839060ff161515610cda57600080fd5b600160a060020a0384166000908152600660205260408120805460ff19169055805460001901935091505b82821015610dd75783600160a060020a0316600083815481101515610d2657fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600160a060020a03161415610dcb57600080546000198101908110610d6757fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600083815481101515610d9657fe5b906000526020600020900160005b6101000a815481600160a060020a030219169083600160a060020a03160217905550610dd7565b5b600190910190610d05565b600080546000190190610dea9082612580565b506000546008541115610e0357600054610e0390611ce1565b5b83600160a060020a03167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405160405180910390a25b5b505b505050565b33600160a060020a03811660009081526006602052604090205460ff161515610e6b57600080fd5b600082815260036020908152604080832033600160a060020a038116855292529091205483919060ff161515610ea057600080fd5b600084815260026020526040902060030154849060ff1615610ec157600080fd5b6000858152600360209081526040808320600160a060020a033316808552925291829020805460ff1916905586917ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e9905160405180910390a35b5b505b50505b5050565b610f2d6125aa565b6001805480602002602001604051908101604052809291908181526020018280548015610f8357602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610f65575b505050505090505b90565b60066020526000908152604090205460ff1681565b600360209081526000928352604080842090915290825290205460ff1681565b30600160a060020a031633600160a060020a0316141515610fe357600080fd5b6001818051610f219291602001906125bc565b505b5b50565b6000825182603282111580156110125750818111155b801561101d57508015155b801561102857508115155b151561103357600080fd5b6000541580156110435750600854155b151561104e57600080fd5b600092505b8451831015611118576006600086858151811061106c57fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205460ff161580156110bd57508483815181106110a757fe5b90602001906020020151600160a060020a031615155b15156110c857600080fd5b6001600660008786815181106110da57fe5b90602001906020020151600160a060020a031681526020810191909152604001600020805460ff19169115159190911790555b600190920191611053565b600085805161112b9291602001906125bc565b5060088490555b5b5050505050565b600160a060020a0333166000908152600760205260409020818051610f219291602001906125bc565b505b50565b6001805482908110610c6a57fe5b906000526020600020900160005b915054906101000a9004600160a060020a031681565b60008030600160a060020a031686600160a060020a031614156111bc57610c51565b600954915083600160a060020a03166323b872dd87308860006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561122b57600080fd5b6102c65a03f1151561123c57600080fd5b505050604051805191505080151561125057fe5b816009541415610c5157610c518686868661231d565b5b5b505050505050565b60056020526000908152604090205481565b6000805b6004548110156112e9578380156112af575060008181526002602052604090206003015460ff16155b806112d357508280156112d3575060008181526002602052604090206003015460ff165b5b156112e0576001820191505b5b600101611286565b5b5092915050565b33600160a060020a0381166000908152600660205260408120549091829160ff16151561131d57600080fd5b600160a060020a0384166000818152600560205260408082205495506370a08231913091516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561138457600080fd5b6102c65a03f1151561139557600080fd5b505050604051805192505082821115610e3b57610e3b60008484038660006040518059106113c05750595b908082528060200260200182016040525b5061231d565b5b5b5b50505050565b30600160a060020a031633600160a060020a031614151561140057600080fd5b600160a060020a038116600090815260066020526040902054819060ff161561142857600080fd5b81600160a060020a038116151561143e57600080fd5b6000805490506001016008546032821115801561145b5750818111155b801561146657508015155b801561147157508115155b151561147c57600080fd5b600160a060020a0385166000908152600660205260408120805460ff1916600190811790915581549081016114b18382612580565b916000526020600020900160005b8154600160a060020a03808a166101009390930a8381029102199091161790915590507ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25b5b50505b505b505b50565b600080805b6000548110156115a6576000848152600360205260408120815490919081908490811061154857fe5b906000526020600020900160005b9054600160a060020a036101009290920a900416815260208101919091526040016000205460ff161561158a576001820191505b60085482141561159d57600192506115a6565b5b60010161151f565b5b5050919050565b6000805b60005481101561162657600083815260036020526040812081549091908190849081106115db57fe5b906000526020600020900160005b9054600160a060020a036101009290920a900416815260208101919091526040016000205460ff161561161d576001820191505b5b6001016115b2565b5b50919050565b610e3b8484848461119a565b5b50505050565b6002602081905260009182526040909120805460018201546003830154600160a060020a03909216939092019060ff1684565b61167b6125aa565b6000805480602002602001604051908101604052809291908181526020018280548015610f8357602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610f65575b505050505090505b90565b6116e46125aa565b600080808085600160a060020a03811615156116ff57600080fd5b30600160a060020a031633600160a060020a031614151561171f57600080fd5b600160a060020a03871660009081526007602052604081205411156117c3576007600088600160a060020a0316600160a060020a031681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156117b757602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611799575b50505050509550611821565b600180548060200260200160405190810160405280929190818152602001828054801561181957602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116117fb575b505050505095505b85519450600093505b848410156119055785848151811061183e57fe5b90602001906020020151600160a060020a0381166000908152600560205260408120549194509092508211156118f957600160a060020a03831660008181526005602052604080822082905563a9059cbb918a91869190516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156118dd57600080fd5b6102c65a03f115156118ee57600080fd5b505050604051805150505b5b60019093019261182a565b5b5b5b50505050505050565b6119196125aa565b6119216125aa565b6000806004546040518059106119345750595b908082528060200260200182016040525b50925060009150600090505b6004548110156119cc5785801561197a575060008181526002602052604090206003015460ff16155b8061199e575084801561199e575060008181526002602052604090206003015460ff165b5b156119c357808383815181106119b157fe5b60209081029091010152600191909101905b5b600101611951565b8787036040518059106119dc5750595b908082528060200260200182016040525b5093508790505b86811015611a3357828181518110611a0857fe5b906020019060200201518489830381518110611a2057fe5b602090810290910101525b6001016119f4565b5b505050949350505050565b60095481565b611a4d6125aa565b611a556125aa565b600080548190604051805910611a685750595b908082528060200260200182016040525b50925060009150600090505b600054811015611b4b5760008581526003602052604081208154909190819084908110611aae57fe5b906000526020600020900160005b9054600160a060020a036101009290920a900416815260208101919091526040016000205460ff1615611b42576000805482908110611af757fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316838381518110611b2357fe5b600160a060020a03909216602092830290910190910152600191909101905b5b600101611a85565b81604051805910611b595750595b908082528060200260200182016040525b509350600090505b81811015611bbc57828181518110611b8657fe5b90602001906020020151848281518110611b9c57fe5b600160a060020a039092166020928302909101909101525b600101611b72565b5b505050919050565b60045481565b611bd36125aa565b60008083600160a060020a0381161515611bec57600080fd5b600160a060020a038516600090815260066020526040902054859060ff1615611c1457600080fd5b30600160a060020a031633600160a060020a0316141515611c3457600080fd5b6000805480602002602001604051908101604052809291908181526020018280548015611c8a57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611c6c575b5050505050945084519350611c9e866113e0565b600092505b83831015610c5157611cc9858481518110611cba57fe5b90602001906020020151610c8e565b5b600190920191611ca3565b5b5b5b505b5050505050565b30600160a060020a031633600160a060020a0316141515611d0157600080fd5b6000548160328211801590611d165750818111155b8015611d2157508015155b8015611d2c57508115155b1515611d3757600080fd5b60088390557fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a8360405190815260200160405180910390a15b5b50505b50565b33600160a060020a03811660009081526006602052604090205460ff161515611d9f57600080fd5b6000828152600260205260409020548290600160a060020a03161515611dc457600080fd5b600083815260036020908152604080832033600160a060020a038116855292529091205484919060ff1615611df857600080fd5b6000858152600360209081526040808320600160a060020a033316808552925291829020805460ff1916600117905586917f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef905160405180910390a3610f1b85612139565b5b5b50505b505b5050565b610e3e8383338461231d565b5b505050565b6000611e87848484612480565b9050611e9281611d77565b5b9392505050565b600760205281600052604060002081815481101515611eb557fe5b906000526020600020900160005b915091509054906101000a9004600160a060020a031681565b603281565b60085481565b600030600160a060020a031633600160a060020a0316141515611f0957600080fd5b600160a060020a038316600090815260066020526040902054839060ff161515611f3257600080fd5b600160a060020a038316600090815260066020526040902054839060ff1615611f5a57600080fd5b600092505b6000548310156120025784600160a060020a0316600084815481101515611f8257fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600160a060020a03161415611ff65783600084815481101515611fc157fe5b906000526020600020900160005b6101000a815481600160a060020a030219169083600160a060020a03160217905550612002565b5b600190920191611f5f565b600160a060020a03808616600081815260066020526040808220805460ff199081169091559388168252908190208054909316600117909255907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b90905160405180910390a283600160a060020a03167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25b5b505b505b505050565b336000600160a060020a03841663dd62ed3e8330846040516020015260405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b151561210957600080fd5b6102c65a03f1151561211a57600080fd5b505050604051805190509050610e3b8282868661119a565b5b50505050565b600081815260026020526040812060030154829060ff161561215a57600080fd5b6121638361151a565b15610e3e5760008381526002602081905260409182902060038101805460ff19166001908117909155815490820154919550600160a060020a03169290918501905180828054600181600116156101000203166002900480156122075780601f106121dc57610100808354040283529160200191612207565b820191906000526020600020905b8154815290600101906020018083116121ea57829003601f168201915b505091505060006040518083038185876187965a03f1925050501561225857827f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405160405180910390a2610e3e565b827f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405160405180910390a260038201805460ff191690555b5b5b5b505050565b80600160a060020a03811615156122b057600080fd5b30600160a060020a031633600160a060020a03161415156122d057600080fd5b6122d9826116dc565b81600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f193505050501515610f2157600080fd5b5b5b5b5050565b83600160a060020a03167f98c09d9949722bae4bd0d988d4050091c3ae7ec6d51d3c6bbfe4233593944e9e8385604051600160a060020a03909216825260208201526040908101905180910390a2600980546001019055600160a060020a038216600090815260056020526040902054151561245a57600180548082016123a48382612580565b916000526020600020900160005b8154600160a060020a038087166101009390930a8381029102199091161790915590506370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561242257600080fd5b6102c65a03f1151561243357600080fd5b5050506040518051600160a060020a03841660009081526005602052604090205550610e3b565b600160a060020a03821660009081526005602052604090208054840190555b5b50505050565b600083600160a060020a038116151561249857600080fd5b600454915060806040519081016040908152600160a060020a038716825260208083018790528183018690526000606084018190528581526002909152208151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03919091161781556020820151816001015560408201518160020190805161252492916020019061266d565b506060820151600391909101805460ff191691151591909117905550600480546001019055817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405160405180910390a25b5b509392505050565b815481835581811511610e3e57600083815260209020610e3e9181019083016126ec565b5b505050565b60206040519081016040526000815290565b828054828255906000526020600020908101928215612620579160200282015b82811115612620578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0391909116178255602092909201916001909101906125dc565b5b5061262d92915061270d565b5090565b815481835581811511610e3e57600083815260209020610e3e9181019083016126ec565b5b505050565b60206040519081016040526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106126ae57805160ff19168380011785556126db565b828001600101855582156126db579182015b828111156126db5782518255916020019190600101906126c0565b5b5061262d9291506126ec565b5090565b610f8b91905b8082111561262d57600081556001016126f2565b5090565b90565b610f8b91905b8082111561262d57805473ffffffffffffffffffffffffffffffffffffffff19168155600101612713565b5090565b905600a165627a7a723058200786c077331fb9b692c0f2a7255efbc0c5d18913e1e95b4e28e8fb5cc1d324930029";
+
+ private MultiSigTokenWallet(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
+ super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit);
+ }
+
+ private MultiSigTokenWallet(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
+ super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit);
+ }
+
+ public List
+ * Do not modify!
+ * Please use the web3j command line tools, or {@link org.web3j.codegen.SolidityFunctionWrapperGenerator} to update.
+ *
+ *